/* ── 基础重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #f0f4f8;
  --surface: #ffffff;
  --primary: #2563eb;
  --primary-l: #dbeafe;
  --accent:  #7c3aed;
  --success: #16a34a;
  --warning: #d97706;
  --danger:  #dc2626;
  --text:    #1e293b;
  --muted:   #64748b;
  --border:  #e2e8f0;
  --radius:  16px;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
  --radius-sm: 10px;
  --transition: .18s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── 顶栏 ── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, #1e40af, #7c3aed);
  color: #fff;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 20px rgba(0,0,0,.2);
}
.header h1 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.header-badge {
  background: rgba(255,255,255,.2);
  border-radius: 20px; padding: 4px 12px; font-size: .8rem;
}

main { flex: 1; padding: 16px; max-width: 720px; margin: 0 auto; width: 100%; }

/* ── 底部导航 ── */
.nav {
  position: sticky; bottom: 0; z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
.nav-item {
  flex: 1; text-align: center; cursor: pointer;
  color: var(--muted); font-size: .7rem; padding: 6px 4px;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 1.5rem; display: block; margin-bottom: 2px; }

/* ── 卡片基类 ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

/* ── 统计 ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.stat-box {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px 8px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.stat-box .num { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-box .label { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.stat-box.fire .num { color: var(--warning); }

/* ── 首页入口 ── */
.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.home-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 28px 16px; border-radius: var(--radius);
  cursor: pointer; transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow); border: none; outline: none; width: 100%;
  font-size: 1rem; font-weight: 700;
}
.home-btn:active { transform: scale(.97); }
.home-btn.primary { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; }
.home-btn.review  { background: linear-gradient(135deg, #7c3aed, #8b5cf6); color: #fff; }
.home-btn.browse  { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.home-btn.stats   { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.home-btn .icon { font-size: 2.4rem; }

/* ── 学习页（正面卡片） ── */
.word-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: visible;
}

/* 砍刀劈词：单词裂开动画 */
.word.split-anim {
  display: inline-block;
  animation: wordSplit .6s ease forwards;
  color: var(--danger);
}
.word-card.chop-flash {
  animation: chopFlash .6s ease;
  border-color: var(--danger);
}
.chop-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; font-weight: 900; color: var(--danger);
  background: rgba(254,226,226,.72);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  animation: chopBurst .6s ease forwards;
}
@keyframes wordSplit {
  0% { transform: rotate(0) scale(1); }
  20% { transform: rotate(2deg) scale(1.15); }
  100% { transform: rotate(-6deg) scale(.6); opacity: 0; letter-spacing: 2em; }
}
@keyframes chopFlash { 0%{box-shadow:0 0 0 rgba(220,38,38,0)} 35%{box-shadow:0 0 40px rgba(220,38,38,.55)} 100%{box-shadow:none} }
@keyframes chopBurst { 0%{opacity:0; transform:scale(.6)} 30%{opacity:1; transform:scale(1.1)} 100%{opacity:0; transform:scale(1.5)} }
.reveal-area { width: 100%; margin-top: 0; text-align: left; }

/* 劈熟撤销提示条 */
.chop-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  z-index: 2000;
  background: #dc2626; color: #fff;
  padding: 12px 18px; border-radius: 30px;
  font-size: .92rem; font-weight: 600;
  display: none; align-items: center; gap: 12px;
  box-shadow: 0 6px 24px rgba(220,38,38,.4);
  animation: toastIn .3s ease;
  max-width: calc(100vw - 32px);
}
.chop-toast button {
  background: #fff; color: #dc2626;
  border: none; border-radius: 16px;
  padding: 4px 14px; font-size: .85rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ═══ 全屏爆炸特效 ═══ */
.explode-flash {
  position: fixed; inset: 0; z-index: 9000;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(251,191,36,.9) 35%, rgba(239,68,68,.85) 65%, rgba(0,0,0,.8) 100%);
  animation: explodeFlash .7s ease-out forwards;
  pointer-events: none;
}
@keyframes explodeFlash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 1; }
}

/* 中心爆炸火球 */
.explode-fireball {
  position: fixed; left: 50%; top: 50%; z-index: 9001;
  font-size: 9rem;
  transform: translate(-50%, -50%);
  animation: fireballBoom 1s ease-out forwards;
  pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(255,120,30,.9));
}
@keyframes fireballBoom {
  0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.6); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; }
}

/* 碎裂碎片 */
.explode-shards { position: fixed; inset: 0; z-index: 9002; pointer-events: none; }
.shard {
  position: absolute; border-radius: 2px;
  opacity: 0;
  box-shadow: 0 0 6px rgba(255,180,60,.6);
  animation: shardFly .9s ease-out forwards;
}
@keyframes shardFly {
  0% { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.2); opacity: 0; }
}

/* 屏幕震动 */
main.explode-shake { animation: screenShake .5s ease; }
@keyframes screenShake {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-10px, 6px); }
  40% { transform: translate(10px, -8px); }
  60% { transform: translate(-8px, -6px); }
  80% { transform: translate(8px, 6px); }
}

/* 碎裂的大号单词 */
.explode-boom {
  position: fixed; left: 50%; top: 42%; z-index: 9003;
  transform: translateX(-50%);
  font-size: 3.4rem; font-weight: 900; color: #fff;
  text-shadow: 0 0 24px rgba(255,90,30,.9), 0 0 60px rgba(255,180,60,.6);
  white-space: nowrap; letter-spacing: .05em;
  animation: boomText 1.1s ease forwards;
  pointer-events: none;
}
@keyframes boomText {
  0% { opacity: 0; transform: translateX(-50%) scale(2.6) rotate(-6deg); }
  30% { opacity: 1; transform: translateX(-50%) scale(1.15) rotate(2deg); }
  55% { opacity: 1; transform: translateX(-50%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.6) rotate(8deg); }
}
.reveal-area { width: 100%; margin-top: 0; text-align: left; }

/* ── 操作按钮 ── */
.actions { display: flex; gap: 12px; margin-top: 16px; }
.btn {
  flex: 1; padding: 14px 8px; border-radius: var(--radius-sm);
  border: none; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); }
.btn-wrong  { background: #fee2e2; color: var(--danger); }
.btn-know   { background: #dcfce7; color: var(--success); }
.btn-next   { background: var(--primary); color: #fff; }
.btn-reveal { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-bomb {
  background: linear-gradient(135deg, #dc2626, #7f1d1d);
  color: #fff;
  box-shadow: 0 4px 14px rgba(220,38,38,.35);
}
.btn-bomb:active { box-shadow: 0 2px 8px rgba(220,38,38,.5); }

/* ── 进度条 ── */
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; margin-bottom: 16px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 3px; transition: width .3s ease; }

/* ── 字母导航 ── */
.alpha-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; justify-content: center; }
.alpha-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .85rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.alpha-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── 词条列表 ── */
.word-list { display: flex; flex-direction: column; gap: 10px; }
.word-item {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  cursor: pointer; transition: transform var(--transition);
}
.word-item:active { transform: scale(.99); }
.word-item .w-stars  { color: var(--warning); font-size: .75rem; flex-shrink: 0; width: 42px; }
.word-item .w-word   { font-size: 1rem; font-weight: 700; flex-shrink: 0; min-width: 80px; }
.word-item .w-phon   { color: var(--muted); font-size: .8rem; flex-shrink: 0; }
.word-item .w-pos    { color: var(--primary); font-size: .75rem; flex-shrink: 0; background: var(--primary-l); border-radius: 6px; padding: 2px 8px; }
.word-item .w-meaning { font-size: .88rem; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-item.mastered .w-word { color: var(--success); }
.chopped-tag {
  font-size: .72rem; color: var(--danger);
  background: #fee2e2; border-radius: 6px; padding: 2px 8px;
  flex-shrink: 0; font-weight: 600;
}

/* ── 弹窗 ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1000; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  background: var(--bg); border-radius: 24px 24px 0 0;
  width: 100%; max-width: 720px; max-height: 85vh; overflow-y: auto;
  padding: 20px 20px 40px; transform: translateY(30px); transition: transform .25s ease;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 16px; }
.modal-close { float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }

/* ── 页切换 ── */
.page { display: none; }
.page.active { display: block; }

/* ── 动画 ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .3s ease forwards; }

/* ══════════════════════════════════════
   单词详情 · 结构化卡片布局
   ══════════════════════════════════════ */

/* 外层容器 */
.detail-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

/* 词头区：渐变背景 + 居中 */
.detail-header {
  background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
  color: #fff;
  padding: 28px 24px 24px;
  text-align: center;
  position: relative;
}
.dh-word {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
  display: inline-flex; align-items: center; gap: 10px;
}
.dh-speak {
  font-size: 1.6rem;
  cursor: pointer;
  opacity: .9;
  transition: transform .15s ease;
  display: inline-flex;
}
.dh-speak:hover { transform: scale(1.15); opacity: 1; }
.dh-phonetic {
  font-size: 1.2rem;
  font-family: Georgia, serif;
  opacity: .92;
  margin-top: 8px;
  letter-spacing: .02em;
}
.dh-pos {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 14px; flex-wrap: wrap;
}
.pos-badge {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(4px);
  padding: 5px 16px; border-radius: 20px;
  font-size: .9rem; font-weight: 700;
}
.dh-meaning { font-size: 1.1rem; font-weight: 500; }
.dh-stars { margin-top: 10px; font-size: 1.25rem; letter-spacing: .18em; color: #fbbf24; line-height: 1.4; }
.dh-unit {
  margin-top: 12px; font-size: .85rem; opacity: .85;
  display: inline-block;
  background: rgba(255,255,255,.15);
  border-radius: 12px; padding: 4px 12px;
}

/* 区块 */
.sec { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.sec:last-child { border-bottom: none; }
.sec-title {
  font-size: .85rem; font-weight: 700; color: var(--primary);
  letter-spacing: .04em; margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.sec-row { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.sec-half { flex: 1; padding: 18px 20px; }
.sec-half + .sec-half { border-left: 1px solid var(--border); }

/* 词形拓展行 */
.detail-section { display: flex; flex-direction: column; gap: 8px; }
.v-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
}
.v-word { font-weight: 700; color: var(--text); min-width: 90px; font-size: .98rem; }
.v-pos {
  font-size: .75rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 3px 10px; border-radius: 12px; white-space: nowrap;
}
.v-desc { flex: 1; font-size: .9rem; color: var(--text); line-height: 1.5; }

/* 例句卡片 */
.ex-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.ex-card:last-child { margin-bottom: 0; }
.ex-en { font-size: .95rem; color: #78350f; line-height: 1.6; }
.ex-cn { font-size: .85rem; color: #92400e; margin-top: 4px; line-height: 1.5; }

/* 标签（近义/反义） */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 5px 14px; border-radius: 16px;
  font-size: .85rem; font-weight: 600;
  border: 1px solid transparent;
}

/* 名师点拨 */
.tips-sec { background: linear-gradient(180deg, #eff6ff, #fff); }
.tips-text {
  background: var(--primary-l);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: .92rem;
  color: #1e3a8a;
  line-height: 1.8;
  white-space: pre-line;
}

/* 掌握进度 */
.mastery-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.m-label { font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.m-bar { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.m-fill { height: 100%; background: linear-gradient(90deg, var(--success), #22c55e); border-radius: 4px; transition: width .5s ease; }
.m-level { font-size: .85rem; font-weight: 700; color: var(--success); min-width: 48px; text-align: right; }

/* ── 响应式 ── */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .home-actions { grid-template-columns: 1fr 1fr; }
  .dh-word { font-size: 2.4rem; }
  .sec-row { flex-direction: column; }
  .sec-half + .sec-half { border-left: none; border-top: 1px solid var(--border); }
  .word-item { flex-wrap: wrap; gap: 6px 10px; }
  .word-item .w-phon { display: none; }
  .word-item .w-meaning { flex-basis: 100%; }
}

/* 空态提示 */
.empty-tip { text-align: center; padding: 40px 20px; color: var(--muted); font-size: .95rem; }

/* ═══ 记忆电池提醒（首页） ═══ */
.battery-alert {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  font-size: .9rem; font-weight: 600;
  animation: ba-pulse 1.6s ease-in-out infinite;
}
.battery-alert .ba-icon { font-size: 1.2rem; }
.battery-alert .ba-text { flex: 1; }
.battery-alert .ba-arrow { font-size: 1.3rem; opacity: .6; }
@keyframes ba-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .25); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* ═══ 复习中心：快忘优先列表 ═══ */
.review-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: .85rem;
}
.review-item:last-child { border-bottom: none; }
.review-item:active { background: var(--surface); }
.ri-icon { font-size: .95rem; width: 20px; text-align: center; }
.ri-word { font-weight: 700; color: var(--text); min-width: 72px; }
.ri-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.ri-fill { display: block; height: 100%; border-radius: 3px; transition: width .4s ease; }
.ri-pct { font-weight: 700; min-width: 36px; text-align: right; font-size: .78rem; }
.ri-state { font-size: .72rem; color: var(--muted); min-width: 56px; text-align: right; }

/* ═══ 记忆里程碑 ═══ */
.milestone-wrap {
  background: #f8f7ff;
  border: 1px solid #e0dcf3;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
}
.milestone-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.milestone-title { font-size: .9rem; font-weight: 700; color: #3c3489; }
.milestone-sub { font-size: .78rem; color: #7c6faf; }
.milestone-bar {
  position: relative; height: 10px; background: #e0dcf3; border-radius: 5px; overflow: hidden;
}
.milestone-fill { height: 100%; background: #639922; border-radius: 5px; transition: width .5s ease; }
.milestone-dot {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid #3b6d11;
  box-shadow: 0 0 0 2px rgba(59,109,17,.15);
  transition: left .5s ease;
}
.milestone-nodes {
  display: flex; justify-content: space-between; margin-top: 8px;
}
.milestone-node {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.mn-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: #e0dcf3; border: 1.5px solid #c4b5fd;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: #888780; font-weight: 700;
}
.milestone-node.done .mn-dot {
  background: #639922; border-color: #3b6d11; color: #fff;
}
.mn-label { font-size: .7rem; color: #888780; font-weight: 500; }
.milestone-node.done .mn-label { color: #3b6d11; }
.milestone-info { font-size: .82rem; color: #5f5e5a; margin-top: 8px; }
.milestone-desc { font-size: .78rem; color: #854f0b; margin-top: 4px; }

/* ═══ 听读任务系统 ═══ */
/* 任务门控横幅 */
.task-gate {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  background: #fef9c3; color: #854d0e;
  border: 1px solid #fde047;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
}
.task-gate.done {
  background: #dcfce7; color: #166534;
  border-color: #86efac;
}

/* 任务按钮（听/录/播） */
.task-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  border-radius: 18px;
  padding: 6px 12px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.task-btn .cnt { background: rgba(0,0,0,.25); border-radius: 10px; padding: 1px 7px; font-size: .75rem; }
.task-btn.done {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.task-btn.done .cnt { background: rgba(255,255,255,.3); }
.task-btn.recording {
  background: #dc2626;
  border-color: #dc2626;
  animation: recPulse 1s ease infinite;
}
.task-btn.play { background: rgba(255,255,255,.22); }
@keyframes recPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5);} 50% { box-shadow: 0 0 0 8px rgba(220,38,38,0);} }

/* 按钮点击反馈 */
.task-btn.pulse { animation: btnPulse .4s ease; }
@keyframes btnPulse { 0%{transform:scale(1)} 40%{transform:scale(1.18)} 100%{transform:scale(1)} }

/* 🔊 听目标按钮：蓝色系 */
.task-btn.listen-btn,
.task-btn[data-target] {
  background: rgba(59,130,246,.38);
  border-color: rgba(96,165,250,.7);
  color: #fff;
}
/* 🎤 录音按钮：紫色系（与听按钮区分） */
.task-btn.rec-btn {
  background: rgba(168,85,247,.45);
  border-color: rgba(192,132,252,.75);
  color: #fff;
}
.task-btn.rec-btn:hover { background: rgba(168,85,247,.6); }
.task-btn.listen-btn:hover { background: rgba(59,130,246,.6); }
/* 完成态统一绿色 */
.task-btn.rec-btn.done, .task-btn.listen-btn.done {
  background: #16a34a;
  border-color: #16a34a;
}

/* 词头任务栏 */
.dh-taskbar {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}

/* 例句任务栏 */
.ex-taskbar {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px;
}

/* 播放列表（多条独立录音） */
.dh-playlist, .ex-playlist {
  display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: center;
}
.ex-playlist { justify-content: flex-start; }
.dh-playlist { margin-top: 10px; }
.task-btn.play { background: rgba(255,255,255,.25); }
.task-btn.play:hover { background: rgba(255,255,255,.4); }

/* 禁用按钮 */
#judgeActions .btn:disabled {
  opacity: .45;
  filter: grayscale(.6);
  pointer-events: none;
}

/* ═══ 选词测验 ═══ */
.home-btn.quiz {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
}
.quiz-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  text-align: center;
  border: 2px solid var(--border);
  min-height: 300px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.quiz-qhead {
  font-size: .85rem; color: var(--muted); margin-bottom: 18px;
  letter-spacing: .05em;
}
.quiz-prompt {
  font-size: 2rem; font-weight: 800; color: var(--text);
  line-height: 1.4; margin-bottom: 6px;
}
.quiz-phon {
  font-size: 1rem; color: var(--muted); font-family: Georgia, serif;
  margin-bottom: 22px;
}
.quiz-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  width: 100%; max-width: 420px;
}
.quiz-opt {
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 1.05rem; font-weight: 600; color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.quiz-opt:active { transform: scale(.96); }
.quiz-opt.correct { background: #dcfce7; border-color: #16a34a; color: #16a34a; }
.quiz-opt.wrong { background: #fee2e2; border-color: #dc2626; color: #dc2626; }
.quiz-opt.dim { opacity: .45; pointer-events: none; }
.quiz-feedback {
  margin-top: 16px; font-size: .95rem; font-weight: 700;
  min-height: 22px;
}
.quiz-feedback.ok { color: var(--success); }
.quiz-feedback.bad { color: var(--danger); }
@media (max-width: 480px) {
  .quiz-options { grid-template-columns: 1fr; gap: 10px; }
}

/* ═══ 单词PK消除 ═══ */
.home-btn.pk {
  background: linear-gradient(135deg, #d85a30, #ef9f27);
  color: #fff;
}
.pk-hud {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; gap: 8px;
}
.pk-hud-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: .85rem; font-weight: 700; color: var(--muted);
}
.pk-hud-item.pk-score { color: var(--warning); }
.pk-arena {
  background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 50%, #e0f2fe 100%);
  border-radius: var(--radius);
  border: 2px dashed #c4b5fd;
  min-height: 460px;
  padding: 20px 14px;
  position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.pk-target {
  font-size: 1.9rem; font-weight: 800; color: #4c1d95;
  text-align: center;
  margin: 10px 0 6px;
  min-height: 48px;
  line-height: 1.3;
}
.pk-target-phon {
  font-size: .95rem; color: #7c6faf; font-family: Georgia, serif;
  margin-bottom: 6px;
}
.pk-bubbles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; width: 100%; max-width: 420px;
  margin-top: 14px;
}
.pk-bubble {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #b5d4f4 55%, #378add 100%);
  border: 2px solid #185fa5;
  color: #042c53;
  font-size: 1.05rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  cursor: pointer;
  padding: 6px;
  box-shadow: 0 4px 10px rgba(24,95,165,.25);
  transition: transform .15s ease;
  -webkit-tap-highlight-color: transparent;
  word-break: break-all;
}
.pk-bubble:active { transform: scale(.92); }
.pk-bubble.pop { animation: bubblePop .55s ease forwards; }
@keyframes bubblePop {
  0% { transform: scale(1); opacity: 1; }
  35% { transform: scale(1.35); opacity: 1; background: radial-gradient(circle, #fde047, #ef9f27); }
  100% { transform: scale(.1) rotate(20deg); opacity: 0; }
}
.pk-bubble.wrong { animation: bubbleShake .4s ease; background: #f7c1c1 !important; border-color: #a32d2d !important; }
@keyframes bubbleShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-5px); }
}
.pk-bubble.ghost { opacity: .3; pointer-events: none; }
.pk-feedback {
  margin-top: 14px; font-size: 1rem; font-weight: 800;
  min-height: 26px; text-align: center;
}
.pk-feedback.ok { color: #16a34a; }
.pk-feedback.bad { color: #dc2626; }
@media (max-width: 480px) {
  .pk-bubbles { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .pk-bubble { font-size: .9rem; }
  .pk-target { font-size: 1.5rem; }
}
