/* ============================================
   MADDEX'S GAME ZONE — "Sticker Zine" theme
   Bright paper, bold ink, hard shadows, rock'n'roll
   ============================================ */

:root {
  --paper: #faf5ec;
  --paper2: #fffdf7;
  --ink: #1d1a16;
  --red: #e6394a;
  --blue: #2f6df6;
  --yellow: #ffc53d;
  --green: #2dc653;
  --purple: #9d4edd;
  --orange: #ff8b2c;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-big: 7px 7px 0 var(--ink);
  --font: 'Rubik', system-ui, sans-serif;
  --display: 'Bungee', 'Rubik', sans-serif;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 197, 61, 0.18), transparent 32%),
    radial-gradient(circle at 88% 20%, rgba(47, 109, 246, 0.10), transparent 30%),
    radial-gradient(circle at 70% 90%, rgba(230, 57, 74, 0.08), transparent 35%),
    var(--paper);
}

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* ============ HEADER ============ */
.gz-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px 10px;
  max-width: 1060px;
  margin: 0 auto;
}
.gz-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.gz-logo-badge {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  font-size: 26px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transform: rotate(-4deg);
  transition: transform 0.2s;
}
.gz-logo:hover .gz-logo-badge { transform: rotate(4deg) scale(1.05); }
.gz-logo-text {
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: 0.02em;
}
.gz-chips { display: flex; gap: 8px; margin-left: auto; }
.gz-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  font-weight: 800;
  font-size: 14px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
}
.gz-chip-btn { cursor: pointer; font-family: var(--font); transition: transform 0.15s; }
.gz-chip-btn:hover { transform: translateY(-2px); }
.gz-chip-btn:active { transform: translateY(1px); box-shadow: 1px 1px 0 var(--ink); }

.gz-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 4px;
}
.gz-navbtn {
  padding: 9px 14px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.gz-navbtn:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); }
.gz-navbtn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.gz-navbtn.active { background: var(--ink); color: var(--paper); }

/* ============ TICKER ============ */
.gz-ticker {
  max-width: 1060px;
  margin: 8px auto 0;
  padding: 0 18px;
  font-weight: 700;
  font-size: 13px;
  color: rgba(29, 26, 22, 0.65);
}
#gz-ticker-text { display: inline-block; animation: tickerPop 0.5s ease; }
@keyframes tickerPop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ============ MAIN / VIEWS ============ */
.gz-main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 16px 18px 60px;
}
.gz-view { display: none; }
.gz-view.active { display: block; animation: viewPop 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes viewPop {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* ============ HOME ============ */
.gz-hero { text-align: center; padding: 18px 0 8px; }
.gz-hero-title {
  font-family: var(--display);
  font-size: clamp(26px, 5.4vw, 46px);
  line-height: 1.1;
  margin: 0;
  animation: heroBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes heroBounce {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.gz-hero-sub { font-size: 16px; font-weight: 600; color: rgba(29, 26, 22, 0.65); margin: 10px 0 0; }

.gz-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.gz-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 20px 18px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--shadow-big);
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.18s, box-shadow 0.18s;
  animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.gz-cards > *:nth-child(1) { animation-delay: 0.03s; }
.gz-cards > *:nth-child(2) { animation-delay: 0.08s; }
.gz-cards > *:nth-child(3) { animation-delay: 0.13s; }
.gz-cards > *:nth-child(4) { animation-delay: 0.18s; }
.gz-cards > *:nth-child(5) { animation-delay: 0.23s; }
.gz-cards > *:nth-child(6) { animation-delay: 0.28s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) rotate(-1deg); }
  to { opacity: 1; transform: none; }
}
.gz-card:hover { transform: translate(-2px, -4px) rotate(-0.5deg); box-shadow: 10px 11px 0 var(--ink); }
.gz-card:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.card-red    { background: linear-gradient(160deg, #ffe3e6, var(--paper2) 70%); }
.card-blue   { background: linear-gradient(160deg, #dfe9ff, var(--paper2) 70%); }
.card-yellow { background: linear-gradient(160deg, #fff1cc, var(--paper2) 70%); }
.card-purple { background: linear-gradient(160deg, #efdfff, var(--paper2) 70%); }
.card-green  { background: linear-gradient(160deg, #dcf7e3, var(--paper2) 70%); }
.card-ink    { background: var(--ink); color: var(--paper); }
.gz-card-emoji { font-size: 42px; line-height: 1; filter: drop-shadow(2px 2px 0 rgba(29,26,22,0.15)); }
.gz-card-name { font-family: var(--display); font-size: 21px; margin-top: 4px; }
.gz-card-desc { font-weight: 600; font-size: 14px; opacity: 0.75; }
.gz-card-stat {
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
  margin-top: 4px;
  opacity: 0.8;
}
.gz-card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  font-family: var(--display);
  font-size: 13px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  transform: rotate(2deg);
}
.card-ink .gz-card-play { background: var(--yellow); color: var(--ink); }

/* ============ SHARED GAME CHROME ============ */
.gz-game-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.gz-game-title { font-family: var(--display); font-size: clamp(22px, 4vw, 32px); margin: 6px 0; }
.gz-game-tools { display: flex; gap: 8px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.gz-game-hint { font-weight: 600; color: rgba(29, 26, 22, 0.6); margin: 2px 0 18px; font-size: 14px; }
.gz-pill {
  padding: 7px 12px;
  font-weight: 800;
  font-size: 13px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
}
.gz-btn {
  padding: 12px 22px;
  font-family: var(--display);
  font-size: 15px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gz-btn:hover:not(:disabled) { transform: translate(-1px, -2px); box-shadow: 5px 6px 0 var(--ink); }
.gz-btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.gz-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.gz-btn.small { padding: 8px 14px; font-size: 12px; }
.gz-btn.big { padding: 16px 34px; font-size: 18px; }
.gz-btn.go { background: var(--green); color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.25); }
.gz-btn.ghost { background: var(--paper2); }

.gz-result {
  margin-top: 20px;
  padding: 18px 20px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--paper2);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  animation: viewPop 0.4s ease;
}
.gz-result .gz-btn { margin-top: 12px; }
.gz-result.hidden { display: none; }
.hidden { display: none !important; }

/* ============ WORD GOAL (wordle) ============ */
.wordle-board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 7px;
  max-width: 340px;
  margin: 0 auto;
}
.wordle-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.wordle-row.shake { animation: rowShake 0.4s ease; }
@keyframes rowShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.wordle-tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: clamp(20px, 5vw, 28px);
  background: var(--paper2);
  border: 3px solid rgba(29, 26, 22, 0.25);
  border-radius: 12px;
  text-transform: uppercase;
  transition: transform 0.1s;
}
.wordle-tile.filled { border-color: var(--ink); animation: tilePop 0.12s ease; }
@keyframes tilePop { 50% { transform: scale(1.08); } }
.wordle-tile.flip { animation: tileFlip 0.5s ease both; }
@keyframes tileFlip {
  0% { transform: rotateX(0); }
  49% { transform: rotateX(90deg); }
  51% { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}
.wordle-tile.hit { background: var(--green); border-color: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--ink); }
.wordle-tile.near { background: var(--yellow); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.wordle-tile.miss { background: #cfc9be; border-color: var(--ink); color: rgba(29,26,22,0.55); }

.wordle-kb { max-width: 520px; margin: 22px auto 0; display: grid; gap: 6px; }
.kb-row { display: flex; gap: 5px; justify-content: center; }
.kb-key {
  min-width: 32px;
  padding: 13px 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper2);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.1s;
  flex: 1;
  max-width: 44px;
}
.kb-key.wide { max-width: 74px; font-size: 12px; }
.kb-key:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.kb-key.hit { background: var(--green); color: #fff; }
.kb-key.near { background: var(--yellow); }
.kb-key.miss { background: #cfc9be; color: rgba(29,26,22,0.5); }

/* ============ FOUR LINES (connections) ============ */
.conn-solved { display: grid; gap: 8px; margin-bottom: 8px; }
.conn-group {
  padding: 12px 14px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  text-align: center;
  box-shadow: 3px 3px 0 var(--ink);
  animation: groupIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes groupIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.conn-group-title { font-family: var(--display); font-size: 14px; }
.conn-group-words { font-weight: 700; font-size: 13px; margin-top: 3px; }
.cg-yellow { background: var(--yellow); }
.cg-green { background: var(--green); color: #fff; }
.cg-green .conn-group-title { color: #fff; }
.cg-blue { background: var(--blue); color: #fff; }
.cg-purple { background: var(--purple); color: #fff; }

.conn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.conn-tile {
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 6px 4px;
  font-family: var(--font);
  font-weight: 800;
  font-size: clamp(11px, 2.4vw, 15px);
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s;
  word-break: break-word;
}
.conn-tile:hover { transform: translateY(-2px); }
.conn-tile.picked {
  background: var(--ink);
  color: var(--paper);
  transform: translate(2px, 2px) scale(0.98);
  box-shadow: 1px 1px 0 var(--ink);
}
.conn-tile.shake { animation: rowShake 0.4s ease; }
.conn-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ============ CLUE CROSS ============ */
.cross-rows { display: grid; gap: 14px; max-width: 720px; }
.cross-row { animation: cardIn 0.4s ease both; }
.cross-rows .cross-row:nth-child(2) { animation-delay: 0.05s; }
.cross-rows .cross-row:nth-child(3) { animation-delay: 0.1s; }
.cross-rows .cross-row:nth-child(4) { animation-delay: 0.15s; }
.cross-rows .cross-row:nth-child(5) { animation-delay: 0.2s; }
.cross-rows .cross-row:nth-child(6) { animation-delay: 0.25s; }
.cross-rows .cross-row:nth-child(7) { animation-delay: 0.3s; }
.cross-clue { font-weight: 700; font-size: 14.5px; margin-bottom: 7px; }
.cross-clue .cross-num {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  margin-right: 8px;
  font-family: var(--display);
  font-size: 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
}
.cross-cells { display: flex; gap: 5px; flex-wrap: wrap; }
.cross-cell {
  width: clamp(34px, 7.5vw, 44px);
  height: clamp(34px, 7.5vw, 44px);
  text-align: center;
  font-family: var(--display);
  font-size: clamp(15px, 3.4vw, 20px);
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 10px;
  outline: none;
  caret-color: var(--red);
  padding: 0;
}
.cross-cell.gold {
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 197, 61, 0.4), 2px 2px 0 var(--ink);
}
.cross-cell:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.25); }
.cross-row.solved .cross-cell {
  background: var(--green);
  color: #fff;
  border-color: var(--ink);
  pointer-events: none;
}
.cross-row.solved .cross-cell.gold { background: var(--yellow); color: var(--ink); }
.cross-row.wrong .cross-cells { animation: rowShake 0.4s ease; }

/* ============ DRUM HERO ============ */
.drum-stage { text-align: center; }
.drum-msg {
  font-weight: 800;
  font-size: 17px;
  min-height: 26px;
  margin-bottom: 20px;
}
.drum-pads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 150px));
  gap: 14px;
  justify-content: center;
  margin-bottom: 26px;
}
.drum-pad {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow-big);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, filter 0.08s;
}
.pad-kick  { background: var(--red); }
.pad-snare { background: var(--blue); }
.pad-hihat { background: var(--yellow); }
.pad-crash { background: var(--purple); }
.pad-emoji { font-size: clamp(26px, 6vw, 44px); }
.pad-name { font-family: var(--display); font-size: clamp(10px, 2vw, 14px); color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,0.35); }
.pad-hihat .pad-name { color: var(--ink); text-shadow: none; }
.drum-pad kbd {
  font-family: var(--font);
  font-weight: 800;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 1px 7px;
}
.drum-pad.lit, .drum-pad:active {
  transform: translate(4px, 4px) scale(0.97);
  box-shadow: 1px 1px 0 var(--ink);
  filter: brightness(1.25) saturate(1.3);
}
.drum-pad:disabled { cursor: default; opacity: 0.85; }

/* ============ MATH RUSH ============ */
.math-stage {
  max-width: 560px;
  margin: 0 auto;
  padding: 26px 20px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow-big);
  text-align: center;
  min-height: 320px;
  display: grid;
  place-items: center;
}
.math-start-emoji { font-size: 64px; margin-bottom: 14px; animation: heroBounce 0.5s ease; }
.math-q {
  font-family: var(--display);
  font-size: clamp(40px, 9vw, 64px);
  margin: 8px 0 22px;
  animation: tilePop 0.2s ease;
}
.math-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.math-opt {
  padding: 18px 10px;
  font-family: var(--display);
  font-size: 24px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}
.math-opt:hover { transform: translateY(-2px); }
.math-opt:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.math-opt.right { background: var(--green); color: #fff; }
.math-opt.nope { background: var(--red); color: #fff; animation: rowShake 0.3s ease; }
.math-combo {
  min-height: 24px;
  font-weight: 900;
  font-size: 15px;
  color: var(--orange);
}
.math-over-score { font-family: var(--display); font-size: 72px; line-height: 1; color: var(--green); text-shadow: 3px 3px 0 var(--ink); }
.math-over-label { font-family: var(--display); font-size: 18px; margin-bottom: 8px; }
.math-over-msg { font-weight: 700; margin-bottom: 16px; }
#math-timer.hurry { background: var(--red); color: #fff; animation: tilePop 0.5s ease infinite; }

/* ============ TOAST + CONFETTI ============ */
.gz-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 22px;
  font-weight: 800;
  font-size: 15px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 rgba(29, 26, 22, 0.3);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  z-index: 200;
  pointer-events: none;
}
.gz-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti-bit {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.6; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 700px) {
  .gz-nav { gap: 6px; }
  .gz-navbtn { padding: 8px 10px; font-size: 12px; }
  .drum-pads { grid-template-columns: repeat(2, minmax(0, 160px)); }
  .gz-chips { margin-left: 0; }
  .conn-tile { min-height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   GLOW-UP LAYER — doodles, marquee, XP, stamps,
   and five new games
   ============================================ */

/* Floating background doodles */
.gz-doodles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.doodle {
  position: absolute;
  font-size: 44px;
  opacity: 0.12;
  animation: doodleFloat 12s ease-in-out infinite alternate;
}
.d1 { top: 12%; left: 4%; animation-duration: 11s; }
.d2 { top: 68%; left: 8%; font-size: 36px; animation-duration: 14s; animation-delay: -3s; }
.d3 { top: 22%; right: 6%; animation-duration: 13s; animation-delay: -6s; }
.d4 { top: 78%; right: 10%; font-size: 52px; animation-duration: 10s; animation-delay: -2s; }
.d5 { top: 45%; left: 2%; font-size: 34px; animation-duration: 16s; animation-delay: -8s; }
.d6 { top: 8%; left: 46%; font-size: 30px; animation-duration: 12s; animation-delay: -5s; }
.d7 { top: 55%; right: 3%; font-size: 38px; animation-duration: 15s; animation-delay: -9s; }
.d8 { top: 88%; left: 42%; font-size: 40px; animation-duration: 13s; animation-delay: -4s; }
@keyframes doodleFloat {
  from { transform: translateY(0) rotate(-8deg); }
  to { transform: translateY(-30px) rotate(10deg); }
}
.gz-header, .gz-main, .gz-ticker { position: relative; z-index: 1; }

/* XP bar */
.gz-xp { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.gz-level {
  font-family: var(--display);
  font-size: 11px;
  padding: 6px 10px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 10px;
  white-space: nowrap;
  transform: rotate(-2deg);
}
.gz-xpbar {
  flex: 1;
  min-width: 80px;
  height: 14px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.gz-xpfill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(45deg, var(--green), var(--green) 8px, #4fdd75 8px, #4fdd75 16px);
  background-size: 32px 32px;
  animation: xpStripes 1.2s linear infinite;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes xpStripes { to { background-position: 32px 0; } }

/* Scrolling marquee ticker */
.gz-ticker {
  overflow: hidden;
  white-space: nowrap;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 6px 0;
  margin-top: 6px;
  font-weight: 800;
  font-size: 13px;
  max-width: none;
}
.gz-ticker-track {
  display: inline-block;
  animation: marquee 30s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* Card upgrades: shine sweep + badge + emoji bounce */
.gz-card { overflow: hidden; }
.gz-card::after {
  content: '';
  position: absolute;
  top: 0; left: -90%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.gz-card:hover::after { left: 140%; }
.gz-card:hover .gz-card-emoji { animation: emojiBounce 0.5s ease; }
@keyframes emojiBounce {
  0%, 100% { transform: scale(1) rotate(0); }
  40% { transform: scale(1.25) rotate(-8deg); }
  70% { transform: scale(1.1) rotate(6deg); }
}
.gz-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--display);
  font-size: 11px;
  padding: 4px 10px;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  transform: rotate(6deg);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: rotate(6deg) scale(1); }
  50% { transform: rotate(6deg) scale(1.1); }
}
.card-orange { background: linear-gradient(160deg, #ffe4cc, var(--paper2) 70%); }
.card-teal   { background: linear-gradient(160deg, #d4f4f0, var(--paper2) 70%); }

/* Slam-in stamp */
.gz-stamp {
  position: fixed;
  top: 42%; left: 50%;
  z-index: 300;
  font-family: var(--display);
  font-size: clamp(34px, 9vw, 72px);
  color: var(--red);
  background: var(--paper2);
  border: 5px solid var(--red);
  border-radius: 18px;
  padding: 14px 34px;
  pointer-events: none;
  box-shadow: 8px 8px 0 rgba(29, 26, 22, 0.35);
  animation: stampSlam 1.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes stampSlam {
  0% { transform: translate(-50%, -50%) rotate(-14deg) scale(3); opacity: 0; }
  16% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; }
  22% { transform: translate(-50%, -50%) rotate(-9deg) scale(1.05); }
  28% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  78% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(-8deg) scale(0.92); opacity: 0; }
}
.confetti-bit.emoji-bit { background: transparent !important; font-size: 20px; width: auto; height: auto; }

/* ============ SHOOTOUT ============ */
.shoot-stage { max-width: 620px; margin: 0 auto; text-align: center; }
.shoot-scene {
  position: relative;
  background: linear-gradient(180deg, #bfe8ff 0%, #d8f3d0 62%, #7ccf6e 62%, #5cb85c 100%);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow-big);
  padding: 26px 20px 66px;
  overflow: hidden;
}
.shoot-goal {
  position: relative;
  width: min(420px, 88%);
  margin: 0 auto;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.55) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.55) 0 2px, transparent 2px 16px),
    rgba(255, 255, 255, 0.18);
  border: 6px solid #fff;
  outline: 3px solid var(--ink);
  border-radius: 8px;
  aspect-ratio: 2.6 / 1;
}
.shoot-zones {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
}
.shoot-zone {
  border: 2px dashed rgba(29, 26, 22, 0.25);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s, transform 0.15s;
}
.shoot-zone:hover { background: rgba(255, 255, 255, 0.35); }
.shoot-zone.aimed {
  background: rgba(255, 197, 61, 0.55);
  border: 3px solid var(--ink);
  transform: scale(0.97);
}
.shoot-keeper {
  position: absolute;
  left: 50%; bottom: -4px;
  transform: translateX(-50%);
  font-size: clamp(34px, 8vw, 52px);
  z-index: 2;
  transition: left 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), bottom 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), transform 0.35s;
  filter: drop-shadow(2px 3px 0 rgba(29,26,22,0.3));
}
.shoot-ball {
  position: absolute;
  left: 50%; bottom: 10px;
  transform: translateX(-50%);
  font-size: clamp(30px, 7vw, 44px);
  z-index: 3;
  transition: all 0.45s cubic-bezier(0.3, 0.9, 0.5, 1);
  filter: drop-shadow(2px 4px 0 rgba(29,26,22,0.3));
}
.shoot-ball.flying { font-size: 22px; }
.shoot-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.shoot-power-track {
  position: relative;
  width: min(300px, 60vw);
  height: 26px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.shoot-power-sweet {
  position: absolute;
  left: 36%; width: 28%; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, var(--green), var(--green) 6px, #4fdd75 6px, #4fdd75 12px);
}
.shoot-power-cursor {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 8px;
  left: 0;
  background: var(--ink);
  border-radius: 4px;
  z-index: 2;
}
.shoot-msg { font-weight: 800; font-size: 17px; margin-top: 14px; min-height: 24px; }

/* ============ PUCK WHACK ============ */
.whack-stage { max-width: 560px; margin: 0 auto; text-align: center; }
.whack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #eaf7ff, #d7efff);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow-big);
  padding: 18px;
}
.whack-hole {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 62%, #b9dff2 38%, #fff 40%);
  border: 3px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.whack-item {
  font-size: clamp(30px, 8vw, 52px);
  transform: translateY(90%) scale(0.5);
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  pointer-events: none;
}
.whack-hole.up .whack-item { transform: translateY(0) scale(1); }
.whack-hole.bonk .whack-item { transform: translateY(0) scale(1.35) rotate(20deg); transition-duration: 0.08s; }
.whack-hole.oops { background: radial-gradient(circle at 50% 62%, #ffd4d9 38%, #fff 40%); }

/* ============ BEAT LAB ============ */
.beat-stage { max-width: 680px; margin: 0 auto; }
.beat-bpm-pill { display: inline-flex; align-items: center; gap: 6px; }
.beat-bpm-pill input[type=range] { width: 110px; accent-color: var(--red); }
.beat-grid {
  display: grid;
  gap: 8px;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow-big);
  padding: 16px;
}
.beat-row { display: grid; grid-template-columns: 92px repeat(8, 1fr); gap: 6px; align-items: center; }
.beat-label {
  font-family: var(--display);
  font-size: 11px;
  color: var(--paper);
  text-align: left;
}
.beat-cell {
  aspect-ratio: 1;
  border: 2px solid rgba(250, 245, 236, 0.35);
  border-radius: 9px;
  background: rgba(250, 245, 236, 0.08);
  cursor: pointer;
  transition: transform 0.08s, background 0.12s;
  padding: 0;
}
.beat-cell:nth-child(4n + 2) { border-color: rgba(250, 245, 236, 0.6); }
.beat-cell:hover { background: rgba(250, 245, 236, 0.22); }
.beat-cell.on.row-0 { background: var(--red); border-color: #fff; }
.beat-cell.on.row-1 { background: var(--blue); border-color: #fff; }
.beat-cell.on.row-2 { background: var(--yellow); border-color: #fff; }
.beat-cell.on.row-3 { background: var(--purple); border-color: #fff; }
.beat-cell.playhead { transform: scale(1.14); box-shadow: 0 0 0 3px #fff; }
.beat-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ============ MATCH UP ============ */
.match-decks { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.deck-btn {
  padding: 8px 14px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s;
}
.deck-btn:hover { transform: translateY(-2px); }
.deck-btn.active { background: var(--ink); color: var(--paper); }
.match-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 480px;
}
.match-card {
  aspect-ratio: 1;
  perspective: 500px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}
.match-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.match-card.flipped .match-inner, .match-card.found .match-inner { transform: rotateY(180deg); }
.match-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(26px, 7vw, 44px);
  border: 3px solid var(--ink);
  border-radius: 16px;
  backface-visibility: hidden;
  box-shadow: 3px 3px 0 var(--ink);
}
.match-face.front {
  background: repeating-linear-gradient(45deg, var(--red), var(--red) 10px, #ef5261 10px, #ef5261 20px);
  color: #fff;
  font-family: var(--display);
  font-size: 22px;
}
.match-face.back { background: var(--paper2); transform: rotateY(180deg); }
.match-card.found .match-face.back { background: #dcf7e3; animation: foundPop 0.4s ease; }
@keyframes foundPop { 50% { transform: rotateY(180deg) scale(1.12); } }

/* ============ TRIVIA ============ */
.trivia-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
  background: var(--paper2);
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow-big);
}
.trivia-cat {
  display: inline-block;
  font-family: var(--display);
  font-size: 12px;
  padding: 5px 12px;
  background: var(--blue);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  transform: rotate(-2deg);
  margin-bottom: 12px;
}
.trivia-q { font-weight: 800; font-size: clamp(17px, 3vw, 22px); margin-bottom: 18px; }
.trivia-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trivia-opt {
  padding: 14px 12px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}
.trivia-opt:hover:not(:disabled) { transform: translateY(-2px); }
.trivia-opt.right { background: var(--green); color: #fff; }
.trivia-opt.nope { background: var(--red); color: #fff; animation: rowShake 0.3s ease; }
.trivia-opt:disabled { cursor: default; }
.trivia-fact {
  margin-top: 14px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  background: #fff7e0;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  animation: viewPop 0.3s ease;
}
.trivia-next { margin-top: 14px; }

/* ============ RESPONSIVE (glow-up additions) ============ */
@media (max-width: 700px) {
  .gz-xp { min-width: 0; width: 100%; order: 3; }
  .beat-row { grid-template-columns: 64px repeat(8, 1fr); }
  .beat-label { font-size: 9px; }
  .trivia-opts { grid-template-columns: 1fr; }
  .match-grid { max-width: none; }
  .doodle { font-size: 30px; }
}
