:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #e6e9f0;
  --brand: #1d4ed8;
  --brand-soft: #e8eeff;
  --accent: #f59e0b;
  --danger: #e5484d;
  --ok: #12b76a;
  --shadow: 0 8px 30px rgba(16, 24, 40, .08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 420px at 12% -10%, #e3ecff 0%, transparent 60%),
    radial-gradient(700px 360px at 95% 0%, #fff4df 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(160%) blur(12px);
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(230, 233, 240, .9);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--brand), #4f7cff);
  color: #fff; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(29, 78, 216, .28);
}
.brand-text { font-weight: 700; font-size: 16px; letter-spacing: .3px; }
.brand-text em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 8px; }
.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: .18s;
}
.nav a:hover { color: var(--ink); background: #eef2f9; }
.nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* hero */
.hero { padding: 54px 0 26px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.2; margin: 0 0 14px; letter-spacing: -.5px; }
.hero h1 span { background: linear-gradient(100deg, #1d4ed8, #0ea5e9 55%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font-size: 14px; font-weight: 600;
  padding: 11px 20px; border-radius: 12px; transition: .18s;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(29, 78, 216, .25); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #c9d3e6; }
.stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 13px; color: var(--muted); }

/* section */
.section { padding: 26px 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 20px; margin: 0; }
.section-head a { font-size: 13px; color: var(--brand); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(16,24,40,.12); }
.cover {
  position: relative; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e3a8a, #2563eb 45%, #38bdf8);
  display: grid; place-items: center; color: rgba(255,255,255,.92);
  font-size: 30px; font-weight: 700; letter-spacing: 2px;
}
.cover.alt { background: linear-gradient(135deg, #7c2d12, #ea580c 50%, #fbbf24); }
.cover.alt2 { background: linear-gradient(135deg, #064e3b, #059669 50%, #34d399); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; background: rgba(16,24,40,.62); color: #fff;
  backdrop-filter: blur(4px);
}
.badge.free { background: rgba(18,183,106,.92); }
.badge.paid { background: rgba(245,158,11,.95); color: #3b2503; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 15px; line-height: 1.45; }
.card-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--danger); font-weight: 700; font-size: 16px; }
.price.free { color: var(--ok); }
.link-mini { font-size: 13px; color: var(--brand); font-weight: 600; }

/* live */
.live-card { padding: 16px; gap: 10px; }
.live-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.living { color: var(--danger); }
.status.living .dot { background: var(--danger); animation: pulse 1.4s infinite; }
.status.pending { color: var(--accent); }
.status.pending .dot { background: var(--accent); }
.status.ended { color: var(--muted); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* detail */
.detail-hero { display: grid; grid-template-columns: 220px 1fr; gap: 26px; padding: 36px 0 18px; align-items: center; }
.detail-cover { aspect-ratio: 4/3; border-radius: 18px; background: linear-gradient(135deg, #1e3a8a, #2563eb 45%, #38bdf8); display: grid; place-items: center; color: #fff; font-size: 40px; font-weight: 700; box-shadow: var(--shadow); }
.detail-hero h1 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 30px); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #eef2f9; color: #475467; }
.price-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.note { font-size: 12.5px; color: var(--muted); }

/* chapters */
.chapter { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.chapter-head { padding: 14px 16px; font-weight: 600; display: flex; justify-content: space-between; background: #fbfcfe; }
.lesson { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.lesson .idx { width: 22px; height: 22px; border-radius: 7px; background: #eef2f9; color: #475467; font-size: 11px; display: grid; place-items: center; flex: none; }
.lesson .name { flex: 1; min-width: 0; }
.lesson .dur { font-size: 12px; color: var(--muted); }
.lesson button.play { border: 0; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.lesson button.play:hover { background: #dbe6ff; }
.lesson .locked { font-size: 12px; color: var(--muted); }
.lesson.trial .idx { background: #e7f8ef; color: #087443; }

/* player */
.player-mask { position: fixed; inset: 0; background: rgba(8, 12, 22, .82); z-index: 80; display: grid; place-items: center; padding: 20px; }
.player-box { width: min(980px, 100%); background: #0b1220; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.player-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 18px; color: #fff; gap: 12px; }
.player-head h3 { margin: 0; font-size: 15px; }
.player-head .muted { color: #98a2b3; font-size: 12px; margin: 4px 0 0; }
.icon-btn { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.video-wrap { position: relative; background: #000; aspect-ratio: 16/9; }
.video-wrap video { width: 100%; height: 100%; display: block; background: #000; }
.player-tip { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 14px; text-align: center; padding: 20px; }

/* footer */
.site-footer { margin-top: 50px; padding: 26px 0 40px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* empty/loading */
.state { padding: 50px 0; text-align: center; color: var(--muted); font-size: 14px; }
.skeleton { height: 150px; border-radius: 16px; background: linear-gradient(90deg, #eef1f6, #f7f9fc, #eef1f6); background-size: 200% 100%; animation: shine 1.2s infinite; }
@keyframes shine { to { background-position: -200% 0; } }

/* 题库 / 背单词 / 资料（官网新增） */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); background: #fff; color: #475467; font-size: 13px; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.quiz { display: grid; gap: 14px; }
.quiz-q { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.q-head { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.q-no { flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 12px; display: grid; place-items: center; }
.q-stem { flex: 1; min-width: 0; word-break: break-word; }
.q-tag { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.opts { display: grid; gap: 8px; margin-top: 12px; }
.opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.opt:hover { border-color: #c9d3e6; }
.opt input { margin-top: 3px; }
.opt.correct { border-color: var(--ok); background: #effbf5; }
.opt.wrong { border-color: var(--danger); background: #fef1f1; }
.blank-input, .subj-input { width: 100%; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; }
.subj-input { min-height: 90px; resize: vertical; }
.quiz-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 22px 0 10px; }
.result-head { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; text-align: center; margin-bottom: 18px; }
.result-head b { font-size: 34px; color: var(--brand); }
.know { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.analysis { margin-top: 10px; font-size: 13px; color: #475467; background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
.analysis b { color: var(--ink); }

.word-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 34px 24px; text-align: center; }
.word-text { font-size: 38px; font-weight: 700; letter-spacing: .5px; word-break: break-word; }
.word-phon { color: var(--muted); font-size: 14px; margin-top: 6px; }
.word-pos { display: inline-block; font-size: 12px; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 6px; margin-top: 12px; }
.word-meaning { font-size: 18px; margin-top: 16px; font-weight: 600; white-space: pre-line; }
.word-example { color: var(--muted); font-size: 13.5px; margin-top: 10px; white-space: pre-line; }
.word-nav { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.word-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.bar { height: 6px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #38bdf8); }

.mat-item { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.mat-icon { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(140deg, #1d4ed8, #38bdf8); }
.mat-body { flex: 1; min-width: 0; }
.mat-body h4 { margin: 0; font-size: 14.5px; }
.mat-body p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }

@media (max-width: 720px) {
  .word-text { font-size: 30px; }
  .mat-item { align-items: flex-start; }
}

@media (max-width: 720px) {
  .detail-hero { grid-template-columns: 1fr; }
  .detail-cover { max-width: 260px; }
  .nav a { padding: 7px 10px; }
  .brand-text em { display: none; }
}