/* ========================================
   生物冲刺 - 专业版样式 v3.0
   对标：百词斩 / 墨墨背单词 / Anki
   ======================================== */

/* ========== 设计令牌 ========== */
:root {
    /* 主色调 - 生物绿系 */
    --color-primary-50: #f0fdf4;
    --color-primary-100: #dcfce7;
    --color-primary-200: #bbf7d0;
    --color-primary-300: #86efac;
    --color-primary-400: #4ade80;
    --color-primary-500: #22c55e;
    --color-primary-600: #16a34a;
    --color-primary-700: #15803d;
    --color-primary-800: #166534;
    --color-primary-900: #14532d;

    /* 强调色 - 活力橙 */
    --color-accent-50: #fff7ed;
    --color-accent-100: #ffedd5;
    --color-accent-200: #fed7aa;
    --color-accent-300: #fdba74;
    --color-accent-400: #fb923c;
    --color-accent-500: #f97316;
    --color-accent-600: #ea580c;
    --color-accent-700: #c2410c;
    --color-accent-800: #9a3412;
    --color-accent-900: #7c2d12;

    /* 功能色 */
    --color-success: #22c55e;
    --color-success-bg: #f0fdf4;
    --color-error: #ef4444;
    --color-error-bg: #fef2f2;
    --color-warning: #f59e0b;
    --color-warning-bg: #fffbeb;
    --color-info: #3b82f6;
    --color-info-bg: #eff6ff;

    /* 紫色系 */
    --color-purple-500: #a855f7;
    --color-purple-600: #9333ea;

    /* 中性色 */
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-400: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-600: #475569;
    --color-gray-700: #334155;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* 文本色 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.25);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* 间距 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 底部导航高度 */
    --nav-height: 64px;
    --nav-height-safe: calc(64px + env(safe-area-inset-bottom, 0px));
}

/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-size: 14px;
    line-height: 1.5;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--color-gray-200);
    border-radius: 4px;
}

::selection {
    background: rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
}

/* ========== 装饰背景 ========== */
.app-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: -1;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 30%, #fff7ed 100%);
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.bg-blob-1 {
    width: 300px;
    height: 300px;
    background: var(--color-primary-400);
    top: -100px;
    right: -80px;
    animation: float1 8s ease-in-out infinite;
}

.bg-blob-2 {
    width: 250px;
    height: 250px;
    background: var(--color-accent-300);
    top: 30%;
    left: -60px;
    animation: float2 10s ease-in-out infinite;
}

.bg-blob-3 {
    width: 280px;
    height: 280px;
    background: var(--color-purple-500);
    opacity: 0.2;
    bottom: 10%;
    right: -40px;
    animation: float3 12s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 40px) scale(1.1); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.05); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -40px) scale(1.08); }
}

/* ========== 主容器 ========== */
.app-container {
    position: relative;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: var(--nav-height-safe);
    overflow-x: hidden;
}

/* ========== 顶部状态栏 ========== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.logo-mark svg {
    width: 22px;
    height: 22px;
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.logo-text {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-accent-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-level {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-primary-600);
    background: var(--color-primary-50);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.streak-badge, .xp-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xs);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.streak-badge {
    color: var(--color-accent-600);
    background: var(--color-accent-50);
}

.streak-icon {
    width: 14px;
    height: 14px;
}

.xp-badge {
    color: var(--color-primary-700);
    background: var(--color-primary-50);
}

.xp-icon {
    width: 14px;
    height: 14px;
}

/* ========== 视图切换 ========== */
.view {
    display: none;
    animation: view-in 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes view-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 首页 ========== */
.home-hero {
    padding: 24px 20px 8px;
    text-align: center;
    position: relative;
}

.hero-illustration {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    position: relative;
    animation: dna-bounce 3s ease-in-out infinite;
}

@keyframes dna-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

.dna-icon {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 16px rgba(34, 197, 94, 0.25));
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(34,197,94,0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero-greeting {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    font-weight: 500;
}

.hero-title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-accent-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ========== 每日目标卡片 ========== */
.daily-card {
    margin: 20px 20px 0;
    background: white;
    border-radius: var(--radius-xl);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.daily-card:active {
    transform: scale(0.98);
}

.daily-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-accent-500));
}

.daily-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.daily-icon-wrap svg {
    width: 24px;
    height: 24px;
}

.daily-main {
    flex: 1;
    min-width: 0;
}

.daily-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 2px;
}

.daily-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.daily-count {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.daily-unit {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.daily-goal-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-accent-600);
    background: var(--color-accent-50);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.daily-goal-badge svg {
    width: 12px;
    height: 12px;
}

.daily-progress-track {
    height: 6px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
}

.daily-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-accent-500));
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.daily-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.daily-arrow {
    flex-shrink: 0;
    color: var(--text-tertiary);
    width: 20px;
    height: 20px;
}

.daily-arrow svg {
    width: 20px;
    height: 20px;
}

/* ========== 数据概览卡 ========== */
.stats-row {
    display: flex;
    gap: 10px;
    padding: 16px 20px 0;
}

.stat-mini-card {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    padding: 12px;
    text-align: center;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-mini-card:active {
    transform: scale(0.96);
}

.stat-mini-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 6px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-mini-icon svg {
    width: 16px;
    height: 16px;
}

.icon-blue { background: var(--color-info-bg); color: var(--color-info); }
.icon-red { background: var(--color-error-bg); color: var(--color-error); }
.icon-purple { background: #faf5ff; color: var(--color-purple-600); }

.stat-mini-num {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-mini-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 1px;
}

/* ========== 分区标题 ========== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px 12px;
}

.section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
}

.section-more {
    font-size: 13px;
    color: var(--color-primary-600);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
}

.section-more svg {
    width: 14px;
    height: 14px;
}

/* ========== 模式卡片 ========== */
.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 20px;
}

.mode-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 14px;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.mode-card:active {
    transform: scale(0.96);
}

.mode-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.mode-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.icon-challenge {
    background: linear-gradient(135deg, var(--color-accent-500), var(--color-error));
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.icon-practice {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.icon-memory {
    background: linear-gradient(135deg, var(--color-purple-500), var(--color-purple-600));
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3);
}

.icon-mistakes {
    background: linear-gradient(135deg, var(--color-error), #be123c);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.mode-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.mode-desc {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* 闯关特色卡片 */
.mode-card-featured {
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #fff7ed, #fef2f2);
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.mode-card-featured .mode-icon-wrap {
    width: 56px;
    height: 56px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.mode-card-featured .mode-icon-wrap svg {
    width: 28px;
    height: 28px;
}

.mode-card-featured .mode-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.mode-card-featured .mode-card-info {
    flex: 1;
}

.mode-badge-hot {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: var(--color-error);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-bottom: 4px;
}

.mode-badge-hot svg {
    width: 10px;
    height: 10px;
}

.mode-card-featured .mode-title {
    font-size: 17px;
    margin-bottom: 2px;
}

.mode-card-featured .mode-desc {
    font-size: 12px;
}

.mode-score-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.mode-score-row svg {
    width: 14px;
    height: 14px;
    color: var(--color-warning);
}

.mode-score-row b {
    color: var(--color-accent-600);
    font-weight: 800;
}

/* ========== 章节横向滚动 ========== */
.chapter-scroll {
    display: flex;
    gap: 12px;
    padding: 0 20px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.chapter-scroll::-webkit-scrollbar {
    display: none;
}

.chapter-card {
    flex-shrink: 0;
    width: 140px;
    background: white;
    border-radius: var(--radius-xl);
    padding: 14px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.chapter-card:active {
    transform: scale(0.96);
}

.chapter-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.chapter-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
    height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chapter-card-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    font-weight: 500;
}

.chapter-card-info span:last-child {
    color: var(--color-primary-600);
    font-weight: 700;
}

.chapter-card-progress {
    height: 4px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.chapter-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-accent-500));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* ========== 打卡日历 ========== */
.calendar-card {
    margin: 0 20px 20px;
    background: white;
    border-radius: var(--radius-xl);
    padding: 16px;
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

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

.calendar-header > span:first-child {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-tertiary);
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
}

.legend-dot-done { background: var(--color-primary-500); }
.legend-dot-today { background: var(--color-accent-500); }

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    transition: all var(--transition-base);
}

.calendar-day.weekday-label {
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 10px;
    aspect-ratio: auto;
    padding: 2px 0;
}

.calendar-day.active {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--color-accent-500), var(--color-error));
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.calendar-day.today.active {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.calendar-day.empty {
    visibility: hidden;
}

/* ========== 章节列表页 ========== */
.chapter-list-page {
    padding: 0 20px;
}

.chapter-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid rgba(0,0,0,0.04);
}

.chapter-list-item:active {
    transform: scale(0.98);
    background: var(--color-gray-50);
}

.chapter-list-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chapter-list-info {
    flex: 1;
    min-width: 0;
}

.chapter-list-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.chapter-list-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}

.chapter-list-bar {
    height: 4px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.chapter-list-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-600));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.chapter-list-arrow {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* ========== 返回按钮 ========== */
.quiz-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.back-btn:active {
    transform: scale(0.9);
    background: var(--color-gray-200);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.quiz-progress-section {
    flex: 1;
    min-width: 0;
}

.quiz-progress-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.quiz-progress-num .current {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.progress-track {
    height: 4px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-accent-500));
    border-radius: var(--radius-full);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-score-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
    color: var(--color-accent-600);
    background: var(--color-accent-50);
    padding: 6px 10px;
    border-radius: var(--radius-full);
    font-size: 14px;
    flex-shrink: 0;
}

.score-star-icon {
    width: 14px;
    height: 14px;
}

/* ========== 闯关状态栏 ========== */
.game-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin: 8px 20px 0;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.combo-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.combo-fire {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(249, 115, 22, 0.3));
}

.combo-text-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.combo-number {
    font-size: 20px;
    font-weight: 900;
    color: var(--color-accent-600);
}

.combo-text {
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.combo-bump {
    animation: combo-bump 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes combo-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.lives-section {
    display: flex;
    gap: 4px;
}

.heart-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.3));
}

.heart-icon.lost {
    opacity: 0.2;
    filter: grayscale(1);
}

/* ========== 题目卡片 ========== */
.question-card {
    margin: 16px 20px;
    background: white;
    border-radius: var(--radius-2xl);
    padding: 24px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    animation: card-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.question-card.shake {
    animation: card-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes card-shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

.question-type-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 14px;
}

.question-text {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* ========== 选项 ========== */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: left;
    position: relative;
}

.option-btn:active {
    transform: scale(0.98);
}

.option-btn:hover {
    background: var(--color-gray-100);
}

.option-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--color-gray-200);
    transition: all var(--transition-base);
}

.option-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
}

.option-btn.correct {
    background: var(--color-success-bg);
    border-color: var(--color-success);
}

.option-btn.correct .option-letter {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.option-btn.wrong {
    background: var(--color-error-bg);
    border-color: var(--color-error);
}

.option-btn.wrong .option-letter {
    background: var(--color-error);
    border-color: var(--color-error);
    color: white;
}

/* 多选题 */
.multi-option .option-check {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transition: all var(--transition-base);
    color: white;
    background: var(--color-gray-400);
}

.multi-option.selected {
    background: var(--color-primary-50);
    border-color: var(--color-primary-500);
}

.multi-option.selected .option-letter {
    background: var(--color-primary-500);
    border-color: var(--color-primary-500);
    color: white;
}

.multi-option.selected .option-check {
    background: var(--color-primary-500);
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.multi-option.correct .option-check {
    background: var(--color-success);
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.multi-option.wrong .option-check {
    background: var(--color-error);
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* 判断题特殊样式 */
.question-card.judge-type .options-container {
    flex-direction: row;
    gap: 12px;
}

.question-card.judge-type .option-btn {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    gap: 8px;
    text-align: center;
}

.question-card.judge-type .option-letter {
    width: 56px;
    height: 56px;
    font-size: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--color-gray-200);
}

.question-card.judge-type .option-btn:nth-child(1) .option-letter {
    color: var(--color-success);
}

.question-card.judge-type .option-btn:nth-child(2) .option-letter {
    color: var(--color-error);
}

.question-card.judge-type .option-btn.correct {
    background: var(--color-success-bg);
    border-color: var(--color-success);
}

.question-card.judge-type .option-btn.correct .option-letter {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.question-card.judge-type .option-btn.wrong {
    background: var(--color-error-bg);
    border-color: var(--color-error);
}

.question-card.judge-type .option-btn.wrong .option-letter {
    background: var(--color-error);
    border-color: var(--color-error);
    color: white;
}

/* ========== 填空题 ========== */
.fill-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fill-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fill-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.fill-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 500;
    background: var(--bg-secondary);
    transition: all var(--transition-base);
    font-family: inherit;
    outline: none;
}

.fill-input:focus {
    border-color: var(--color-primary-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.fill-input.correct {
    border-color: var(--color-success);
    background: var(--color-success-bg);
    color: var(--color-success);
    font-weight: 700;
}

.fill-input.wrong {
    border-color: var(--color-error);
    background: var(--color-error-bg);
    color: var(--color-error);
}

.fill-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
    color: white;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
    transition: all var(--transition-base);
}

.fill-submit-btn:active {
    transform: scale(0.98);
}

@keyframes btn-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: btn-shake 0.4s ease;
}

/* ========== 解析面板 ========== */
.explanation-panel {
    margin: 0 20px 16px;
    background: white;
    border-radius: var(--radius-xl);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    animation: slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.explanation-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explanation-icon svg {
    width: 22px;
    height: 22px;
}

.explanation-icon.correct {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.explanation-icon.wrong {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.explanation-info {
    flex: 1;
}

.explanation-status {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.explanation-status.correct { color: var(--color-success); }
.explanation-status.wrong { color: var(--color-error); }

.explanation-correct-answer {
    padding: 12px 14px;
    background: var(--color-gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.explanation-correct-answer .label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    font-weight: 500;
}

.explanation-correct-answer .value {
    font-weight: 700;
    color: var(--color-primary-700);
    font-size: 14px;
}

.explanation-detail {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(34, 197, 94, 0.06));
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.exp-detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--color-primary-600);
    font-size: 13px;
    font-weight: 600;
}

.exp-detail-header svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.exp-detail-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: justify;
}

.next-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
    color: white;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.next-btn svg {
    width: 18px;
    height: 18px;
}

.next-btn:active {
    transform: scale(0.98);
}

.fade-in {
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 结果页 ========== */
.result-container {
    padding: 20px;
    text-align: center;
    animation: result-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes result-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-illustration {
    width: 120px;
    height: 120px;
    margin: 20px auto 16px;
    position: relative;
}

.result-illustration svg {
    width: 100%;
    height: 100%;
}

#resultRing {
    transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-accent-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-subtitle {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
    font-weight: 500;
}

.score-ring-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
}

.score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: var(--color-gray-100);
    stroke-width: 10;
}

.score-ring-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 502;
    stroke-dashoffset: 502;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.score-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-percent {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-accent-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-percent-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
    font-weight: 500;
}

.result-stats-grid {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.result-stat-card {
    flex: 1;
    background: white;
    border-radius: var(--radius-xl);
    padding: 14px 10px;
    text-align: center;
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.result-stat-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-stat-icon svg {
    width: 18px;
    height: 18px;
}

.result-stat-icon.success { background: var(--color-success-bg); color: var(--color-success); }
.result-stat-icon.error { background: var(--color-error-bg); color: var(--color-error); }
.result-stat-icon.xp { background: var(--color-accent-50); color: var(--color-accent-600); }

.result-stat-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.result-stat-card:nth-child(1) .result-stat-num { color: var(--color-success); }
.result-stat-card:nth-child(2) .result-stat-num { color: var(--color-error); }
.result-stat-card:nth-child(3) .result-stat-num { color: var(--color-accent-600); }

.result-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.xp-gained {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(249,115,22,0.08));
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.xp-gained svg {
    width: 16px;
    height: 16px;
    color: var(--color-accent-500);
}

.xp-gained-num {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-accent-600);
}

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

.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 700;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.action-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--color-gray-200);
}

.action-btn:active {
    transform: scale(0.97);
}

/* ========== 记忆模式 ========== */
.memory-cat-bar {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.memory-cat-bar::-webkit-scrollbar { display: none; }

.memory-cat-pill {
    flex-shrink: 0;
    padding: 8px 16px;
    background: white;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.memory-cat-pill.active {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.flashcard-wrapper {
    padding: 16px 20px;
    perspective: 1000px;
    height: 320px;
}

.flashcard {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-2xl);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.flashcard-front {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.flashcard-back {
    background: linear-gradient(135deg, #f0fdf4, #fff7ed);
    transform: rotateY(180deg);
    border: 1px solid rgba(34, 197, 94, 0.1);
}

.card-category-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    align-self: flex-start;
    margin-bottom: 16px;
}

.card-front-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-question-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 24px;
}

.card-flip-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.card-back-content {
    flex: 1;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    padding-right: 4px;
}

.card-back-content p { margin-bottom: 10px; }
.card-back-content p:last-child { margin-bottom: 0; }

.card-back-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 11px;
}

.card-back-content th,
.card-back-content td {
    border: 1px solid var(--color-gray-200);
    padding: 6px 8px;
    text-align: left;
    background: white;
}

.card-back-content th {
    background: var(--color-gray-50);
    font-weight: 700;
    color: var(--text-primary);
}

.card-back-content h2,
.card-back-content h3 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 14px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--color-primary-200);
}

.card-back-content h2:first-child,
.card-back-content h3:first-child {
    margin-top: 0;
}

.card-back-content ul,
.card-back-content ol {
    margin: 8px 0;
    padding-left: 18px;
}

.card-back-content li {
    margin-bottom: 4px;
}

.card-back-content strong {
    color: var(--color-primary-700);
    font-weight: 700;
}

.card-progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 12px;
}

.card-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-purple-500), var(--color-primary-500));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.card-progress-text {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    flex-shrink: 0;
}

.card-progress-text b {
    color: var(--text-primary);
    font-weight: 700;
}

.memory-rating {
    display: flex;
    gap: 6px;
    padding: 0 20px 16px;
}

.rating-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 4px;
    border-radius: var(--radius-lg);
    background: white;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.rating-btn:active {
    transform: scale(0.92);
}

.rating-btn-icon {
    width: 24px;
    height: 24px;
}

.rating-btn span {
    font-size: 11px;
    font-weight: 600;
}

.rating-btn.again { color: var(--color-error); }
.rating-btn.hard { color: var(--color-warning); }
.rating-btn.good { color: var(--color-success); }
.rating-btn.easy { color: var(--color-accent-600); }

.memory-progress-stats {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.mem-stat-card {
    flex: 1;
    background: white;
    border-radius: var(--radius-xl);
    padding: 14px 8px;
    text-align: center;
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.mem-stat-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mem-stat-icon svg { width: 16px; height: 16px; }

.mem-stat-icon.mastered { background: var(--color-success-bg); color: var(--color-success); }
.mem-stat-icon.learning { background: var(--color-info-bg); color: var(--color-info); }
.mem-stat-icon.new { background: var(--color-gray-100); color: var(--text-tertiary); }

.mem-stat-num {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mem-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ========== 错题本 ========== */
.wrongbook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.wrongbook-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.wrongbook-count b {
    color: var(--color-error);
    font-weight: 800;
    font-size: 18px;
}

.wrongbook-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--color-error), #be123c);
    color: white;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
    transition: all var(--transition-base);
}

.wrongbook-action-btn svg { width: 14px; height: 14px; }

.wrongbook-action-btn:active {
    transform: scale(0.96);
}

.wrong-list {
    padding: 0 20px;
}

.wrong-item {
    position: relative;
    padding: 16px 40px 16px 16px;
    background: white;
    border-radius: var(--radius-xl);
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-left: 3px solid var(--color-error);
    transition: all var(--transition-base);
}

.wrong-item:active {
    transform: scale(0.98);
}

.wrong-item-chapter {
    font-size: 11px;
    color: var(--color-error);
    font-weight: 700;
    margin-bottom: 6px;
}

.wrong-item-question {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.wrong-item-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-gray-100);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.wrong-item-remove:active {
    background: var(--color-error);
    color: white;
    transform: scale(0.9);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-icon-wrap {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: var(--color-gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon-wrap svg {
    width: 50px;
    height: 50px;
}

.empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-tertiary);
}

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height-safe);
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 0;
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.nav-item.active {
    color: var(--color-primary-600);
}

.nav-center-btn {
    position: relative;
}

.center-btn-inner {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
    transition: all var(--transition-base);
    position: absolute;
    top: -20px;
}

.center-btn-inner svg {
    width: 24px;
    height: 24px;
}

.nav-center-btn span {
    margin-top: 32px;
    color: var(--color-primary-600);
    font-weight: 700;
}

.nav-center-btn.active .center-btn-inner {
    transform: scale(1.05);
}

/* ========== 成就弹窗 ========== */
.achievement-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.achievement-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.achievement-modal {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 32px 28px;
    text-align: center;
    transform: scale(0.5);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 80%;
    width: 300px;
    position: relative;
    overflow: hidden;
}

.achievement-overlay.show .achievement-modal {
    transform: scale(1);
}

.achievement-modal::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(34,197,94,0.12), transparent 70%);
    border-radius: 50%;
}

.achievement-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    position: relative;
    z-index: 1;
    animation: badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 8px 20px rgba(34, 197, 94, 0.3));
}

.achievement-badge svg {
    width: 100%;
    height: 100%;
}

@keyframes badge-pop {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.achievement-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-accent-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achievement-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.achievement-xp-reward {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
}

/* ========== 粒子效果 ========== */
.particle-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 2000;
    overflow: hidden;
}

.burst-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: burst 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes burst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* ========== 响应式 ========== */
@media (min-width: 480px) {
    .app-container {
        box-shadow: 0 0 40px rgba(0,0,0,0.06);
        border-left: 1px solid var(--color-gray-200);
        border-right: 1px solid var(--color-gray-200);
    }

    .bottom-nav {
        border-left: 1px solid rgba(0,0,0,0.06);
        border-right: 1px solid rgba(0,0,0,0.06);
    }
}
