/* ============================================
   初中数理化中考冲刺学习系统 - 全局样式
   薛老师网校 xuelaoshi.cn
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --success: #10B981;
    --success-light: #D1FAE5;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    
    --bg: #F0F2F7;
    --bg-card: #FFFFFF;
    --bg-dark: #1E293B;
    
    --text: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
    --shadow-xl: 0 25px 50px rgba(0,0,0,0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px;
    padding-top: 60px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ 顶部导航 ============ */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: 60px;
}

.header-inner {
    max-width: 768px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.logo-text {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--bg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.header-btn:hover, .header-btn:active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-icon { font-size: 16px; }
.btn-label { display: none; }

@media (min-width: 480px) {
    .btn-label { display: inline; }
}

/* ============ 主容器 ============ */
.main-content {
    max-width: 768px;
    margin: 0 auto;
    padding: 16px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============ 底部导航 ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
}

.nav-item .nav-icon {
    font-size: 22px;
    transition: var(--transition);
}

.nav-item.active .nav-icon {
    transform: scale(1.15);
}

.nav-item:active .nav-icon {
    transform: scale(0.9);
}

/* ============ 卡片 ============ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card:active {
    transform: scale(0.985);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-primary {
    background: var(--info-light);
    color: var(--info);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* ============ 首页横幅 ============ */
.hero-banner {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 30%, #8B5CF6 60%, #6366F1 100%);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: float 5s ease-in-out infinite reverse;
}

.hero-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 500;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.hero-desc {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 16px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-size: 24px;
    font-weight: 900;
}

.hero-stat-label {
    font-size: 11px;
    opacity: 0.8;
}

/* ============ 科目卡片 ============ */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.subject-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.subject-card:active {
    transform: scale(0.95);
}

.subject-card .subject-icon {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
    transition: var(--transition);
}

.subject-card:hover .subject-icon {
    transform: scale(1.15) rotate(-5deg);
}

.subject-card .subject-name {
    font-size: 16px;
    font-weight: 700;
}

.subject-card .subject-count {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.subject-card.math { border-color: #E0E7FF; }
.subject-card.math:hover { border-color: #4F46E5; background: #F8FAFF; }
.subject-card.physics { border-color: #D1FAE5; }
.subject-card.physics:hover { border-color: #10B981; background: #FAFFFA; }
.subject-card.chemistry { border-color: #FEE2E2; }
.subject-card.chemistry:hover { border-color: #EF4444; background: #FFF5F5; }

/* ============ 功能入口 ============ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-card:active {
    transform: scale(0.97);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.feature-icon.blue { background: #EFF6FF; }
.feature-icon.green { background: #ECFDF5; }
.feature-icon.red { background: #FEF2F2; }
.feature-icon.orange { background: #FFF7ED; }
.feature-icon.purple { background: #F5F3FF; }
.feature-icon.yellow { background: #FFFBEB; }

.feature-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.feature-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============ 知识点列表 ============ */
.topic-list {
    list-style: none;
}

.topic-item {
    background: #fff;
    border-radius: var(--radius);
    margin-bottom: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.topic-item:hover {
    box-shadow: var(--shadow);
}

.topic-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.topic-header:active {
    background: var(--bg);
}

.topic-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.topic-num {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.topic-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.topic-info span {
    font-size: 11px;
    color: var(--text-secondary);
}

.topic-arrow {
    font-size: 12px;
    color: var(--text-light);
    transition: var(--transition);
}

.topic-item.open .topic-arrow {
    transform: rotate(180deg);
}

.topic-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.topic-item.open .topic-content {
    max-height: 2000px;
    padding: 16px;
}

.topic-content p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.topic-content .formula-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--primary-dark);
    text-align: center;
    font-weight: 600;
}

.topic-content .key-point {
    background: #FFFBEB;
    border-left: 3px solid var(--warning);
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 12px;
    color: #92400E;
}

.topic-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(79,70,229,0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(79,70,229,0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 20px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 30px;
}

.btn-block {
    width: 100%;
}

/* ============ 题目样式 ============ */
.question-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.question-card.current {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
    animation: scaleIn 0.3s ease;
}

.question-number {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.question-type {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

.qtype-choice { background: #DBEAFE; color: #1D4ED8; }
.qtype-fill { background: #D1FAE5; color: #065F46; }
.qtype-tf { background: #FEF3C7; color: #92400E; }

.question-text {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 16px;
}

.options-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    user-select: none;
}

.option-item:hover {
    border-color: var(--primary-light);
    background: #F8FAFF;
}

.option-item:active {
    transform: scale(0.98);
}

.option-item.selected {
    border-color: var(--primary);
    background: #EEF2FF;
}

.option-item.correct {
    border-color: var(--success);
    background: #ECFDF5;
}

.option-item.wrong {
    border-color: var(--danger);
    background: #FEF2F2;
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    transition: var(--transition);
}

.option-item.selected .option-letter {
    background: var(--primary);
    color: #fff;
}

.option-item.correct .option-letter {
    background: var(--success);
    color: #fff;
}

.option-item.wrong .option-letter {
    background: var(--danger);
    color: #fff;
}

/* 解析区域 */
.answer-reveal {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius);
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    display: none;
}

.answer-reveal.show {
    display: block;
    animation: scaleIn 0.3s ease;
}

.answer-label {
    font-weight: 700;
    font-size: 13px;
    color: #92400E;
    margin-bottom: 6px;
}

.answer-text {
    font-size: 14px;
    color: #78350F;
    line-height: 1.7;
}

/* ============ 进度条 ============ */
.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, var(--primary), #8B5CF6);
}

.progress-fill.green {
    background: linear-gradient(90deg, var(--success), #34D399);
}

.progress-fill.orange {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

/* ============ 统计数字 ============ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.stat-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-num {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-num.green {
    background: linear-gradient(135deg, #10B981, #34D399);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-num.red {
    background: linear-gradient(135deg, #EF4444, #F87171);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ============ 科目选择器 ============ */
.subject-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.subject-tabs::-webkit-scrollbar { display: none; }

.subject-tab {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    border: 2px solid var(--border);
    background: #fff;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.subject-tab:hover {
    border-color: var(--primary-light);
}

.subject-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(79,70,229,0.3);
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* ============ 弹窗 ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.modal h2 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 8px;
}

.modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal .modal-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ============ 结果页 ============ */
.result-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

.result-score {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin: 16px 0;
}

.result-grade {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.result-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.result-detail-item {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px 8px;
    text-align: center;
}

.result-detail-item .detail-num {
    font-size: 22px;
    font-weight: 700;
}

.result-detail-item .detail-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============ 联系页 ============ */
.contact-hero {
    background: linear-gradient(135deg, #1E293B, #334155);
    border-radius: var(--radius-xl);
    padding: 40px 24px;
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.contact-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 900;
    border: 3px solid rgba(255,255,255,0.3);
}

.contact-hero h2 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 4px;
}

.contact-hero .contact-subtitle {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 20px;
}

.contact-hero .contact-phone {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
}

.contact-hero .contact-phone a {
    color: #fff;
    text-decoration: none;
}

.contact-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.contact-feature {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.contact-feature .cf-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.contact-feature h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-feature p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============ 搜索框 ============ */
.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: #fff;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}

/* ============ 浮动按钮 ============ */
.float-call-btn {
    position: fixed;
    bottom: 90px;
    right: 16px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(16,185,129,0.4);
    animation: pulse 2s infinite;
}

.float-consult-btn {
    position: fixed;
    bottom: 155px;
    right: 16px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7C3AED);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(79,70,229,0.4);
    animation: pulse 2.5s infinite;
}

/* ============ 标签 ============ */
.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin: 2px 4px;
}

.tag-primary { background: #EEF2FF; color: #4F46E5; }
.tag-success { background: #ECFDF5; color: #059669; }
.tag-danger { background: #FEF2F2; color: #DC2626; }
.tag-warning { background: #FFFBEB; color: #D97706; }

/* ============ 分页/导航按钮 ============ */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

/* ============ 分割线 ============ */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ 倒计时 ============ */
.countdown-bar {
    background: #fff;
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.countdown-label {
    font-size: 13px;
    font-weight: 600;
}

.countdown-timer {
    font-size: 18px;
    font-weight: 900;
    color: var(--danger);
}

/* ============ 响应式 ============ */
@media (min-width: 768px) {
    .main-content {
        padding: 24px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .subjects-grid {
        gap: 16px;
    }
    
    .subject-card {
        padding: 28px 16px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .question-card {
        padding: 28px;
    }
    
    .hero-banner {
        padding: 40px 32px;
    }
}

@media (min-width: 1024px) {
    .main-content {
        max-width: 960px;
    }
}

/* ============ 滚动条美颜 ============ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

/* ============ 选择文本颜色 ============ */
::selection {
    background: rgba(79,70,229,0.2);
    color: var(--primary-dark);
}

/* ============ 考试页专用样式 ============ */

/* 考试倒计时栏 */
.exam-countdown-bar {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: linear-gradient(135deg, #1E293B, #334155);
    color: #fff;
    border: none;
    transition: background 0.5s ease;
}

.exam-countdown-bar.warning {
    background: linear-gradient(135deg, #92400E, #D97706);
}

.exam-countdown-bar.danger {
    background: linear-gradient(135deg, #991B1B, #DC2626);
    animation: pulseWarning 1s infinite;
}

@keyframes pulseWarning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* 题目导航器 */
.exam-nav {
    position: sticky;
    top: 106px;
    z-index: 99;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.exam-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.exam-nav-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.exam-nav-dots {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
    flex: 1;
}

.exam-nav-dots::-webkit-scrollbar { display: none; }

.exam-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
    user-select: none;
}

.exam-dot:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    transform: scale(1.1);
}

.exam-dot.answered {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.exam-dot.correct {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.exam-dot.wrong {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.exam-dot.unanswered {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #94A3B8;
}

/* 键盘提示 kbd 标签 */
kbd {
    display: inline;
}

/* ============ 键盘快捷键提示 ============ */
.kb-hint {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
    font-family: monospace;
}

.option-item:hover .kb-hint {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============ 暗色模式 ============ */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F172A;
        --bg-card: #1E293B;
        --bg-dark: #0F172A;
        --text: #F1F5F9;
        --text-secondary: #94A3B8;
        --text-light: #64748B;
        --border: #334155;
    }
    
    .top-header { background: rgba(15,23,42,0.85); }
    .bottom-nav { background: rgba(15,23,42,0.9); }
    .top-header, .bottom-nav { border-color: var(--border); }
    
    .subject-card { background: var(--bg-card); }
    .feature-card { background: var(--bg-card); }
    .question-card { background: var(--bg-card); }
    .card { background: var(--bg-card); }
    .topic-item { background: var(--bg-card); }
    .topic-content { background: #0F172A; }
    .header-btn { background: #334155; color: var(--text-secondary); }
    .search-input { background: #1E293B; color: var(--text); }
    .form-input { background: #1E293B; color: var(--text); border-color: var(--border); }
    .stat-box { background: var(--bg-card); }
    .auth-card { background: var(--bg-card); }
    .auth-form label { color: var(--text-secondary); }
    .message-item { background: var(--bg-card); border-color: var(--border); }
    .contact-feature { background: var(--bg-card); }
    .countdown-bar { background: var(--bg-card); }
    .exam-nav { background: var(--bg-card); border-color: var(--border); }
    .exam-nav-btn { background: var(--bg-card); border-color: var(--border); color: var(--text-secondary); }
    .exam-dot { background: var(--bg-card); border-color: var(--border); color: var(--text-secondary); }
    .exam-dot.unanswered { background: #1E293B; border-color: #475569; color: #64748B; }
    .subject-tab { background: var(--bg-card); }
    .answer-reveal { background: #1E293B; border-color: #475569; }
    .answer-label { color: #FBBF24; }
    .answer-text { color: #FDE68A; }
    .topic-content .formula-box { background: #0F172A; color: #A5B4FC; }
    .topic-content .key-point { background: #1E293B; color: #FDE68A; }
    .user-dropdown { background: #1E293B; border-color: var(--border); }
    .user-dropdown-header { background: #0F172A; border-color: var(--border); }
    .user-dropdown-links a { color: var(--text-secondary); }
    .user-dropdown-links a:hover { background: #0F172A; }
}

/* ============ 打印样式 ============ */
@media print {
    .top-header, .bottom-nav, .float-call-btn, .float-consult-btn { display: none !important; }
    body { padding: 0; }
    .main-content { max-width: 100%; }
    .question-card { break-inside: avoid; border: 1px solid #ccc; }
    .topic-content { max-height: none !important; display: block !important; }
    .topic-item.open .topic-content { max-height: none !important; }
}

/* ============================================
   认证系统样式（登录/注册/用户菜单）
   ============================================ */

/* 认证容器 */
.auth-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 28px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.auth-logo {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-bottom: 12px;
}

.auth-logo-icon {
    font-size: 48px;
    animation: float 3s ease-in-out infinite;
    display: inline-block;
}

.auth-title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
    color: #1E293B;
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: #64748B;
    margin-bottom: 24px;
}

.auth-form {
    margin-bottom: 16px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.required {
    color: #EF4444;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
}

select.form-input {
    cursor: pointer;
    appearance: auto;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 4px;
    display: block;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    padding: 12px 0 8px;
    margin-top: 4px;
    border-top: 1px solid #F1F5F9;
}

.auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.auth-alert-error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.auth-alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.auth-alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.auth-alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.auth-alert a {
    color: inherit;
    font-weight: 700;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F1F5F9;
}

.auth-footer p {
    font-size: 13px;
    color: #64748B;
    margin: 4px 0;
}

.auth-footer a {
    color: #4F46E5;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 注册按钮样式 */
.header-btn-register {
    background: linear-gradient(135deg, #4F46E5, #7C3AED) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.header-btn-register:hover,
.header-btn-register:active {
    background: linear-gradient(135deg, #4338CA, #6D28D9) !important;
    color: #fff !important;
}

/* 用户下拉菜单 */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.user-name-label {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline !important;
}

.user-arrow {
    font-size: 10px;
    margin-left: 2px;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 1100;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    animation: scaleIn 0.2s ease;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #F8FAFF;
    border-bottom: 1px solid #E2E8F0;
}

.user-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 700;
    color: #1E293B;
}

.user-dropdown-info {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 2px;
}

.user-dropdown-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    text-decoration: none;
    color: #334155;
    transition: all 0.15s ease;
}

.user-dropdown-links a:hover {
    background: #F8FAFF;
    color: #4F46E5;
}

.user-dropdown-links a.admin-link {
    border-top: 1px solid #F1F5F9;
    color: #7C3AED;
    font-weight: 600;
}

.user-dropdown-links a.logout-link {
    border-top: 1px solid #F1F5F9;
    color: #EF4444;
}

/* 留言列表样式 */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #E2E8F0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-time {
    font-size: 12px;
    color: #94A3B8;
}

.message-body {
    margin-bottom: 10px;
}

.message-body p {
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
}

.message-reply {
    background: #F0F4FF;
    border-radius: 10px;
    padding: 14px;
    border-left: 3px solid #4F46E5;
    margin-top: 8px;
}

.message-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #4F46E5;
}

.message-reply p {
    font-size: 13px;
    line-height: 1.7;
    color: #475569;
}

/* 游客保护提示浮层 */
.guest-overlay {
    position: relative;
}

.guest-guard {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.guest-guard-inner {
    text-align: center;
    padding: 20px;
}

.guest-guard-inner .lock-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.guest-guard-inner p {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 12px;
}

.guest-guard-inner a {
    color: #4F46E5;
    font-weight: 600;
    text-decoration: none;
}
