* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #7C4DFF;
    --primary-light: #B388FF;
    --primary-dark: #5E35B1;
    --secondary: #FF6E7F;
    --bg-light: #F8F9FE;
    --bg-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-gray: #6B7B8D;
    --text-light: #A0AEC0;
    --border-light: #E2E8F0;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(124, 77, 255, 0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(145deg, #F0F2F8 0%, #E8ECF4 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--text-dark);
    line-height: 1.5;
}

.app-wrapper {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: 700px;
}

/* 付费推广条 */
.promo-banner {
    background: linear-gradient(135deg, #FFE9E9 0%, #FFF3E0 100%);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 107, 107, 0.15);
}

.promo-link {
    color: #E53E3E;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    letter-spacing: 0.3px;
    display: block;
}

.promo-link:hover {
    text-decoration: underline;
}

/* 页面切换 */
.page {
    display: none;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.page.active {
    display: block;
}

/* 封面页 */
.cover-content {
    padding: 40px 28px 36px;
    text-align: center;
}

.cover-badge {
    display: inline-block;
    background: linear-gradient(135deg, #E8E0FF 0%, #D8CCFF 100%);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 40px;
    margin-bottom: 28px;
    letter-spacing: 1px;
}

.cover-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.3;
    background: linear-gradient(135deg, #5E35B1 0%, #7C4DFF 50%, #B388FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.cover-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 32px;
    font-weight: 500;
    letter-spacing: 2px;
}

.cover-description {
    background: var(--bg-light);
    padding: 24px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    text-align: left;
}

.cover-description p {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.cover-description p:last-child {
    margin-bottom: 0;
}

.cover-rules {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-light);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-dark);
}

.rule-icon {
    font-size: 1.3rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 60px;
    font-size: 1.25rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(124, 77, 255, 0.3);
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(124, 77, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.cover-footer {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* 答题页 */
.quiz-header {
    padding: 20px 24px 0;
}

.progress-bar-container {
    height: 6px;
    background: var(--border-light);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.quiz-stats {
    text-align: right;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.quiz-content {
    padding: 28px 24px 20px;
    min-height: 420px;
}

.question-text {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 32px;
    color: var(--text-dark);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-dark);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.option-item:hover {
    background: #EDE7F6;
}

.option-item.selected {
    background: linear-gradient(135deg, #F3E5F5 0%, #E1D5F5 100%);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.2);
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px 28px;
    gap: 16px;
}

.btn-nav {
    flex: 1;
    background: white;
    border: 1.5px solid var(--border-light);
    padding: 16px 0;
    border-radius: 60px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-nav:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: #F8F4FF;
}

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

/* 结果页 */
.result-content {
    padding: 32px 24px 36px;
}

.result-header {
    text-align: center;
    margin-bottom: 28px;
}

.result-badge {
    display: inline-block;
    background: var(--bg-light);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 40px;
    margin-bottom: 16px;
}

.result-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.result-tagline {
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: 500;
}

.result-scores {
    background: var(--bg-light);
    padding: 20px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 28px;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.score-row:last-child {
    margin-bottom: 0;
}

.score-label {
    width: 75px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.score-bar-bg {
    flex: 1;
    height: 10px;
    background: #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.score-bar-fill.e { background: #4CAF50; }
.score-bar-fill.f { background: #FF9800; }
.score-bar-fill.d { background: #F44336; }
.score-bar-fill.r { background: #2196F3; }

.score-value {
    width: 35px;
    text-align: right;
    font-weight: 700;
    color: var(--text-dark);
}

.result-analysis {
    margin-bottom: 32px;
}

.analysis-section {
    margin-bottom: 24px;
}

.analysis-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.analysis-text {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 0.95rem;
    padding-left: 6px;
    border-left: 3px solid var(--primary-light);
    padding-left: 16px;
}

.suggestions-list {
    list-style: none;
    padding-left: 6px;
}

.suggestions-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

.suggestions-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.result-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    flex: 1;
    background: white;
    border: 1.5px solid var(--border-light);
    padding: 16px 0;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: #F8F4FF;
}

/* 移动端适配 */
@media (max-width: 400px) {
    .cover-title {
        font-size: 2rem;
    }
    .question-text {
        font-size: 1.2rem;
    }
    .option-item {
        padding: 16px 16px;
    }
}