/* ===== 三上绘本复习乐园 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FFF9F0;
  --card: #FFFFFF;
  --ink: #3D3833;
  --ink-soft: #8A8178;
  --line: #F0E6D9;
  --accent: #E8734A;
  --accent-soft: #FDEAE0;
  --ok: #4CAF7D;
  --ok-soft: #E6F5EE;
  --bad: #E05C5C;
  --bad-soft: #FCEBEB;
  --gold: #F5B942;
  --radius: 18px;
  --shadow: 0 4px 18px rgba(120, 90, 60, 0.10);
}

html { font-size: 16px; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Comic Sans MS", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
  padding: 10px 22px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.brand {
  font-size: 1.25rem; font-weight: 800; letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: linear-gradient(135deg, #E8734A, #F5A623);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .logo { font-size: 1.5rem; -webkit-text-fill-color: initial; }
.nav-books { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.nav-btn {
  padding: 8px 16px; border-radius: 999px; font-size: 0.95rem; font-weight: 700;
  background: #fff; color: var(--ink); border: 2px solid var(--line);
  transition: all 0.18s ease; display: flex; align-items: center; gap: 6px;
}
.nav-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.nav-btn.active { color: #fff; border-color: transparent; }
.nav-btn.active[data-book="dino"] { background: #E8734A; }
.nav-btn.active[data-book="anna"] { background: #5BA85F; }
.nav-btn.active[data-book="animal"] { background: #3E8FC4; }

/* ---------- 主区域 ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 26px 20px 60px; }

/* ---------- 首页 ---------- */
.hero {
  text-align: center; padding: 34px 20px 26px;
}
.hero h1 { font-size: 2.1rem; font-weight: 800; margin-bottom: 10px; }
.hero p { color: var(--ink-soft); font-size: 1.05rem; }
.hero .stars { font-size: 1.4rem; letter-spacing: 6px; margin-bottom: 8px; }

.book-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 26px;
}
.book-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 2px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-6px); box-shadow: 0 10px 30px rgba(120, 90, 60, 0.18); }
.book-card .cover { width: 100%; height: 190px; object-fit: cover; object-position: top; display: block; }
.book-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.book-card h3 { font-size: 1.2rem; }
.book-card .en { color: var(--ink-soft); font-size: 0.92rem; font-weight: 600; }
.book-card .level {
  display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; width: fit-content;
}
.book-card .feats { display: flex; flex-wrap: wrap; gap: 6px; }
.feat {
  font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 8px;
  background: #F7F2EA; color: var(--ink-soft);
}
.book-card .go {
  margin-top: auto; padding: 12px; border-radius: 12px; color: #fff;
  font-size: 1rem; font-weight: 800; transition: filter 0.15s ease;
}
.book-card .go:hover { filter: brightness(1.08); }

/* ---------- 绘本详情页 ---------- */
.book-head {
  display: flex; gap: 20px; align-items: center; background: var(--card);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  border: 2px solid var(--line); margin-bottom: 22px;
}
.book-head img { width: 120px; height: 150px; object-fit: cover; object-position: top; border-radius: 12px; }
.book-head .info { flex: 1; }
.book-head h2 { font-size: 1.5rem; margin-bottom: 4px; }
.book-head .en { color: var(--ink-soft); font-weight: 600; margin-bottom: 8px; }
.book-head .level { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; display: inline-block; margin-bottom: 10px; }
.book-head .synopsis { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.7; }

.tabs {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
  position: sticky; top: 64px; z-index: 50;
  background: var(--bg); padding: 10px 0;
}
.tab-btn {
  padding: 10px 20px; border-radius: 999px; font-size: 1rem; font-weight: 700;
  background: #fff; border: 2px solid var(--line); color: var(--ink-soft);
  transition: all 0.15s ease;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: #fff; border-color: transparent; }

.panel { display: none; animation: fadeIn 0.25s ease; }
.panel.show { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); border: 2px solid var(--line); margin-bottom: 20px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.card .hint { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 14px; line-height: 1.6; }

/* ---------- 跟读视频 ---------- */
.video-wrap { border-radius: 14px; overflow: hidden; background: #000; line-height: 0; }
.video-wrap video { width: 100%; max-height: 72vh; display: block; }
.anna-player { display: grid; grid-template-columns: 1fr; gap: 14px; }
.anna-stage {
  position: relative; border-radius: 14px; overflow: hidden; background: #222; line-height: 0;
  border: 2px solid var(--line);
}
.anna-stage img { width: 100%; max-height: 56vh; object-fit: contain; display: block; }
.anna-page-label {
  position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 0.85rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; line-height: 1.4;
}
.anna-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.anna-controls audio { flex: 1; min-width: 240px; height: 42px; }
.page-btn {
  padding: 9px 16px; border-radius: 10px; background: #F7F2EA; font-weight: 700; font-size: 0.9rem;
  border: 2px solid var(--line); color: var(--ink);
}
.page-btn:hover { background: var(--accent-soft); }

/* ---------- 点读模式 ---------- */
.reader-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px;
}
.tool-btn {
  padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 0.92rem;
  background: #fff; border: 2px solid var(--line); color: var(--ink);
  transition: all 0.15s ease;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.tool-btn.primary:hover { filter: brightness(1.08); color: #fff; }
.tool-btn.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.rate-label { font-size: 0.88rem; color: var(--ink-soft); font-weight: 700; }

.sentence-list { display: flex; flex-direction: column; gap: 10px; }
.sentence {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 2px solid var(--line); border-radius: 14px;
  padding: 14px 16px; transition: all 0.18s ease;
}
.sentence:hover { border-color: #E8D5C4; }
.sentence.playing { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 4px 14px rgba(232, 115, 74, 0.18); }
.sentence .idx {
  min-width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem; background: #F7F2EA; color: var(--ink-soft); flex-shrink: 0;
}
.sentence.playing .idx { background: var(--accent); color: #fff; }
.sentence .text { flex: 1; min-width: 0; }
.sentence .en-text { font-size: 1.08rem; font-weight: 700; line-height: 1.5; word-break: break-word; }
.sentence .zh-text { color: var(--ink-soft); font-size: 0.92rem; margin-top: 3px; line-height: 1.5; }
.sentence.heading-row { background: #FBF7F1; }
.sentence.heading-row .en-text { color: var(--ink-soft); font-size: 0.98rem; }
.sentence.title-row { background: linear-gradient(135deg, #FFF3E4, #FFE9F0); }
.sentence.title-row .en-text { font-size: 1.15rem; }
.sentence .actions { display: flex; gap: 6px; flex-shrink: 0; }
.act-btn {
  width: 40px; height: 40px; border-radius: 12px; font-size: 1.05rem;
  background: #F7F2EA; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; transition: all 0.15s ease;
}
.act-btn:hover { background: var(--accent-soft); border-color: var(--accent); transform: scale(1.06); }
.act-btn.recording { background: var(--bad); border-color: var(--bad); color: #fff; animation: pulse 1s infinite; }
.act-btn.has-rec { background: var(--ok-soft); border-color: var(--ok); }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.rec-tip { font-size: 0.8rem; color: var(--bad); font-weight: 700; margin-top: 4px; display: none; }
.rec-tip.show { display: block; }

/* ---------- 单词复习 · 卡片墙 + 翻牌弹窗 ---------- */
.word-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 0.88rem; font-weight: 700;
  background: #fff; border: 2px solid var(--line); color: var(--ink-soft);
}
.chip:hover { color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 模式切换：看英识中 / 看中识英 */
.mode-switch {
  display: inline-flex; background: #F7F2EA; border: 2px solid var(--line);
  border-radius: 999px; padding: 3px; gap: 3px;
}
.mode-btn {
  padding: 8px 18px; border-radius: 999px; font-size: 0.95rem; font-weight: 800;
  color: var(--ink-soft); transition: all 0.15s ease; white-space: nowrap;
}
.mode-btn:hover { color: var(--ink); }
.mode-btn.on { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(232, 115, 74, 0.35); }
.word-progress {
  font-size: 0.92rem; font-weight: 700; color: var(--ink-soft);
  background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 7px 16px;
}
.word-progress b { color: var(--accent); font-size: 1.05rem; }

.word-tip {
  font-size: 0.98rem; font-weight: 700; color: #A08E7E; margin-bottom: 14px; line-height: 1.6;
}
.word-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px;
}
.word-card {
  background: #fff; border: 3px solid var(--line); border-radius: 18px;
  padding: 22px 12px 16px; text-align: center; cursor: pointer; position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  user-select: none;
}
.word-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #E8C9B2; }
.word-card:active { transform: scale(0.97); }
.word-card .cat-tag {
  position: absolute; top: 8px; left: 10px; font-size: 0.72rem; font-weight: 800;
  color: #C4B4A4; letter-spacing: 1px;
}
.word-card .w-main {
  font-size: 1.45rem; font-weight: 800; line-height: 1.35; word-break: break-word;
  margin-top: 6px; min-height: 2.2em; display: flex; align-items: center; justify-content: center;
}
.word-card .w-sub { font-size: 0.8rem; color: #C4B4A4; font-weight: 700; margin-top: 8px; }
.word-card.done { border-color: var(--ok); background: var(--ok-soft); }
.word-card.done .w-main { color: var(--ok); }
.word-card.done .w-sub { color: var(--ok); }
.word-card.done::after {
  content: "✓"; position: absolute; top: 6px; right: 10px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--ok); color: #fff; font-size: 0.9rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.word-card.pop { animation: cardPop 0.45s ease; }
@keyframes cardPop { 0% { transform: scale(1); } 45% { transform: scale(1.09); } 100% { transform: scale(1); } }

/* ---------- 单词翻牌弹窗 ---------- */
.fc-overlay {
  position: fixed; inset: 0; z-index: 300; padding: 20px;
  background: rgba(61, 56, 51, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.fc-modal { position: relative; width: min(460px, 94vw); }
.fc-counter {
  text-align: center; color: #fff; font-weight: 800; font-size: 0.95rem;
  margin-bottom: 12px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.fc { perspective: 1400px; }
.fc-inner {
  position: relative; width: 100%; height: 380px; cursor: pointer;
  transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.fc.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 26px; border: 3px solid var(--line); background: #fff;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 26px 22px; text-align: center;
}
.fc-back { transform: rotateY(180deg); background: linear-gradient(160deg, #FFFDF8, #FFF4E2); }
.fc-cat { font-size: 0.85rem; font-weight: 800; color: #C4B4A4; letter-spacing: 2px; }
.fc-main {
  font-size: clamp(2.1rem, 8vw, 3rem); font-weight: 800; line-height: 1.2; word-break: break-word;
}
.fc-sub { font-size: 1.35rem; font-weight: 700; color: var(--ink-soft); }
.fc-tip { font-size: 0.9rem; font-weight: 700; color: #C4B4A4; }
.fc-img {
  font-size: 4.6rem; line-height: 1; background: #fff; border: 3px dashed #EAD9C6;
  border-radius: 22px; padding: 16px 26px; box-shadow: inset 0 2px 8px rgba(120, 90, 60, 0.06);
}
.fc-speak {
  margin-top: 4px; padding: 9px 20px; border-radius: 999px; font-size: 0.95rem; font-weight: 800;
  background: #F7F2EA; border: 2px solid var(--line); color: var(--ink);
}
.fc-speak:hover { border-color: var(--accent); color: var(--accent); }
.fc-btns { display: flex; gap: 12px; margin-top: 16px; }
.fc-btn {
  flex: 1; padding: 14px 10px; border-radius: 16px; font-size: 1.05rem; font-weight: 800;
  background: #fff; border: 3px solid var(--line); color: var(--ink); transition: all 0.15s ease;
}
.fc-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.fc-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.fc-done:hover { filter: brightness(1.06); }
.fc-next { background: var(--accent); border-color: var(--accent); color: #fff; }
.fc-next:hover { filter: brightness(1.06); }
.fc-close {
  position: absolute; top: -14px; right: -6px; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 3px solid var(--line); font-size: 1.1rem; font-weight: 800;
  color: var(--ink-soft); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); z-index: 5;
}
.fc-close:hover { border-color: var(--bad); color: var(--bad); }

/* ---------- 练习 ---------- */
.ex-section { margin-bottom: 8px; }
.ex-title {
  font-size: 1.1rem; font-weight: 800; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.ex-source { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 14px; }
.ex-group { margin-bottom: 22px; }
.ex-note { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 12px; font-weight: 600; }
.ex-item {
  background: #FBF7F1; border: 2px solid var(--line); border-radius: 12px;
  padding: 13px 16px; margin-bottom: 10px;
}
.ex-item .q { font-size: 1.05rem; font-weight: 600; line-height: 1.9; }
.ex-item .q .q-num { color: var(--ink-soft); font-weight: 800; margin-right: 2px; }
.ex-item .q .blank {
  display: inline-block; min-width: 90px; border-bottom: 2px solid var(--ink-soft);
  text-align: center; font-weight: 800; color: var(--accent); margin: 0 4px;
}
.ex-item .q .blank.ok { color: var(--ok); }
.ex-item .q .blank.bad { color: var(--bad); text-decoration: line-through; }
.ex-item .q .blank.sel { border-bottom-color: var(--accent); background: var(--accent-soft); border-radius: 6px 6px 0 0; }
.ex-item .feedback { font-size: 0.85rem; font-weight: 700; margin-top: 6px; min-height: 1.3em; }
.ex-item .feedback.ok { color: var(--ok); }
.ex-item .feedback.bad { color: var(--bad); }

.bank { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bank .word-chip {
  padding: 7px 14px; border-radius: 10px; background: #fff; border: 2px dashed #D8CBBF;
  font-weight: 700; font-size: 0.92rem; cursor: pointer; transition: all 0.15s ease;
}
.bank .word-chip:hover { border-color: var(--accent); color: var(--accent); }
.bank .word-chip.used { opacity: 0.35; pointer-events: none; }
.bank .word-chip.placed { border-style: solid; border-color: var(--ok); color: var(--ok); }

.mini-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 700;
  background: #fff; border: 2px solid var(--line); color: var(--ink-soft); margin-top: 8px;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent); }

.score-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, #FFF6E5, #FFEFE0); border: 2px solid #F5D9B8;
  border-radius: 14px; padding: 14px 18px; margin-bottom: 18px;
}
.score-bar .score-num { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.score-bar .score-text { font-weight: 700; }
.score-bar .cheer { margin-left: auto; font-weight: 800; color: var(--gold); }

/* ---------- 趣味游戏 ---------- */
.game-star-total {
  font-size: 1.05rem; font-weight: 800; background: linear-gradient(135deg, #FFF6E5, #FFEFE0);
  border: 2px solid #F5D9B8; border-radius: 14px; padding: 12px 18px; margin-bottom: 18px;
}
.game-star-total b { color: var(--gold); font-size: 1.3rem; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.game-tile {
  background: var(--card); border: 3px solid var(--line); border-radius: 20px;
  padding: 22px 18px; text-align: center; display: flex; flex-direction: column;
  gap: 8px; align-items: center; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.game-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #E8C9B2; }
.game-tile .g-icon { font-size: 2.6rem; line-height: 1; }
.game-tile .g-name { font-size: 1.2rem; font-weight: 800; }
.game-tile .g-desc { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.6; min-height: 2.8em; }
.game-tile .g-stars { font-size: 1.2rem; letter-spacing: 3px; }
.game-tile .g-play {
  margin-top: 6px; padding: 10px 22px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 0.95rem;
}
.game-tile .g-play:hover { filter: brightness(1.08); }

.game-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.game-title { font-size: 1.25rem; font-weight: 800; }
.game-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.game-stat {
  background: #F7F2EA; border: 2px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 0.9rem; font-weight: 700;
}
.game-stat b { color: var(--accent); }

/* 记忆翻牌 */
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 560px; margin: 0 auto; }
.mem-card { perspective: 800px; aspect-ratio: 3 / 4; cursor: pointer; }
.mem-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform 0.45s ease;
}
.mem-card.open .mem-inner { transform: rotateY(180deg); }
.mem-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px; border: 3px solid var(--line);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 8px; font-weight: 800; word-break: break-word; line-height: 1.3;
}
.mem-cover { background: linear-gradient(135deg, #FFE3C9, #FFD1DC); font-size: 1.8rem; }
.mem-face-in { transform: rotateY(180deg); background: #fff; font-size: 1.02rem; }
.mem-face-in.is-zh { background: #FFF9EC; font-size: 1.15rem; }
.mem-card.matched .mem-face-in { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.mem-card.matched { cursor: default; }

/* 听音选词 */
.listen-prompt { text-align: center; font-size: 1.25rem; font-weight: 800; margin-bottom: 14px; }
.listen-speak {
  display: block; margin: 0 auto 18px; padding: 14px 34px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 1.15rem; font-weight: 800;
  box-shadow: 0 4px 14px rgba(232, 115, 74, 0.35); transition: filter 0.15s ease;
}
.listen-speak:hover { filter: brightness(1.08); }
.listen-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 620px; margin: 0 auto; }
.listen-opt {
  background: #fff; border: 3px solid var(--line); border-radius: 16px;
  padding: 18px 10px; text-align: center; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.listen-opt:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-3px); }
.listen-opt .lo-img { font-size: 2.2rem; line-height: 1; }
.listen-opt .lo-zh { font-size: 1.25rem; font-weight: 800; margin-top: 8px; }
.listen-opt:disabled { cursor: default; }
.listen-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.listen-opt.wrong { border-color: var(--bad); background: var(--bad-soft); animation: shake 0.4s ease; }

/* 单词快闪 */
.quick-prompt { text-align: center; font-size: 1.6rem; font-weight: 800; margin-bottom: 12px; line-height: 1.4; }
.quick-prompt .quick-zh-tip { font-size: 0.9rem; color: var(--ink-soft); font-weight: 700; }
.quick-timer { height: 10px; background: #F0E6D9; border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.quick-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--ok), var(--gold)); border-radius: 999px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.quick-card {
  padding: 14px 8px; border-radius: 14px; background: #fff; border: 3px solid var(--line);
  font-size: 1.05rem; font-weight: 800; word-break: break-word;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.quick-card:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.quick-card.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.quick-card.wrong { border-color: var(--bad); background: var(--bad-soft); animation: shake 0.4s ease; }

/* 结算弹窗 & 撒花 */
.game-result {
  width: min(420px, 94vw); background: #fff; border-radius: 26px; padding: 30px 24px;
  text-align: center; box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  border: 3px solid var(--line); animation: popIn 0.35s ease;
}
.gr-emoji { font-size: 3.4rem; line-height: 1; }
.gr-title { font-size: 1.4rem; font-weight: 800; margin: 10px 0 6px; }
.gr-stars { font-size: 2rem; letter-spacing: 6px; margin-bottom: 12px; }
.gr-lines { font-size: 1rem; font-weight: 700; color: var(--ink-soft); line-height: 2; margin-bottom: 18px; }
.gr-lines b { color: var(--accent); }
.gr-btns { display: flex; gap: 12px; }
@keyframes popIn { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}
.confetti { position: fixed; top: -40px; z-index: 400; pointer-events: none; animation: confettiFall linear forwards; }
@keyframes confettiFall { to { transform: translateY(110vh) rotate(680deg); } }

/* ---------- PK 对战 ---------- */
.pk-record {
  font-size: 1rem; font-weight: 800; background: #fff; border: 2px dashed #E5C9C9;
  border-radius: 12px; padding: 10px 16px; margin-bottom: 14px;
}
.pk-record b { color: var(--accent); }
.pk-game-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.pk-game-btn {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 14px 16px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.pk-game-btn:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.pk-game-btn .pk-icon { font-size: 1.9rem; line-height: 1; }
.pk-game-btn .pk-body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pk-game-btn .pk-body b { font-size: 1.08rem; }
.pk-game-btn .pk-body em { font-style: normal; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.5; }
.pk-game-btn .pk-go { font-weight: 800; color: var(--accent); font-size: 0.9rem; white-space: nowrap; }

.pk-prompt { text-align: center; font-size: 1.5rem; font-weight: 800; margin: 6px 0 14px; line-height: 1.4; }
.pk-prompt-tip { display: block; font-size: 0.85rem; color: var(--ink-soft); font-weight: 700; margin-top: 4px; }
.pk-speak { margin: 0 auto 16px; }
.pk-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pk-side {
  border: 3px solid var(--line); border-radius: 18px; padding: 14px; background: #fff;
  transition: box-shadow 0.2s ease, opacity 0.2s ease; position: relative;
}
.pk-side.red { border-color: #F0B8B8; background: #FDF6F6; }
.pk-side.blue { border-color: #B3D4EA; background: #F4F9FD; }
.pk-side-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 1.08rem; font-weight: 800; margin-bottom: 12px;
}
.pk-side-score { font-size: 1.35rem; }
.pk-side.red .pk-side-score { color: #D05555; }
.pk-side.blue .pk-side-score { color: #2F7DB8; }
.pk-side.leading { box-shadow: 0 0 0 4px rgba(245, 185, 66, 0.5); }
.pk-side.done { opacity: 0.8; }
.pk-side.locked { opacity: 0.55; }
.pk-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pk-opt {
  padding: 14px 8px; border-radius: 12px; background: #fff; border: 2px solid var(--line);
  font-size: 1.05rem; font-weight: 800; word-break: break-word; transition: all 0.15s ease;
}
.pk-opt:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.pk-opt:disabled { cursor: default; }
.pk-opt.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.pk-opt.wrong { border-color: var(--bad); background: var(--bad-soft); animation: shake 0.4s ease; }
.pk-tip { text-align: center; font-size: 0.92rem; font-weight: 800; color: var(--ok); margin-top: 10px; }
.pk-tip.bad { color: var(--bad); }
.pk-next-row { display: flex; justify-content: center; margin-top: 18px; }
.pk-next-btn {
  padding: 14px 44px; border-radius: 999px; font-size: 1.15rem; font-weight: 800;
  background: var(--accent); color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.pk-next-btn:hover { filter: brightness(1.08); transform: translateY(-2px); }
.pk-final-score { font-size: 2.6rem; font-weight: 800; letter-spacing: 4px; margin: 6px 0 12px; }

/* ---------- 页脚 ---------- */
.footer { text-align: center; color: var(--ink-soft); font-size: 0.82rem; padding: 30px 0 10px; line-height: 1.8; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.5rem; }
  .book-head { flex-direction: column; text-align: center; }
  .book-head img { width: 160px; height: 200px; }
  .tabs { top: 58px; }
  .tab-btn { padding: 8px 14px; font-size: 0.9rem; }
  .sentence { flex-wrap: wrap; }
  .sentence .actions { margin-left: 48px; }
  .match-cols { gap: 8px; }
  .memory-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .quick-prompt { font-size: 1.3rem; }
  .game-grid { grid-template-columns: 1fr; }
  .pk-board { grid-template-columns: 1fr; }
  .pk-prompt { font-size: 1.25rem; }
  .pk-next-btn { padding: 12px 32px; font-size: 1.05rem; width: 100%; }
  .pk-game-list { grid-template-columns: 1fr; }
  .nav-btn { padding: 7px 12px; font-size: 0.85rem; }
}
