/* ═══════════════════════════════════════════════════════════════════
   GAMES — Complete Styles
   Canvas-backed games with glass-morphism UI, animations, particles
   ═══════════════════════════════════════════════════════════════════ */

/* ─── GAME MENU ────────────────────────────────────────────────── */
.games-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.game-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.game-card-header {
  padding: 22px 20px 18px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Animated shimmer on header */
.game-card-header::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255,255,255,0.08) 50%,
    transparent 70%
  );
  animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer {
  0%,100% { transform: translateX(-30%) translateY(-30%); }
  50%     { transform: translateX(30%) translateY(30%); }
}

.game-card-header .game-card-icon {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  animation: iconFloat 3s ease-in-out infinite;
}
@keyframes iconFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-4px); }
}

.game-card-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 1;
}
.game-card-header .game-card-sub {
  font-size: 0.82rem;
  opacity: 0.85;
  margin-top: 3px;
  display: block;
  position: relative;
  z-index: 1;
}

/* Themed gradients */
.game-card[data-game="memory"] .game-card-header     { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.game-card[data-game="spelling"] .game-card-header    { background: linear-gradient(135deg, #10B981, #059669); }
.game-card[data-game="listening"] .game-card-header   { background: linear-gradient(135deg, #7C3AED, #6D28D9); }
.game-card[data-game="sentences"] .game-card-header   { background: linear-gradient(135deg, #EC4899, #DB2777); }
.game-card[data-game="rocket"] .game-card-header      { background: linear-gradient(135deg, #0D1B2A, #1B2838); }
.game-card[data-game="sailing"] .game-card-header     { background: linear-gradient(135deg, #00695C, #00838F); }
.game-card[data-game="fishing"] .game-card-header     { background: linear-gradient(135deg, #003545, #004D40); }
.game-card[data-game="falling"] .game-card-header     { background: linear-gradient(135deg, #42A5F5, #64B5F6); }
.game-card[data-game="balloons"] .game-card-header    { background: linear-gradient(135deg, #AD1457, #C2185B); }
.game-card[data-game="timetrial"] .game-card-header   { background: linear-gradient(135deg, #120028, #1A0042); }

.game-card-body {
  padding: 16px 20px 20px;
}
.game-card-body p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--c-text-light);
  line-height: 1.5;
}
.game-card-learns {
  font-size: 0.82rem;
  color: var(--c-primary);
  font-weight: 600;
}
.game-card-learns::before { content: "\1F4D6 "; }

/* Hover play indicator */
.game-card::after {
  content: '\25B6  Play';
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-primary);
  opacity: 0;
  transition: opacity 0.3s;
}
.game-card {
  position: relative;
}
.game-card:hover::after {
  opacity: 1;
}

/* ─── GAME AREA (Canvas + DOM overlay) ─────────────────────────── */
.game-area {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 480px;
}

.game-canvas-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* All direct children above canvas */
.game-area > *:not(.game-canvas-bg) {
  position: relative;
  z-index: 1;
}

/* ─── GLASS BUTTONS (for use over canvas backgrounds) ──────────── */
.btn-glass {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-glass:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}
.btn-glass:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.btn-glass-accent {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.btn-glass-accent:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.btn-glass-go {
  background: rgba(0,230,118,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,230,118,0.5);
  color: #fff;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  animation: glowPulse 1.5s ease-in-out infinite;
}
.btn-glass-go:hover {
  background: rgba(0,230,118,0.5);
  transform: translateY(-2px) scale(1.03);
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 12px rgba(0,230,118,0.3); }
  50%     { box-shadow: 0 0 24px rgba(0,230,118,0.6); }
}

/* Speaker button over dark backgrounds */
.btn-speak-glow {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-speak-glow:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.1);
}

/* ─── GAME HEADER (frosted glass bar) ──────────────────────────── */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 12px 16px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.game-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.game-score-bar {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Back button over canvas */
.game-area > .btn-back {
  margin: 12px 12px 0;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.game-area > .btn-back:hover {
  background: rgba(255,255,255,0.25);
}

.game-msg {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ─── TEACH PHASE (flashcards over canvas) ─────────────────────── */
.teach-phase {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
  text-align: center;
}
.teach-header {
  margin-bottom: 20px;
}
.teach-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.teach-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.teach-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s;
}
.teach-dot.active {
  background: #fff;
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}
.teach-dot.done {
  background: #00E676;
  box-shadow: 0 0 6px rgba(0,230,118,0.5);
}

/* Flashcard 3D flip */
.teach-card-wrap {
  margin-bottom: 24px;
}
.teach-card {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  cursor: pointer;
}
.teach-card-inner {
  position: relative;
  width: 100%;
}
.teach-card-front {
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.teach-meaning-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.teach-word-native {
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.teach-arrow-down {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.3);
  margin: 2px 0;
}
.teach-word-big {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  letter-spacing: 0.02em;
}
.teach-hint-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}
.teach-nav {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.teach-prev, .teach-next {
  min-width: 130px;
}

/* ─── MEMORY GAME ──────────────────────────────────────────────── */
.mem-grid {
  display: grid;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto;
  padding: 16px;
}

.mem-card {
  perspective: 600px;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  min-height: 80px;
}
.mem-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease;
  transform-style: preserve-3d;
}
.mem-card.flipped .mem-card-inner,
.mem-card.matched .mem-card-inner {
  transform: rotateY(180deg);
}

.mem-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

/* Card front — Delft pottery pattern */
.mem-card-front {
  background:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.12) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.12) 2px, transparent 2px),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 6px, transparent 6px),
    linear-gradient(135deg, #3B82F6, #2563EB);
  background-size: 18px 18px, 18px 18px, 36px 36px, 100% 100%;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
}
.mem-tulip {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  animation: iconFloat 3s ease-in-out infinite;
}

/* Card back */
.mem-card-back {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,0.5);
  transform: rotateY(180deg);
  box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}
.mem-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
}
.mem-lang {
  font-size: 0.65rem;
  color: #666;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 4px;
  text-transform: uppercase;
}

/* Matched state */
.mem-card.matched .mem-card-back {
  border-color: #4CAF50;
  background: rgba(232,245,233,0.95);
  box-shadow: 0 0 16px rgba(76,175,80,0.4);
}
.mem-card.matched .mem-text { color: #10B981; }

/* No-match shake */
.mem-card.no-match {
  animation: cardShake 0.4s ease;
}
.mem-card.no-match .mem-card-back {
  border-color: #e53935;
  box-shadow: 0 0 12px rgba(229,57,53,0.3);
}

/* ─── SPELLING GAME ────────────────────────────────────────────── */
.spell-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
  text-align: center;
}
.spell-info { margin-bottom: 24px; }
.spell-meaning {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 12px;
}
.spell-listen {
  margin-bottom: 8px;
}
.spell-prog {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-top: 6px;
}

.spell-slots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.spell-slot {
  width: 42px;
  height: 50px;
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255,255,255,0.08);
  transition: all 0.25s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.spell-slot.filled {
  border-style: solid;
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.15);
  animation: slotPop 0.2s ease;
}
.spell-slot.correct {
  border-color: #00E676;
  background: rgba(0,230,118,0.25);
  box-shadow: 0 0 12px rgba(0,230,118,0.4);
}
.spell-slot.wrong {
  border-color: #FF5252;
  background: rgba(255,82,82,0.25);
  box-shadow: 0 0 12px rgba(255,82,82,0.4);
  animation: cardShake 0.4s ease;
}

.spell-tiles {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.spell-tile {
  width: 46px;
  height: 50px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.spell-tile:hover:not(.used) {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.25);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.spell-tile.used {
  opacity: 0.15;
  pointer-events: none;
  transform: scale(0.85);
}

.spell-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
}

.spell-feedback {
  margin: 16px auto 0;
  padding: 14px 24px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  font-size: 1rem;
  color: #fff;
  max-width: 400px;
  animation: fadeSlideUp 0.3s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ─── LISTENING GAME ───────────────────────────────────────────── */
.listen-wrap {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px 16px;
  text-align: center;
}
.listen-prompt { margin-bottom: 28px; }

/* Animated speaker with sound rings */
.listen-speaker-anim {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.listen-icon-inner {
  font-size: 2.8rem;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.listen-ring {
  position: absolute;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  animation: ringPulse 2s ease-out infinite;
}
.listen-ring.r1 { width: 50px; height: 50px; animation-delay: 0s; }
.listen-ring.r2 { width: 70px; height: 70px; animation-delay: 0.4s; }
.listen-ring.r3 { width: 90px; height: 90px; animation-delay: 0.8s; }
@keyframes ringPulse {
  0%   { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

.listen-inst {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.listen-replay { margin-bottom: 8px; }
.listen-prog {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.listen-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.listen-opt {
  padding: 18px 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.listen-opt:hover:not(.disabled) {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.listen-opt.correct {
  border-color: #00E676;
  background: rgba(0,230,118,0.25);
  box-shadow: 0 0 16px rgba(0,230,118,0.4);
  animation: slotPop 0.3s ease;
}
.listen-opt.wrong {
  border-color: #FF5252;
  background: rgba(255,82,82,0.25);
  box-shadow: 0 0 12px rgba(255,82,82,0.4);
  animation: cardShake 0.4s ease;
}
.listen-opt.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.listen-reinforce {
  animation: fadeSlideUp 0.4s ease;
}
.listen-reinf-card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 18px 28px;
  display: inline-block;
}
.reinf-word {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.reinf-meaning {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
}

/* ─── SENTENCE BUILDER GAME ───────────────────────────────────── */
.sent-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
  text-align: center;
}
.sent-prompt { margin-bottom: 24px; }
.sent-prompt-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.sent-prompt-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 8px;
}
.sent-prog {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.sent-dropzone {
  min-height: 60px;
  border: 2px dashed rgba(255,255,255,0.3);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.06);
  transition: all 0.3s;
}
.sent-dropzone.correct {
  border-color: #00E676;
  background: rgba(0,230,118,0.15);
  box-shadow: 0 0 20px rgba(0,230,118,0.3);
}
.sent-dropzone.wrong {
  border-color: #FF5252;
  background: rgba(255,82,82,0.15);
  box-shadow: 0 0 16px rgba(255,82,82,0.3);
  animation: cardShake 0.4s ease;
}
.sent-placeholder {
  color: rgba(255,255,255,0.45);
  font-size: 0.9rem;
  font-style: italic;
}

.sent-placed {
  display: inline-block;
  padding: 9px 16px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  animation: fadeSlideUp 0.15s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.sent-placed:hover {
  background: rgba(255,82,82,0.25);
  border-color: rgba(255,82,82,0.5);
  transform: scale(1.05);
}

.sent-tiles {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sent-tile {
  padding: 10px 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.sent-tile:hover:not(.used) {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.sent-tile.used {
  opacity: 0.15;
  pointer-events: none;
  transform: scale(0.85);
}

.sent-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
}

.sent-feedback {
  margin: 16px auto 0;
  padding: 14px 24px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  font-size: 1rem;
  color: #fff;
  max-width: 500px;
  animation: fadeSlideUp 0.3s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ─── GAME OVER CARD ───────────────────────────────────────────── */
.game-over-card {
  text-align: center;
  padding: 36px 28px;
  max-width: 380px;
  margin: 30px auto;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.game-over-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 18px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.game-over-stars {
  font-size: 2.6rem;
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.game-star {
  display: inline-block;
  transition: transform 0.3s;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.game-star.empty {
  filter: grayscale(1) brightness(0.5);
  opacity: 0.3;
}
.game-star.pop {
  animation: starPop 0.5s ease;
}
.game-over-score {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 22px;
  font-weight: 600;
}
.game-over-btns {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* ─── ANIMATIONS ───────────────────────────────────────────────── */
@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  15%  { transform: translateX(-6px) rotate(-1deg); }
  30%  { transform: translateX(6px) rotate(1deg); }
  45%  { transform: translateX(-5px); }
  60%  { transform: translateX(5px); }
  75%  { transform: translateX(-3px); }
  90%  { transform: translateX(3px); }
}

@keyframes slotPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes starPop {
  0%   { transform: scale(0) rotate(-30deg); }
  50%  { transform: scale(1.4) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ringPulse {
  0%   { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ─── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .games-menu {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .listen-opts {
    grid-template-columns: 1fr;
  }
  .teach-card {
    height: 185px;
  }
  .teach-word-big {
    font-size: 1.5rem;
  }
  .mem-card {
    min-height: 65px;
  }
  .spell-slot {
    width: 36px;
    height: 42px;
    font-size: 1.15rem;
  }
  .spell-tile {
    width: 40px;
    height: 44px;
    font-size: 1.1rem;
  }
  .game-header {
    margin: 8px 8px 12px;
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .games-menu {
    grid-template-columns: 1fr;
  }
  .game-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .game-area {
    min-height: 420px;
  }
  .teach-card {
    height: 165px;
    max-width: 280px;
  }
  .teach-word-big {
    font-size: 1.3rem;
  }
  .spell-slot {
    width: 30px;
    height: 36px;
    font-size: 1rem;
  }
  .spell-tile {
    width: 34px;
    height: 38px;
    font-size: 0.95rem;
  }
  .sent-placed {
    padding: 7px 12px;
    font-size: 0.9rem;
  }
  .sent-tile {
    padding: 8px 13px;
    font-size: 0.9rem;
  }
  .listen-speaker-anim {
    width: 70px;
    height: 70px;
  }
  .listen-icon-inner {
    font-size: 2.2rem;
  }
  .mem-grid {
    padding: 8px;
    gap: 6px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   WORD ROCKET
   ═══════════════════════════════════════════════════════════════════ */
.rocket-wrap {
  display: flex;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  align-items: stretch;
}

.rocket-gauge {
  width: 36px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
  min-height: 250px;
}
.rocket-gauge-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #FF6D00, #FFD600, #00E676);
  border-radius: 18px;
  transition: height 0.8s ease;
}
.rocket-gauge-label {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.rocket-scene {
  flex: 1;
  text-align: center;
}

.rocket-ship {
  font-size: 3.5rem;
  margin-bottom: 12px;
  transition: transform 0.4s ease;
  display: inline-block;
  position: relative;
  filter: drop-shadow(0 4px 12px rgba(255,109,0,0.4));
}
.rocket-ship.rocket-boost {
  animation: rocketBoost 0.8s ease;
}
@keyframes rocketBoost {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-30px) scale(1.1); }
  60%  { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

.rocket-flame {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 0;
  background: linear-gradient(to bottom, #FF6D00, #FFD600, transparent);
  border-radius: 0 0 50% 50%;
  opacity: 0;
  transition: height 0.3s, opacity 0.3s;
}
.rocket-flame.active {
  height: 30px;
  opacity: 1;
  animation: flameFlicker 0.15s ease infinite alternate;
}
@keyframes flameFlicker {
  from { transform: translateX(-50%) scaleX(0.8); }
  to   { transform: translateX(-50%) scaleX(1.2); }
}

.rocket-word {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 10px;
}
.rocket-speak { margin-bottom: 12px; }
.rocket-timer {
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 6px;
  transition: color 0.3s;
}
.rocket-timer.rocket-timer-low {
  color: #FF5252;
  animation: pulse 0.5s ease infinite;
}
.rocket-prog {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.rocket-input-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.rocket-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}
.rocket-input {
  width: 100%;
  max-width: 280px;
  padding: 12px 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.rocket-input::placeholder { color: rgba(255,255,255,0.35); }
.rocket-input:focus { border-color: rgba(255,255,255,0.6); }
.rocket-input.rocket-shake { animation: cardShake 0.4s ease; }

.rocket-feedback {
  margin-top: 16px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  font-size: 1rem;
  color: #fff;
  text-align: center;
  animation: fadeSlideUp 0.3s ease;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════════════════
   SAIL THE SEA
   ═══════════════════════════════════════════════════════════════════ */
.sail-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
  text-align: center;
}

.sail-distance {
  position: relative;
  height: 32px;
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 16px;
  overflow: visible;
}
.sail-dist-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #00BCD4, #00E676);
  border-radius: 16px;
  transition: width 0.6s ease;
}
.sail-dist-ship {
  position: absolute;
  top: -8px;
  font-size: 1.5rem;
  transition: left 0.6s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  z-index: 1;
}
.sail-dist-end {
  position: absolute;
  right: 4px;
  top: 2px;
  font-size: 1.1rem;
}

.sail-lives {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 1.4rem;
}
.sail-heart.lost {
  filter: grayscale(1);
  opacity: 0.4;
  animation: cardShake 0.3s ease;
}

.sail-obstacle {
  margin-bottom: 24px;
}
.sail-rock {
  font-size: 2.5rem;
  margin-bottom: 8px;
  animation: rockBob 2s ease-in-out infinite;
}
@keyframes rockBob {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50%     { transform: translateY(-6px) rotate(3deg); }
}
.sail-word {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 8px;
}
.sail-speak { margin-bottom: 6px; }
.sail-prog {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

.sail-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sail-opt {
  padding: 16px 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.sail-opt:hover:not(.disabled) {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.sail-opt.correct {
  border-color: #00E676;
  background: rgba(0,230,118,0.25);
  box-shadow: 0 0 16px rgba(0,230,118,0.4);
  animation: slotPop 0.3s ease;
}
.sail-opt.wrong {
  border-color: #FF5252;
  background: rgba(255,82,82,0.25);
  animation: cardShake 0.4s ease;
}
.sail-opt.disabled { pointer-events: none; opacity: 0.5; }

/* ═══════════════════════════════════════════════════════════════════
   FISH SPEAR  (Canvas edition — HUD overlay)
   ═══════════════════════════════════════════════════════════════════ */
.fish-hud {
  position: relative;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 380px;
  padding: 10px 16px;
}
.fish-hud-top {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.fish-hud-clue {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
}
.fish-hud-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.fish-hud-word {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.fish-hud-lives {
  display: flex;
  gap: 3px;
}
.fish-heart {
  font-size: 1.15rem;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  transition: opacity 0.3s, filter 0.3s;
}
.fish-heart.lost {
  opacity: 0.25;
  filter: grayscale(1);
}
.fish-hud-round {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  background: rgba(0,0,0,0.25);
  padding: 3px 10px;
  border-radius: 10px;
}
.fish-hud-keys {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.fish-hud-keys kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
}

/* ═══════════════════════════════════════════════════════════════════
   FALLING WORDS
   ═══════════════════════════════════════════════════════════════════ */
.fall-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
}

.fall-lives {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 1.4rem;
}
.fall-heart.lost {
  filter: grayscale(1);
  opacity: 0.4;
  animation: cardShake 0.3s ease;
}

.fall-sky {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
}

.fall-ground {
  height: 8px;
  background: rgba(255,82,82,0.3);
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 2px solid rgba(255,82,82,0.4);
  transition: background 0.2s;
}
.fall-ground.fall-ground-flash {
  background: rgba(255,82,82,0.7);
  box-shadow: 0 0 20px rgba(255,82,82,0.5);
}

.fall-word {
  position: absolute;
  top: -10%;
  padding: 10px 18px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  white-space: nowrap;
  z-index: 2;
  animation: wordFall linear forwards;
}
@keyframes wordFall {
  0%   { top: -10%; opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 95%; opacity: 0.3; }
}

.fall-word.fall-caught {
  animation: none !important;
  background: rgba(0,230,118,0.3);
  border-color: #00E676;
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(0,230,118,0.4);
  transition: opacity 0.4s;
  opacity: 0 !important;
}
.fall-word.fall-missed {
  animation: none !important;
  border-color: #FF5252;
  background: rgba(255,82,82,0.3);
  opacity: 0;
  transition: opacity 0.3s;
}

.fall-input-area {
  padding: 12px 16px;
  text-align: center;
}
.fall-input {
  width: 100%;
  max-width: 400px;
  padding: 14px 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}
.fall-input::placeholder { color: rgba(255,255,255,0.35); }
.fall-input:focus { border-color: rgba(255,255,255,0.6); }
.fall-input.fall-shake { animation: cardShake 0.4s ease; }

/* ═══════════════════════════════════════════════════════════════════
   BALLOON POP
   ═══════════════════════════════════════════════════════════════════ */
.bln-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  text-align: center;
}
.bln-clue { margin-bottom: 12px; }
.bln-clue-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.bln-clue-word {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 4px;
}
.bln-prog {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

.bln-sky {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.1);
}

.bln-balloon {
  position: absolute;
  bottom: -18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 0;
  border: none;
  background: none;
  z-index: 2;
  animation: balloonRise linear forwards;
  transition: transform 0.15s;
}
.bln-balloon:hover {
  transform: scale(1.1);
}

.bln-body {
  width: 60px;
  height: 72px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  display: block;
  box-shadow: inset -10px -4px 16px rgba(0,0,0,0.15),
              inset 8px 6px 20px rgba(255,255,255,0.3),
              0 4px 12px rgba(0,0,0,0.2);
  position: relative;
}
.bln-body::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 20%;
  width: 16px;
  height: 10px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.bln-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  white-space: nowrap;
  width: 56px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bln-string {
  width: 0;
  height: 20px;
  border-left: 2px solid;
  display: block;
  opacity: 0.5;
}

@keyframes balloonRise {
  0%   { bottom: -18%; opacity: 0; transform: translateX(0); }
  8%   { opacity: 1; }
  25%  { transform: translateX(8px); }
  50%  { transform: translateX(-8px); }
  75%  { transform: translateX(5px); }
  88%  { opacity: 1; }
  100% { bottom: 105%; opacity: 0; transform: translateX(0); }
}

.bln-balloon.bln-popped {
  animation: balloonPop 0.3s ease forwards !important;
}
@keyframes balloonPop {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(2); opacity: 0; }
}

.bln-balloon.bln-wrong {
  animation: cardShake 0.4s ease !important;
  opacity: 0.4;
}
.bln-balloon.bln-correct-show .bln-body {
  box-shadow: 0 0 20px rgba(0,230,118,0.6), inset -10px -4px 16px rgba(0,0,0,0.15);
  outline: 3px solid #00E676;
}

/* ═══════════════════════════════════════════════════════════════════
   TIME TRIAL
   ═══════════════════════════════════════════════════════════════════ */
.tt-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  text-align: center;
}

.tt-combo {
  min-height: 40px;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.tt-combo-fire {
  font-size: 1.6rem;
  animation: pulse 0.5s ease infinite;
}
.tt-combo-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFEA00;
  text-shadow: 0 0 12px rgba(255,234,0,0.5);
}
.tt-combo-mult {
  font-size: 1.3rem;
  font-weight: 900;
  color: #76FF03;
  text-shadow: 0 0 16px rgba(118,255,3,0.5);
  animation: pulse 0.7s ease infinite;
}

.tt-word {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  margin-bottom: 10px;
}
.tt-speak { margin-bottom: 16px; }

.tt-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.tt-opt {
  position: relative;
  padding: 18px 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.tt-opt:hover:not(.disabled) {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255,255,255,0.1);
}
.tt-opt.correct {
  border-color: #76FF03;
  background: rgba(118,255,3,0.2);
  box-shadow: 0 0 20px rgba(118,255,3,0.4);
  animation: slotPop 0.2s ease;
}
.tt-opt.wrong {
  border-color: #FF1744;
  background: rgba(255,23,68,0.2);
  box-shadow: 0 0 16px rgba(255,23,68,0.4);
  animation: cardShake 0.3s ease;
}
.tt-opt.disabled { pointer-events: none; opacity: 0.5; }

.tt-opt-key {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 1px 4px;
}

.tt-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

.tt-timer-critical {
  color: #FF1744 !important;
  animation: pulse 0.4s ease infinite !important;
  text-shadow: 0 0 8px rgba(255,23,68,0.5);
}

/* ═══════════════════════════════════════════════════════════════════
   NEW GAMES — RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .rocket-wrap {
    flex-direction: column;
    align-items: center;
  }
  .rocket-gauge {
    width: 100%;
    height: 20px;
    min-height: auto;
    border-radius: 10px;
  }
  .rocket-gauge-fill {
    height: 100% !important;
    width: 0;
    top: 0;
    bottom: 0;
    border-radius: 10px;
    transition: width 0.8s ease;
  }
  .rocket-gauge-label {
    bottom: auto;
    top: 2px;
    left: auto;
    right: 10px;
  }
  .sail-opts { grid-template-columns: 1fr; }
  .tt-opts { grid-template-columns: 1fr; }
  .fish-hud { min-height: 280px; }
  .fall-sky { min-height: 260px; }
  .bln-sky { min-height: 280px; }
  .bln-body { width: 50px; height: 60px; }
  .bln-text { font-size: 0.7rem; width: 46px; }
}

@media (max-width: 480px) {
  .rocket-word { font-size: 1.5rem; }
  .rocket-input { font-size: 1rem; padding: 10px 14px; }
  .sail-word { font-size: 1.4rem; }
  .sail-opt { padding: 12px 10px; font-size: 0.95rem; }
  .fish-clue-word { font-size: 1.4rem; }
  .fish-hud-word { font-size: 1.1rem; }
  .fish-hud-keys { display: none; }
  .fall-input { font-size: 1rem; padding: 10px 14px; }
  .bln-clue-word { font-size: 1.4rem; }
  .bln-body { width: 42px; height: 50px; }
  .bln-text { font-size: 0.65rem; width: 38px; }
  .tt-word { font-size: 1.6rem; }
  .tt-opt { padding: 14px 10px; font-size: 0.95rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   GAME CARD THUMBNAILS & HI-SCORE BADGES
   ═══════════════════════════════════════════════════════════════════ */
.game-card-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid rgba(0,0,0,0.08);
}

.game-card-hiscore {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFD700, #FFA000);
  color: #333;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.game-card-hiscore:empty {
  display: none;
}

/* Game over hi-score */
.game-over-hiscore {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--c-text-light);
  font-weight: 600;
}
.game-over-hiscore.new-best {
  color: #FFD700;
  font-size: 1.1rem;
  animation: newBestPulse 0.6s ease-in-out 2;
}
@keyframes newBestPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════════
   GAME STATS GRID (Account Page)
   ═══════════════════════════════════════════════════════════════════ */
.game-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.game-stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.2s;
}
.game-stat-card:hover {
  transform: translateY(-3px);
}
.game-stat-card.unplayed {
  opacity: 0.55;
}
.game-stat-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}
.game-stat-name {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--c-text);
}
.game-stat-stars {
  font-size: 1.1rem;
  color: #FFD700;
  margin-bottom: 4px;
  letter-spacing: 2px;
}
.game-stat-best {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-primary);
}
.game-stat-plays {
  font-size: 0.75rem;
  color: var(--c-text-light);
  margin-top: 2px;
}
.game-stat-unplayed {
  font-size: 0.78rem;
  color: var(--c-text-light);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════
   ACHIEVEMENTS GRID (Account Page)
   ═══════════════════════════════════════════════════════════════════ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.achievement-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: transform 0.2s, box-shadow 0.2s;
}
.achievement-card.unlocked {
  border-color: #FFD700;
  background: linear-gradient(135deg, rgba(255,215,0,0.06), transparent);
}
.achievement-card.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255,215,0,0.15);
}
.achievement-card.locked {
  opacity: 0.5;
}
.achievement-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}
.achievement-info {
  flex: 1;
  min-width: 0;
}
.achievement-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c-text);
}
.achievement-desc {
  font-size: 0.78rem;
  color: var(--c-text-light);
  margin-top: 2px;
}
.achievements-count {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--c-text-light);
  font-weight: 600;
}
.section-desc {
  font-size: 0.88rem;
  color: var(--c-text-light);
  margin: 0 0 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   ACHIEVEMENT TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════════════ */
.achievement-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #FFD700;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(255,215,0,0.2);
  z-index: 10000;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 340px;
}
.achievement-toast-show {
  transform: translateX(0);
}
.achievement-toast-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}
.achievement-toast-text {
  font-size: 0.88rem;
  line-height: 1.4;
}
.achievement-toast-text strong {
  color: #FFD700;
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 480px) {
  .game-card-thumb { height: 100px; }
  .game-stats-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
  .achievements-grid { grid-template-columns: 1fr; }
  .achievement-toast { bottom: 12px; right: 12px; left: 12px; max-width: none; }
}
