/* ═══════════════════════════════════════════════════════════════
   SUSHI SQUASH — Match-3 Game Stylesheet
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0f0a06;
  --surface:   #1a110a;
  --board-bg:  #0a0f1a;
  --border:    #c9a84c;
  --text:      #f5e6d0;
  --muted:     #8a7060;
  --accent:    #e02020;
  --gold:      #f5c518;
  --purple1:   #7b2ff7;
  --purple2:   #c158f0;
  --cell:      54px;
  --gap:       5px;
}

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse at 20% 10%, #1a0f05 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 90%, #050a14 0%, transparent 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  overflow-x: hidden;
}

/* ── Theme toggle ───────────────────────────────────────────── */
.ss-back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.15s;
}
.ss-back-link:hover { color: var(--text); }

.btn-settings-fab {
  position: fixed;
  top: 12px;
  right: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: background 0.2s, transform 0.2s;
}
.btn-settings-fab:hover { background: var(--surface); transform: rotate(30deg); }

.ss-auth-widget {
  position: fixed;
  top: 14px;
  right: 62px;
  z-index: 999;
}

/* Settings panel */
.settings-panel {
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  width: min(480px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn-overlay-close {
  background: var(--surface2, #1a110a);
  border: 1px solid var(--muted);
  color: var(--text);
  border-radius: 50%;
  width: 30px; height: 30px;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 12px 14px;
}
.settings-row.col {
  flex-direction: column;
  align-items: stretch;
}
.settings-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-row-label {
  font-size: 0.9rem;
  font-weight: 500;
}
.row-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vol-label {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 32px;
  text-align: right;
}
.pill-toggle {
  background: var(--muted);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.pill-toggle.on { background: var(--accent, #e02020); }
/* Volume slider */
.vol-slider {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--muted);
  border-radius: 3px;
  outline: none;
  margin-top: 8px;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold, #f5c518);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.vol-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold, #f5c518);
  cursor: pointer;
  border: none;
}

body.light {
  --bg:       #eef0f7;
  --surface:  #ffffff;
  --board-bg: #1e2d6b;
  --border:   #dde0ef;
  --text:     #1a1b2e;
  --muted:    #6b6d8e;
  --purple1:  #6d28d9;
  --purple2:  #7c3aed;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(109,40,217,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(109,40,217,0.04) 0%, transparent 50%);
}

/* ══════════════════════════════════════════════════════════════
   SCREENS
══════════════════════════════════════════════════════════════ */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 540px;
  padding: 20px 16px 40px;
  animation: fadeIn 0.3s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   LOBBY SCREEN
══════════════════════════════════════════════════════════════ */
.lobby-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 24px 0 20px;
}

.logo-icon {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 16px rgba(229,139,65,0.6));
  animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.logo-title {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #f5c518 0%, #e07820 50%, #e02020 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  line-height: 1;
}
.logo-sub {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Lives display */
.lives-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  background: var(--surface);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 14px;
  padding: 14px 24px;
  width: 100%;
}
.lives-hearts {
  display: flex;
  gap: 8px;
  font-size: 1.8rem;
  line-height: 1;
}
.heart {
  transition: transform 0.2s;
  animation: heartPulse 2s ease-in-out infinite;
}
.heart.empty { filter: grayscale(1) opacity(0.35); animation: none; }
.heart:nth-child(1) { animation-delay: 0s; }
.heart:nth-child(2) { animation-delay: 0.15s; }
.heart:nth-child(3) { animation-delay: 0.3s; }
.heart:nth-child(4) { animation-delay: 0.45s; }
.heart:nth-child(5) { animation-delay: 0.6s; }

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

.lives-regen {
  font-size: 0.8rem;
  color: var(--muted);
}
.lives-regen .timer { color: var(--gold); font-weight: 700; }

/* Level card */
.level-card {
  background: var(--surface);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 16px;
  padding: 18px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0;
}
.level-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.level-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
}
.level-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; letter-spacing: 1px; }

.level-stars {
  display: flex;
  gap: 4px;
  font-size: 1.4rem;
}
.star { opacity: 0.25; }
.star.earned { opacity: 1; animation: starPop 0.4s ease; }
@keyframes starPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.level-stats {
  display: flex;
  gap: 16px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-value { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.best-label { font-size: 0.75rem; color: var(--muted); text-align: right; }
.best-value { font-size: 1.1rem; font-weight: 700; color: var(--gold); text-align: right; }

/* Buttons */
.btn {
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  padding: 14px 28px;
  transition: all 0.15s;
  letter-spacing: 0.5px;
  width: 100%;
}
.btn:active { transform: scale(0.97); }

.btn-play {
  background: linear-gradient(135deg, #e02020, #b01010);
  color: #fff;
  font-size: 1.3rem;
  padding: 18px;
  box-shadow: 0 4px 20px rgba(224,32,32,0.45);
  margin-top: 8px;
}
.btn-play:hover { box-shadow: 0 6px 28px rgba(224,32,32,0.65); transform: translateY(-1px); }
.btn-play:disabled {
  background: #3a2020;
  color: #6a4040;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-ad {
  background: linear-gradient(135deg, #7b2ff7, #c158f0);
  color: #fff;
  font-size: 0.95rem;
  padding: 12px;
  box-shadow: 0 3px 14px rgba(123,47,247,0.4);
}
.btn-ad:hover { box-shadow: 0 5px 22px rgba(123,47,247,0.6); transform: translateY(-1px); }
.btn-ad:disabled { background: #2a1a40; color: #5a4070; box-shadow: none; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(201,168,76,0.4);
  font-size: 0.9rem;
  padding: 10px;
}
.btn-secondary:hover { background: #2a1f14; }

.level-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 8px 0;
}
.btn-nav {
  background: var(--surface);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-nav:hover { background: #2a1f14; }
.btn-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.level-nav .level-card { flex: 1; margin: 0; }

/* ══════════════════════════════════════════════════════════════
   GAME SCREEN
══════════════════════════════════════════════════════════════ */
#screen-game {
  padding: 8px 10px 20px;
  max-width: 600px;
}

/* HUD */
.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 0 10px;
}

.btn-back {
  background: var(--surface);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-back:hover { background: #2a1f14; }

.hud-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.hud-level {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hud-score {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--gold);
}

.progress-bar-wrap {
  position: relative;
  height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
  flex: 1;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple1), var(--purple2));
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.25,1,0.5,1);
  min-width: 0%;
  max-width: 100%;
}
.progress-label {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.moves-badge {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  min-width: 44px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.3s;
}
.moves-badge.low { color: #e02020; animation: movesWarn 0.6s ease; }
.moves-badge-label {
  font-size: 0.6rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
@keyframes movesWarn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Board */
.board-wrap {
  position: relative;
  margin: 4px 0 10px;
}

#board {
  display: grid;
  grid-template-columns: repeat(8, var(--cell));
  grid-template-rows: repeat(8, var(--cell));
  gap: var(--gap);
  background: var(--board-bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  touch-action: none; /* prevent scroll hijacking during swipes */
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.15),
    0 0 30px rgba(201,168,76,0.08),
    inset 0 0 40px rgba(0,0,0,0.4);
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: calc(var(--cell) + var(--gap)) calc(var(--cell) + var(--gap));
}

/* Gem cells */
.gem {
  width: var(--cell);
  height: var(--cell);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.12s;
  overflow: visible;
}
.gem svg, .gem img {
  width: 96%;
  height: 96%;
  display: block;
  pointer-events: none;
}
.gem:hover { transform: scale(1.08); z-index: 2; }

.gem.selected {
  transform: scale(1.12);
  z-index: 3;
  outline: 2.5px solid #fff;
  outline-offset: 2px;
  animation: selectedPulse 0.8s ease-in-out infinite;
}
@keyframes selectedPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.5), var(--gem-shadow, none); }
  50% { box-shadow: 0 0 0 6px rgba(255,255,255,0.15), var(--gem-shadow, none); }
}

/* Gem colors (background tint) */
.gem[data-type="sushi"]    { background: rgba(255,100,50,0.15); --gem-shadow: 0 3px 12px rgba(255,100,50,0.35); box-shadow: var(--gem-shadow); }
.gem[data-type="dumpling"] { background: rgba(200,155,50,0.15); --gem-shadow: 0 3px 12px rgba(200,155,50,0.35); box-shadow: var(--gem-shadow); }
.gem[data-type="chili"]    { background: rgba(220,20,20,0.15);  --gem-shadow: 0 3px 12px rgba(220,20,20,0.35);  box-shadow: var(--gem-shadow); }
.gem[data-type="ginger"]   { background: rgba(255,100,150,0.15);--gem-shadow: 0 3px 12px rgba(255,100,150,0.35);box-shadow: var(--gem-shadow); }
.gem[data-type="soysauce"] { background: rgba(60,30,10,0.5);    --gem-shadow: 0 3px 12px rgba(60,20,5,0.6);    box-shadow: var(--gem-shadow); }
.gem[data-type="bao"]      { background: rgba(240,225,195,0.15);--gem-shadow: 0 3px 12px rgba(240,200,150,0.25);box-shadow: var(--gem-shadow); }

/* Gem animations */
@keyframes gemMatch {
  0%   { transform: scale(1); opacity: 1; }
  40%  { transform: scale(1.35); opacity: 0.9; }
  100% { transform: scale(0); opacity: 0; }
}
.gem.matching { animation: gemMatch 0.32s ease-in forwards; pointer-events: none; }

@keyframes gemFall {
  0%   { transform: translateY(-60px); opacity: 0; }
  60%  { transform: translateY(4px); }
  80%  { transform: translateY(-2px); }
  100% { transform: translateY(0); opacity: 1; }
}
.gem.gem-new { animation: gemFall 0.38s cubic-bezier(0.25,1,0.5,1) forwards; }

@keyframes shake {
  0%  { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
  100%{ transform: translateX(0); }
}
.gem.shake { animation: shake 0.35s ease; }

@keyframes gemGlow {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 0px gold); }
  50% { filter: brightness(1.5) drop-shadow(0 0 12px gold); }
}
.gem.glow { animation: gemGlow 0.5s ease 2; }

/* Striped gem overlay — border highlights showing sweep direction */
.gem[data-stripe="h"]::after,
.gem[data-stripe="v"]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
  animation: stripePulse 1.2s ease-in-out infinite alternate;
}
/* H stripe: glowing top + bottom borders → sweeps the full row */
.gem[data-stripe="h"]::after {
  border-top:    3px solid rgba(255,230,80,0.95);
  border-bottom: 3px solid rgba(255,230,80,0.95);
  box-shadow:
    inset 0  3px 6px rgba(255,220,60,0.35),
    inset 0 -3px 6px rgba(255,220,60,0.35);
}
/* V stripe: glowing left + right borders → sweeps the full column */
.gem[data-stripe="v"]::after {
  border-left:  3px solid rgba(80,200,255,0.95);
  border-right: 3px solid rgba(80,200,255,0.95);
  box-shadow:
    inset  3px 0 6px rgba(60,190,255,0.35),
    inset -3px 0 6px rgba(60,190,255,0.35);
}
@keyframes stripePulse {
  from { opacity: 0.6; }
  to   { opacity: 1.0; }
}

/* Bomb gem overlay */
.gem[data-stripe="b"]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at 50% 50%, rgba(255,60,0,0.0) 30%, rgba(255,80,0,0.55) 60%, rgba(255,160,0,0.7) 75%, transparent 90%);
  animation: bombPulse 1s ease-in-out infinite alternate;
}
@keyframes bombPulse {
  from { opacity: 0.7; transform: scale(0.92); }
  to   { opacity: 1.0; transform: scale(1.0);  filter: drop-shadow(0 0 6px rgba(255,120,0,0.9)); }
}

/* Tile upgrade animation (normal → striped) */
@keyframes gemUpgrade {
  0%   { transform: scale(1);    filter: brightness(1); }
  40%  { transform: scale(1.35); filter: brightness(2.5) drop-shadow(0 0 10px gold); }
  100% { transform: scale(1);    filter: brightness(1); }
}
.gem-upgrade { animation: gemUpgrade 0.32s ease forwards; pointer-events: none; }

/* Score popup */
.score-popup {
  position: fixed;
  pointer-events: none;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  z-index: 500;
  animation: scoreFloat 0.9s ease-out forwards;
}
@keyframes scoreFloat {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
}

/* Combo toast */
.combo-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 600;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px rgba(245,197,24,0.9), 0 3px 10px rgba(0,0,0,0.8);
  letter-spacing: 2px;
  animation: toastPop 0.8s cubic-bezier(0.25,1,0.5,1) forwards;
}
@keyframes toastPop {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  25%  { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
  70%  { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(0.8); opacity: 0; }
}

.game-info-bar {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════════
   OVERLAYS
══════════════════════════════════════════════════════════════ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 700;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}
.overlay.active { display: flex; }

.overlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 340px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  animation: cardSlideUp 0.3s cubic-bezier(0.25,1,0.5,1);
}
@keyframes cardSlideUp {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.overlay-emoji { font-size: 3.5rem; line-height: 1; }
.overlay-title { font-size: 1.8rem; font-weight: 900; text-align: center; }
.overlay-sub { font-size: 0.95rem; color: var(--muted); text-align: center; }

/* Result overlay stars */
.result-stars { display: flex; gap: 8px; font-size: 2.5rem; }
.result-star { opacity: 0.2; transition: opacity 0.3s; }
.result-star.earned {
  opacity: 1;
  animation: starEarn 0.5s cubic-bezier(0.25,1,0.5,1) forwards;
}
@keyframes starEarn {
  0%   { transform: scale(0) rotate(-30deg); }
  60%  { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.result-scores {
  display: flex;
  gap: 20px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 12px 20px;
  width: 100%;
  justify-content: center;
}
.result-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.result-score-val { font-size: 1.4rem; font-weight: 900; color: var(--gold); }
.result-score-lbl { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.overlay-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; }

/* No-lives overlay */
.no-lives-timer {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 1px;
}

/* Ad overlay */
.ad-progress-wrap {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  overflow: hidden;
}
.ad-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple1), var(--purple2));
  border-radius: 5px;
  transition: width 1s linear;
}
.ad-timer { font-size: 2rem; font-weight: 900; color: var(--text); }
.ad-desc { font-size: 0.9rem; color: var(--muted); text-align: center; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 520px) {
  :root { --cell: 40px; --gap: 4px; }
  .logo-title { font-size: 2rem; }
  .hud-score { font-size: 1rem; }
  .moves-badge { font-size: 1.2rem; min-width: 36px; }
}
@media (max-width: 390px) {
  :root { --cell: 36px; --gap: 3px; }
  #board { padding: 6px; }
  .logo-title { font-size: 1.7rem; }
}
@media (max-width: 340px) {
  :root { --cell: 32px; --gap: 3px; }
}
