:root {
    --blue: #e9f3ff;
    --accent: #6aa9ff;
    --light: #e5e7eb;
    --text: #374151;
    --secondary: #9ca3af;
}

* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    margin: 0;
    padding: 0;
}

html {
    background: linear-gradient(180deg, #e9f3ff, #faf8f2) fixed;
    min-height: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.app {
    max-width: 520px;
    width: 100%;
    padding: 20px;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

h1 {
    text-align: center;
    margin: 0 0 16px 0;
    font-size: 26px;
    color: var(--text);
}

.intro {
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 16px;
}

.option-desc {
    background: var(--blue);
    padding: 12px;
    border-radius: 10px;
    color: var(--text);
    margin-bottom: 20px;
    font-size: 15px;
}

.center {
    text-align: center;
    margin-top: 20px;
}

button {
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    min-width: 120px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

button.secondary {
    background: var(--secondary);
}

.hidden {
    display: none;
}

/* 测试页 */
.section-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
}

.progress {
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.3s;
}

.question-index {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

#questionText {
    font-size: 20px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.4;
}

/* 序号样式由js添加的span控制，但这里也可以定义全局 */
.question-number {
    color: var(--accent);
    font-weight: 600;
    margin-right: 6px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.option {
    padding: 14px 16px;
    border: 1px solid var(--light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
    font-size: 16px;
}

.option.selected {
    border-color: var(--accent);
    background: #f0f7ff;
}

.nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.nav button {
    flex: 1;
    min-width: 0;
}

/* 结果页 */
.personality-type {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    letter-spacing: 4px;
    margin: 20px 0;
    line-height: 1.2;
}

.scores-chart {
    margin: 24px 0;
}

.dimension {
    margin-bottom: 18px;
}

.dim-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.bars {
    display: flex;
    height: 36px;
    background: #edf2f7;
    border-radius: 40px;
    overflow: hidden;
}

.bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    transition: width 0.3s;
    white-space: nowrap;
}

.i-bar, .s-bar, .f-bar, .p-bar {
    background: var(--accent);
}

.e-bar, .n-bar, .t-bar, .j-bar {
    background: #b3d0ff; /* 稍浅的accent */
}

.bar-label {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 40px;
    font-size: 12px;
}

.type-description,
.type-fields,
.type-careers {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid var(--accent);
    font-size: 15px;
    color: var(--text);
    line-height: 1.6;
}

.type-fields {
    border-left-color: var(--accent);
}

.type-careers {
    border-left-color: var(--accent);
}

.note {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 30px;
    text-align: center;
}

#restartBtn {
    background: var(--accent);
    margin-top: 10px;
}