/* =========================================================
   HSK 1 级结业总结课件 — 通用样式表 styles.css
   配色：清爽蓝白 | 响应式：手机 + 电脑
   ========================================================= */

:root {
  color-scheme: light;
  --blue-900: #7c2d12;
  --blue-700: #c2410c;
  --blue-600: #ea580c;
  --blue-500: #f97316;
  --blue-100: #ffedd5;
  --blue-50:  #fff7ed;
  --ink:      #431407;
  --ink-soft: #7c2d12;
  --line:     #fed7aa;
  --white:    #ffffff;
  --green:    #2e9e5b;
  --green-bg: #e8f6ee;
  --amber:    #c47f00;
  --amber-bg: #fff7ed;
  --red:      #d23b3b;
  --red-bg:   #fdeaea;
  --radius:   14px;
  --shadow:   0 4px 18px rgba(249, 115, 22, 0.14);
  --shadow-sm:0 2px 8px rgba(249, 115, 22, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--blue-50);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  background: rgba(255,250,243,0.96);
  color: var(--blue-900);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
}
.nav-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .5px;
}
.brand .logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,.2);
  display: grid; place-items: center;
  font-size: 1.1rem;
  border: 1px solid rgba(255,255,255,.35);
}
.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0; padding: 0;
}
.nav-links a {
  display: block;
  color: var(--blue-900);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 9px;
  font-size: .95rem;
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: #fff7ed; }
.nav-links a.active {
  background: #ffedd5;
  color: var(--blue-700);
  font-weight: 700;
}

/* ---------- 页面容器 ---------- */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ---------- 页头横幅 ---------- */
.hero {
  background-image: linear-gradient(135deg, rgba(26,23,20,0.85) 40%, rgba(26,23,20,0.4) 80%), url('/images/hero-classroom.png');
  background-size: cover;
  background-position: center;
  background-color: var(--blue-900);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.hero h1 {
  margin: 0 0 6px;
  font-size: 1.85rem;
  color: #fff;
}
.hero .sub {
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: 1.02rem;
}
.hero .pinyin { color: #fed7aa; font-weight: 600; }

/* ---------- 区块卡片 ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.card h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
  color: var(--blue-700);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-100);
}
.card h2 .num {
  background: var(--blue-600);
  color: #fff;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-grid; place-items: center;
  font-size: .95rem;
  flex: none;
}
.card h3 {
  color: var(--blue-900);
  font-size: 1.08rem;
  margin: 22px 0 10px;
}

/* ---------- 拼音排版 ---------- */
.zh { font-weight: 600; }
.py {
  color: var(--blue-600);
  font-style: normal;
  font-size: .92em;
  font-weight: 500;
}
.term {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 2px 6px;
  line-height: 1.25;
  vertical-align: middle;
}
.term .py { font-size: .8rem; }
.term .zh { font-size: 1.05rem; }

/* ---------- 信息表格 ---------- */
table.info {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 4px;
  font-size: .96rem;
}
table.info th, table.info td {
  border: 1px solid var(--line);
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
}
table.info thead th {
  background: var(--blue-600);
  color: #fff;
  font-weight: 600;
}
table.info tbody tr:nth-child(even) { background: var(--blue-50); }
table.info td .py { display: block; font-size: .82rem; }

/* ---------- 高亮提示框 ---------- */
.callout {
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
  border-left: 5px solid;
  font-size: .96rem;
}
.callout.info  { background: var(--blue-100); border-color: var(--blue-600); }
.callout.pass  { background: var(--green-bg); border-color: var(--green); }
.callout.warn  { background: var(--amber-bg); border-color: var(--amber); }

/* ---------- 数据指标卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 8px 0;
}
.stat {
  background: var(--blue-50);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.stat .big { font-size: 2rem; font-weight: 800; color: var(--blue-700); }
.stat .lab { color: var(--ink-soft); font-size: .9rem; margin-top: 4px; }

/* ---------- 词性分类标签 ---------- */
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.pos-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--blue-50);
}
.pos-card .head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.pos-card .head b { color: var(--blue-700); font-size: 1.02rem; }
.badge {
  background: var(--blue-600); color: #fff;
  border-radius: 20px; padding: 2px 11px;
  font-size: .8rem; font-weight: 600;
}

/* ---------- 语法例句 ---------- */
.example {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  border-radius: 0 8px 8px 0;
  padding: 8px 14px;
  margin: 8px 0;
}
.example .py { display: block; font-size: .85rem; margin-bottom: 1px; }
.example .en { color: var(--ink-soft); font-size: .88rem; }

/* ---------- 题目 ---------- */
.q {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
  background: var(--white);
}
.q-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.q-no {
  background: var(--blue-600); color:#fff;
  min-width: 34px; height: 34px; padding: 0 6px;
  border-radius: 8px;
  display: inline-grid; place-items: center;
  font-weight: 700; font-size: .9rem; flex: none;
}
.q-type {
  font-size: .78rem; color: var(--blue-700);
  background: var(--blue-100);
  padding: 3px 10px; border-radius: 20px; font-weight: 600;
}
.q-body { margin-left: 2px; }
.script {
  background: var(--blue-50);
  border: 1px dashed var(--blue-500);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: .95rem;
}
.script .label { color: var(--blue-700); font-weight: 700; font-size: .82rem; }

.options { list-style: none; margin: 10px 0 0; padding: 0; }
.options li {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 14px;
  margin-bottom: 8px;
  cursor: default;
  transition: background .15s;
}
.options li:hover { background: var(--blue-50); }
.options .opt-key {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 6px; margin-right: 10px;
  background: var(--blue-100); color: var(--blue-700);
  font-weight: 700; font-size: .82rem;
}

.match-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.match-col { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--blue-50); }
.match-col h4 { margin: 0 0 8px; color: var(--blue-700); font-size: .95rem; }
.match-col ol, .match-col ul { margin: 0; padding-left: 20px; }
.match-col li { margin-bottom: 8px; }

.word-bank {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 12px 0;
}
.chip {
  background: var(--white);
  border: 1.5px solid var(--blue-500);
  color: var(--blue-700);
  border-radius: 22px;
  padding: 7px 16px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.chip .py { display: block; font-size: .72rem; text-align: center; }
.blank {
  display: inline-block;
  min-width: 70px;
  border-bottom: 2px solid var(--blue-500);
  text-align: center;
  color: var(--blue-600);
  font-weight: 700;
}

.task-box {
  background: var(--amber-bg);
  border: 1px solid #f0d9a8;
  border-left: 5px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 10px 0;
}
.task-box .scene { color: var(--amber); font-weight: 700; font-size: .85rem; }

/* ---------- 答案 ---------- */
.answer {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
  background: var(--white);
}
.answer .a-no {
  background: var(--green); color:#fff;
  padding: 2px 11px; border-radius: 7px;
  font-weight: 700; font-size: .85rem; margin-right: 8px;
}
.answer .a-key { color: var(--green); font-weight: 800; }
.answer .a-exp { color: var(--ink-soft); font-size: .93rem; margin-top: 6px; }

.score-table th { background: var(--blue-700); }
.self-check { list-style: none; padding: 0; margin: 8px 0; }
.self-check li {
  padding: 9px 12px 9px 40px;
  position: relative;
  border-bottom: 1px dashed var(--line);
}
.self-check li::before {
  content: "☐";
  position: absolute; left: 12px; top: 7px;
  color: var(--blue-600); font-size: 1.2rem;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--blue-900);
  color: rgba(255,255,255,.8);
  text-align: center;
  padding: 22px 20px;
  font-size: .88rem;
}
.site-footer a { color: #acd2ff; }

/* ---------- 工具类 ---------- */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tag-list .t {
  background: var(--blue-100); color: var(--blue-700);
  border-radius: 20px; padding: 5px 13px; font-size: .9rem;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform .15s, box-shadow .15s;
}
.btn-primary { background: var(--blue-600); color:#fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background:#fff; color: var(--blue-700); border:1.5px solid var(--blue-500); }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .hero h1 { font-size: 1.45rem; }
  .nav-wrap { justify-content: center; }
  .brand { padding: 10px 0; }
  .nav-links { width: 100%; justify-content: center; }
  .nav-links a { padding: 8px 11px; font-size: .88rem; }
  .match-grid { grid-template-columns: 1fr; }
  .card { padding: 18px 16px; }
  .page { padding: 20px 14px 60px; }
  .dialogue .turn { max-width: 92%; }
  .func-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   HSK 2 级补充样式（对话气泡 / 三选判断 / 完形 / 功能网格）
   ========================================================= */

/* 多句对话气泡 */
.dialogue {
  background: var(--blue-50);
  border: 1px dashed var(--blue-500);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 10px 0;
}
.dialogue .label { color: var(--blue-700); font-weight: 700; font-size: .82rem; display:block; margin-bottom: 6px; }
.dialogue .turn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px;
  margin: 6px 0;
  max-width: 80%;
}
.dialogue .turn .py { display:block; font-size:.82rem; }
.dialogue .turn.a { border-left: 4px solid var(--blue-500); }
.dialogue .turn.b { border-left: 4px solid var(--green); margin-left: auto; background: var(--blue-50); }
.dialogue .who { font-size: .78rem; color: var(--ink-soft); font-weight: 700; }

/* 三选判断（对/错/不知道） */
.tri-options { list-style:none; display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 0; padding:0; }
.tri-options li {
  border:1px solid var(--line); border-radius:9px;
  padding:8px 16px; flex:1; min-width:120px; text-align:center;
}
.tri-options .opt-key { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:6px; margin-right:6px; background:var(--blue-100); color:var(--blue-700); font-weight:700; font-size:.8rem; }

/* 完形填空整段文本 */
.cloze {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 10px 0;
  line-height: 2.2;
}
.cloze .blank { min-width: 60px; }

/* 14 大语言功能网格 */
.func-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.func-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--blue-50);
}
.func-card .fnum {
  display:inline-grid; place-items:center;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--blue-600); color:#fff; font-weight:700; font-size:.82rem;
  margin-right: 8px;
}
.func-card .ftitle { font-weight: 700; color: var(--blue-700); }
.func-card .ex { margin-top: 8px; font-size: .92rem; }
.func-card .ex .py { display:block; font-size:.8rem; }

.brand-link { color: inherit; text-decoration: none; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; border-radius: 12px; background: #fff; padding: 5px; border: 1px solid #fed7aa; box-shadow: 0 8px 18px rgba(249,115,22,.12); }
.lesson-switcher,
.aca-lesson-switcher { background:#fff7ed; border-bottom:1px solid #fed7aa; display:flex; align-items:center; justify-content:center; gap:8px; padding:10px 16px; flex-wrap:wrap; }
.lesson-switcher a,
.aca-lesson-switcher a { display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:6px 14px; border-radius:999px; border:1px solid #fed7aa; background:#fffaf5; color:#7c2d12; text-decoration:none; font-size:14px; font-weight:800; white-space:nowrap; box-shadow:0 6px 16px rgba(194,65,12,.06); transition:background .15s ease,color .15s ease,border-color .15s ease,transform .15s ease; }
.lesson-switcher a:hover:not(.active),
.aca-lesson-switcher a:hover:not(.active) { color:#ea580c; border-color:#fb923c; background:#fff; transform:translateY(-1px); }
.lesson-switcher a.active,
.aca-lesson-switcher a.active { background:#f97316; border-color:#f97316; color:#fff; box-shadow:0 10px 22px rgba(249,115,22,.22); }
@media (max-width:720px) { .lesson-switcher, .aca-lesson-switcher { justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding:10px 12px; } .lesson-switcher::-webkit-scrollbar, .aca-lesson-switcher::-webkit-scrollbar { display:none; } .lesson-switcher a, .aca-lesson-switcher a { min-height:32px; padding:5px 12px; font-size:13px; } }
