/* 乐学 · 自由学习平台 —— 样式表（浅色主题） */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3fa;
  --surface-3: #e9ecf7;
  --text: #1c2340;
  --text-2: #3d4668;
  --muted: #6f7899;
  --border: #e4e8f2;
  --primary: #4f46e5;
  --primary-dark: #4038c9;
  --primary-soft: #eef0ff;
  --accent: #0891b2;
  --accent-soft: #e3f7fb;
  --warm: #f59e0b;
  --warm-soft: #fff5e2;
  --success: #10b981;
  --success-soft: #e6f8f1;
  --danger: #e5484d;
  --danger-soft: #ffeded;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(28, 35, 64, .07);
  --shadow-lg: 0 20px 55px rgba(28, 35, 64, .13);
  --ring: 0 0 0 3px rgba(79, 70, 229, .16);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg); }
.boot-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 700; background: linear-gradient(135deg, #4f46e5, #0891b2); box-shadow: var(--shadow-lg); }
.boot-text { color: var(--muted); font-size: 14px; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.app-main { min-height: calc(100vh - 150px); }
.section { padding: 54px 0; }
.section.tight { padding: 30px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 2px 0 0; font-size: 27px; letter-spacing: -.6px; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.eyebrow { display: inline-block; color: var(--primary); background: var(--primary-soft); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; padding: 4px 12px; border-radius: 99px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.divider { height: 1px; background: var(--border); margin: 22px 0; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; background: var(--surface-3); color: var(--text);
  padding: 10px 18px; border-radius: 11px; font-size: 14px; font-weight: 600;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: linear-gradient(135deg, #5b52ee, #4f46e5); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .25); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(79, 70, 229, .34); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 13px; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }

.input, .textarea, .select {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.label .req { color: var(--danger); }
.hint { font-size: 12px; color: var(--muted); }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box .input { padding-left: 38px; }
.search-box::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-52%); font-size: 20px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.success { background: var(--success-soft); color: #087f5b; }
.badge.warm { background: var(--warm-soft); color: #b45309; }
.badge.accent { background: var(--accent-soft); color: #0e7490; }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.chip { padding: 7px 15px; border-radius: 99px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: all .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tag { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 2px 9px; border-radius: 6px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 24px; }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b52ee, #0891b2); transition: width .45s ease; }
.progress.thin { height: 5px; }

.empty { text-align: center; padding: 52px 20px; color: var(--muted); }
.empty .empty-icon { font-size: 42px; display: block; margin-bottom: 10px; opacity: .8; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 17px; }

/* ---------- 导航 ---------- */
.navbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; height: 68px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.5px; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 18px; background: linear-gradient(135deg, #5b52ee, #0891b2); box-shadow: 0 4px 12px rgba(79, 70, 229, .28); }
.brand small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .5px; line-height: 1; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link { padding: 8px 13px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); transition: all .15s; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.user-pill { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 99px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); font-size: 16px; flex-shrink: 0; }
.nav-toggle { display: none; }

/* ---------- 首页 ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, #f6f7fb 100%); border-bottom: 1px solid var(--border); }
.hero::before { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; right: -140px; top: -230px; background: radial-gradient(circle, rgba(79, 70, 229, .13), transparent 68%); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; left: -180px; bottom: -260px; background: radial-gradient(circle, rgba(8, 145, 178, .11), transparent 68%); pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; padding: 76px 0 84px; }
.hero-title { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.22; letter-spacing: -1.6px; margin: 18px 0 18px; font-weight: 800; }
.hero-title em { font-style: normal; background: linear-gradient(100deg, #4f46e5, #0891b2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 16px; color: var(--muted); max-width: 520px; margin: 0 0 28px; line-height: 1.85; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .num { font-size: 25px; font-weight: 800; letter-spacing: -.8px; }
.hero-stats .lbl { font-size: 12px; color: var(--muted); }
.hero-visual { position: relative; }
.hero-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg); transform: rotate(1.5deg); }
.hero-card .hc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hc-lesson { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; background: var(--surface-2); margin-bottom: 10px; }
.hc-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 18px; flex-shrink: 0; }
.hc-check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 800; }
.float-badge { position: absolute; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 11px 16px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 700; }
.float-badge.f1 { top: -22px; right: -18px; transform: rotate(-4deg); }
.float-badge.f2 { bottom: -20px; left: -26px; transform: rotate(3deg); }
.float-badge span { color: var(--primary); font-size: 18px; margin-right: 6px; }

.feature-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; }
.cta-band { background: linear-gradient(120deg, #4f46e5, #5b52ee 45%, #0891b2); color: #fff; border-radius: 24px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.cta-band h2 { margin: 0 0 8px; font-size: 27px; }
.cta-band p { margin: 0; opacity: .85; }
.cta-band .btn { background: #fff; color: var(--primary); }

/* ---------- 课程 ---------- */
.filter-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.course-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; cursor: pointer; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d5d9ee; }
.course-cover { height: 128px; position: relative; display: flex; align-items: center; justify-content: center; font-size: 52px; color: #fff; overflow: hidden; }
.course-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 18%, rgba(255,255,255,.28), transparent 42%); }
.course-cover .cover-level { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: var(--text); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; z-index: 1; }
.course-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-body h3 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
.course-body .sub { color: var(--muted); font-size: 13px; margin-top: -4px; }
.course-meta { display: flex; gap: 14px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.course-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }

/* ---------- 课程详情 ---------- */
.detail-hero { border-radius: 22px; padding: 34px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.detail-hero::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; right: -80px; top: -160px; background: rgba(255,255,255,.13); }
.detail-hero .dh-emoji { font-size: 46px; }
.detail-hero h1 { margin: 8px 0; font-size: 32px; letter-spacing: -.8px; }
.detail-hero p { margin: 0; opacity: .9; max-width: 620px; }
.detail-hero .dh-tags { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.detail-hero .dh-tags span { background: rgba(255,255,255,.2); padding: 3px 11px; border-radius: 99px; font-size: 12px; }
.detail-layout { display: grid; grid-template-columns: 1fr 310px; gap: 24px; align-items: start; }
.module { margin-bottom: 18px; overflow: hidden; }
.module-head { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, var(--surface-2), transparent); }
.module-head h3 { margin: 0; font-size: 16px; }
.point-item { display: flex; align-items: center; gap: 13px; padding: 13px 22px; border-bottom: 1px solid var(--border); transition: background .15s; }
.point-item:last-child { border-bottom: 0; }
.point-item:hover { background: var(--surface-2); }
.point-num { width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.point-item.done .point-num { background: var(--success-soft); color: var(--success); }
.point-status { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 11px; color: transparent; flex-shrink: 0; }
.point-item.done .point-status { background: var(--success); border-color: var(--success); color: #fff; }
.side-card { position: sticky; top: 88px; }

/* ---------- 学习页 ---------- */
.learn-layout { display: grid; grid-template-columns: 272px 1fr; gap: 22px; align-items: start; }
.learn-side { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; }
.side-group { padding: 10px 0; border-bottom: 1px solid var(--border); }
.side-group:last-child { border: 0; }
.side-group-title { padding: 6px 14px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .4px; }
.side-point { display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.side-point:hover { background: var(--surface-2); }
.side-point.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.side-point .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.side-point.done .dot { background: var(--success); }
.side-point.active .dot { background: var(--primary); }
.learn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.learn-head h1 { margin: 4px 0 6px; font-size: 25px; letter-spacing: -.6px; }
.task-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.task-card { border: 1px solid var(--border); border-radius: 13px; padding: 13px 11px; text-align: center; background: var(--surface); cursor: pointer; transition: all .16s; }
.task-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.task-card.active { border-color: var(--primary); box-shadow: var(--ring); background: var(--primary-soft); }
.task-card.done { background: var(--success-soft); border-color: #bfe9d8; }
.task-card .t-icon { font-size: 20px; display: block; }
.task-card .t-name { font-size: 12px; font-weight: 700; margin-top: 4px; }
.task-card .t-score { font-size: 11px; color: var(--muted); }
.panel-body { padding: 24px; min-height: 260px; }
.material-text { white-space: pre-line; font-size: 15px; line-height: 2; color: var(--text-2); }
.slide-list { display: grid; gap: 12px; }
.slide-item { display: flex; gap: 14px; padding: 16px 18px; border-radius: 13px; background: var(--surface-2); border-left: 4px solid var(--primary); }
.slide-item .s-num { font-size: 20px; font-weight: 800; color: var(--primary); opacity: .55; }
.video-stage { border-radius: 15px; padding: 34px; text-align: center; color: #fff; margin-bottom: 18px; position: relative; overflow: hidden; }
.video-stage .play { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.24); display: grid; place-items: center; margin: 0 auto 12px; font-size: 22px; border: 1px solid rgba(255,255,255,.5); }
.video-stage h3 { margin: 0 0 4px; font-size: 18px; }
.video-stage p { margin: 0; font-size: 13px; opacity: .9; }
.notes-box { background: var(--surface-2); border-radius: 13px; padding: 16px 18px; }
.notes-box h4 { margin: 0 0 8px; font-size: 14px; }
.notes-box p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.9; }
.quiz-item { padding: 18px 0; border-bottom: 1px dashed var(--border); }
.quiz-item:last-child { border: 0; }
.quiz-item .q-title { font-weight: 700; margin-bottom: 12px; }
.quiz-option { display: flex; align-items: center; gap: 11px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 8px; cursor: pointer; font-size: 14px; transition: all .15s; }
.quiz-option:hover { border-color: var(--primary); }
.quiz-option.selected { border-color: var(--primary); background: var(--primary-soft); }
.quiz-option.correct { border-color: var(--success); background: var(--success-soft); }
.quiz-option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.opt-letter { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.quiz-explain { background: var(--accent-soft); color: #0e7490; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-top: 10px; }
.result-ring { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: conic-gradient(var(--primary) var(--p, 0%), var(--surface-3) 0); position: relative; }
.result-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); }
.result-ring span { position: relative; font-size: 25px; font-weight: 800; }

/* ---------- 面板 ---------- */
.stat-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-card .s-label { font-size: 13px; color: var(--muted); }
.stat-card .s-value { font-size: 29px; font-weight: 800; letter-spacing: -1px; line-height: 1.3; }
.stat-card .s-icon { font-size: 24px; }
.chart-bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; height: 100%; }
.chart-col .bar { width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #6d64f2, #4f46e5); min-height: 4px; transition: height .4s; }
.chart-col .bar.zero { background: var(--surface-3); }
.chart-col .cap { font-size: 11px; color: var(--muted); }
.badge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.badge-item { text-align: center; padding: 16px 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.badge-item.locked { opacity: .42; filter: grayscale(1); }
.badge-item .b-icon { font-size: 28px; }
.badge-item .b-name { font-weight: 700; font-size: 13px; margin-top: 4px; }
.badge-item .b-desc { font-size: 11px; color: var(--muted); }
.mini-course { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mini-course:last-child { border: 0; }
.mini-cover { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 21px; flex-shrink: 0; }

/* ---------- 证书 ---------- */
.cert-card { background: #fffdf8; border: 1px solid #eadfc4; border-radius: 18px; padding: 30px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.cert-card::before { content: ""; position: absolute; inset: 9px; border: 2px double #d9c79b; border-radius: 12px; pointer-events: none; }
.cert-inner { position: relative; text-align: center; padding: 16px 12px; }
.cert-inner .c-logo { font-size: 13px; letter-spacing: 5px; color: #a17c37; font-weight: 700; }
.cert-inner h2 { font-size: 29px; letter-spacing: 7px; margin: 18px 0; color: #3c3320; }
.cert-inner .c-name { font-size: 22px; font-weight: 700; border-bottom: 1px solid #d9c79b; display: inline-block; padding: 0 26px 5px; }
.cert-inner .c-text { color: #6c5c3d; line-height: 2; margin: 16px 0; font-size: 14px; }
.cert-seal { position: absolute; right: 20px; bottom: 14px; width: 78px; height: 78px; border: 3px solid rgba(197, 60, 60, .65); border-radius: 50%; color: rgba(197, 60, 60, .75); display: grid; place-items: center; font-size: 13px; font-weight: 800; transform: rotate(-16deg); line-height: 1.3; text-align: center; }
.cert-foot { display: flex; justify-content: space-between; font-size: 12px; color: #93805a; margin-top: 20px; }

/* ---------- 考试中心 ---------- */
.exam-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.exam-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; color: var(--primary); }
.exam-q { padding: 18px 0; border-bottom: 1px solid var(--border); }
.exam-q:last-child { border: 0; }
.exam-q .eq-title { font-weight: 700; margin-bottom: 12px; }

/* ---------- 后台 / 表格 ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tab { padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; background: transparent; border-top: 0; border-left: 0; border-right: 0; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 12px 14px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fafbff; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.role-pill { font-size: 12px; padding: 3px 10px; border-radius: 99px; font-weight: 700; }
.role-pill.admin { background: var(--warm-soft); color: #b45309; }
.role-pill.teacher { background: var(--accent-soft); color: #0e7490; }
.role-pill.student { background: var(--surface-2); color: var(--muted); }
.editor-point { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; background: var(--surface); }

/* ---------- 登录 ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 600px; gap: 0; max-width: 900px; margin: 0 auto; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-side { background: linear-gradient(150deg, #4f46e5, #6d5cf0 48%, #0891b2); color: #fff; padding: 46px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { font-size: 30px; line-height: 1.4; margin: 0 0 14px; }
.auth-side p { opacity: .88; margin: 0 0 30px; }
.auth-side .a-points { display: flex; flex-direction: column; gap: 12px; }
.auth-side .a-points div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.auth-card { background: var(--surface); padding: 46px; display: flex; flex-direction: column; justify-content: center; }
.auth-card h2 { margin: 0 0 6px; font-size: 24px; }
.demo-list { display: grid; gap: 8px; }
.demo-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 11px; padding: 9px 12px; cursor: pointer; text-align: left; background: var(--surface); transition: all .15s; width: 100%; }
.demo-item:hover { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- 弹窗 / 提示 ---------- */
.toast-root { position: fixed; top: 80px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; padding: 12px 18px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; min-width: 210px; animation: toastIn .22s ease; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
.modal-mask { position: fixed; inset: 0; z-index: 150; background: rgba(20, 26, 50, .42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; }
.modal-card { background: var(--surface); border-radius: 20px; padding: 26px; width: min(560px, 100%); max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn .2s ease; }
.modal-card.wide { width: min(820px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card h3 { margin: 0 0 6px; font-size: 20px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.footer-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--primary); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; padding: 54px 0 64px; }
  .hero-visual { max-width: 480px; }
  .detail-layout, .learn-layout { grid-template-columns: 1fr; }
  .learn-side, .side-card { position: static; max-height: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-wrap { grid-template-columns: 1fr; max-width: 520px; }
  .auth-side { padding: 32px; }
}
@media (max-width: 720px) {
  .container, .nav-inner, .footer-inner { width: min(100% - 28px, 1180px); }
  .nav-inner { height: 60px; gap: 10px; }
  .nav-links { position: absolute; top: 60px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; display: none; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: grid; margin-left: auto; }
  .nav-actions .btn { padding: 7px 11px; font-size: 13px; }
  .user-pill span.uname { display: none; }
  .section { padding: 36px 0; }
  .grid-2, .grid-3, .grid-4, .form-grid, .badge-grid { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-title { font-size: 34px; }
  .detail-hero { padding: 24px; }
  .cta-band { padding: 28px; }
  .float-badge.f1 { right: 0; } .float-badge.f2 { left: 0; }
  .cert-card { padding: 20px; }
  .cert-inner h2 { font-size: 22px; letter-spacing: 3px; }
  .cert-seal { width: 60px; height: 60px; font-size: 11px; }
  .toast-root { right: 12px; left: 12px; }
}

@media print {
  body { background: #fff; }
  .navbar, .footer, .no-print, .app-main > .container > .section-head, .cert-actions { display: none !important; }
  .app-main { min-height: 0; }
  .cert-card { box-shadow: none; border: 2px double #b9a273; page-break-inside: avoid; }
  .grid, .section { padding: 0 !important; margin: 0 !important; }
}
