/**
 * 音标王国历险记 - 样式表
 * 设计: 儿童友好、明亮配色、大圆角、大字号、动画
 */

:root {
  --primary: #FF6B6B;
  --primary-dark: #ee5a5a;
  --secondary: #4ECDC4;
  --accent: #FFE66D;
  --bg: #f0f4ff;
  --card-bg: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --success: #00b894;
  --danger: #e74c3c;
  --shadow: 0 4px 15px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: linear-gradient(180deg, #e0e7ff 0%, #f0f4ff 100%);
  color: var(--text);
}

#app {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========== 通用页面 ========== */
.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px;
  max-width: 500px;
  margin: 0 auto;
}

/* ========== 顶部栏 ========== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  margin-bottom: 8px;
  gap: 8px;
}

.top-bar h2 {
  font-size: 18px;
  color: var(--text);
}

.btn-back {
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.btn-back:active { transform: scale(0.95); }

.player-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-avatar { font-size: 28px; }

.player-stats {
  display: flex;
  gap: 8px;
}

.stat-item {
  background: var(--card-bg);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.btn-sign {
  background: var(--accent);
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.btn-sign.active {
  animation: pulse 1.5s infinite;
}

.btn-sign:active { transform: scale(0.95); }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ========== 地图页 ========== */
.map-title {
  text-align: center;
  padding: 16px 0 12px;
}

.map-title h1 {
  font-size: 24px;
  color: var(--primary);
  text-shadow: 2px 2px 0 rgba(255,255,255,0.8);
}

.map-title p {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

.chapter-path {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0 80px;
}

.chapter-node {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.chapter-node:active { transform: scale(0.97); }

.chapter-node::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--primary);
}

.chapter-node[data-status="complete"]::before { background: var(--success); }
.chapter-node[data-status="locked"]::before { background: #ccc; }

.chapter-node.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.chapter-emoji {
  font-size: 36px;
  flex-shrink: 0;
}

.chapter-info { flex: 1; }

.chapter-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.chapter-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.chapter-progress {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 13px;
}

.chapter-status {
  font-size: 24px;
  flex-shrink: 0;
}

/* ========== 底部导航 ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--card-bg);
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 6px 0;
  max-width: 500px;
  margin: 0 auto;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  padding: 6px;
  font-size: 11px;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s;
}

.nav-btn:active { color: var(--primary); }

.nav-icon { font-size: 22px; }

/* ========== 关卡地图 ========== */
.chapter-title-bar {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  text-align: center;
}

.chapter-stars-bar {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.level-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0 40px;
}

.level-node {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border: 4px solid var(--ch-color, var(--primary));
}

.level-node:active { transform: scale(0.9); }

.level-node.available {
  animation: bounce 2s infinite;
}

.level-node.locked {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #ccc;
}

.level-node.boss {
  width: 100px;
  height: 100px;
  border-width: 5px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
  border-color: #ffd700;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.level-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.level-node.boss .level-num {
  font-size: 36px;
}

.level-stars {
  display: flex;
  gap: 1px;
  font-size: 10px;
  margin-top: 2px;
}

.star-on { opacity: 1; }
.star-off { opacity: 0.2; }

.boss-label {
  position: absolute;
  bottom: -18px;
  background: #ffd700;
  color: #333;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ========== 游戏页 ========== */
.game-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.game-progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar {
  flex: 1;
  height: 12px;
  background: rgba(255,255,255,0.5);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 6px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}

.combo-display {
  background: linear-gradient(135deg, #ff6b6b, #ffd700);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  animation: pulse 1s infinite;
}

.game-prompt-text {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding: 12px;
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.game-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ========== 音标配对玩法 ========== */
.match-prompt {
  text-align: center;
  padding: 20px;
}

.phoneme-display {
  font-size: 56px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.boss-phoneme {
  color: #e74c3c;
  text-shadow: 3px 3px 0 rgba(255,215,0,0.3);
}

.btn-listen {
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.btn-listen:active { transform: scale(0.95); }

.match-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin: 8px 0 16px;
}

.match-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.match-card {
  background: var(--card-bg);
  border: 3px solid transparent;
  border-radius: var(--radius);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.match-card:active { transform: scale(0.95); }

.match-card.correct {
  border-color: var(--success);
  background: #e8fff5;
  animation: correctPop 0.4s;
}

.match-card.wrong {
  border-color: var(--danger);
  background: #fff0f0;
  animation: shake 0.4s;
}

@keyframes correctPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.card-emoji { font-size: 32px; }

.card-text {
  font-size: 16px;
  font-weight: 600;
}

.card-meaning {
  font-size: 12px;
  color: var(--text-light);
}

/* ========== 拼读消消乐 ========== */
.bubble-game {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.bubble-word-area {
  text-align: center;
  padding: 20px;
}

.word-emoji {
  font-size: 56px;
  margin-bottom: 8px;
}

.word-meaning {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.word-ipa-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: 4px;
}

.bubble-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  border-bottom: 3px solid var(--primary);
  color: var(--primary);
  transition: all 0.2s;
}

.bubble-slot.filled {
  animation: slotFill 0.3s;
}

@keyframes slotFill {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.bubble-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}

.bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #ff8a8a, #ff6b6b);
  box-shadow: 0 4px 10px rgba(255,107,107,0.3);
  transition: all 0.2s;
  animation: float 3s infinite ease-in-out;
}

.bubble:nth-child(2n) {
  background: radial-gradient(circle at 30% 30%, #6dd5d0, #4ecdc4);
  box-shadow: 0 4px 10px rgba(78,205,196,0.3);
  animation-delay: 0.5s;
}

.bubble:nth-child(3n) {
  background: radial-gradient(circle at 30% 30%, #ffe88a, #ffd700);
  box-shadow: 0 4px 10px rgba(255,215,0,0.3);
  animation-delay: 1s;
}

.bubble:nth-child(4n) {
  background: radial-gradient(circle at 30% 30%, #b8a8ff, #9b8cff);
  box-shadow: 0 4px 10px rgba(155,140,255,0.3);
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.bubble:active { transform: scale(0.85); }

.bubble.used {
  opacity: 0.2;
  pointer-events: none;
  animation: none;
}

.bubble.shake {
  animation: shake 0.4s;
}

/* ========== 听音辨词 ========== */
.listen-game {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.listen-prompt {
  text-align: center;
  padding: 30px 20px;
}

.btn-listen-big {
  background: linear-gradient(135deg, var(--secondary), #3bb5ad);
  color: white;
  border: none;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 6px 20px rgba(78,205,196,0.3);
  transition: all 0.2s;
  margin: 0 auto;
}

.btn-listen-big:active { transform: scale(0.9); }

.icon-big { font-size: 40px; }

.listen-hint {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 12px;
}

.listen-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 0 20px;
}

.listen-card {
  background: var(--card-bg);
  border: 3px solid transparent;
  border-radius: var(--radius);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.listen-card:active { transform: scale(0.95); }

.listen-card.correct {
  border-color: var(--success);
  background: #e8fff5;
  animation: correctPop 0.4s;
}

.listen-card.wrong {
  border-color: var(--danger);
  background: #fff0f0;
  animation: shake 0.4s;
}

/* ========== Boss战 ========== */
.boss-banner {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #e74c3c;
  background: linear-gradient(90deg, #fff3e0, #ffe0e0, #fff3e0);
  padding: 8px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  animation: pulse 1s infinite;
}

.boss-card {
  border: 3px solid #ffd700;
}

/* ========== 结算页 ========== */
.page-result {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 40px;
}

.result-banner {
  font-size: 28px;
  font-weight: 800;
  padding: 16px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.result-banner.win {
  background: linear-gradient(135deg, #00b894, #55efc4);
  color: white;
  animation: correctPop 0.6s;
}

.result-banner.lose {
  background: linear-gradient(135deg, #fdcb6e, #ffeaa7);
  color: #333;
}

.result-stars {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.result-star {
  font-size: 48px;
  opacity: 0.2;
  transition: all 0.5s;
}

.result-star.earned {
  opacity: 1;
  animation: starPop 0.5s;
}

@keyframes starPop {
  0% { transform: scale(0) rotate(-180deg); }
  100% { transform: scale(1) rotate(0); }
}

.result-stats {
  width: 100%;
  max-width: 320px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.stat-row:last-child { border-bottom: none; }

.stat-row.reward {
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.btn-primary:active { transform: scale(0.95); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border: 2px solid rgba(0,0,0,0.08);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.btn-secondary:active { transform: scale(0.95); }

.btn-danger {
  background: #fff0f0;
  color: var(--danger);
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

/* ========== 图鉴 ========== */
.pokedex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-bottom: 20px;
}

.pokedex-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  cursor: pointer;
}

.pokedex-card.unlocked:active { transform: scale(0.93); }

.pokedex-card.locked {
  opacity: 0.4;
  cursor: default;
  filter: grayscale(1);
}

.pokedex-symbol {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.pokedex-cn {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.pokedex-type {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ========== 音标详情 ========== */
.phoneme-detail-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.detail-symbol {
  font-size: 64px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.detail-cn {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.detail-type {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

.detail-mouth {
  font-size: 36px;
  margin: 12px 0;
}

.detail-tip {
  background: #fffde7;
  border-radius: var(--radius);
  padding: 10px;
  font-size: 14px;
  color: var(--text);
  margin: 12px 0;
}

.detail-section {
  text-align: left;
  margin-top: 16px;
}

.detail-section h3 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
}

.example-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.example-word {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.example-word:active { background: #e0e0e0; }

.spelling-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spelling-tag {
  background: var(--secondary);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

/* ========== 复习页 ========== */
.review-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.review-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.review-list, .weak-list, .task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-item, .weak-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.review-item:active, .weak-item:active { background: #f0f0f0; }

.review-symbol {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.review-cn { font-size: 14px; flex: 1; margin-left: 10px; }

.review-count {
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
}

.empty-hint {
  text-align: center;
  color: var(--text-light);
  padding: 20px;
  font-size: 14px;
}

/* ========== 商店 ========== */
.coins-display {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 20px;
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.shop-emoji { font-size: 36px; }

.shop-info { flex: 1; }

.shop-name { font-size: 15px; font-weight: 600; }
.shop-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.btn-buy {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
}

.btn-buy:active { transform: scale(0.93); }

.btn-buy.disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ========== 家长中心 ========== */
.parent-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.parent-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: linear-gradient(135deg, #e3f2fd, #f5f5f5);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 14px;
}

.task-item.done {
  opacity: 0.6;
  text-decoration: line-through;
}

.chapter-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 0;
}

.mini-progress {
  flex: 1;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.mini-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 4px;
  transition: width 0.3s;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
}

.setting-item:last-child { border-bottom: none; }

.setting-item input[type="range"] {
  width: 120px;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 16px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  max-width: 300px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ========== 响应式 ========== */
@media (max-width: 360px) {
  .phoneme-display { font-size: 44px; }
  .word-emoji { font-size: 44px; }
  .word-ipa-slots { font-size: 26px; }
  .bubble { width: 54px; height: 54px; font-size: 16px; }
  .bubble-slot { min-width: 42px; height: 42px; }
  .btn-listen-big { width: 100px; height: 100px; }
  .pokedex-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== v1.1 新增：跟读练习 ========== */
.nav-btn.highlight .nav-icon { filter: drop-shadow(0 0 6px rgba(255,107,107,.8)); }
.nav-btn.highlight span:last-child { color: #FF6B6B; font-weight: 700; }

.speak-node .level-num { background: linear-gradient(135deg, #FF8A65, #FF6B6B); }
.speak-label { background: #FF6B6B !important; }

.player-pet { font-size: 14px; margin-left: 2px; }
.coin-chip { cursor: pointer; }
.ver-tag { font-size: 12px; color: #999; }

.speak-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  margin-bottom: 16px;
}
.speak-emoji { font-size: 54px; line-height: 1.2; }
.speak-word { font-size: 38px; font-weight: 800; color: #333; letter-spacing: 1px; margin-top: 4px; }
.speak-ipa { font-size: 16px; color: #FF6B6B; margin-top: 6px; }
.speak-phoneme { font-size: 20px; color: #7E57C2; margin-top: 10px; letter-spacing: 2px; }

.speak-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.speak-actions button {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #42A5F5;
}
.btn-record { background: linear-gradient(135deg, #FF6B6B, #FF8A65) !important; }
.btn-record.recording {
  background: linear-gradient(135deg, #E53935, #D81B60) !important;
  animation: pulseRec 1s infinite alternate;
}
.btn-record:disabled { opacity: .6; }
.btn-playback { background: #7E57C2 !important; }
.btn-playback:disabled { opacity: .5; }
@keyframes pulseRec {
  from { transform: scale(1); box-shadow: 0 0 0 0 rgba(229,57,53,.5); }
  to { transform: scale(1.04); box-shadow: 0 0 0 12px rgba(229,57,53,0); }
}

.speak-status {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin: 14px 0;
  min-height: 20px;
}

.speak-result {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  margin-bottom: 14px;
}
.speak-result.hidden, .speak-self.hidden, #btnNextSpeak.hidden { display: none; }
.speak-score { font-size: 46px; font-weight: 800; }
.speak-score.ok { color: #43A047; }
.speak-score.low { color: #FB8C00; }
.speak-stars { font-size: 26px; margin: 4px 0 6px; }
.speak-feedback { font-size: 15px; color: #444; }
.speak-note { font-size: 12px; color: #999; }
.speak-detail { font-size: 12px; color: #999; margin-top: 8px; line-height: 1.6; }
.speak-tip { font-size: 13px; color: #FF6B6B; margin-top: 8px; }

.speak-self { background: #FFF8E1; border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.self-title { font-size: 14px; color: #666; margin-bottom: 10px; text-align: center; }
.self-btns { display: flex; gap: 8px; justify-content: center; }
.self-btns button {
  border: none; border-radius: 12px; padding: 10px 14px; font-size: 14px;
  background: #FFE082; color: #5D4037; font-weight: 600;
}

.speak-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.speak-chip {
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,.06);
  display: flex; flex-direction: column; align-items: center; min-width: 84px;
}
.chip-emoji { font-size: 24px; }
.chip-word { font-size: 15px; font-weight: 700; color: #333; }
.chip-ipa { font-size: 12px; color: #FF6B6B; }

.speak-records { display: flex; flex-direction: column; gap: 8px; }
.speak-record {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.rec-score.ok { color: #43A047; font-weight: 700; }
.rec-score.low { color: #FB8C00; font-weight: 700; }
.rec-mode { font-size: 12px; color: #999; }
.speak-cap { font-size: 13px; color: #888; margin-top: 10px; text-align: center; }
.speak-avg { font-size: 13px; color: #FF6B6B; font-weight: 600; }

/* ========== v1.1 新增：道具与提示 ========== */
.btn-hint {
  border: none; background: #FFE082; color: #5D4037;
  border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 700;
}
.hint-glow { animation: hintGlow 1s ease-in-out 2; box-shadow: 0 0 0 4px rgba(255,193,7,.6); }
@keyframes hintGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
/* 答错后的重试卡入口 */
.retry-bar { display: flex; justify-content: center; margin-top: 14px; }
.btn-retry {
  background: #E3F2FD; color: #1565C0; border: 2px solid #64B5F6;
  border-radius: 12px; padding: 8px 16px; font-size: 14px; font-weight: 700;
  animation: hintGlow 1.2s ease-in-out infinite;
}
.inventory-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff; border-radius: 14px; padding: 10px 12px; font-size: 13px; color: #666;
  box-shadow: 0 3px 10px rgba(0,0,0,.06); margin-bottom: 12px;
}
.inv-tag { background: #F5F5F5; border-radius: 8px; padding: 3px 8px; }
.owned { font-size: 11px; color: #43A047; background: #E8F5E9; border-radius: 6px; padding: 1px 6px; }
.shop-tip { font-size: 12px; color: #999; text-align: center; margin: 14px 0; }

/* ========== v1.1 新增：学习报告 ========== */
.report-card {
  background: #fff; border-radius: 18px; padding: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
.report-title { font-size: 19px; font-weight: 800; color: #333; text-align: center; }
.report-sub { font-size: 12px; color: #999; text-align: center; margin: 6px 0 14px; }
.report-block { margin-bottom: 16px; }
.report-block h4 {
  font-size: 14px; color: #FF6B6B; margin-bottom: 8px;
  border-left: 3px solid #FF6B6B; padding-left: 8px;
}
.report-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13px; color: #555; padding: 5px 0; border-bottom: 1px dashed #EEE;
}
.report-row span:last-child { color: #333; font-weight: 600; text-align: right; }
.report-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.report-actions button {
  border: none; border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 600; color: #fff;
}
.report-actions .btn-primary { background: linear-gradient(135deg, #FF6B6B, #FF8A65); }
.report-actions .btn-secondary { background: #7E57C2; }
.report-hint { font-size: 12px; color: #999; text-align: center; margin-top: 10px; line-height: 1.5; }

.daily-table { display: flex; flex-direction: column; gap: 6px; }
.daily-row {
  display: grid; grid-template-columns: 1.1fr .8fr .8fr .8fr 1.4fr;
  font-size: 12px; color: #555; background: #fff; border-radius: 10px; padding: 8px 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04); text-align: center;
}
.daily-day { font-weight: 700; color: #333; }

.stat-sub { font-size: 12px; color: #888; margin-top: 10px; text-align: center; line-height: 1.6; }
.stage-tag {
  font-size: 11px; color: #7E57C2; background: #EDE7F6;
  border-radius: 6px; padding: 1px 6px; margin-left: 6px;
}
.review-count.ready { color: #43A047; font-weight: 700; }

/* ========== 多账号管理 (v1.4) ========== */
.player-name {
  font-weight: 700; color: #4E342E; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.page-profiles, .page-profile-edit { padding-bottom: 90px; }
.profiles-hint {
  font-size: 12px; color: #8D6E63; background: #FFF8E1;
  border-radius: 12px; padding: 10px 14px; margin: 0 16px 12px; line-height: 1.6;
}
.profile-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.profile-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); border: 2px solid transparent;
}
.profile-card.current { border-color: #FF6B6B; background: #FFF5F5; }
.profile-avatar { font-size: 34px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: #FFF3E0; border-radius: 50%; flex-shrink: 0; }
.profile-meta { flex: 1; min-width: 0; }
.profile-name { font-size: 16px; font-weight: 700; color: #333; display: flex; align-items: center; gap: 6px; }
.profile-badge {
  font-size: 10px; color: #fff; background: #FF6B6B;
  border-radius: 8px; padding: 1px 8px; font-weight: 600;
}
.profile-sub { font-size: 12px; color: #999; margin-top: 3px; }
.profile-actions { display: flex; gap: 8px; align-items: center; }
.btn-mini {
  border: none; border-radius: 12px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #66BB6A, #43A047);
}
.btn-mini.danger { background: #E57373; padding: 8px 10px; }
.profile-add { margin: 16px 16px 0; width: auto; }
.edit-form { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.form-label { font-size: 13px; color: #666; font-weight: 600; margin-top: 6px; }
.profile-name-input {
  border: 2px solid #FFE0B2; border-radius: 14px; padding: 12px 14px;
  font-size: 16px; outline: none; background: #fff;
}
.profile-name-input:focus { border-color: #FF6B6B; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-option {
  font-size: 26px; aspect-ratio: 1; border-radius: 14px;
  border: 2px solid transparent; background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.avatar-option.selected { border-color: #FF6B6B; background: #FFF5F5; }
.form-hint { font-size: 12px; color: #999; text-align: center; margin-top: 4px; }

/* ========== 音标旁的汉字助记 (v1.5) ========== */
.phoneme-hz {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #E65100;
  background: #FFF3E0;
  border: 1.5px solid #FFCC80;
  border-radius: 10px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: middle;
  line-height: 1.5;
  letter-spacing: 1px;
  font-family: "PingFang SC", "Microsoft YaHei", "Heiti SC", sans-serif;
  white-space: nowrap;
}
.phoneme-display .phoneme-hz { font-size: 20px; padding: 2px 12px; border-radius: 14px; margin-left: 10px; }
.detail-symbol .phoneme-hz { font-size: 22px; padding: 3px 14px; border-radius: 16px; margin-left: 12px; }
.pokedex-symbol .phoneme-hz { font-size: 11px; padding: 0 6px; border-radius: 8px; margin-left: 5px; }
.review-symbol .phoneme-hz { font-size: 12px; padding: 0 6px; border-radius: 8px; margin-left: 6px; }
@media (max-width: 480px) {
  .phoneme-display .phoneme-hz { font-size: 16px; padding: 1px 9px; }
  .detail-symbol .phoneme-hz { font-size: 18px; }
}

/* 泡泡里的汉字助记 (v1.5) */
.bubble { flex-direction: column; line-height: 1.05; padding: 0; }
.bubble .bubble-sym { font-size: 19px; font-weight: 700; }
.bubble .bubble-hz { font-size: 10px; font-weight: 600; opacity: 0.95; margin-top: 1px; }

/* ========== 答题表情反馈 (v1.7) ========== */
.answer-feedback {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) scale(0.3);
  font-size: 84px;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.25));
  transition: opacity .15s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.answer-feedback.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.15);
}
.answer-feedback.fb-happy.show { animation: fb-bounce-happy .9s ease forwards; }
.answer-feedback.fb-sad.show { animation: fb-bounce-sad .9s ease forwards; }
@keyframes fb-bounce-happy {
  0% { transform: translate(-50%,-50%) scale(.3) rotate(-15deg); opacity: 0; }
  35% { transform: translate(-50%,-50%) scale(1.25) rotate(8deg); opacity: 1; }
  60% { transform: translate(-50%,-52%) scale(1.1) rotate(-4deg); }
  100% { transform: translate(-50%,-58%) scale(.9) rotate(0deg); opacity: 0; }
}
@keyframes fb-bounce-sad {
  0% { transform: translate(-50%,-50%) scale(.3); opacity: 0; }
  35% { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
  75% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-46%) scale(.85); opacity: 0; }
}

/* v1.9 答题反馈：表情后跟「非常棒/继续努力」文字 */
.answer-feedback .fb-text {
  font-size: 40px;
  font-weight: 800;
  margin-left: 14px;
  vertical-align: middle;
  letter-spacing: 2px;
  text-shadow: 0 3px 10px rgba(0,0,0,.28), 0 1px 0 rgba(255,255,255,.55);
}
.answer-feedback .fb-text-good { color: #ff9d00; }
.answer-feedback .fb-text-bad  { color: #6c7f93; }

/* ========== v1.8 修复：翻题导航 / 回看模式 / 图鉴待解锁 ========== */
.game-topbar .btn-qnav {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 12px;
  padding: 5px 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.4;
  flex-shrink: 0;
}
.game-topbar .btn-qnav.wide {
  font-size: 13px;
  padding: 5px 10px;
  white-space: nowrap;
}
.game-topbar .btn-qnav:active { transform: scale(0.92); }

.review-banner {
  text-align: center;
  font-size: 13px;
  color: #8a6d1a;
  background: #fff7dd;
  border: 1px dashed #e8c96a;
  border-radius: 10px;
  margin: 8px 14px 0;
  padding: 6px 10px;
}

/* 图鉴：未解锁的音标也完整可看，仅做弱化处理 */
.pokedex-card.unseen {
  opacity: 0.78;
}
.pokedex-card.unseen .pokedex-type { color: #9aa0a6; }
.pokedex-card.unseen:active { transform: scale(0.95); }
