:root {
    --ink: #16201a;
    --muted: #647066;
    --paper: #f6f1e6;
    --panel: rgba(255, 252, 243, 0.88);
    --line: rgba(22, 32, 26, 0.14);
    --shadow: 0 30px 80px rgba(45, 54, 44, 0.16);
    --accent: #9b6cff;
    --accent-deep: #6d45c4;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(155, 108, 255, 0.18), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(109, 69, 196, 0.12), transparent 30%),
        linear-gradient(135deg, #f8f0df 0%, #edf3e6 52%, #e7efe8 100%);
}

body::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(22, 32, 26, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 32, 26, 0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 82%);
}

.page-shell {
    width: min(800px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 100px;
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.back-link {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #6d45c4;
    border: 1px solid #6d45c4;
    border-radius: 999px;
    background: rgba(255, 252, 243, 0.72);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    flex-shrink: 0;
}

.back-link:hover,
.back-link:focus-visible {
    background: rgba(255, 252, 243, 0.92);
    outline: none;
}

.page-title {
    flex: 1;
    margin: 0;
    font-size: 1.8em;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
}

.progress-indicator {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-deep);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(155, 108, 255, 0.12);
}

.hidden { display: none !important; }

.quiz-container {
    position: relative;
}

.info-card,
.question-card,
.result-card {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.info-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 800;
}

.info-desc {
    font-size: 16px;
    line-height: 1.8;
    color: var(--ink);
    margin: 0 0 16px;
}

.info-list {
    padding-left: 20px;
    margin: 0 0 28px;
    color: var(--muted);
    line-height: 2;
}

.info-list b { color: var(--ink); }

.question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.question-num {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
}

.question-category {
    font-size: 13px;
    color: var(--accent-deep);
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(155, 108, 255, 0.12);
}

.question-text {
    font-size: 18px;
    line-height: 1.7;
    margin: 0 0 24px;
    font-weight: 600;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.option-item {
    padding: 16px 20px;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 180ms ease;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    text-align: left;
    font-family: inherit;
}

.option-item:hover {
    border-color: var(--accent);
    background: rgba(155, 108, 255, 0.08);
}

.option-item.selected {
    border-color: var(--accent);
    background: rgba(155, 108, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(155, 108, 255, 0.15);
}

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

.nav-row.center {
    justify-content: center;
}

.primary-btn {
    display: block;
    margin: 24px auto 0;
    padding: 12px 32px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 160ms ease;
    font-family: inherit;
}

.primary-btn:hover {
    background: var(--accent-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(109, 69, 196, 0.28);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ghost-btn {
    padding: 12px 28px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 160ms ease;
    font-family: inherit;
}

.ghost-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent);
}

.ghost-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.result-card {
    text-align: center;
}

.result-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 12px;
}

.result-desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--muted);
    margin: 0 0 24px;
}

.dimension-bars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
    text-align: left;
}

.dimension-item {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
}

.dimension-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dimension-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(22, 32, 26, 0.1);
    overflow: hidden;
    margin-bottom: 6px;
}

.dimension-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-deep));
    transition: width 600ms ease;
}

.dimension-level {
    font-size: 12px;
    color: var(--accent-deep);
    font-weight: 600;
}

.dimension-details {
    text-align: left;
    margin-bottom: 28px;
}

.detail-item {
    padding: 16px;
    border-radius: 14px;
    background: rgba(155, 108, 255, 0.08);
    margin-bottom: 12px;
    border-left: 4px solid var(--accent);
}

.detail-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--accent-deep);
}

.detail-level {
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(155, 108, 255, 0.2);
    color: var(--accent-deep);
}

.detail-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink);
    margin: 0;
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 28px, 640px);
        padding: 36px 0;
    }
    .info-card,
    .question-card,
    .result-card {
        padding: 24px 20px;
    }
    .dimension-bars {
        grid-template-columns: 1fr;
    }
}