/* ==========================================================================
   GAMES.CSS — Giao diện Trò Chơi Tiếng Trung (MiniGames)
   Hỗ trợ sáng/tối qua biến CSS từ themes.css & style.css, responsive tới 360px
   ========================================================================== */

/* Khung chứa chính của phân hệ MiniGames */
.games-module {
  box-sizing: border-box;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  color: var(--text, #1f1a17);
  font-family: var(--font-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.games-module *,
.games-module *::before,
.games-module *::after {
  box-sizing: border-box;
}

/* Hanzi Typography */
.games-hanzi {
  font-family: var(--font-hanzi, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif);
  font-weight: 600;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   1. MÀN SẢNH (LOBBY)
   -------------------------------------------------------------------------- */
.games-lobby-header {
  text-align: center;
  margin-bottom: 24px;
}

.games-lobby-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent, #b3261e);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.games-lobby-desc {
  color: var(--muted, #4b5563);
  font-size: 0.95rem;
  margin: 0 0 20px 0;
}

/* Thanh cấu hình: Bộ lọc từ vựng & Âm thanh */
.games-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5dac9);
  padding: 12px 16px;
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  margin-bottom: 24px;
}

.games-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.games-filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted, #4b5563);
}

.games-scope-selector {
  display: inline-flex;
  background: var(--surface-2, #f4efe3);
  border-radius: var(--radius-sm, 8px);
  padding: 3px;
  gap: 2px;
}

.games-scope-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text, #1f1a17);
  transition: all 0.15s ease;
}

.games-scope-btn.active {
  background: var(--accent, #b3261e);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.games-scope-count {
  font-size: 0.78rem;
  color: var(--muted, #4b5563);
  margin-left: 4px;
}

.games-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2, #f4efe3);
  border: 1px solid var(--border, #e5dac9);
  color: var(--text, #1f1a17);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.games-sound-btn:hover {
  background: var(--accent-light, rgba(179,38,30,0.08));
  border-color: var(--accent, #b3261e);
}

/* Lưới thẻ trò chơi */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.game-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5dac9);
  border-radius: var(--radius-lg, 16px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
  border-color: var(--accent, #b3261e);
}

.game-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--surface-2, #f4efe3);
  color: var(--accent-2, #c9a227);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border, #e5dac9);
}

.game-card-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: inline-block;
}

.game-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text, #1f1a17);
  margin: 0 0 8px 0;
}

.game-card-desc {
  font-size: 0.88rem;
  color: var(--muted, #4b5563);
  line-height: 1.45;
  margin: 0 0 16px 0;
  flex-grow: 1;
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--border, #e5dac9);
  padding-top: 14px;
  margin-top: 8px;
}

.game-card-best {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #4b5563);
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-card-best strong {
  color: var(--accent-2, #c9a227);
}

.game-play-btn {
  background: var(--accent, #b3261e);
  color: #ffffff;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.game-play-btn:hover {
  background: var(--accent-hover, #981f18);
  transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   2. THANH TIÊU ĐỀ IN-GAME (HEADER CHUNG)
   -------------------------------------------------------------------------- */
.game-active-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5dac9);
  border-radius: var(--radius-md, 12px);
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}

.game-back-btn {
  background: transparent;
  border: 1px solid var(--border, #e5dac9);
  color: var(--text, #1f1a17);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.game-back-btn:hover {
  background: var(--surface-2, #f4efe3);
  border-color: var(--accent, #b3261e);
  color: var(--accent, #b3261e);
}

.game-stats-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.game-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

.game-stat-item.score strong {
  font-size: 1.15rem;
  color: var(--accent, #b3261e);
}

.game-stat-item.timer strong {
  font-size: 1.15rem;
  color: var(--accent-2, #c9a227);
  font-variant-numeric: tabular-nums;
}

.game-stat-item.lives {
  letter-spacing: 2px;
  font-size: 1rem;
}

.game-combo-pill {
  background: var(--accent-light, rgba(179,38,30,0.08));
  color: var(--accent, #b3261e);
  border: 1px solid var(--accent, #b3261e);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  animation: comboPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes comboPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   3. TRÒ 1: GHÉP CẶP TỐC ĐỘ (SPEED MATCH)
   -------------------------------------------------------------------------- */
.match-game-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
}

.match-card {
  aspect-ratio: 1.25 / 1;
  min-height: 84px;
  background: var(--surface, #ffffff);
  border: 2px solid var(--border, #e5dac9);
  border-radius: var(--radius-md, 12px);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, opacity 0.25s ease;
  position: relative;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2, #c9a227);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
}

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

.match-card.card-hanzi .match-card-content {
  font-size: 1.6rem;
  color: var(--text, #1f1a17);
}

.match-card.card-vi .match-card-content {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text, #1f1a17);
  line-height: 1.3;
}

.match-card.selected {
  border-color: var(--accent, #b3261e);
  background: var(--accent-light, rgba(179,38,30,0.08));
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.2);
  transform: scale(1.02);
}

.match-card.matched {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  opacity: 0.35;
  pointer-events: none;
  transform: scale(0.96);
}

.match-card.error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  animation: shake 0.35s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* --------------------------------------------------------------------------
   4. TRÒ 2: MƯA CHỮ (HANZI RAIN)
   -------------------------------------------------------------------------- */
.rain-game-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rain-stage {
  position: relative;
  width: 100%;
  height: 380px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5dac9);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.03);
}

/* Đường ranh giới mặt đất nguy hiểm */
.rain-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(to top, rgba(239, 68, 68, 0.15), transparent);
  border-top: 2px dashed rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 1px;
}

.rain-ground.danger-flash {
  animation: dangerFlash 0.3s ease;
}

@keyframes dangerFlash {
  0%, 100% { background: linear-gradient(to top, rgba(239, 68, 68, 0.15), transparent); }
  50% { background: rgba(239, 68, 68, 0.35); }
}

/* Chữ Hán đang rơi */
.rain-word-drop {
  position: absolute;
  transform: translateX(-50%);
  background: var(--surface, #ffffff);
  border: 2px solid var(--border, #e5dac9);
  border-radius: var(--radius-md, 12px);
  padding: 8px 14px;
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  pointer-events: none;
  transition: transform 0.05s linear;
  white-space: nowrap;
}

.rain-word-hanzi {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text, #1f1a17);
}

.rain-word-hint {
  font-size: 0.75rem;
  color: var(--muted, #4b5563);
  margin-top: 2px;
}

.rain-word-drop.exploding {
  animation: popOut 0.35s ease forwards;
}

@keyframes popOut {
  0% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(1.4); opacity: 0.8; filter: brightness(1.5); }
  100% { transform: translateX(-50%) scale(1.8); opacity: 0; }
}

/* Thanh nhập pinyin bắn chữ */
.rain-control-bar {
  display: flex;
  gap: 10px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5dac9);
  padding: 10px 14px;
  border-radius: var(--radius-md, 12px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}

.rain-input {
  flex-grow: 1;
  border: 1.5px solid var(--border, #e5dac9);
  background: var(--surface-2, #f4efe3);
  color: var(--text, #1f1a17);
  font-size: 1rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm, 8px);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rain-input:focus {
  border-color: var(--accent, #b3261e);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15);
  background: var(--surface, #ffffff);
}

.rain-input.shake {
  animation: shake 0.3s ease-in-out;
  border-color: #ef4444;
}

.rain-fire-btn {
  background: var(--accent, #b3261e);
  color: #ffffff;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.rain-fire-btn:hover {
  background: var(--accent-hover, #981f18);
}

/* --------------------------------------------------------------------------
   5. TRÒ 3: NGHE CHỌN CHỮ (LISTEN & PICK)
   -------------------------------------------------------------------------- */
.listen-game-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.listen-progress-line {
  width: 100%;
  height: 6px;
  background: var(--surface-2, #f4efe3);
  border-radius: 999px;
  overflow: hidden;
}

.listen-progress-fill {
  height: 100%;
  background: var(--accent, #b3261e);
  transition: width 0.3s ease;
}

.listen-audio-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5dac9);
  border-radius: var(--radius-lg, 16px);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}

.listen-speaker-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent, #b3261e);
  color: #ffffff;
  border: none;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(179, 38, 30, 0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}

.listen-speaker-btn:hover {
  transform: scale(1.08);
  background: var(--accent-hover, #981f18);
}

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

.listen-speaker-btn.pulsing {
  animation: pulseSpeaker 0.6s ease;
}

@keyframes pulseSpeaker {
  0% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.5); }
  70% { box-shadow: 0 0 0 18px rgba(179, 38, 30, 0); }
  100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0); }
}

.listen-audio-prompt {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted, #4b5563);
}

/* 4 phương án lựa chọn */
.listen-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.listen-opt-btn {
  background: var(--surface, #ffffff);
  border: 2px solid var(--border, #e5dac9);
  border-radius: var(--radius-md, 12px);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  transition: all 0.15s ease;
  user-select: none;
}

.listen-opt-btn:hover {
  border-color: var(--accent, #b3261e);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
}

.listen-opt-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2, #f4efe3);
  color: var(--muted, #4b5563);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.listen-opt-hanzi {
  font-size: 1.8rem;
  color: var(--text, #1f1a17);
}

.listen-opt-btn.correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.12) !important;
}

.listen-opt-btn.correct .listen-opt-badge {
  background: #10b981;
  color: #ffffff;
}

.listen-opt-btn.wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  animation: shake 0.35s ease-in-out;
}

.listen-opt-btn.wrong .listen-opt-badge {
  background: #ef4444;
  color: #ffffff;
}

.listen-opt-btn.highlight-correct {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

/* --------------------------------------------------------------------------
   6. MÀN TỔNG KẾT (SUMMARY / GAME OVER)
   -------------------------------------------------------------------------- */
.games-summary-card {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5dac9);
  border-radius: var(--radius-lg, 16px);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
}

.summary-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent, #b3261e);
  margin: 0 0 12px 0;
}

.summary-score-box {
  margin: 20px 0;
}

.summary-score-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent, #b3261e);
  line-height: 1;
}

.summary-score-label {
  font-size: 0.95rem;
  color: var(--muted, #4b5563);
  margin-top: 6px;
}

.summary-badge-record {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201, 162, 39, 0.15);
  color: var(--accent-2, #c9a227);
  border: 1px solid var(--accent-2, #c9a227);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* Phần thưởng kinh tế */
.summary-rewards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 24px 0;
  flex-wrap: wrap;
}

.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.reward-chip.coins {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.reward-chip.xp {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.35);
}

/* Từ cần ôn tập */
.summary-review-box {
  text-align: left;
  border-top: 1px solid var(--border, #e5dac9);
  padding-top: 20px;
  margin-top: 20px;
}

.summary-review-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #1f1a17);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-review-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}

.summary-review-item {
  background: var(--surface-2, #f4efe3);
  border: 1px solid var(--border, #e5dac9);
  border-radius: var(--radius-sm, 8px);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-review-word {
  display: flex;
  flex-direction: column;
}

.summary-review-hanzi {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text, #1f1a17);
}

.summary-review-py {
  font-size: 0.78rem;
  color: var(--accent, #b3261e);
  font-weight: 600;
}

.summary-review-vi {
  font-size: 0.78rem;
  color: var(--muted, #4b5563);
}

.summary-review-audio-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--accent, #b3261e);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.summary-review-audio-btn:hover {
  transform: scale(1.2);
}

.summary-review-perfect {
  text-align: center;
  color: #10b981;
  font-weight: 600;
  padding: 12px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: var(--radius-sm, 8px);
}

/* Các nút hành động */
.summary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.summary-btn {
  padding: 10px 22px;
  border-radius: var(--radius-sm, 8px);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.summary-btn.retry {
  background: var(--accent, #b3261e);
  color: #ffffff;
  border: none;
}

.summary-btn.retry:hover {
  background: var(--accent-hover, #981f18);
  transform: scale(1.02);
}

.summary-btn.lobby {
  background: var(--surface-2, #f4efe3);
  color: var(--text, #1f1a17);
  border: 1px solid var(--border, #e5dac9);
}

.summary-btn.lobby:hover {
  border-color: var(--accent, #b3261e);
  color: var(--accent, #b3261e);
}

/* --------------------------------------------------------------------------
   7. RESPONSIVE DESIGN (TỚI 360PX KHÔNG CUỘN NGANG)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .games-module {
    padding: 12px 8px;
  }

  .match-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .match-card {
    min-height: 76px;
    padding: 6px 6px;
  }

  .match-card.card-hanzi .match-card-content {
    font-size: 1.35rem;
  }

  .match-card.card-vi .match-card-content {
    font-size: 0.8rem;
  }

  .listen-options-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .rain-stage {
    height: 320px;
  }

  .summary-score-num {
    font-size: 2.4rem;
  }
}

@media (max-width: 380px) {
  .match-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .match-card {
    min-height: 68px;
    padding: 4px;
  }

  .match-card.card-hanzi .match-card-content {
    font-size: 1.2rem;
  }

  .match-card.card-vi .match-card-content {
    font-size: 0.72rem;
  }

  .games-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .games-filter-group {
    justify-content: space-between;
  }

  .games-sound-btn {
    justify-content: center;
  }
}
