.game-board-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 12px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}

.game-board {
  position: relative;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 0 40px var(--section-glow, rgba(99, 102, 241, 0.08)),
    inset 0 0 60px rgba(0, 0, 0, 0.3);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--grid-size), 1fr);
  grid-template-rows: repeat(var(--grid-size), 1fr);
  gap: 1px;
  padding: 1px;
  z-index: 2;
}

.path-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.game-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
  z-index: 2;
}

.game-cell.filled {
  background: color-mix(in srgb, var(--cell-color) 12%, transparent);
}

.dot {
  width: 60%;
  height: 60%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Slowed from 2s→4s — runs on every dot in the puzzle grid */
  animation: dotPulse 4s ease-in-out infinite;
  z-index: 3;
  position: relative;
}

.dot-inner {
  width: 35%;
  height: 35%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

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

.path-drawing {
  filter: brightness(1.05);
}

.path-connected {
  filter: brightness(1.15);
  /* Slowed from 1.5s→3s — runs on every completed flow */
  animation: pathGlow 3s ease-in-out infinite alternate;
}

@keyframes pathGlow {
  0% { opacity: 0.78; }
  100% { opacity: 0.95; }
}

/* ── Unfilled-cell alert animation ─────────────────────────────── */
.game-cell.unfilled-alert {
  /* Slowed from 0.9s→1.8s — runs on all unfilled cells simultaneously */
  animation: unfilledPulse 1.8s ease-in-out infinite;
  border-color: rgba(255, 220, 60, 0.55) !important;
  z-index: 3;
}

@keyframes unfilledPulse {
  0%, 100% {
    background: rgba(255, 210, 20, 0.08);
    box-shadow: inset 0 0 0 1.5px rgba(255, 220, 60, 0.4),
                0 0 6px rgba(255, 210, 20, 0.25);
    transform: scale(1);
  }
  50% {
    background: rgba(255, 210, 20, 0.18);
    box-shadow: inset 0 0 0 2px rgba(255, 230, 80, 0.8),
                0 0 14px rgba(255, 210, 20, 0.5),
                0 0 22px rgba(255, 200, 0, 0.25);
    transform: scale(1.04);
  }
}

/* ── Tutorial marching-ant overlay ─────────────────────────────────── */
.tutorial-layer {
  pointer-events: none;
}

/* Fade in when a new flow guide appears */
.tutorial-path-group {
  animation: tutFadeIn 0.35s ease forwards;
}

@keyframes tutFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/*
 * Marching-ant dashes.
 * pathLength="1" on the <path> element means strokeDasharray values are
 * fractions of total path length (0–1), so the loop is always exact.
 * Animate dashoffset by exactly one period (dash + gap = 0.06 + 0.07 = 0.13)
 * in the negative direction so ants march forward along the path.
 */
.tutorial-dash-anim {
  /* Slowed from 1.4s→2.8s */
  animation: marchingAnts 2.8s linear infinite;
}

@keyframes marchingAnts {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -0.13; }
}

/* ── Performance: Halt decorative animations when OS requests it ─ */
@media (prefers-reduced-motion: reduce) {
  .dot,
  .path-connected,
  .tutorial-dash-anim,
  .game-cell.unfilled-alert {
    animation: none !important;
  }
}
/* ================================================================
   GAME SCREEN v2 — Full-width theme · Clean HUD · Bottom Hint bar
   Inspired by: Flow Free, Candy Crush, 2048, Monument Valley
   ================================================================ */

/* ══════════════════════════════════════════════════════
   OUTER WRAPPER — Full-width themed background
   ══════════════════════════════════════════════════════ */
.game-screen-outer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  z-index: 10;
  overflow: hidden;
}

/* Full-bleed ambient glow that covers entire screen */
.gs-ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 10%, var(--section-glow, rgba(99,102,241,0.2)) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 90%, var(--section-glow, rgba(99,102,241,0.15)) 0%, transparent 55%);
  opacity: 0.5;
  /* Slowed from 10s→20s — halves compositing frequency during active gameplay */
  animation: gsAmbientShift 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
  will-change: opacity;
}
@keyframes gsAmbientShift {
  0%   { opacity: 0.4; }
  100% { opacity: 0.6; }
}

/* Static particle dots — removed animation which caused per-frame GPU work */
.game-screen-outer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 25%, rgba(255,255,255,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 15%, rgba(255,255,255,0.1) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 35% 75%, rgba(255,255,255,0.12) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 55%, rgba(255,255,255,0.08) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 92% 80%, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}


/* ══════════════════════════════════════════════════════
   INNER CONTAINER — Capped at 480px, holds all UI
   ══════════════════════════════════════════════════════ */
.game-screen {
  width: 100%;
  max-width: var(--app-max-width);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  padding: 0;
}


/* ══════════════════════════════════════════════════════
   TOP BAR — Back · Level Title · Reset
   Matches app-wide shared header style
   ══════════════════════════════════════════════════════ */
.gs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top, 14px));
  gap: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: gsSlideDown 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
@keyframes gsSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Back Button */
.gs-back-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.gs-back-btn:active {
  transform: scale(0.92);
  background: rgba(255,255,255,0.12);
}

/* Centre Title Area */
.gs-title-area {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.gs-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Outfit', sans-serif;
}
.gs-level-emoji {
  font-size: 18px;
  line-height: 1;
}
.gs-level-text {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}
.gs-boss-badge {
  font-size: 9px;
  font-weight: 800;
  color: #000;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 1.2px;
  line-height: 1.2;
  box-shadow: 0 0 12px rgba(251,191,36,0.4);
  animation: gsBossPulse 2.5s ease-in-out infinite;
}
@keyframes gsBossPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(251,191,36,0.3); }
  50% { box-shadow: 0 0 20px rgba(251,191,36,0.6); }
}
.gs-level-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.gs-diff-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1px 8px;
  border-radius: 5px;
}
.gs-diff-easy { color: #34D399; background: rgba(52,211,153,0.15); }
.gs-diff-medium { color: #FBBF24; background: rgba(251,191,36,0.15); }
.gs-diff-hard { color: #FB7185; background: rgba(251,113,133,0.15); }
.gs-diff-expert { color: #F87171; background: rgba(248,113,113,0.15); }
.gs-grid-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
}

/* Reset Button */
.gs-reset-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.gs-reset-btn:active {
  transform: scale(0.92) rotate(-90deg);
  background: rgba(255,255,255,0.12);
}


/* ══════════════════════════════════════════════════════
   STATS ROW — Flows · Pipe · Moves
   Vertically centred, gamified pipe bar
   ══════════════════════════════════════════════════════ */
.gs-stats-row {
  display: flex;
  align-items: center;     /* vertical centre all three columns */
  justify-content: space-between;
  padding: 0px 20px;
  margin-top: 3vh;
  gap: 12px;
  animation: gsStatsEnter 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
@keyframes gsStatsEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}
.gs-stat-lbl {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  line-height: 1;
}

/* Flows — conic ring indicator */
.gs-stat-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(
    var(--section-accent, #6366f1) var(--ring-pct, 0%),
    rgba(255,255,255,0.08) var(--ring-pct, 0%)
  );
  position: relative;
}
.gs-stat-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
}
.gs-stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 1;
}

/* ══ PIPE — Gamified tall pill bar ═════════════════════════ */
.gs-stat-center {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* outer track */
.gs-pipe-bar-wrap {
  width: 100%;
  height: 22px;
  background: rgba(255,255,255,0.06);
  border-radius: 11px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

/* animated fill */
.gs-pipe-bar {
  height: 100%;
  min-width: 22px;
  background: linear-gradient(
    90deg,
    var(--section-accent, #6366f1),
    color-mix(in srgb, var(--section-accent, #6366f1) 60%, #fff)
  );
  border-radius: 11px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 10px var(--section-glow, rgba(99,102,241,0.4));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* Slowed from 2.5s→6s */
  animation: gsPipeGlow 6s ease-in-out infinite;
}
@keyframes gsPipeGlow {
  0%, 100% { box-shadow: 0 0 6px var(--section-glow, rgba(99,102,241,0.35)); }
  50%       { box-shadow: 0 0 14px var(--section-glow, rgba(99,102,241,0.6)); }
}

/* shimmer sweep — slowed from 2s→5s */
.gs-pipe-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.18) 50%,
    transparent 100%
  );
  animation: gsPipeShimmer 5s ease-in-out infinite;
  background-size: 200% 100%;
}
@keyframes gsPipeShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* percentage label INSIDE the bar */
.gs-pipe-pct-inside {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 6px rgba(0,0,0,0.5);
  padding-right: 8px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  letter-spacing: 0.3px;
  line-height: 1;
}

/* "PIPE" label below — same style as Flows / Moves label */
.gs-pipe-label {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  line-height: 1;
  text-align: center;
}

/* Moves — clean big number */
.gs-stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}


/* ══════════════════════════════════════════════════════
   BOTTOM BAR — Flow dots + Hint button
   Anchored at bottom of screen, always visible
   ══════════════════════════════════════════════════════ */
.gs-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 16px;
  gap: 14px;
  animation: gsBottomEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
@keyframes gsBottomEnter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Flow dots — compact completion tracker */
.gs-flow-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.gs-fdot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dot-color);
  opacity: 0.3;
  border: 1.5px solid rgba(255,255,255,0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gs-fdot.done {
  opacity: 1;
  transform: scale(1.2);
  border-color: transparent;
  box-shadow: 0 0 10px var(--dot-glow), 0 0 20px var(--dot-glow);
}
.gs-fdot.done::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 8px;
  font-weight: 900;
  color: rgba(0,0,0,0.5);
}

/* ── Hint Button — Visible, labeled, game-style ── */
.gs-hint-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(249,115,22,0.12));
  border: 1px solid rgba(251,191,36,0.25);
  color: #FBBF24;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.25s ease;
  flex-shrink: 0;
  position: relative;
  /* Slowed from 3s→8s — this runs the entire time a level is played */
  animation: gsHintGlow 8s ease-in-out infinite;
}
@keyframes gsHintGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50% { box-shadow: 0 0 14px 1px rgba(251,191,36,0.12); }
}
.gs-hint-btn:active {
  transform: scale(0.94);
  background: linear-gradient(135deg, rgba(251,191,36,0.3), rgba(249,115,22,0.2));
}
.gs-hint-icon {
  color: #FBBF24;
  flex-shrink: 0;
}
.gs-hint-text {
  font-size: 14px;
  font-weight: 700;
  color: #FBBF24;
}
.gs-hint-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: linear-gradient(135deg, #FBBF24, #F97316);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(251,191,36,0.4);
}


/* ══════════════════════════════════════════════════════
   TIMER BAR — Timed levels only
   ══════════════════════════════════════════════════════ */
.timer-bar-wrap {
  padding: 6px 16px 0;
  animation: gsSlideDown 0.4s ease;
}
.timer-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #34D399);
  border-radius: 4px;
  transition: width 1s linear;
  box-shadow: 0 0 10px rgba(16,185,129,0.5);
}
.timer-bar-wrap.danger .timer-fill {
  background: linear-gradient(90deg, #F97316, #FBBF24);
  box-shadow: 0 0 10px rgba(249,115,22,0.5);
}
.timer-bar-wrap.critical .timer-fill {
  background: linear-gradient(90deg, #EF4444, #F97316);
  box-shadow: 0 0 14px rgba(239,68,68,0.6);
  animation: gsPulseBar 0.6s ease-in-out infinite;
}
@keyframes gsPulseBar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.timer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
}
.timer-time {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #10B981;
  letter-spacing: 0.5px;
}
.timer-time.timer-red { color: #EF4444; }
.timer-time.timer-pulse { animation: gsTimerPulse 0.8s ease-in-out infinite; }
@keyframes gsTimerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); color: #FF3B5C; }
}
.timer-boost-btn, .timer-ad-boost-btn {
  padding: 4px 10px;
  border-radius: 8px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.timer-boost-btn {
  background: rgba(251,191,36,0.15);
  color: #FBBF24;
  border: 1px solid rgba(251,191,36,0.25);
}
.timer-ad-boost-btn {
  background: rgba(99,102,241,0.15);
  color: #A5B4FC;
  border: 1px solid rgba(99,102,241,0.25);
}
.timer-boost-btn:active, .timer-ad-boost-btn:active {
  transform: scale(0.92);
}


/* ══════════════════════════════════════════════════════
   BOSS TITLE CARD
   ══════════════════════════════════════════════════════ */
.boss-title-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease;
  cursor: pointer;
}
.boss-title-card {
  text-align: center;
  padding: 40px 32px;
  position: relative;
  animation: gsBossCardIn 0.8s ease;
}
@keyframes gsBossCardIn {
  0% { transform: scale(0.3) rotate(-5deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.boss-title-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 300px; height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--section-glow) 0%, transparent 70%);
  /* Slowed from 3s→8s */
  animation: gsBossGlow 8s ease-in-out infinite;
}
@keyframes gsBossGlow {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}
.boss-title-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px; font-weight: 800;
  color: var(--section-accent);
  letter-spacing: 6px; text-transform: uppercase;
  display: block; margin-bottom: 16px;
  position: relative;
  text-shadow: 0 0 20px var(--section-glow);
}
.boss-title-name {
  font-family: 'Outfit', sans-serif;
  font-size: 32px; font-weight: 900;
  color: #fff; margin: 0 0 12px;
  text-shadow: 0 0 40px var(--section-glow);
  position: relative;
}
.boss-title-section {
  font-size: 14px;
  color: var(--text-secondary);
  display: block; margin-bottom: 24px;
  position: relative;
}
.boss-title-tap {
  font-size: 12px;
  color: var(--text-muted);
  animation: pulse 2s ease-in-out infinite;
  position: relative;
}


/* ══════════════════════════════════════════════════════
   STREAK & DAILY BANNERS
   ══════════════════════════════════════════════════════ */
.streak-banner, .daily-bonus-banner {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 28px;
  border-radius: 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  z-index: 100;
  animation: gsBannerIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), gsBannerOut 0.5s ease 3s forwards;
  white-space: nowrap;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  max-width: calc(100vw - 40px);
}
.streak-banner {
  background: linear-gradient(135deg, rgba(249,115,22,0.88), rgba(239,68,68,0.88));
  color: #fff;
  box-shadow: 0 8px 32px rgba(249,115,22,0.35);
}
.daily-bonus-banner {
  background: linear-gradient(135deg, rgba(16,185,129,0.88), rgba(6,182,212,0.88));
  color: #fff;
  box-shadow: 0 8px 32px rgba(16,185,129,0.35);
}
@keyframes gsBannerIn {
  from { transform: translateX(-50%) translateY(40px) scale(0.8); opacity: 0; }
  to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}
@keyframes gsBannerOut {
  to { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(0.9); pointer-events: none; }
}


/* ══════════════════════════════════════════════════════
   TIMER FAILED OVERLAY
   ══════════════════════════════════════════════════════ */
.timer-failed-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
  padding: 20px;
}
.timer-failed-card {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 40px 28px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  animation: gsFailIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.timer-failed-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #EF4444, transparent);
}
@keyframes gsFailIn {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.timer-failed-icon {
  font-size: 60px;
  margin-bottom: 16px;
  animation: gsShake 0.6s ease;
}
@keyframes gsShake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-15deg); }
  40% { transform: rotate(15deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(10deg); }
}
.timer-failed-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px; font-weight: 900;
  color: #EF4444;
  margin-bottom: 8px;
}
.timer-failed-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}
.timer-failed-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ══════════════════════════════════════════════════════
   HINT MENU
   ══════════════════════════════════════════════════════ */
.hint-menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.hint-menu {
  position: relative;
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 36px 24px;
  max-width: 340px; width: 100%;
  text-align: center;
  overflow: hidden;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.hint-menu-glow {
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(251,191,36,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hint-menu-title {
  font-size: 22px; font-weight: 800; color: #fff;
  margin-bottom: 8px; position: relative;
}
.hint-menu-desc {
  font-size: 14px; color: rgba(255,255,255,0.45);
  margin-bottom: 24px; position: relative; line-height: 1.5;
}
.hint-menu-desc strong { color: #FBBF24; }
.hint-menu-actions {
  display: flex; flex-direction: column; gap: 10px; position: relative;
}
.hint-ad-btn {
  gap: 8px; justify-content: center;
  background: linear-gradient(135deg, #FBBF24, #F97316) !important;
  color: #000 !important;
  box-shadow: 0 4px 20px rgba(251,191,36,0.3) !important;
}


/* ══════════════════════════════════════════════════════
   SHARED BUTTONS
   ══════════════════════════════════════════════════════ */
.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; align-items: center;
  gap: 6px; justify-content: center;
  position: relative; overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}
.btn:active::after { left: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--section-accent, #6366f1), color-mix(in srgb, var(--section-accent, #6366f1) 70%, #fff));
  color: white;
  box-shadow: 0 4px 20px var(--section-glow, rgba(99,102,241,0.4));
}
.btn-primary:active {
  transform: scale(0.95);
}
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.4);
  justify-content: center;
}
.btn-next-section {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--section-accent, #6366f1) 20%, transparent),
    color-mix(in srgb, var(--section-accent, #6366f1) 10%, transparent)
  );
  border: 1.5px solid color-mix(in srgb, var(--section-accent, #6366f1) 55%, transparent);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.3px;
  box-shadow:
    0 4px 20px color-mix(in srgb, var(--section-accent, #6366f1) 25%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.08);
  animation: nextSectionPulse 2.5s ease-in-out infinite;
}
.btn-next-section:active {
  transform: scale(0.95);
}
@keyframes nextSectionPulse {
  0%, 100% { box-shadow: 0 4px 20px color-mix(in srgb, var(--section-accent, #6366f1) 25%, transparent); }
  50%       { box-shadow: 0 4px 32px color-mix(in srgb, var(--section-accent, #6366f1) 50%, transparent), 0 0 0 3px color-mix(in srgb, var(--section-accent, #6366f1) 15%, transparent); }
}

.unfilled-toast {
  position: absolute;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  max-width: calc(100% - 32px);
  width: max-content;
  background: linear-gradient(
    135deg,
    rgba(255, 200, 20, 0.18),
    rgba(255, 140, 0, 0.14)
  );
  border: 1.5px solid rgba(255, 210, 60, 0.45);
  box-shadow:
    0 8px 32px rgba(255, 200, 0, 0.25),
    0 0 0 1px rgba(255, 230, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.unfilled-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  animation: unfilledToastBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes unfilledToastBounce {
  0%   { transform: translateX(-50%) translateY(30px) scale(0.88); opacity: 0; }
  60%  { transform: translateX(-50%) translateY(-5px) scale(1.02); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0)    scale(1);    opacity: 1; }
}

.unfilled-toast-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(255, 200, 0, 0.6));
  animation: unfilledIconWiggle 1.2s ease-in-out infinite;
}

@keyframes unfilledIconWiggle {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  25%       { transform: rotate(8deg)  scale(1.12); }
  50%       { transform: rotate(-6deg) scale(1); }
  75%       { transform: rotate(6deg)  scale(1.08); }
}

.unfilled-toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unfilled-toast-body strong {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #FFD84D;
  letter-spacing: 0.2px;
  text-shadow: 0 0 12px rgba(255, 200, 0, 0.4);
}

.unfilled-toast-body span {
  font-family: 'Outfit', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 245, 200, 0.8);
  line-height: 1.45;
}

/* ─── RESPONSIVE — Tablet (600px – 1023px) ──────────────── */
@media (min-width: 600px) and (max-width: 1023px) {
  /* Inner container fills full viewport — native game app look */
  .game-screen {
    max-width: none;
  }
  /* Top bar and bottom bar get wider lateral padding on tablets */
  .gs-topbar {
    padding: 14px clamp(20px, 4vw, 40px);
  }
  .gs-bottom-bar {
    padding: 10px clamp(20px, 4vw, 40px) 16px;
  }
  .gs-stats-row {
    padding: 0 clamp(20px, 4vw, 40px);
  }
}

/* ══════════════════════════════════════════════════════
   BACK CONFIRMATION MODAL
   ══════════════════════════════════════════════════════ */
.gs-back-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.gs-back-confirm-card {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 36px 28px 28px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  position: relative;
  overflow: hidden;
  animation: gsFailIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Top accent line using section colour */
.gs-back-confirm-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--section-accent, #6366f1), transparent);
}

.gs-back-confirm-icon {
  font-size: 52px;
  margin-bottom: 14px;
  line-height: 1;
}

.gs-back-confirm-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.gs-back-confirm-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  margin-bottom: 24px;
}

.gs-back-confirm-actions {
  display: flex;
  gap: 10px;
}

.gs-back-confirm-actions .btn {
  flex: 1;
  padding: 13px 16px;
  font-size: 14px;
}

/* Leave button uses section accent */
.gs-back-confirm-leave {
  background: linear-gradient(135deg, var(--section-accent, #6366f1), color-mix(in srgb, var(--section-accent, #6366f1) 60%, #fff)) !important;
  box-shadow: 0 4px 20px var(--section-glow, rgba(99, 102, 241, 0.35)) !important;
  color: #fff !important;
}
