/* ============================================================
   FreeGame Casino - shared theme
   Dark casino green + gold, inspired by Bunny Bet aesthetic
   ============================================================ */

:root {
  /* Color palette */
  --bg-deep:      #061a0e;
  --bg-felt:      #0d3a1f;
  --bg-felt-2:    #0a2d18;
  --bg-panel:     #061509;
  --bg-panel-2:   #08200f;
  --gold:         #d4af37;
  --gold-soft:    #e8c95c;
  --gold-dim:     #8a6f1f;
  --text:         #e8d791;
  --text-soft:    #b9a256;
  --text-dim:     #6c5a26;
  --red:          #b83232;
  --black:        #1a1a1a;
  --green-zero:   #1a7a3a;
  --shadow:       0 4px 18px rgba(0,0,0,0.6);

  /* Typography */
  --font-display: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --radius:    10px;
  --radius-pill: 999px;
  --pad:       16px;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.08), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.6), transparent 70%),
    var(--bg-felt);
  background-attachment: fixed;
  position: relative;
}

/* Subtle diamond pattern overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(212,175,55,0.025) 0px,
      rgba(212,175,55,0.025) 1px,
      transparent 1px,
      transparent 28px),
    repeating-linear-gradient(-45deg,
      rgba(212,175,55,0.025) 0px,
      rgba(212,175,55,0.025) 1px,
      transparent 1px,
      transparent 28px);
  z-index: 0;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.15));
  backdrop-filter: blur(4px);
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--gold);
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(212,175,55,0.25);
}
.site-header .brand .bunny {
  font-size: 26px;
  filter: drop-shadow(0 0 6px rgba(212,175,55,0.5));
}
.site-header nav a {
  margin: 0 10px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.site-header .balance {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold-soft);
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--gold-dim);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  letter-spacing: 1px;
}
.site-header .balance .chip {
  color: var(--gold);
  margin-right: 6px;
}
.site-header .header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-header .topup-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  color: #1a1100;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  animation: topupPulse 1.6s ease-in-out infinite;
}
.site-header .topup-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}
@keyframes topupPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(212,175,55,0); }
}

/* ---------- Layout containers ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.page-title {
  font-family: var(--font-display);
  text-align: center;
  font-size: 32px;
  letter-spacing: 6px;
  color: var(--gold);
  margin-bottom: 8px;
  text-shadow: 0 0 18px rgba(212,175,55,0.18);
}
.page-subtitle {
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 36px;
}

/* ---------- Game cards (lobby) ---------- */
.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  text-align: center;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  text-decoration: none;
  color: var(--text);
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 26px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,55,0.15);
}
.game-card .icon {
  font-size: 64px;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.game-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 6px;
}
.game-card p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}
.game-card .play-tag {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold-soft);
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, #1a4a25, #0a2a13);
  color: var(--gold);
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}
.btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: linear-gradient(180deg, #245d33, #0e3219);
  color: var(--gold-soft);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn.primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  color: #1a1100;
  border-color: var(--gold);
}
.btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #000;
}
.btn.danger { color: #e88; border-color: #6a2222; }
.btn.danger:hover:not(:disabled) { color: #ffaaaa; border-color: #b83232; }

/* ---------- Game stage shared ---------- */
.game-stage {
  background: linear-gradient(180deg, var(--bg-felt), var(--bg-felt-2));
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.bet-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0;
  font-size: 14px;
  color: var(--text-soft);
}
.bet-row label { letter-spacing: 1px; text-transform: uppercase; }
.bet-row input[type="number"] {
  width: 110px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-pill);
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-size: 16px;
  text-align: center;
}
.bet-row input[type="number"]:focus {
  outline: none;
  border-color: var(--gold);
}

.status-line {
  text-align: center;
  font-family: var(--font-display);
  letter-spacing: 3px;
  color: var(--gold);
  font-size: 18px;
  min-height: 28px;
  margin-top: 14px;
  text-shadow: 0 0 8px rgba(212,175,55,0.25);
}
.status-line.win  { color: #8de08d; text-shadow: 0 0 10px rgba(141,224,141,0.35); }
.status-line.lose { color: #e88;   text-shadow: 0 0 10px rgba(232,136,136,0.30); }

/* ---------- Ad slots ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px auto;
  border: 1px dashed var(--gold-dim);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.25);
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.ad-slot.banner   { width: 100%; max-width: 728px; height: 90px; }
.ad-slot.leader   { width: 100%; max-width: 970px; height: 90px; }
.ad-slot.square   { width: 300px; height: 250px; }
.ad-slot.sidebar  { width: 160px; height: 600px; }

/* ===================================================
   BLACKJACK
   =================================================== */
.bj-table {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}
.bj-hand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.bj-hand-label {
  font-family: var(--font-display);
  letter-spacing: 4px;
  font-size: 14px;
  color: var(--gold-soft);
  text-transform: uppercase;
}
.bj-cards {
  display: flex;
  gap: 8px;
  min-height: 130px;
}
.card {
  width: 88px;
  height: 124px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #222;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  position: relative;
  user-select: none;
}
.card.facedown {
  background:
    repeating-linear-gradient(45deg, #6a1a2a 0 10px, #4a0f1d 10px 20px);
  color: transparent;
}
.card .corner-tl { align-self: flex-start; line-height: 1; }
.card .corner-br { align-self: flex-end; line-height: 1; transform: rotate(180deg); }
.card .center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.card.red { color: #c81d2a; }
.card.black { color: #1a1a1a; }

.bj-totals {
  font-size: 14px;
  color: var(--text-soft);
  letter-spacing: 2px;
}

/* ===================================================
   ROULETTE
   =================================================== */
.roulette-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
@media (min-width: 880px) {
  .roulette-stage { grid-template-columns: 360px 1fr; }
}

.wheel-wrap {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}
.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #2a1a0a;
  position: relative;
  box-shadow:
    inset 0 0 0 6px var(--gold-dim),
    inset 0 0 0 12px #2a1a0a,
    inset 0 0 0 14px var(--gold),
    0 0 30px rgba(0,0,0,0.7);
  transition: transform 4.5s cubic-bezier(0.15,0.6,0.25,1);
  transform: rotate(0deg);
}
.wheel-center {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  background: radial-gradient(circle, var(--gold-soft), var(--gold-dim));
  border-radius: 50%;
  z-index: 4;
  box-shadow: 0 0 8px rgba(0,0,0,0.6);
}
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid var(--gold);
  z-index: 5;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7));
}
.wheel-result {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 32px;
  color: #fff;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(0,0,0,0.9);
}

/* Roulette betting board */
.roulette-board {
  display: grid;
  grid-template-columns: 60px repeat(12, 1fr) 70px;
  grid-auto-rows: 38px;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.roulette-board .cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  cursor: pointer;
  position: relative;
  transition: outline-color .15s ease;
  outline: 1px solid transparent;
}
.roulette-board .cell.red { background: var(--red); }
.roulette-board .cell.zero { background: var(--green-zero); grid-row: span 3; }
.roulette-board .cell.outside {
  background: #1f1f1f;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.roulette-board .cell.outside.red { background: var(--red); }
.roulette-board .cell.outside.black { background: var(--black); }
.roulette-board .cell:hover { outline-color: var(--gold); }
.roulette-board .cell.has-bet::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft), var(--gold-dim));
  border: 2px solid #000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.roulette-board .cell.has-bet::before {
  content: attr(data-amount);
  position: absolute;
  z-index: 2;
  font-size: 11px;
  color: #000;
  font-weight: 800;
}

.chip-rack {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}
.chip-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px dashed #fff;
  background: var(--gold);
  color: #000;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.chip-btn:hover { transform: translateY(-2px); }
.chip-btn.selected {
  box-shadow: 0 0 0 3px var(--gold-soft), 0 4px 10px rgba(0,0,0,0.6);
  transform: translateY(-2px);
}
.chip-btn[data-value="1"]   { background: #d4d4d4; }
.chip-btn[data-value="5"]   { background: #c8262f; }
.chip-btn[data-value="25"]  { background: #2a7a3a; }
.chip-btn[data-value="100"] { background: #1a1a1a; color: var(--gold); }
.chip-btn[data-value="500"] { background: #6a1aaa; color: #fff; }

/* ===================================================
   SLOTS
   =================================================== */
.slots-frame {
  background: linear-gradient(180deg, #2a1a0a, #1a0d04);
  border: 4px solid var(--gold);
  border-radius: 20px;
  padding: 24px;
  box-shadow:
    inset 0 0 0 2px #000,
    inset 0 0 24px rgba(0,0,0,0.6),
    0 6px 20px rgba(0,0,0,0.6);
  max-width: 520px;
  margin: 0 auto;
}
.slots-reels {
  position: relative;          /* anchors the .payline overlay */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #000;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--gold-dim);
}
.reel {
  height: 220px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 64px;
  line-height: 1;
}
.reel-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reel-symbol {
  height: 73.33px;     /* 220 / 3 visible rows */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.payline {
  position: absolute;
  left: 10px; right: 10px;     /* match .slots-reels padding */
  height: 73.33px;
  top: 83.33px;                /* parent padding (10) + first row (73.33) */
  border-top: 2px dashed rgba(212,175,55,0.4);
  border-bottom: 2px dashed rgba(212,175,55,0.4);
  pointer-events: none;
}
.slots-status {
  margin-top: 16px;
  font-family: var(--font-display);
  text-align: center;
  letter-spacing: 4px;
  font-size: 18px;
  color: var(--gold);
  min-height: 26px;
}
.slots-pay {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-top: 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  border-top: 1px solid rgba(212,175,55,0.15);
  margin-top: 40px;
}

/* ---------- Out-of-chips modal ---------- */
.oc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}
.oc-card {
  position: relative;
  z-index: 1;
  max-width: 380px;
  width: calc(100% - 32px);
  padding: 32px 28px 28px;
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.2);
  text-align: center;
  animation: ocPop 0.18s ease-out;
}
@keyframes ocPop {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.oc-card .oc-bunny {
  font-size: 56px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  margin-bottom: 8px;
}
.oc-card h2 {
  font-family: var(--font-display);
  letter-spacing: 4px;
  color: var(--gold);
  font-size: 24px;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(212,175,55,0.2);
}
.oc-card p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.oc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.oc-actions .btn { min-width: 180px; }

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.center { text-align: center; }
.muted  { color: var(--text-dim); }

@media (max-width: 600px) {
  .site-header { flex-direction: column; gap: 8px; padding: 12px; }
  .site-header nav { order: 3; }
  .roulette-board { grid-template-columns: 50px repeat(12, 1fr) 60px; font-size: 11px; }
  .reel { height: 180px; font-size: 52px; }
  .reel-symbol { height: 60px; }
  .payline { height: 60px; top: 70px; }   /* 10px padding + 60px first row */
}
