/* ============================================================
   刷题平台 - 响应式样式表
   Mobile-first: 手机端优先, 大屏增强
   ============================================================ */

/* ---- CSS 变量 ---- */
:root {
    --c-brand: #2563eb;
    --c-brand-dark: #1d4ed8;
    --c-brand-light: #dbeafe;
    --c-green: #16a34a;
    --c-green-light: #dcfce7;
    --c-red: #dc2626;
    --c-red-light: #fee2e2;
    --c-orange: #ea580c;
    --c-orange-light: #fff7ed;
    --c-purple: #7c3aed;
    --c-purple-light: #ede9fe;
    --c-bg: #f1f5f9;
    --c-card: #ffffff;
    --c-text: #1e293b;
    --c-text2: #475569;
    --c-text3: #94a3b8;
    --c-border: #e2e8f0;
    --c-border2: #cbd5e1;
    --radius: 0px;
    --radius-sm: 0px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.1);
    --font: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --mono: "SF Mono", "Fira Code", Consolas, monospace;
    --max-w: 1200px;
    --nav-h: 60px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
    font-family: var(--font);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
a { color: var(--c-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }

/* ---- Container ---- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 20px 16px;
    flex: 1;
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: var(--nav-h);
}
.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-brand);
    text-decoration: none !important;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--c-text2);
    font-size: .88rem;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.nav-link svg { flex-shrink: 0; opacity: .7; }
.nav-link:hover { background: var(--c-bg); color: var(--c-brand); }
.nav-link:hover svg { opacity: 1; }
.nav-link.active { color: var(--c-brand); background: var(--c-brand-light); font-weight: 600; }
.nav-link.active svg { opacity: 1; }

/* 下拉菜单（更多） */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { border: none; background: none; cursor: pointer; font-family: inherit; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    padding: 6px;
    z-index: 200;
}
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--c-text2);
    font-size: .85rem;
    text-decoration: none !important;
    transition: background .12s;
    white-space: nowrap;
}
.nav-dropdown-item:hover { background: var(--c-bg); color: var(--c-brand); }
.nav-dropdown-divider { height: 1px; background: var(--c-border); margin: 4px 0; }

/* 用户区域 */
.nav-user-area {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--c-border);
}
.nav-user-dropdown { position: relative; }
.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: var(--radius);
    border: none;
    background: none;
    cursor: pointer;
    transition: background .15s;
}
.nav-user-btn:hover { background: var(--c-bg); }
.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
    flex-shrink: 0;
}
.nav-avatar-lg { width: 40px; height: 40px; font-size: 1rem; }
.nav-user-info { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.nav-user-name { font-weight: 600; font-size: .85rem; line-height: 1.2; }
.nav-user-meta { display: flex; gap: 4px; }

/* 用户下拉菜单 */
.nav-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 200;
    overflow: hidden;
}
.nav-user-menu.open { display: block; }
.nav-user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--c-border);
}
.nav-user-menu-stats {
    display: flex;
    padding: 12px 16px;
    gap: 24px;
    border-bottom: 1px solid var(--c-border);
}
.nav-user-stat { text-align: center; }
.nav-user-stat-val { font-size: 1rem; font-weight: 800; color: var(--c-brand); }
.nav-user-stat-label { font-size: .7rem; color: var(--c-text3); }
.nav-user-menu-body { padding: 6px; }
.nav-user-menu-footer { padding: 6px; border-top: 1px solid var(--c-border); }
.nav-user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--c-text2);
    font-size: .85rem;
    text-decoration: none !important;
    transition: background .12s;
}
.nav-user-menu-item:hover { background: var(--c-bg); color: var(--c-brand); }
.nav-user-logout { color: var(--c-red) !important; }
.nav-user-logout:hover { background: var(--c-red-light); color: var(--c-red) !important; }

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: transform .2s;
}

/* ---- 手机端导航 ---- */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--c-card);
        border-bottom: 1px solid var(--c-border);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        padding: 12px 16px;
        gap: 2px;
    }
    .nav-links.open { display: flex; }
    .nav-link { width: 100%; padding: 12px; text-align: left; }
    .nav-dropdown-menu { position: static; transform: none; box-shadow: none; border: none; background: var(--c-bg); margin-top: 4px; }
    .nav-user-area { border-left: none; border-top: 1px solid var(--c-border); margin-left: 0; padding-left: 0; padding-top: 12px; margin-top: 8px; justify-content: space-between; }
    .nav-user-menu { position: static; box-shadow: none; border: 1px solid var(--c-border); margin-top: 8px; }
    .nav-user-info { display: none; }
}

/* ============================================================
   卡片
   ============================================================ */
.card {
    background: var(--c-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--c-border);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.card-title {
    font-size: 1.15rem;
    font-weight: 700;
}
.card-subtitle {
    font-size: .85rem;
    color: var(--c-text3);
}

/* ---- 统计卡片 ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--c-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--c-border);
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { font-size: 2rem; margin-bottom: 8px; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--c-brand); }
.stat-label { font-size: .8rem; color: var(--c-text3); margin-top: 4px; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.4;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--c-brand); color: #fff; }
.btn-primary:hover { background: var(--c-brand-dark); box-shadow: var(--shadow-md); }

.btn-success { background: var(--c-green); color: #fff; }
.btn-success:hover { background: #15803d; }

.btn-danger { background: var(--c-red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-orange { background: var(--c-orange); color: #fff; }
.btn-orange:hover { background: #c2410c; }

.btn-outline {
    background: transparent;
    color: var(--c-brand);
    border: 2px solid var(--c-brand);
}
.btn-outline:hover { background: var(--c-brand); color: #fff; }

.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   表单
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 6px;
    color: var(--c-text2);
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    color: var(--c-text);
    background: var(--c-card);
    transition: border-color .15s, box-shadow .15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px var(--c-brand-light);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-help { font-size: .78rem; color: var(--c-text3); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--c-red); margin-top: 4px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   警告/提示
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: .9rem;
    border: 1px solid;
}
.alert-error { background: var(--c-red-light); color: var(--c-red); border-color: #fecaca; }
.alert-success { background: var(--c-green-light); color: #15803d; border-color: #bbf7d0; }
.alert-info { background: var(--c-brand-light); color: var(--c-brand-dark); border-color: #bfdbfe; }
.alert-warning { background: var(--c-orange-light); color: #c2410c; border-color: #fed7aa; }

/* ============================================================
   表格
   ============================================================ */
.table-wrap { overflow-x: auto; margin-bottom: 16px; -webkit-overflow-scrolling: touch; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
thead { background: var(--c-bg); }
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
}
th { font-weight: 600; color: var(--c-text2); font-size: .82rem; text-transform: uppercase; letter-spacing: .3px; }
tr:hover td { background: #f8fafc; }

/* ============================================================
   落地页 (Landing) — 多彩纯色风格
   ============================================================ */

/* Hero */
.lp-hero {
    background: #1e40af;
    border-radius: var(--radius);
    padding: 60px 24px 50px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
    color: #fff;
    text-align: center;
}
.lp-hero-inner { position: relative; z-index: 2; }
.lp-hero-badge {
    display: inline-block;
    background: #fbbf24;
    color: #78350f;
    padding: 4px 16px;
    border-radius: 0px;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.lp-hero h1 {
    font-size: 2.6rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: -1px;
}
.lp-hero-sub {
    font-size: 1.1rem;
    opacity: .85;
    max-width: 520px;
    margin: 0 auto 28px;
    line-height: 1.6;
}
.lp-hero-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    padding: 14px 36px;
    background: #fbbf24;
    color: #78350f;
    font-weight: 800;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(251,191,36,.4);
    transition: transform .15s, box-shadow .15s;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(251,191,36,.5); background: #f59e0b; }
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    padding: 14px 36px;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255,255,255,.4);
    text-decoration: none !important;
    transition: background .15s;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.25); }

/* Hero 装饰 */
.lp-hero-shapes { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: none; }
.lp-shape {
    position: absolute;
    border-radius: 50%;
    opacity: .12;
}
.lp-shape-1 { width: 200px; height: 200px; background: #fbbf24; top: -40px; right: -40px; }
.lp-shape-2 { width: 140px; height: 140px; background: #34d399; bottom: -30px; left: -20px; }
.lp-shape-3 { width: 80px; height: 80px; background: #f87171; top: 50%; left: 15%; }

/* 统计 */
.lp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.lp-stat {
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow-md);
}
.lp-stat-blue { background: #2563eb; }
.lp-stat-green { background: #16a34a; }
.lp-stat-purple { background: #7c3aed; }
.lp-stat-num { font-size: 2.4rem; font-weight: 900; line-height: 1; }
.lp-stat-label { font-size: .85rem; opacity: .85; margin-top: 6px; }

/* 章节标题 */
.lp-section-title {
    text-align: center;
    margin-bottom: 24px;
}
.lp-section-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--c-text);
    margin-bottom: 6px;
}
.lp-section-title p {
    color: var(--c-text3);
    font-size: .95rem;
}

/* 功能特色 */
.lp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 44px;
}
.lp-feat {
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow);
    transition: transform .15s;
}
.lp-feat:hover { transform: translateY(-4px); }
.lp-feat-red { background: #dc2626; }
.lp-feat-blue { background: #2563eb; }
.lp-feat-orange { background: #ea580c; }
.lp-feat-green { background: #16a34a; }
.lp-feat-icon { font-size: 2.6rem; margin-bottom: 12px; }
.lp-feat h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.lp-feat p { font-size: .88rem; opacity: .85; line-height: 1.5; }

/* 课程卡片 */
.lp-courses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 44px;
}
.lp-course-card {
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 22px 18px;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
}
.lp-course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.lp-course-dot {
    width: 36px; height: 36px;
    border-radius: 0px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.lp-course-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.lp-course-card p { font-size: .8rem; color: var(--c-text3); line-height: 1.4; }

/* CTA */
.lp-cta {
    background: #0f172a;
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}
.lp-cta h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.lp-cta p { color: #94a3b8; font-size: .95rem; margin-bottom: 24px; }

/* ============================================================
   课程列表页
   ============================================================ */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.course-item {
    display: flex;
    flex-direction: column;
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--c-border);
    transition: transform .15s, box-shadow .15s;
}
.course-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-brand);
}
.course-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--c-text);
}
.course-item p {
    font-size: .85rem;
    color: var(--c-text3);
    line-height: 1.5;
    flex: 1;
}
@media (max-width: 600px) {
    .course-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ============================================================
   考试时间表
   ============================================================ */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--c-border2);
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--c-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow);
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px; top: 20px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--c-brand);
    border: 2px solid var(--c-card);
    box-shadow: 0 0 0 2px var(--c-brand);
}
.timeline-date { font-weight: 700; color: var(--c-brand); font-size: .9rem; }
.timeline-info { font-size: .88rem; color: var(--c-text2); margin-top: 4px; }
.timeline-room { font-size: .8rem; color: var(--c-text3); }

.timeline-item.passed { opacity: .6; }
.timeline-item.passed::before { background: var(--c-text3); box-shadow: 0 0 0 2px var(--c-text3); }
.timeline-item.next { border-color: var(--c-brand); }

/* ============================================================
   答题界面
   ============================================================ */

/* 顶部状态栏 */
.quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 12px;
}
.quiz-back-link {
    font-size: .9rem;
    color: var(--c-text2);
    text-decoration: none !important;
    font-weight: 500;
    transition: color .15s;
}
.quiz-back-link:hover { color: var(--c-brand); }
.quiz-progress-text {
    font-size: .9rem;
    font-weight: 700;
    color: var(--c-text);
    background: var(--c-bg);
    padding: 4px 12px;
    border-radius: 0px;
    border: 1px solid var(--c-border);
}

/* 进度条 */
.quiz-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--c-card);
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow);
}
.progress-track {
    height: 6px;
    background: var(--c-border);
    border-radius: 0px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--c-brand);
    border-radius: 0px;
    transition: width .4s ease;
}

/* 进度点 */
.progress-dots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all .2s;
}
.dot-active {
    background: var(--c-brand);
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px rgba(37,99,235,.25);
}
.dot-correct { background: var(--c-green); border-color: var(--c-green); }
.dot-fuzzy { background: var(--c-orange); border-color: var(--c-orange); border-style: dashed; }
.dot-wrong { background: var(--c-red); border-color: var(--c-red); }
.dot-hot { box-shadow: 0 0 0 3px rgba(220,38,38,.3); }
.dot-empty { background: transparent; border-color: var(--c-border2); }

/* 进度图例 */
.progress-legend {
    display: flex;
    gap: 12px;
    font-size: .72rem;
    color: var(--c-text3);
    justify-content: center;
}
.progress-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dot-sm {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
}

/* 题目卡片 */
.quiz-card {
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--c-border);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--c-brand);
    opacity: .6;
}
.quiz-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.quiz-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 0px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .5px;
}
.quiz-type-badge.choice { background: var(--c-brand-light); color: var(--c-brand); }
.quiz-type-badge.fill { background: var(--c-green-light); color: var(--c-green); }
.quiz-type-badge.multi_choice { background: #fef3c7; color: #92400e; }

/* 难度点 */
.quiz-diff-badge {
    display: flex;
    gap: 3px;
    align-items: center;
}
.diff-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-border);
    transition: background .2s;
}
.diff-active { background: var(--c-orange); }

/* 模糊题标记 */
.fuzzy-flag {
    font-size: .72rem;
    font-weight: 600;
    color: var(--c-orange);
    background: var(--c-orange-light);
    padding: 3px 10px;
    border-radius: 0px;
    border: 1px dashed var(--c-orange);
}

.quiz-stem {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 22px;
    white-space: pre-wrap;
    color: var(--c-text);
    font-weight: 500;
}

/* 选择题选项 */
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--c-bg);
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .15s;
    text-align: left;
    font-size: .95rem;
    width: 100%;
}
.option-btn:hover { border-color: var(--c-brand); background: var(--c-brand-light); }
.option-btn.selected { border-color: var(--c-brand); background: var(--c-brand-light); font-weight: 600; }
.option-btn.correct { border-color: var(--c-green); background: var(--c-green-light); }
.option-btn.wrong { border-color: var(--c-red); background: var(--c-red-light); }
.option-letter {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}
.option-btn.selected .option-letter { background: var(--c-brand); color: #fff; }
.option-btn.correct .option-letter { background: var(--c-green); color: #fff; }
.option-btn.wrong .option-letter { background: var(--c-red); color: #fff; }
.option-btn:disabled { opacity: 1; cursor: default; }
.option-btn:disabled.correct { border-color: var(--c-green); background: var(--c-green-light); color: var(--c-text); }
.option-btn:disabled.wrong { border-color: var(--c-red); background: var(--c-red-light); color: var(--c-text); }
.option-btn:disabled.correct .option-letter { background: var(--c-green); color: #fff; }
.option-btn:disabled.wrong .option-letter { background: var(--c-red); color: #fff; }

/* 填空题 */
.fill-input {
    display: flex;
    gap: 12px;
    align-items: center;
}
.fill-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}
.fill-input input:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px var(--c-brand-light);
}
.fill-input input.correct { border-color: var(--c-green); background: var(--c-green-light); }
.fill-input input.wrong { border-color: var(--c-red); background: var(--c-red-light); }

/* 解析区域 */
.explanation {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    line-height: 1.7;
    animation: slideUp .3s ease;
}
.explanation.correct { background: var(--c-green-light); border-left: 4px solid var(--c-green); }
.explanation.wrong { background: var(--c-red-light); border-left: 4px solid var(--c-red); }
.explanation-title { font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.explanation-answer { margin-bottom: 4px; }
.explanation-detail { color: var(--c-text2); font-size: .85rem; }

/* 模糊标记按钮 */
.btn-fuzzy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    margin-top: 14px;
    background: var(--c-card);
    border: 2px dashed var(--c-orange);
    color: var(--c-orange);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    transition: all .2s;
}
.btn-fuzzy:hover {
    background: var(--c-orange-light);
    border-style: solid;
}
.btn-fuzzy.fuzzy-active {
    background: var(--c-orange-light);
    border-style: solid;
    color: #fff;
    background: var(--c-orange);
}

/* 历史做题标记 */
.quiz-history {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
}
.history-correct { background: rgba(16,185,129,.08); color: var(--c-green); border: 1px solid rgba(16,185,129,.2); }
.history-wrong { background: rgba(244,63,94,.06); color: var(--c-red); border: 1px solid rgba(244,63,94,.2); }

/* 操作区 */
.quiz-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* 答题结果页 */
.practice-result-wrap {
    max-width: 480px;
    margin: 24px auto;
    padding: 0 12px;
}
.practice-result-card {
    background: var(--c-card);
    border-radius: 0px;
    padding: 36px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--c-border);
    position: relative;
    overflow: hidden;
}
.practice-result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--c-brand);
}
.result-icon { 
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}
.result-icon svg { width: 36px; height: 36px; }
.result-score {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--c-brand);
    margin-bottom: 16px;
    line-height: 1;
}
.result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    background: var(--c-bg);
    border-radius: 0px;
    padding: 16px 12px;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.stat-num {
    font-size: 1.4rem;
    font-weight: 800;
}
.stat-label {
    font-size: .72rem;
    color: var(--c-text3);
}
.stat-correct .stat-num { color: var(--c-green); }
.stat-wrong .stat-num { color: var(--c-red); }
.stat-fuzzy .stat-num { color: var(--c-orange); }
.stat-total .stat-num { color: var(--c-text2); }
.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.result-actions .btn {
    min-height: 44px;
    border-radius: 0px;
    font-weight: 600;
    font-size: .88rem;
}
.result-actions .btn-share {
    grid-column: 1 / -1;
}

/* 骗动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 加载中动画 */
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ghost 按钮 */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--c-border2);
    color: var(--c-text2);
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-size: .9rem;
}
.btn-ghost:hover {
    background: var(--c-bg);
    border-color: var(--c-border2);
    color: var(--c-text);
}

/* ============================================================
   挑战赛排行榜
   ============================================================ */
.leaderboard { list-style: none; }
.leaderboard li {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border);
    gap: 12px;
    overflow: hidden;
}
.leaderboard li:last-child { border-bottom: none; }
.lb-rank {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.lb-rank.gold { background: #fef3c7; color: #b45309; }
.lb-rank.silver { background: #f1f5f9; color: #475569; }
.lb-rank.bronze { background: #fed7aa; color: #c2410c; }
.lb-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 700; color: var(--c-brand); font-size: 1.1rem; flex-shrink: 0; }

/* ============================================================
   错题本
   ============================================================ */
.wrong-item {
    background: var(--c-card);
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.wrong-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.wrong-count {
    font-size: .78rem;
    padding: 3px 8px;
    border-radius: 0px;
    background: var(--c-red-light);
    color: var(--c-red);
    font-weight: 600;
}
.mastered-badge {
    font-size: .78rem;
    padding: 3px 8px;
    border-radius: 0px;
    background: var(--c-green-light);
    color: var(--c-green);
    font-weight: 600;
}
.wrong-item.wrong-hot {
    border-left: 3px solid var(--c-red);
    background: var(--c-card);
    box-shadow: 0 2px 12px rgba(244,63,94,.1);
}

/* ============================================================
   落地页 Footer
   ============================================================ */
.footer {
    background: var(--c-card);
    border-top: 1px solid var(--c-border);
    padding: 20px;
    text-align: center;
    font-size: .82rem;
    color: var(--c-text3);
    margin-top: auto;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }

/* ============================================================
   分页
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.pg-btn {
    padding: 8px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-text2);
    font-size: .85rem;
    text-decoration: none !important;
    transition: all .15s;
}
.pg-btn:hover { background: var(--c-brand-light); color: var(--c-brand); border-color: var(--c-brand); }
.pg-btn.active { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
.pg-info { font-size: .8rem; color: var(--c-text3); margin-left: 8px; }

/* ============================================================
   标签/徽章
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 0px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-blue { background: var(--c-brand-light); color: var(--c-brand); }
.badge-green { background: var(--c-green-light); color: var(--c-green); }
.badge-red { background: var(--c-red-light); color: var(--c-red); }
.badge-orange { background: var(--c-orange-light); color: var(--c-orange); }
.badge-purple { background: var(--c-purple-light); color: var(--c-purple); }

/* ============================================================
   Tab 切换
   ============================================================ */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--c-border); padding-bottom: 0; flex-wrap: wrap; }
.tab-btn {
    padding: 10px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    color: var(--c-text3);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
}
.tab-btn:hover { color: var(--c-brand); }
.tab-btn.active { color: var(--c-brand); border-bottom-color: var(--c-brand); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   空状态
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--c-text3);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-text { font-size: 1rem; }

/* ============================================================
   搜索/筛选栏
   ============================================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-bar .form-input,
.filter-bar .form-select {
    width: auto;
    min-width: 160px;
    flex: 1;
}
@media (max-width: 600px) {
    .filter-bar { flex-direction: column; }
    .filter-bar .form-input,
    .filter-bar .form-select { width: 100%; min-width: 0; }
}

/* ============================================================
   Admin Sidebar (桌面端)
   ============================================================ */
.admin-layout {
    display: flex;
    gap: 24px;
    min-height: 60vh;
}
.admin-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: var(--c-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--c-border);
    padding: 16px 0;
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    align-self: flex-start;
}
.admin-sidebar a {
    display: block;
    padding: 10px 20px;
    color: var(--c-text2);
    font-size: .9rem;
    text-decoration: none !important;
    transition: background .15s, color .15s;
}
.admin-sidebar a:hover { background: var(--c-bg); color: var(--c-brand); }
.admin-sidebar a.active { background: var(--c-brand-light); color: var(--c-brand); font-weight: 600; }
.admin-content { flex: 1; min-width: 0; }

@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        position: static;
        display: flex;
        overflow-x: auto;
        padding: 8px 12px;
        gap: 4px;
    }
    .admin-sidebar a { white-space: nowrap; padding: 8px 14px; border-radius: var(--radius-sm); }
}

/* 落地页手机端适配 */
@media (max-width: 600px) {
    .lp-hero { padding: 48px 20px 40px; }
    .lp-hero h1 { font-size: 2.2rem; }
    .lp-hero-sub { font-size: .95rem; line-height: 1.7; }
    .btn-hero-primary { padding: 14px 32px; font-size: 1rem; }
    .btn-hero-secondary { padding: 12px 28px; font-size: .95rem; }
    .lp-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .lp-stat { padding: 18px 10px; }
    .lp-stat svg { width: 22px; height: 22px; }
    .lp-stat-num { font-size: 1.6rem; }
    .lp-stat-label { font-size: .72rem; }
    .lp-features { grid-template-columns: 1fr 1fr; gap: 12px; }
    .lp-feat { padding: 20px 14px; }
    .lp-feat-icon svg { width: 32px; height: 32px; }
    .lp-feat h3 { font-size: .95rem; }
    .lp-feat p { font-size: .78rem; }
    .lp-courses { grid-template-columns: 1fr 1fr; gap: 12px; }
    .lp-course-card { padding: 16px 14px; }
    .lp-course-dot { width: 32px; height: 32px; }
    .lp-course-dot svg { width: 16px; height: 16px; }
    .lp-course-card h3 { font-size: .9rem; }
    .lp-cta { padding: 36px 20px; }
    .lp-cta h2 { font-size: 1.3rem; }
}

/* ============================================================
   排行榜
   ============================================================ */
.leaderboard {
    list-style: none;
    padding: 0;
    margin: 0;
}
.leaderboard li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border);
    overflow: hidden;
}
.leaderboard li:last-child { border-bottom: none; }
.lb-rank {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--c-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: var(--c-text2);
    flex-shrink: 0;
}
.lb-rank.gold { background: #fbbf24; color: #78350f; }
.lb-rank.silver { background: #d1d5db; color: #374151; }
.lb-rank.bronze { background: #f97316; color: #fff; }
.lb-name { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 700; color: var(--c-brand); font-size: 1.1rem; flex-shrink: 0; }

/* ============================================================
   标签
   ============================================================ */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 0px;
    font-size: .78rem;
    color: #fff;
    cursor: pointer;
    transition: opacity .15s;
}
.tag-pill:hover { opacity: .8; }

/* ============================================================
   评论区
   ============================================================ */
.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.comment-body {
    font-size: .9rem;
    line-height: 1.6;
    margin-top: 6px;
}
.comment-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}
.comment-actions button {
    padding: 2px 8px;
    font-size: .75rem;
    border: 1px solid var(--c-border2);
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    transition: background .1s;
}
.comment-actions button:hover { background: var(--c-bg); }

/* ============================================================
   贡献值卡片
   ============================================================ */
.contrib-card {
    background: #2563eb;
    color: #fff;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.contrib-num {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}
.contrib-label {
    font-size: .85rem;
    opacity: .8;
    margin-top: 4px;
}

/* ============================================================
   Markdown 模板
   ============================================================ */
.md-template {
    font-family: var(--mono);
    font-size: .82rem;
    background: var(--c-bg);
    padding: 16px;
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    line-height: 1.6;
    border: 1px solid var(--c-border);
    overflow-x: auto;
}

/* ============================================================
   勋章墙
   ============================================================ */
.badge-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.badge-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--c-bg);
    border-radius: var(--radius-sm);
    transition: transform .1s;
}
.badge-card.earned { background: #fff; box-shadow: var(--shadow); }
.badge-card:hover { transform: translateY(-1px); }
.badge-icon { font-size: 2rem; flex-shrink: 0; }

/* 勋章通知弹窗 */
.badge-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
    z-index: 9999;
    text-align: center;
    transition: transform .4s ease;
    max-width: 300px;
}
.badge-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   移动端底部导航栏 (iOS APP风格)
   ============================================================ */
.mobile-bottom-nav { display: none; }

@media (max-width: 768px) {
    /* 全局防溢出 — 所有内容不超出屏幕 */
    *, *::before, *::after { max-width: 100vw; }
    img, video, canvas { max-width: 100%; height: auto; }

    /* iPhone 安全区适配 */
    body { 
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
        -webkit-font-smoothing: antialiased;
        -webkit-tap-highlight-color: transparent;
    }

    /* 答题页面：底部操作栏替代全局导航栏 */
    body.quiz-page .mobile-bottom-nav { display: none !important; }
    body.quiz-page { padding-bottom: 0; }

    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(52px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(255,255,255,.92);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        border-top: 0.5px solid rgba(0,0,0,.08);
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding-top: 0;
        z-index: 1000;
    }
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: var(--c-text3);
        font-size: 11px;
        padding: 4px 0;
        border-radius: 0px;
        transition: color .2s;
        -webkit-tap-highlight-color: transparent;
        flex: 1;
        max-width: 64px;
        line-height: 1;
    }
    .mobile-bottom-nav a .nav-icon {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        margin: 0 auto;
    }
    .mobile-bottom-nav a .nav-icon svg {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
        display: block;
    }
    .mobile-bottom-nav a.active {
        color: var(--c-brand);
        font-weight: 600;
    }
    .mobile-bottom-nav a.active .nav-icon {
        transform: translateY(-1px);
    }
    .mobile-bottom-nav a:active {
        opacity: .5;
    }

    /* 顶部导航栏在手机端简化 */
    .navbar { padding: 0 12px; }
    .nav-inner { gap: 8px; }
    .nav-brand { font-size: 1rem; font-weight: 800; }
    .nav-user-info { display: none; }

    /* 卡片移动端优化 */
    .card { border-radius: 0px; padding: 16px; margin-bottom: 14px; }
    .card-header { margin-bottom: 12px; gap: 6px; }
    .card-title { font-size: 1rem; }

    /* 课程条目移动端 */
    .course-item { padding: 12px; gap: 10px; border-radius: 0px; }
    .course-item-icon { width: 32px; height: 32px; border-radius: 0px; }
    .course-item-icon svg { width: 16px; height: 16px; }
    .course-item-name { font-size: .88rem; }
    .course-item-count { font-size: .78rem; }

    /* 按钮更大更好点击 */
    .btn { min-height: 46px; padding: 11px 22px; font-size: .92rem; }
    .btn-sm { min-height: 38px; padding: 7px 16px; font-size: .84rem; }

    /* 表单输入更大 */
    .form-input, .form-select, .form-textarea {
        min-height: 46px;
        font-size: 16px; /* 防止iOS缩放 */
        padding: 11px 16px;
    }

    /* 统计卡片更紧凑 */
    .stats-grid { gap: 10px; }
    .stat-card { padding: 16px 12px; border-radius: 0px; }
    .stat-num { font-size: 1.6rem; }

    /* 答题界面优化 — 手机端统一 */
    .quiz-card { padding: 20px 16px; margin: 0 10px 14px; border-radius: 0px; }
    .quiz-card::before { height: 3px; }
    .quiz-header { padding: 10px 12px; margin: 0 10px 10px; flex-wrap: wrap; gap: 8px; }
    .quiz-header a:first-child { font-size: .85rem; }
    .quiz-progress { padding: 12px 14px; margin: 0 10px 14px; border-radius: 0px; }
    .quiz-stem { font-size: 1rem; line-height: 1.75; margin-bottom: 18px; }
    .quiz-card-header { gap: 8px; margin-bottom: 16px; }
    .quiz-type-badge { font-size: .78rem; padding: 4px 12px; }
    .fuzzy-flag { font-size: .75rem; padding: 3px 10px; }
    .done-badge { font-size: .75rem; padding: 3px 10px; }

    /* 选项按钮移动端 */
    .options-list { gap: 10px; }
    .option-btn { min-height: 50px; padding: 14px 16px; font-size: .95rem; gap: 12px; border-radius: 0px; border-width: 1.5px; }
    .option-letter { width: 28px; height: 28px; font-size: .85rem; }

    /* 填空题输入框 — font-size 16px 防止 iOS 自动缩放 */
    .fill-input input { font-size: 16px; padding: 12px 16px; min-height: 50px; }

    /* 提交按钮区 */
    .quiz-actions { margin-top: 16px; gap: 10px; }
    .quiz-actions .btn { min-height: 46px; font-size: .95rem; }

    /* 知识点标签移动端 */
    .knowledge-tags { gap: 8px; }
    .knowledge-tag { font-size: .78rem; padding: 5px 10px; }

    /* 答题反馈区域移动端 — 选择后自适应 */
    .explanation { padding: 14px 16px; font-size: .88rem; border-radius: 0px; line-height: 1.65; margin-top: 14px; }
    .explanation-title { font-size: .92rem; margin-bottom: 6px; }
    .explanation-answer { font-size: .88rem; margin-bottom: 4px; }
    .explanation-detail { font-size: .84rem; }
    .hint-box { padding: 12px 14px; font-size: .84rem; border-radius: 0px; margin-top: 12px; }
    .hint-box-title { font-size: .84rem; margin-bottom: 4px; }
    .btn-fuzzy { font-size: .84rem; padding: 9px 16px; margin-top: 12px; }
    .btn-retry { font-size: .84rem; padding: 9px 16px; margin-top: 12px; }
    .quiz-card-header { gap: 6px; flex-wrap: wrap; }
    .quiz-card-header .done-badge { font-size: .72rem; padding: 3px 8px; }
    .quiz-card-header .fuzzy-flag { font-size: .72rem; padding: 3px 8px; }

    /* 评论区移动端 — 选择后出现 */
    #commentsArea { margin: 0 10px; padding: 16px; padding-bottom: 160px; border-radius: 0px; }
    .comment-section-header { gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
    .comment-section-header .card-title { font-size: .92rem; }
    .comment-input-wrap { gap: 10px; margin-bottom: 12px; }
    .comment-textarea { font-size: 16px; padding: 10px 12px; min-height: 56px; }
    .comment-item { padding: 12px 0; }
    .comment-body { font-size: .85rem; }
    .comment-actions { gap: 8px; }
    .comment-action-btn { font-size: .78rem; padding: 4px 8px; }

    /* 结果页移动端 */
    .practice-result-card { padding: 30px 18px; border-radius: 0px; }
    .practice-result-wrap { margin: 16px auto; }
    .result-score { font-size: 2.4rem; }
    .result-stats { gap: 10px; padding: 14px 10px; }
    .stat-num { font-size: 1.3rem; }
    .stat-label { font-size: .75rem; }
    .result-actions { gap: 10px; }
    .result-actions .btn { min-height: 44px; font-size: .88rem; }

    /* 进度点移动端 */
    .progress-dots { gap: 5px; }
    .dot { width: 12px; height: 12px; }

    /* 底部操作栏移动端 */
    .bottom-bar-nav { gap: 8px; margin-bottom: 8px; }
    .bottom-nav-btn { padding: 8px 14px; font-size: .88rem; min-height: 40px; }
    .bottom-bar-rate { gap: 8px; }
    .rate-btn { padding: 10px 12px; font-size: .88rem; min-height: 44px; border-radius: 0px; }

    /* 闪卡模式移动端 */
    .flash-header { padding: 12px 16px; gap: 10px; }
    .flash-counter { font-size: .88rem; }
    .flash-card { margin: 0 10px; }
    .flash-stem { font-size: .95rem; line-height: 1.65; }
    .flash-nav { gap: 8px; margin-bottom: 10px; }
    .flash-nav-btn { padding: 8px 14px; font-size: .88rem; }
    .flash-flip-btn { padding: 10px 24px; font-size: .9rem; }
    .flash-rate-bar { gap: 8px; }
    .flash-rate-btn { flex: 1; padding: 10px 10px; font-size: .88rem; border-radius: 0px; min-height: 44px; }
    .flash-container { min-height: 320px; padding-bottom: 180px; }
    .flash-card { min-height: 300px; }
    .flash-card-inner { min-height: 300px; }
    .flash-face { padding: 20px 16px; border-radius: 0px; }
    .flash-answer { font-size: 1.05rem; }
    .flash-explanation { font-size: .88rem; }

    /* 连对条移动端 */
    .streak-bar { padding: 10px 14px; gap: 10px; border-radius: 0px; }
    .streak-text { font-size: .84rem; white-space: nowrap; }

    /* 排行榜项更大 */
    .leaderboard li { padding: 14px 12px; gap: 10px; }
    .lb-rank { width: 38px; height: 38px; font-size: .92rem; }

    /* 页面间距优化 */
    .container { padding: 14px 16px; }

    /* 通知面板移动端 */
    .notif-panel { width: calc(100vw - 16px); right: 8px; max-height: 400px; }
    .notif-modal { width: calc(100vw - 32px); max-width: 320px; }

    /* 平台数据条移动端 */
    .dash-platform { gap: 0; border-radius: 0px; }
    .dash-platform-item { padding: 12px 6px; }
    .dash-platform-val { font-size: 1rem; }

    /* 隐藏桌面端导航，在手机端用底部栏 */
    .nav-toggle { display: none !important; }
    .nav-links {
        display: none !important;
    }
}

/* ============================================================
   实用工具类
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-text3); }
.text-sm { font-size: .85rem; }
.text-lg { font-size: 1.15rem; }
.text-brand { color: var(--c-brand); }
.text-green { color: var(--c-green); }
.text-red { color: var(--c-red); }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-sm { gap: 8px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

/* ============================================================
   动画
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .3s ease-out; }

/* ============================================================
   通知系统
   ============================================================ */

/* 导航栏铃铛 */
.notif-bell {
    position: relative;
    cursor: pointer;
    padding: 6px;
    border-radius: 0px;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text2);
}
.notif-bell:hover { background: var(--c-bg); color: var(--c-brand); }
.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    border-radius: 0px;
    background: var(--c-red);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--c-card);
    line-height: 1;
}

/* 通知下拉面板 */
.notif-panel {
    position: fixed;
    top: var(--nav-h);
    right: 16px;
    width: 360px;
    max-height: 480px;
    background: var(--c-card);
    border-radius: 0px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--c-border);
    z-index: 200;
    overflow: hidden;
    animation: slideDown .2s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-border);
}
.notif-panel-body {
    max-height: 420px;
    overflow-y: auto;
}
.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid var(--c-border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--c-bg); }
.notif-item-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title { font-weight: 600; font-size: .88rem; margin-bottom: 2px; }
.notif-item-text { font-size: .78rem; color: var(--c-text2); line-height: 1.4; }
.notif-item-time { font-size: .7rem; color: var(--c-text3); margin-top: 4px; }
.notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.15);
    z-index: 199;
}

/* 通知弹窗 */
.notif-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .2s ease;
}
.notif-modal {
    background: var(--c-card);
    border-radius: 0px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.92) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.notif-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--c-border);
}
.notif-modal-icon { font-size: 1.5rem; }
.notif-modal-title { font-weight: 700; font-size: 1rem; flex: 1; }
.notif-modal-close {
    width: 28px; height: 28px;
    border-radius: 0px;
    border: none;
    background: var(--c-bg);
    color: var(--c-text3);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.notif-modal-close:hover { background: var(--c-red-light); color: var(--c-red); }
.notif-modal-body {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}
.notif-modal-footer {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--c-border);
    justify-content: flex-end;
}

/* 手机端通知面板 */
@media (max-width: 480px) {
    .notif-panel {
        right: 8px;
        left: 8px;
        width: auto;
    }
    .notif-modal { max-width: 95vw; }
}

/* ============================================================
   答题界面布局 — PC端侧边导航 + 手机端底部栏
   ============================================================ */
.quiz-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 960px;
    margin: 0 auto;
}
.quiz-layout-main {
    flex: 1;
    min-width: 0;
}
/* PC端右侧浮动导航面板 */
.quiz-side-nav {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    width: 180px;
    flex-shrink: 0;
    background: var(--c-card);
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quiz-side-nav .side-nav-label {
    font-size: .78rem;
    color: var(--c-text3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 2px;
}
.quiz-side-nav .side-nav-progress {
    font-size: .95rem;
    font-weight: 800;
    color: var(--c-brand);
    text-align: center;
    padding: 8px;
    background: var(--c-brand-light);
    border-radius: var(--radius-sm);
}
.quiz-side-nav .side-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--c-border);
    transition: all .15s;
    cursor: pointer;
    text-align: center;
}
.quiz-side-nav .side-nav-btn:hover {
    background: var(--c-brand-light);
    color: var(--c-brand);
    border-color: var(--c-brand);
}
.quiz-side-nav .side-nav-btn.disabled {
    opacity: .35;
    pointer-events: none;
}
.quiz-side-nav .side-nav-btn.primary-action {
    background: var(--c-brand);
    color: #fff;
    border-color: var(--c-brand);
}
.quiz-side-nav .side-nav-btn.primary-action:hover {
    background: var(--c-brand-dark);
}
.quiz-side-nav .side-nav-rate {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.quiz-side-nav .side-rate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-card);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    color: var(--c-text);
}
.quiz-side-nav .side-rate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.side-rate-btn.sr-know { color: var(--c-green); border-color: rgba(34,197,94,.3); }
.side-rate-btn.sr-know:hover { background: var(--c-green-light); border-color: var(--c-green); }
.side-rate-btn.sr-fuzzy { color: var(--c-orange); border-color: rgba(245,158,11,.3); }
.side-rate-btn.sr-fuzzy:hover { background: var(--c-orange-light); border-color: var(--c-orange); }
.side-rate-btn.sr-dontknow { color: var(--c-red); border-color: rgba(239,68,68,.3); }
.side-rate-btn.sr-dontknow:hover { background: var(--c-red-light); border-color: var(--c-red); }
/* PC端右侧迷你进度点 */
.side-progress-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}
.side-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all .2s;
    cursor: default;
}

/* 手机端：隐藏侧边栏，改用底部栏 */
@media (max-width: 768px) {
    .quiz-side-nav { display: none; }
    .quiz-layout { flex-direction: column; gap: 0; padding-bottom: 0; }
    .quiz-layout-main { padding: 0 2px; }
}

/* ============================================================
   底部常驻操作栏 — 刷题模式 (手机端)
   ============================================================ */
.practice-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,.95);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid rgba(0,0,0,.08);
    z-index: 1001;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    animation: slideUp .2s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.bottom-bar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.bottom-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    border: 1px solid var(--c-border);
    min-height: 40px;
}
.bottom-nav-btn:hover { background: var(--c-brand-light); color: var(--c-brand); border-color: var(--c-brand); }
.bottom-nav-btn.disabled { opacity: .35; pointer-events: none; }
.bottom-bar-progress {
    font-size: .82rem;
    font-weight: 600;
    color: var(--c-text2);
    background: var(--c-bg);
    padding: 4px 12px;
    border-radius: 0px;
}
.bottom-bar-rate {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.rate-btn {
    flex: 1;
    max-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-card);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    color: var(--c-text);
    min-height: 44px;
}
.rate-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.rate-btn:active { transform: scale(.97); }
.rate-know { color: var(--c-green); border-color: rgba(34,197,94,.3); }
.rate-know:hover { background: var(--c-green-light); border-color: var(--c-green); }
.rate-fuzzy { color: var(--c-orange); border-color: rgba(245,158,11,.3); }
.rate-fuzzy:hover { background: var(--c-orange-light); border-color: var(--c-orange); }
.rate-dontknow { color: var(--c-red); border-color: rgba(239,68,68,.3); }
.rate-dontknow:hover { background: var(--c-red-light); border-color: var(--c-red); }

/* ============================================================
   提示/知识点/批次标签等新视觉元素
   ============================================================ */

/* 提示框 */
.hint-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--c-brand);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 14px;
    font-size: .88rem;
    line-height: 1.6;
    color: var(--c-text2);
    animation: slideUp .3s ease;
}
.hint-box-title {
    font-weight: 700;
    color: var(--c-brand);
    font-size: .82rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 知识点标签 */
.knowledge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.knowledge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 0px;
    font-size: .72rem;
    font-weight: 600;
    background: var(--c-purple-light);
    color: var(--c-purple);
    border: 1px solid rgba(124,58,237,.15);
}

/* 批次/轮次标签 */
.batch-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 0px;
    font-size: .78rem;
    font-weight: 700;
    background: var(--c-brand-light);
    color: var(--c-brand);
    border: 1px solid rgba(37,99,235,.15);
}

/* 已做过标记（不泄露答案） */
.done-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 0px;
    font-size: .75rem;
    font-weight: 600;
    background: var(--c-green-light);
    color: var(--c-green);
    border: 1px solid rgba(22,163,74,.2);
}
.done-badge.was-wrong {
    background: var(--c-red-light);
    color: var(--c-red);
    border-color: rgba(220,38,38,.2);
}

/* 重做按钮 */
.btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    background: var(--c-card);
    border: 2px dashed var(--c-brand);
    color: var(--c-brand);
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    transition: all .2s;
}
.btn-retry:hover {
    background: var(--c-brand-light);
    border-style: solid;
}

/* 桌面端答题内容区域约束 */
.quiz-card,
.quiz-header,
.quiz-progress,
#commentsArea,
.practice-result-wrap {
    max-width: 720px;
}

/* 桌面端隐藏手机端底部栏（答题页面用侧边栏代替） */
@media (min-width: 769px) {
    .practice-bottom-bar { display: none; }
}

/* ============================================================
   闪卡背诵模式
   ============================================================ */
.flash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 8px;
}
.flash-counter {
    font-size: .88rem;
    font-weight: 700;
    color: var(--c-text2);
    background: var(--c-bg);
    padding: 4px 14px;
    border-radius: 0px;
}
.flash-container {
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding-bottom: 200px;
}
.flash-card {
    width: 100%;
    max-width: 560px;
    aspect-ratio: auto;
    min-height: 380px;
    cursor: pointer;
    transition: opacity .3s, transform .3s;
}
.flash-card.flash-hidden { display: none; }
.flash-card.flash-active { display: block; }

.flash-card-inner {
    position: relative;
    width: 100%;
    min-height: 380px;
    transition: transform .5s cubic-bezier(.4,.0,.2,1);
    transform-style: preserve-3d;
}
.flash-card-inner.flipped {
    transform: rotateY(180deg);
}

.flash-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 0px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.flash-front {
    background: var(--c-card);
    border: 2px solid var(--c-brand);
    box-shadow: 0 8px 32px rgba(67,97,238,.12);
}
.flash-back {
    background: #f0fdf4;
    border: 2px solid var(--c-green);
    box-shadow: 0 8px 32px rgba(34,197,94,.12);
    transform: rotateY(180deg);
}

.flash-front-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.flash-diff {
    font-size: .8rem;
    letter-spacing: 1px;
    color: var(--c-orange);
}
.flash-stem {
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 16px;
}
.flash-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.flash-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,.7);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
}
.flash-opt-letter {
    min-width: 26px;
    height: 26px;
    border-radius: 0px;
    background: var(--c-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}
.flash-tap-hint {
    margin-top: auto;
    text-align: center;
    color: var(--c-text3);
    font-size: .82rem;
    padding-top: 16px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: .4; }
    50% { opacity: 1; }
}

.flash-back-label {
    font-size: .82rem;
    font-weight: 700;
    color: var(--c-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.flash-answer {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--c-green);
    margin-bottom: 16px;
}
.flash-explanation {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(34,197,94,.2);
}
.flash-exp-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--c-text2);
    margin-bottom: 6px;
}
.flash-explanation div:last-child {
    font-size: .88rem;
    line-height: 1.6;
    color: var(--c-text2);
}

/* 闪卡底部操作栏 */
.flash-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,.95);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid rgba(0,0,0,.08);
    z-index: 1001;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
}
.flash-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.flash-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid var(--c-border);
}
.flash-nav-btn:hover { background: var(--c-brand-light); color: var(--c-brand); border-color: var(--c-brand); }
.flash-flip-btn {
    padding: 8px 24px;
    border-radius: var(--radius);
    background: var(--c-brand);
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    border: none;
}
.flash-flip-btn:hover { background: var(--c-brand-deep); transform: scale(1.03); }
.flash-rate-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.flash-rate-btn {
    flex: 1;
    max-width: 120px;
    padding: 10px;
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--c-border);
    background: var(--c-card);
    transition: all .15s;
    color: var(--c-text);
}
.flash-rate-btn:hover { transform: translateY(-1px); }
.flash-rate-btn.rate-know { color: var(--c-green); border-color: rgba(34,197,94,.3); }
.flash-rate-btn.rate-know:hover { background: var(--c-green-light); }
.flash-rate-btn.rate-fuzzy { color: var(--c-orange); border-color: rgba(245,158,11,.3); }
.flash-rate-btn.rate-fuzzy:hover { background: var(--c-orange-light); }
.flash-rate-btn.rate-dontknow { color: var(--c-red); border-color: rgba(239,68,68,.3); }
.flash-rate-btn.rate-dontknow:hover { background: var(--c-red-light); }

/* 手机端适配 */
@media (max-width: 480px) {
    .flash-container { min-height: 360px; }
    .flash-card { min-height: 320px; }
    .flash-card-inner { min-height: 320px; }
    .flash-face { padding: 20px 16px; }
    .flash-stem { font-size: .95rem; }
    .flash-answer { font-size: 1.1rem; }
    .rate-btn { padding: 8px 8px; font-size: .82rem; }
    .bottom-nav-btn { padding: 6px 10px; font-size: .82rem; }
}

/* ============================================================
   分享功能
   ============================================================ */
.share-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    background: var(--c-card);
    color: var(--c-text2);
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s;
}
.share-trigger:hover {
    border-color: var(--c-brand);
    color: var(--c-brand);
    background: var(--c-brand-light);
}
.share-trigger svg {
    flex-shrink: 0;
}

/* 分享弹窗遮罩 */
.share-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999;
    justify-content: center;
    align-items: center;
    animation: fadeIn .2s ease;
}
.share-overlay.active {
    display: flex;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 分享弹窗 */
.share-modal {
    background: var(--c-card);
    border-radius: 0px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: slideUp .25s ease;
    overflow: hidden;
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--c-border);
}
.share-modal-header .share-title {
    font-weight: 700;
    font-size: 1rem;
}
.share-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--c-bg);
    border-radius: 0px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--c-text3);
    transition: all .15s;
}
.share-modal-close:hover {
    background: var(--c-red-light);
    color: var(--c-red);
}

/* 分享预览区 */
.share-preview {
    padding: 16px 20px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
}
.share-preview-text {
    font-size: .88rem;
    color: var(--c-text2);
    line-height: 1.6;
    margin-bottom: 10px;
    word-break: break-all;
}
.share-preview-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}
.share-preview-url {
    flex: 1;
    font-size: .82rem;
    color: var(--c-text3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--mono);
}
.share-copy-btn {
    flex-shrink: 0;
    padding: 4px 12px;
    border: none;
    border-radius: 0px;
    background: var(--c-brand);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.share-copy-btn:hover { background: var(--c-brand-dark); }
.share-copy-btn.copied {
    background: var(--c-green);
}

/* 分享渠道列表 */
.share-channels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 16px 20px 20px;
}
.share-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background .15s;
    font-size: .75rem;
    color: var(--c-text2);
}
.share-channel:hover { background: var(--c-bg); }
.share-channel-icon {
    width: 44px;
    height: 44px;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
}
.share-channel-icon.wechat { background: #07c160; }
.share-channel-icon.qq { background: #12b7f5; }
.share-channel-icon.weibo { background: #e6162d; }
.share-channel-icon.qzone { background: #f5c63d; }
.share-channel-icon.link { background: var(--c-brand); }

/* 分享按钮（内联） */
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    background: var(--c-card);
    color: var(--c-text2);
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s;
}
.btn-share:hover {
    border-color: var(--c-brand);
    color: var(--c-brand);
    background: var(--c-brand-light);
    text-decoration: none;
}

/* 成绩分享卡片样式 */
.share-result-card {
    background: var(--c-brand-light);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 0;
}
.share-result-card .share-score {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--c-brand);
}
.share-result-card .share-label {
    font-size: .85rem;
    color: var(--c-text3);
    margin-top: 4px;
}
.share-result-card .share-brand {
    font-size: .75rem;
    color: var(--c-text3);
    margin-top: 10px;
}

/* 手机端适配 */
@media (max-width: 480px) {
    .share-modal { width: 95%; border-radius: 0px; }
    .share-channels { grid-template-columns: repeat(4, 1fr); padding: 12px 16px 16px; }
    .share-modal-header { padding: 14px 16px 10px; }
    .share-preview { padding: 12px 16px; }
}

/* ============================================================
   答题爽感 — 连对进度条
   ============================================================ */
.streak-bar {
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUp .3s ease;
}
.streak-track {
    flex: 1;
    height: 8px;
    background: var(--c-border);
    border-radius: 0px;
    overflow: hidden;
}
.streak-fill {
    height: 100%;
    background: #ef4444;
    border-radius: 0px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
    width: 0;
}
.streak-bar.streak-hot .streak-track {
    animation: streakPulse 1s infinite;
}
@keyframes streakPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
    50% { box-shadow: 0 0 8px 2px rgba(249,115,22,.3); }
}
.streak-text {
    font-size: .82rem;
    font-weight: 700;
    color: var(--c-orange);
    white-space: nowrap;
}

/* ============================================================
   答题爽感 — 庆祝弹窗
   ============================================================ */
.celebrate-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: rgba(255,255,255,.95);
    border-radius: 0px;
    padding: 24px 36px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
    z-index: 9998;
    opacity: 0;
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(34,197,94,.2);
}
.celebrate-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.celebrate-popup.wrong-popup {
    border-color: rgba(59,130,246,.2);
}
.celebrate-emoji {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: bounceIn .5s ease;
}
.celebrate-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 4px;
}
.celebrate-streak {
    font-size: .85rem;
    font-weight: 600;
    color: var(--c-orange);
    margin-top: 4px;
}
@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================================
   答题爽感 — 彩纸粒子
   ============================================================ */
.confetti-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    z-index: 9997;
    pointer-events: none;
    animation: confettiFall 2s ease-out forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   评论区增强样式
   ============================================================ */
.comment-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.comment-count-badge {
    font-size: .78rem;
    font-weight: 600;
    color: var(--c-text3);
    background: var(--c-bg);
    padding: 4px 10px;
    border-radius: 0px;
}
.comment-input-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--c-border);
}
.comment-input-avatar {
    width: 36px;
    height: 36px;
    border-radius: 0px;
    background: var(--c-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-input-body {
    flex: 1;
    min-width: 0;
}
.comment-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--c-text);
    background: var(--c-bg);
    resize: none;
    min-height: 44px;
    max-height: 120px;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    line-height: 1.5;
}
.comment-textarea:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px var(--c-brand-light);
    background: var(--c-card);
}
.comment-textarea::placeholder {
    color: var(--c-text3);
}
.comment-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}
.comment-input-hint {
    font-size: .75rem;
    color: var(--c-text3);
}
.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--c-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-item.comment-new {
    animation: commentSlideIn .4s ease;
}
@keyframes commentSlideIn {
    from { opacity: 0; transform: translateY(-12px); background: var(--c-green-light); }
    to { opacity: 1; transform: translateY(0); background: transparent; }
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.comment-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 0px;
    background: var(--c-brand-light);
    color: var(--c-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-user-name {
    font-size: .88rem;
    font-weight: 600;
}
.comment-body {
    font-size: .9rem;
    line-height: 1.6;
    color: var(--c-text);
    margin-left: 38px;
}
.comment-actions {
    display: flex;
    gap: 12px;
    margin-left: 38px;
    margin-top: 8px;
}
.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--c-border);
    border-radius: 0px;
    background: none;
    color: var(--c-text3);
    font-size: .78rem;
    cursor: pointer;
    transition: all .15s;
}
.comment-action-btn:hover {
    background: var(--c-bg);
    color: var(--c-brand);
    border-color: var(--c-brand);
}
.comment-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--c-text3);
    font-size: .88rem;
}
.comment-empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: .6;
}

/* ============================================================
   通用 Toast 提示
   ============================================================ */
.toast-tip {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,.8);
    color: #fff;
    padding: 10px 24px;
    border-radius: 0px;
    font-size: .88rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all .3s ease;
    pointer-events: none;
    white-space: nowrap;
}
.toast-tip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   手机端答题爽感适配
   ============================================================ */
@media (max-width: 768px) {
    .celebrate-popup {
        padding: 20px 28px;
        max-width: 280px;
    }
    .celebrate-emoji { font-size: 2rem; }
    .celebrate-text { font-size: .95rem; }
    .streak-bar { margin-left: 12px; margin-right: 12px; }
    .comment-body { margin-left: 0; margin-top: 6px; }
    .comment-actions { margin-left: 0; }
}

/* ============================================================
   iPhone 移动端深度优化 (iOS HIG 风格)
   ============================================================ */
@media (max-width: 768px) {
    /* 滚动条隐藏 */
    ::-webkit-scrollbar { display: none; }
    * { scrollbar-width: none; }

    /* 卡片组件增强 */
    .card {
        border-radius: 0px;
        padding: 18px 16px;
        margin-bottom: 14px;
        border: 0.5px solid rgba(0,0,0,.06);
        box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
    }

    /* 按钮组件 iOS 风格 */
    .btn {
        border-radius: 0px;
        font-weight: 600;
        letter-spacing: .01em;
        transition: transform .1s, opacity .15s;
    }
    .btn:active { transform: scale(.97); opacity: .85; }
    .btn-primary {
        background: var(--c-brand);
        box-shadow: 0 2px 8px rgba(37,99,235,.25);
    }
    .btn-lg { border-radius: 0px; min-height: 50px; font-size: .95rem; }

    /* Badge 组件增强 */
    .badge {
        border-radius: 0px;
        font-weight: 600;
        letter-spacing: .01em;
    }

    /* Tab 组件 iOS 风格 */
    .tabs {
        gap: 0;
        background: var(--c-bg);
        border-radius: 0px;
        padding: 3px;
    }
    .tab-btn {
        border-radius: 0px;
        font-weight: 600;
        transition: all .2s;
    }
    .tab-btn.active {
        box-shadow: 0 1px 4px rgba(0,0,0,.1);
    }

    /* Alert 组件增强 */
    .alert {
        border-radius: 0px;
        padding: 14px 16px;
    }

    /* Empty State 增强 */
    .empty-state { padding: 32px 20px; }
    .empty-icon { font-size: 2.5rem; opacity: .5; }
    .empty-text { font-size: .92rem; color: var(--c-text3); }

    /* Filter Bar 横向滚动 */
    .filter-bar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filter-bar::-webkit-scrollbar { display: none; }

    /* Table 横向滚动 */
    .table-wrap { border-radius: 0px; overflow: hidden; }
    table { font-size: .82rem; }

    /* 分页组件 */
    .pagination { gap: 6px; }
    .pg-btn { min-width: 36px; min-height: 36px; font-size: .82rem; }

    /* Leaderboard 增强 */
    .leaderboard li { border-radius: 0px; }

    /* 淡入动画优化 */
    .fade-in { animation: fadeInUp .35s ease; }
    @keyframes fadeInUp {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* 安全区顶部适配 (刘海屏) */
    .navbar { 
        padding-top: env(safe-area-inset-top, 0px);
    }
}

/* ============================================================
   打印
   ============================================================ */
@media print {
    .navbar, .footer, .btn, .nav-toggle, .practice-bottom-bar, .flash-bottom-bar { display: none !important; }
    .container { padding: 0; }
}
