/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1a2e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 页面切换 */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* ==================== 按钮样式 ==================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 14px 32px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-large {
    padding: 20px 48px;
    font-size: 18px;
    border-radius: var(--radius-xl);
}

.btn-start {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-start:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

.btn-icon {
    font-size: 24px;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.brain-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-light);
}

/* ==================== 英雄区域 ==================== */
.hero {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-note {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 16px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brain-animation {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

.circle-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.circle-2 {
    width: 75%;
    height: 75%;
    animation-delay: 0.5s;
}

.circle-3 {
    width: 50%;
    height: 50%;
    animation-delay: 1s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.5;
    }
}

.brain-icon-large {
    font-size: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==================== 特点区域 ==================== */
.features {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== 测试说明 ==================== */
.test-info {
    padding: 80px 0;
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.info-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.info-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-chart h3 {
    margin-bottom: 24px;
    font-size: 20px;
}

.iq-chart {
    position: relative;
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
}

.chart-bar {
    position: absolute;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.chart-bar:nth-child(1) { background: #ef4444; }
.chart-bar:nth-child(2) { background: #f97316; }
.chart-bar:nth-child(3) { background: #10b981; }
.chart-bar:nth-child(4) { background: #3b82f6; }
.chart-bar:nth-child(5) { background: #8b5cf6; }

.bar-label {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
}

/* ==================== 测试页面 ==================== */
.test-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 24px;
}

.test-progress {
    flex: 1;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

.progress-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.test-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.timer-icon {
    font-size: 20px;
}

.timer-warning {
    color: var(--danger-color);
    animation: pulse 1s ease-in-out infinite;
}

/* ==================== 题目区域 ==================== */
.question-area {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.question-category {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.question-number {
    color: var(--text-muted);
    font-size: 14px;
}

.question-content {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.question-image {
    text-align: center;
    margin: 24px 0;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-image svg {
    max-width: 100%;
    max-height: 300px;
}

/* ==================== 选项区域 ==================== */
.options-area {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

.option-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.option-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.option-item.selected {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.option-item.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.option-item.incorrect {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.option-label {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.option-item.selected .option-label {
    background: var(--primary-color);
}

.option-item.correct .option-label {
    background: var(--success-color);
}

.option-item.incorrect .option-label {
    background: var(--danger-color);
}

.option-text {
    font-size: 16px;
}

/* ==================== 测试按钮 ==================== */
.test-buttons {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.test-buttons button {
    flex: 1;
}

/* ==================== 结果页面 ==================== */
.result-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

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

.result-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.iq-score-display {
    text-align: center;
    margin-bottom: 60px;
}

.score-circle {
    width: 280px;
    height: 280px;
    margin: 0 auto 32px;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(20px);
}

.score-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--primary-color);
    position: relative;
}

.score-number {
    font-size: 72px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-label {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 8px;
}

.score-category {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-light);
}

.score-description {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ==================== 详细分析 ==================== */
.result-details {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.details-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.detail-item {
    text-align: center;
}

.detail-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-light);
}

/* ==================== 能力分析 ==================== */
.ability-analysis {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.ability-bars {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ability-item {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    align-items: center;
    gap: 16px;
}

.ability-label {
    font-weight: 600;
}

.ability-bar {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
}

.ability-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    transition: width 0.5s ease;
}

.ability-score {
    font-weight: 700;
    text-align: right;
}

/* ==================== 结果操作按钮 ==================== */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.result-actions button {
    min-width: 160px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .hero .container,
    .info-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .hero-visual {
        order: -1;
    }

    .brain-animation {
        width: 240px;
        height: 240px;
    }

    .brain-icon-large {
        font-size: 80px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        display: none;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .test-header {
        flex-direction: column;
        align-items: stretch;
    }

    .question-content {
        font-size: 18px;
    }

    .score-circle {
        width: 220px;
        height: 220px;
    }

    .score-number {
        font-size: 56px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 24px;
    }

    .result-title {
        font-size: 32px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .ability-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .result-actions {
        flex-direction: column;
    }
}
