/* ============== GAME PAGE LAYOUT ============== */
.game-page {
  min-height: calc(100vh - 80px);
  padding: 130px 0 80px;
  display: flex; flex-direction: column;
}

.game-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.game-intro .eyebrow { display: inline-flex; }
.game-intro h1 { margin-top: 18px; font-size: clamp(40px, 5vw, 60px); }
.game-intro p { margin-top: 18px; font-size: 16px; line-height: 1.7; max-width: 56ch; margin-left: auto; margin-right: auto; }

.stage {
  margin: 0 auto;
  width: 100%;
  max-width: 720px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-base));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden;
}
.stage::before {
  content: ""; position: absolute;
  inset: 0;
  background: radial-gradient(700px 300px at 50% 0%, rgba(212, 166, 74, 0.1), transparent 60%);
  pointer-events: none;
}

.tokens {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tokens .pile {
  display: flex; align-items: center; gap: 14px;
}
.tokens .pile .icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-bright), var(--gold) 60%, var(--gold-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 18px rgba(212, 166, 74, 0.4);
}
.tokens .pile .info { display: flex; flex-direction: column; }
.tokens .pile small {
  font-family: var(--font-accent);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.tokens .pile strong {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  color: var(--ink);
  font-style: italic;
  line-height: 1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.tokens .ledger {
  display: flex; gap: 18px;
  font-family: var(--font-accent);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tokens .ledger span { font-variant-numeric: tabular-nums; }
.tokens .ledger b { color: var(--ink); font-weight: 500; margin-left: 6px; }

.game-actions {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.game-actions .reset {
  font-family: var(--font-accent);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 14px;
  transition: color 0.3s;
}
.game-actions .reset:hover { color: var(--gold); }

.game-msg {
  text-align: center;
  margin-top: 22px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-mute);
  min-height: 30px;
  transition: color 0.3s, transform 0.4s var(--ease-out);
}
.game-msg.win { color: var(--gold-bright); }
.game-msg.bump { animation: bump 0.5s var(--ease-out); }
@keyframes bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.other-games {
  margin: 80px auto 0;
  text-align: center;
  max-width: 720px;
}
.other-games span {
  font-family: var(--font-accent);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 26px;
}
.other-games .links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.other-games a {
  padding: 22px 24px;
  border-radius: var(--radius-m);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
  text-align: left;
  transition: border-color 0.3s, transform 0.4s var(--ease-out);
}
.other-games a:hover { border-color: var(--gold); transform: translateY(-3px); }
.other-games a small {
  font-family: var(--font-accent);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--gold);
  text-transform: uppercase;
}
.other-games a strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}
@media (max-width: 600px) {
  .other-games .links { grid-template-columns: 1fr; }
}

/* ============== BLOOM REELS ============== */
.reels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 auto;
  max-width: 520px;
}
.reel {
  aspect-ratio: 1 / 1.3;
  border-radius: var(--radius-m);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.4)),
    radial-gradient(circle at 50% 50%, var(--bg-elev) 0%, var(--bg-deep) 100%);
  border: 1px solid var(--line-strong);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}
.reel-strip {
  position: absolute;
  left: 0; right: 0; top: 0;
  display: flex; flex-direction: column;
  transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
.reel-cell {
  width: 100%;
  aspect-ratio: 1 / 1.3;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.reel-cell svg { width: 60%; height: 60%; }
.reel-pane {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(212, 166, 74, 0.3);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(212, 166, 74, 0.06) 0%, transparent 30%, transparent 70%, rgba(212, 166, 74, 0.06) 100%);
}
.reel.win {
  animation: reelWin 0.8s var(--ease-out);
  box-shadow: inset 0 0 40px rgba(212, 166, 74, 0.4), 0 0 30px rgba(212, 166, 74, 0.3);
  border-color: var(--gold);
}
@keyframes reelWin {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

.spin-btn {
  margin: 36px auto 0;
  display: flex;
  align-items: center; justify-content: center;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-bright), var(--gold) 50%, var(--gold-deep) 100%);
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bg-deep);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 20px 50px rgba(212, 166, 74, 0.35);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
  position: relative;
}
.spin-btn::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px dashed rgba(6, 17, 13, 0.5);
  border-radius: 50%;
}
.spin-btn:hover:not(:disabled) {
  transform: scale(1.04);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 28px 70px rgba(212, 166, 74, 0.5);
}
.spin-btn:disabled { opacity: 0.5; cursor: wait; }
.spin-btn.spinning::before { animation: spinDash 1.5s linear infinite; }
@keyframes spinDash {
  to { transform: rotate(360deg); }
}

/* ============== WHEEL ============== */
.wheel-stage {
  position: relative;
  margin: 0 auto;
  width: min(520px, 100%);
  aspect-ratio: 1;
}
.wheel-stage svg { width: 100%; height: 100%; }
.wheel-pointer {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 36px;
  z-index: 5;
}
.wheel-rotor {
  transition: transform 5s cubic-bezier(0.2, 0.6, 0.05, 1);
  will-change: transform;
  transform-origin: 50% 50%;
}
.wheel-stage .center-jewel {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 0 30px rgba(212, 166, 74, 0.5);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 30px;
  font-weight: 500;
  color: var(--bg-deep);
  z-index: 4;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.wheel-controls {
  margin-top: 36px;
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}

/* ============== PAIRS ============== */
.pairs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}
.pair-card {
  aspect-ratio: 1 / 1.25;
  border-radius: var(--radius-m);
  position: relative;
  cursor: pointer;
  perspective: 800px;
  background: transparent;
}
.pair-inner {
  position: absolute; inset: 0;
  transition: transform 0.6s var(--ease-out);
  transform-style: preserve-3d;
}
.pair-card.flipped .pair-inner,
.pair-card.matched .pair-inner { transform: rotateY(180deg); }

.pair-face {
  position: absolute; inset: 0;
  border-radius: inherit;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, var(--bg-elev), var(--bg-deep));
  overflow: hidden;
}
.pair-back {
  background: linear-gradient(140deg, #1a3429, #06110d);
  position: relative;
}
.pair-back::before {
  content: ""; position: absolute; inset: 12px;
  border: 1px dashed rgba(212, 166, 74, 0.4);
  border-radius: 8px;
}
.pair-back::after {
  content: "✦";
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold);
  position: relative;
  z-index: 1;
}
.pair-front {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, var(--bg-elev), var(--bg-base));
}
.pair-front svg { width: 60%; height: 60%; }
.pair-card.matched .pair-front {
  border-color: var(--gold);
  box-shadow: inset 0 0 24px rgba(212, 166, 74, 0.4);
}
.pair-card:hover:not(.flipped):not(.matched) .pair-back {
  border-color: var(--gold);
}

@media (max-width: 540px) {
  .pairs-grid { gap: 8px; }
}
