/* ============ 自考英语在线学堂 · 商务高级风格 ============
   深藏青 + 香槟金，克制的留白与细线，卡片式布局          */
:root {
  --navy-950: #0b1524;
  --navy-900: #101f33;
  --navy-800: #16283f;
  --navy-700: #1e3450;
  --navy-line: rgba(255,255,255,.08);
  --gold: #c9a227;
  --gold-light: #e3c565;
  --gold-dark: #a8871b;
  --ink: #17202c;
  --ink-soft: #55637a;
  --bg: #f6f7f9;
  --card: #ffffff;
  --line: #e7eaf0;
  --danger: #c0392b;
  --ok: #1e7f4f;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(16,31,51,.06), 0 4px 14px rgba(16,31,51,.05);
  --shadow-md: 0 8px 30px rgba(16,31,51,.12);
  --shadow-lg: 0 20px 60px rgba(16,31,51,.22);
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { font-family:"PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif; background:var(--bg); color:var(--ink); line-height:1.6; }
a { text-decoration:none; color:inherit; }
button { font-family:inherit; cursor:pointer; }

/* ---------- 顶部导航 ---------- */
.topbar { position:sticky; top:0; z-index:100; background:var(--navy-950); border-bottom:1px solid var(--navy-line); }
.topbar-inner { max-width:1200px; margin:0 auto; padding:0 24px; height:64px; display:flex; align-items:center; gap:40px; }
.brand { display:flex; align-items:center; gap:10px; }
.brand-mark { width:36px; height:36px; border-radius:9px; background:linear-gradient(135deg,var(--gold),var(--gold-dark)); color:var(--navy-950); display:grid; place-items:center; font-weight:800; font-size:15px; letter-spacing:.5px; }
.brand-name { color:#fff; font-weight:600; font-size:16px; letter-spacing:.5px; }
.nav { display:flex; gap:6px; flex:1; }
.nav-link { color:rgba(255,255,255,.72); padding:8px 14px; border-radius:8px; font-size:14.5px; transition:.2s; }
.nav-link:hover { color:#fff; background:rgba(255,255,255,.06); }
.topbar-right { display:flex; gap:10px; align-items:center; }
.topbar-right .user-chip { color:#fff; font-size:14px; display:flex; align-items:center; gap:10px; }
.user-chip .vip-tag { background:linear-gradient(135deg,var(--gold),var(--gold-dark)); color:#122036; font-size:11px; font-weight:700; padding:2px 8px; border-radius:99px; }

/* ---------- 按钮 ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:none; border-radius:10px; padding:9px 20px; font-size:14.5px; font-weight:600; transition:.2s; }
.btn:active { transform:translateY(1px); }
.btn-gold { background:linear-gradient(135deg,var(--gold-light),var(--gold) 55%,var(--gold-dark)); color:#17223a; box-shadow:0 4px 14px rgba(201,162,39,.35); }
.btn-gold:hover { filter:brightness(1.06); }
.btn-ghost { background:transparent; color:rgba(255,255,255,.85); border:1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { background:rgba(255,255,255,.08); color:#fff; }
.btn-outline { background:transparent; color:var(--navy-800); border:1.5px solid var(--navy-700); }
.btn-outline:hover { background:var(--navy-800); color:#fff; }
.btn-primary { background:var(--navy-800); color:#fff; }
.btn-primary:hover { background:var(--navy-700); }
.btn-lg { padding:13px 30px; font-size:15.5px; border-radius:12px; }
.btn-block { width:100%; }
.btn-sm { padding:6px 14px; font-size:13px; border-radius:8px; }

/* ---------- Hero ---------- */
.hero { background:
  radial-gradient(1100px 500px at 85% -10%, rgba(201,162,39,.14), transparent 60%),
  linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color:#fff; position:relative; overflow:hidden;
}
.hero::after { content:""; position:absolute; inset:0; background-image:
  linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size:56px 56px; pointer-events:none; }
.hero-inner { max-width:1200px; margin:0 auto; padding:96px 24px 84px; position:relative; z-index:1; }
.hero-badge { display:inline-block; border:1px solid rgba(201,162,39,.5); color:var(--gold-light); font-size:13px; letter-spacing:2px; padding:6px 16px; border-radius:99px; margin-bottom:26px; }
.hero-title { font-size:52px; line-height:1.22; font-weight:700; letter-spacing:1px; }
.hero-title em { font-style:normal; color:var(--gold-light); position:relative; }
.hero-desc { margin:22px 0 34px; color:rgba(255,255,255,.68); font-size:17px; max-width:640px; }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; }
.hero-stats { display:flex; gap:0; margin-top:56px; border-top:1px solid var(--navy-line); padding-top:26px; }
.hero-stat { padding-right:48px; margin-right:48px; border-right:1px solid var(--navy-line); }
.hero-stat b { font-size:30px; font-weight:700; color:#fff; display:block; }
.hero-stat span { color:rgba(255,255,255,.55); font-size:13px; letter-spacing:1px; }

/* ---------- 区块 ---------- */
.section { max-width:1200px; margin:0 auto; padding:72px 24px 40px; }
.section-alt { max-width:none; background:var(--bg); }
.section-alt > .section-head, .section-alt > * { }
.section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:34px; }
.section-kicker { color:var(--gold-dark); font-size:12px; letter-spacing:3px; font-weight:700; margin-bottom:8px; }
.section-title { font-size:30px; font-weight:700; color:var(--ink); letter-spacing:.5px; }
.section-sub { color:var(--ink-soft); margin-top:10px; font-size:14.5px; }

/* ---------- 课程卡片 ---------- */
.course-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:22px; }
.course-card { background:var(--card); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); transition:.25s; border:1px solid var(--line); display:flex; flex-direction:column; }
.course-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); }
.course-cover { height:150px; background:linear-gradient(135deg,var(--navy-900),var(--navy-700)); position:relative; display:grid; place-items:center; color:rgba(255,255,255,.9); font-size:40px; }
.course-cover img { width:100%; height:100%; object-fit:cover; }
.course-cover .course-count { position:absolute; right:12px; bottom:10px; background:rgba(11,21,36,.7); color:#fff; font-size:12px; padding:4px 10px; border-radius:99px; }
.course-body { padding:20px 22px 22px; flex:1; display:flex; flex-direction:column; }
.course-title { font-size:17px; font-weight:700; margin-bottom:8px; }
.course-desc { color:var(--ink-soft); font-size:13.5px; flex:1; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.course-meta { display:flex; justify-content:space-between; align-items:center; margin-top:16px; padding-top:14px; border-top:1px dashed var(--line); }
.course-teacher { color:var(--ink-soft); font-size:13px; }

/* 章节列表 */
.chapter-list { margin-top:12px; border-top:1px solid var(--line); }
.chapter-item { display:flex; align-items:center; justify-content:space-between; padding:11px 4px; border-bottom:1px dashed var(--line); font-size:14px; cursor:pointer; transition:.15s; }
.chapter-item:hover { color:var(--gold-dark); padding-left:8px; }
.chapter-item .ch-free { color:var(--ok); font-size:11px; border:1px solid var(--ok); padding:1px 7px; border-radius:99px; margin-left:8px; }
.chapter-item .ch-dur { color:var(--ink-soft); font-size:12px; }
.chapter-item .ch-lock { color:var(--ink-soft); font-size:12px; }

/* ---------- 直播 ---------- */
.live-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(360px,1fr)); gap:22px; max-width:1200px; margin:0 auto; padding:0 24px; }
.live-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:22px 24px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:12px; position:relative; overflow:hidden; }
.live-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:linear-gradient(var(--gold),var(--gold-dark)); }
.live-status { display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600; }
.live-status .dot { width:8px; height:8px; border-radius:50%; }
.live-status[data-s="1"] { color:var(--danger); } .live-status[data-s="1"] .dot { background:var(--danger); animation:pulse 1.4s infinite; }
.live-status[data-s="0"] { color:var(--gold-dark); } .live-status[data-s="0"] .dot { background:var(--gold); }
.live-status[data-s="2"] { color:var(--ink-soft); } .live-status[data-s="2"] .dot { background:#9aa7ba; }
@keyframes pulse { 50% { opacity:.35; } }
.live-title { font-size:17px; font-weight:700; }
.live-meta { color:var(--ink-soft); font-size:13.5px; display:flex; gap:16px; flex-wrap:wrap; }

/* ---------- 单词 ---------- */
.word-summary { display:flex; gap:22px; }
.word-summary .ws-item { text-align:center; }
.word-summary b { display:block; font-size:22px; color:var(--navy-800); }
.word-summary span { font-size:12px; color:var(--ink-soft); }
.deck-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:22px; }
.deck-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow-sm); transition:.25s; }
.deck-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }
.deck-name { font-size:16.5px; font-weight:700; margin-bottom:8px; }
.deck-desc { color:var(--ink-soft); font-size:13.5px; min-height:40px; }
.deck-foot { display:flex; justify-content:space-between; align-items:center; margin-top:16px; }
.deck-count { font-size:13px; color:var(--ink-soft); }
.deck-count b { color:var(--navy-800); font-size:16px; }

/* 单词训练卡 */
.flashcard { background:linear-gradient(160deg,var(--navy-900),var(--navy-700)); color:#fff; border-radius:16px; padding:44px 30px; text-align:center; min-height:240px; display:flex; flex-direction:column; justify-content:center; gap:14px; }
.flashcard .fc-word { font-size:40px; font-weight:700; letter-spacing:1px; }
.flashcard .fc-phonetic { color:var(--gold-light); font-size:15px; }
.flashcard .fc-meaning { font-size:17px; color:rgba(255,255,255,.85); }
.flashcard .fc-example { font-size:13px; color:rgba(255,255,255,.5); font-style:italic; }
.flash-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:18px; }
.flash-btn { padding:12px; border-radius:10px; border:none; font-weight:600; font-size:14px; transition:.15s; }
.flash-btn.f0 { background:#fdeaea; color:var(--danger); } .flash-btn.f0:hover { background:#fbd3d3; }
.flash-btn.f1 { background:#fff6df; color:var(--gold-dark); } .flash-btn.f1:hover { background:#fdeab6; }
.flash-btn.f2 { background:#e5f5ec; color:var(--ok); } .flash-btn.f2:hover { background:#cfeedd; }
.progress-bar { height:6px; background:var(--line); border-radius:99px; overflow:hidden; margin-top:16px; }
.progress-bar i { display:block; height:100%; background:linear-gradient(90deg,var(--gold),var(--gold-dark)); border-radius:99px; transition:width .3s; }

/* ---------- 试卷 ---------- */
.paper-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:22px; }
.paper-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow-sm); transition:.25s; }
.paper-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }
.paper-year { display:inline-block; background:var(--navy-800); color:var(--gold-light); font-size:12px; padding:3px 12px; border-radius:99px; letter-spacing:1px; margin-bottom:12px; }
.paper-title { font-size:17px; font-weight:700; margin-bottom:8px; }
.paper-desc { color:var(--ink-soft); font-size:13.5px; min-height:40px; }
.paper-foot { display:flex; justify-content:space-between; align-items:center; margin-top:16px; }

/* 成绩列表 */
.records-box { margin-top:28px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:24px; }
.records-box table { width:100%; border-collapse:collapse; font-size:14px; }
.records-box th, .records-box td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--line); }
.records-box th { color:var(--ink-soft); font-weight:600; font-size:12.5px; letter-spacing:1px; }

/* ---------- 资料 ---------- */
.material-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(380px,1fr)); gap:18px; }
.material-item { display:flex; align-items:center; gap:16px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px 22px; box-shadow:var(--shadow-sm); }
.material-icon { width:46px; height:46px; border-radius:11px; background:linear-gradient(135deg,#f4ecd2,#e7d9a8); display:grid; place-items:center; font-size:20px; flex-shrink:0; }
.material-info { flex:1; min-width:0; }
.material-title { font-weight:700; font-size:15px; margin-bottom:3px; }
.material-meta { color:var(--ink-soft); font-size:12.5px; display:flex; gap:12px; flex-wrap:wrap; }
.material-vip { color:var(--gold-dark); font-size:11px; font-weight:700; border:1px solid var(--gold); padding:1px 8px; border-radius:99px; }

/* ---------- VIP ---------- */
.vip-card { max-width:640px; margin:0 auto; background:linear-gradient(160deg,var(--navy-900),var(--navy-700)); color:#fff; border-radius:20px; padding:56px 40px; text-align:center; box-shadow:var(--shadow-lg); position:relative; overflow:hidden; }
.vip-card::before { content:"VIP"; position:absolute; right:-20px; top:-30px; font-size:140px; font-weight:800; color:rgba(255,255,255,.04); letter-spacing:-6px; }
.vip-card .section-kicker { color:var(--gold-light); }
.vip-card .section-title { color:#fff; }
.vip-card .section-sub { color:rgba(255,255,255,.65); }
.vip-price { margin:26px 0 30px; color:var(--gold-light); }
.vip-price .vip-cur { font-size:22px; font-weight:700; vertical-align:top; }
.vip-price span:nth-child(2) { font-size:64px; font-weight:800; line-height:1; }
.vip-unit { font-size:14px; color:rgba(255,255,255,.5); margin-left:6px; }
.vip-note { margin-top:18px; color:rgba(255,255,255,.45); font-size:12.5px; }

/* ---------- 页脚 ---------- */
.footer { background:var(--navy-950); color:rgba(255,255,255,.6); margin-top:60px; }
.footer-inner { max-width:1200px; margin:0 auto; padding:30px 24px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; font-size:13px; }
.footer-brand { display:flex; align-items:center; gap:10px; color:#fff; }
.footer-brand .brand-mark { width:30px; height:30px; font-size:12px; }
.footer-info { display:flex; gap:24px; align-items:center; flex-wrap:wrap; }
.footer-admin { color:var(--gold-light); }

/* ---------- 浮动二维码 ---------- */
.float-qr { position:fixed; right:26px; bottom:26px; z-index:200; display:flex; flex-direction:column; align-items:flex-end; gap:12px; }
.float-qr-panel { width:230px; background:var(--card); border-radius:16px; box-shadow:var(--shadow-lg); padding:22px 18px 18px; text-align:center; position:relative; display:none; animation:slideUp .25s ease; border:1px solid var(--line); }
.float-qr.open .float-qr-panel { display:block; }
@keyframes slideUp { from { opacity:0; transform:translateY(12px); } }
.float-qr-close { position:absolute; right:10px; top:8px; border:none; background:none; font-size:20px; color:var(--ink-soft); }
.float-qr-title { font-weight:700; font-size:15px; margin-bottom:12px; }
.float-qr-img img { width:180px; height:180px; border-radius:10px; display:block; margin:0 auto; }
.qr-placeholder { width:180px; height:180px; margin:0 auto; border:1.5px dashed var(--line); border-radius:10px; display:grid; place-items:center; color:var(--ink-soft); font-size:13px; line-height:1.8; }
.float-qr-desc { margin-top:12px; color:var(--ink-soft); font-size:12.5px; }
.float-qr-btn { display:flex; align-items:center; gap:10px; background:linear-gradient(135deg,var(--gold-light),var(--gold-dark)); border:none; color:#17223a; font-weight:700; font-size:14.5px; padding:14px 22px; border-radius:99px; box-shadow:0 10px 30px rgba(201,162,39,.4); transition:.2s; }
.float-qr-btn:hover { transform:translateY(-2px); }
.float-qr-label { letter-spacing:1px; }

/* ---------- 弹层 ---------- */
.modal { position:fixed; inset:0; z-index:300; display:grid; place-items:center; padding:20px; }
.modal[hidden] { display:none; }
.modal-mask { position:absolute; inset:0; background:rgba(8,15,26,.62); backdrop-filter:blur(3px); }
.modal-panel { position:relative; background:var(--card); border-radius:18px; padding:34px; width:min(480px, 100%); max-height:90vh; overflow:auto; box-shadow:var(--shadow-lg); animation:slideUp .25s ease; }
.modal-panel-lg { width:min(880px, 100%); }
.modal-panel-xl { width:min(1000px, 100%); padding:28px; }
.modal-close { position:absolute; right:16px; top:14px; border:none; background:none; font-size:24px; color:var(--ink-soft); z-index:2; }
.modal-title { font-size:20px; font-weight:700; margin-bottom:16px; }

/* 播放器 */
.player-wrap { background:#000; border-radius:12px; overflow:hidden; aspect-ratio:16/9; }
.player-wrap video, .player-wrap iframe { width:100%; height:100%; display:block; }
.player-tip { margin-top:12px; color:var(--ink-soft); font-size:13px; }

/* 认证 */
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; background:var(--bg); border-radius:12px; padding:5px; margin-bottom:24px; }
.auth-tab { border:none; background:none; padding:10px; border-radius:9px; font-size:15px; font-weight:600; color:var(--ink-soft); }
.auth-tab.active { background:var(--navy-800); color:#fff; }
.field { display:block; margin-bottom:16px; }
.field span { display:block; font-size:13px; color:var(--ink-soft); margin-bottom:6px; font-weight:600; }
.field input, .field select, .field textarea { width:100%; border:1.5px solid var(--line); border-radius:10px; padding:11px 14px; font-size:15px; outline:none; transition:.15s; font-family:inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(201,162,39,.12); }
.auth-error { color:var(--danger); font-size:13.5px; margin-top:12px; min-height:18px; }
.auth-hint { margin-top:14px; color:var(--ink-soft); font-size:12px; text-align:center; }

/* 考试 */
.exam-part { margin-bottom:28px; }
.exam-part-head { background:var(--navy-900); color:#fff; border-radius:10px; padding:14px 18px; margin-bottom:14px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.exam-part-head b { font-size:15.5px; }
.exam-part-head .part-info { color:var(--gold-light); font-size:12.5px; }
.exam-passage { background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:16px 20px; font-size:14.5px; line-height:1.9; margin-bottom:14px; white-space:pre-wrap; }
.exam-passage .psg-title { font-weight:700; margin-bottom:8px; }
.exam-options { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.exam-options .opt-chip { background:var(--bg); border:1px solid var(--line); padding:6px 14px; border-radius:99px; font-size:13.5px; }
.exam-q { border:1px solid var(--line); border-radius:10px; padding:14px 18px; margin-bottom:12px; }
.exam-q .q-stem { font-weight:600; font-size:14.5px; margin-bottom:10px; }
.q-opts { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:8px; }
.q-opt { display:flex; align-items:center; gap:8px; border:1.5px solid var(--line); border-radius:9px; padding:8px 12px; font-size:13.5px; cursor:pointer; transition:.15s; }
.q-opt:hover { border-color:var(--gold); }
.q-opt.sel { border-color:var(--gold); background:#fdf8e9; font-weight:600; }
.q-input { width:100%; max-width:260px; border:1.5px solid var(--line); border-radius:9px; padding:8px 12px; font-size:14px; }
.q-input:focus { outline:none; border-color:var(--gold); }
.q-writing textarea { width:100%; min-height:180px; border:1.5px solid var(--line); border-radius:10px; padding:14px; font-size:14.5px; font-family:Georgia,serif; line-height:1.8; }
.q-writing textarea:focus { outline:none; border-color:var(--gold); }
.exam-footer { position:sticky; bottom:0; background:var(--card); border-top:1px solid var(--line); padding:16px 6px 6px; display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.exam-result { text-align:center; padding:30px 10px; }
.exam-result .score-big { font-size:56px; font-weight:800; color:var(--navy-800); }
.exam-result .score-big em { font-style:normal; color:var(--gold-dark); }
.r-detail { text-align:left; margin-top:20px; }
.r-detail .rd-item { padding:8px 4px; border-bottom:1px dashed var(--line); font-size:13.5px; display:flex; gap:10px; }
.rd-ok { color:var(--ok); font-weight:700; } .rd-no { color:var(--danger); font-weight:700; }

/* toast */
.toast { position:fixed; left:50%; bottom:40px; transform:translateX(-50%); background:var(--navy-900); color:#fff; padding:12px 24px; border-radius:12px; font-size:14px; box-shadow:var(--shadow-lg); z-index:400; animation:slideUp .2s ease; }
.toast.err { background:var(--danger); }
.toast[hidden] { display:none; }

/* 响应式 */
@media (max-width: 860px) {
  .nav { display:none; }
  .hero-title { font-size:34px; }
  .hero-stat { padding-right:22px; margin-right:22px; }
  .hero-stat b { font-size:22px; }
  .section { padding:52px 18px 30px; }
  .section-head { flex-direction:column; align-items:flex-start; }
  .word-summary { margin-top:6px; }
  .topbar-inner { gap:16px; }
}
