/* games.css — 玩法专用样式 */

/* ===== ① 闪卡点读 ===== */
.flash-card {
  background: #fff; border-radius: 28px; padding: 28px 20px;
  max-width: 520px; margin: 0 auto; text-align: center;
  box-shadow: var(--shadow); cursor: pointer;
  border: 4px solid var(--theme-light);
}
.flash-card .emoji { font-size: 130px; line-height: 1.1; }
.flash-card .word {
  font-size: 56px; font-weight: 800; margin: 8px 0 2px; letter-spacing: 2px;
}
.flash-card .word span { display: inline-block; padding: 0 2px; border-radius: 8px; }
.flash-card .phonetic { font-size: 18px; color: var(--muted); }
.flash-card .zh { font-size: 22px; margin-top: 8px; color: var(--theme-dark); font-weight: 700; }
.flash-nav { display: flex; gap: 14px; justify-content: center; margin-top: 18px; }
.flash-progress { text-align: center; margin-top: 12px; color: var(--muted); font-size: 18px; }

/* ===== ② ③ 拼词 / 听音组词 ===== */
.spell-stage { text-align: center; }
.spell-emoji { font-size: 80px; }
.spell-zh { font-size: 22px; color: var(--theme-dark); font-weight: 700; margin-bottom: 10px; }
.letter-slots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.slot {
  width: 64px; height: 76px; border-radius: 16px;
  border: 3px dashed var(--theme); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; color: var(--ink);
}
.slot.filled { border-style: solid; background: var(--theme-light); }
.slot.good { background: #d4f7df; border-color: var(--ok); }
.letter-pool { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.letter-btn {
  width: 72px; height: 72px; border-radius: 18px; border: 0;
  background: var(--theme); color: #fff; font-size: 32px; font-weight: 800; cursor: pointer;
  box-shadow: var(--shadow);
}
.letter-btn.used { visibility: hidden; }
.letter-btn:active { transform: scale(.94); }
.listen-hint-btn { font-size: 20px; padding: 10px 20px; }

/* ===== ④ 听音选词 ===== */
.choose-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 520px; margin: 0 auto; }
.choose-card {
  background: #fff; border-radius: 24px; padding: 22px 10px; text-align: center;
  border: 4px solid var(--theme-light); cursor: pointer; box-shadow: var(--shadow);
}
.choose-card .emoji { font-size: 90px; }
.choose-card .w { font-size: 24px; font-weight: 700; margin-top: 6px; }
.choose-card.good { border-color: var(--ok); background: #e8fcef; }
.choose-card.bad { border-color: var(--bad); background: #ffe6e3; }
.choose-progress { text-align: center; margin: 10px 0; color: var(--muted); }

/* ===== ⑤ 句子拼装 ===== */
.sentence-zone {
  min-height: 80px; border: 3px dashed var(--theme); border-radius: 20px;
  background: #fff; padding: 12px; display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: center; margin-bottom: 18px;
}
.word-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.word-chip {
  background: var(--theme); color: #fff; border: 0; border-radius: 14px;
  padding: 12px 18px; font-size: 24px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow);
}
.word-chip.used { visibility: hidden; }
.word-chip-placed {
  background: var(--theme-light); color: var(--theme-dark); border-radius: 12px;
  padding: 8px 14px; font-size: 26px; font-weight: 700; cursor: pointer;
}
.sentence-zone .word-chip-placed span { display: inline-block; border-radius: 6px; padding: 0 2px; }

/* ===== ⑥ 句子点读 ===== */
.read-sentence {
  font-size: 38px; line-height: 1.7; text-align: center; margin: 20px 0;
}
.read-sentence span { display: inline-block; padding: 0 4px; border-radius: 8px; cursor: pointer; }
.read-sentence span:hover { background: var(--theme-light); }
.read-zh { text-align: center; font-size: 20px; color: var(--muted); margin-bottom: 14px; }
.read-nav { display: flex; gap: 14px; justify-content: center; margin-top: 16px; }

/* ===== ⑦ 短文阅读 ===== */
.passage { max-width: 640px; margin: 0 auto; }
.passage h2 { text-align: center; font-size: 28px; }
.passage .p-zh-title { text-align: center; color: var(--muted); font-size: 18px; margin-bottom: 14px; }
.p-sentence { margin: 10px 0; font-size: 26px; line-height: 1.7; cursor: pointer; padding: 6px 10px; border-radius: 12px; }
.p-sentence:hover { background: var(--theme-light); }
.p-sentence span { display: inline-block; border-radius: 6px; padding: 0 2px; }
.p-zh { color: var(--muted); font-size: 17px; margin-left: 8px; }
.keywords { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.key-chip {
  background: #fff; border: 3px solid var(--theme-light); color: var(--theme-dark);
  border-radius: 999px; padding: 8px 16px; font-size: 20px; font-weight: 700; cursor: pointer;
}
.key-chip:hover { background: var(--theme-light); }

/* 通用：喇叭大按钮 */
.speaker-big {
  width: 90px; height: 90px; border-radius: 50%; border: 0;
  background: var(--theme); color: #fff; font-size: 44px; cursor: pointer;
  box-shadow: var(--shadow);
}
.center { text-align: center; }
.row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }

/* ===== 对话气泡 ===== */
.bubble-scene { max-width: 640px; margin: 16px auto; display: flex; flex-direction: column; gap: 14px; }
.bubble-row { display: flex; align-items: flex-end; gap: 8px; cursor: pointer; }
.bubble-row.right { flex-direction: row-reverse; }
.bubble-row .bubble-avatar { font-size: 40px; flex: 0 0 auto; }
.bubble {
  max-width: 78%; padding: 12px 16px; border-radius: 20px;
  background: #fff; box-shadow: var(--shadow); transition: transform .15s ease, background .15s ease;
}
.bubble-row.left .bubble { background: #e8f1ff; border-bottom-left-radius: 6px; }
.bubble-row.right .bubble { background: #ffe8f1; border-bottom-right-radius: 6px; }
.bubble-row .bubble-en { font-size: 24px; line-height: 1.5; }
.bubble-row .bubble-en span { display: inline-block; border-radius: 6px; padding: 0 2px; }
.bubble-row .bubble-zh { font-size: 16px; color: #888; margin-top: 4px; }
.bubble-row.active .bubble,
.bubble-row.highlight .bubble { transform: scale(1.04); background: #fff7c2; }

/* ===== 跟读录音 ===== */
.rec-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 18px; padding: 12px 14px; margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.rec-row .rec-text { flex: 1; }
.rec-row .rec-en { font-size: 22px; font-weight: 700; }
.rec-row .rec-zh { font-size: 15px; color: #888; }
.rec-btns { display: flex; gap: 8px; }
.rec-btn {
  width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: var(--theme); color: #fff; font-size: 24px; cursor: pointer;
}
.rec-btn:disabled { opacity: .4; cursor: not-allowed; }
.rec-rec.recording { background: #e74c3c; animation: blink 0.8s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.rec-time { width: 90px; font-size: 14px; color: #e67e22; }
