@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@600;700;800;900&display=swap');

:root {
  --bg-deep: #070d1a;
  --bg-card: #0c1c30;
  --bg-card2: #0f2340;
  --border: #1a3a60;
  --border-light: #244a70;
  --gold: #f5c542;
  --gold-dark: #c9a100;
  --gold-light: #ffd966;
  --teal: #0ab4cc;
  --teal-dark: #0890a4;
  --green: #22c55e;
  --red: #ef4444;
  --text: #e4edf8;
  --text-secondary: #7a9bbf;
  --text-muted: #4a6a8a;
  --radius: 12px;
  --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
h1,h2,h3,h4 { font-family: 'Montserrat', sans-serif; font-weight: 800; line-height: 1.2; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--gold); }

/* NAVBAR */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 900; padding: 0 20px; height: 70px; display: flex; align-items: center; background: rgba(7,13,26,0.92); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(26,58,96,0.5); }
.nav-inner { max-width: 1200px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.nav-logo-text { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1rem; color: var(--text); }
.nav-logo-text span { color: var(--gold); }
.nav-back { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); font-size: 0.85rem; transition: all 0.2s; }
.nav-back:hover { color: var(--text); border-color: var(--border-light); }
.nav-coins { display: flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; font-weight: 700; color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* GAME LAYOUT */
.game-page { padding-top: 70px; min-height: 100vh; }
.game-header { padding: 28px 20px 20px; max-width: 900px; margin: 0 auto; }
.game-header h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 6px; }
.game-header p { color: var(--text-secondary); font-size: 0.88rem; }
.game-arena { max-width: 900px; margin: 0 auto; padding: 0 20px 40px; }

/* BALANCE BAR */
.balance-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.balance-item { display: flex; flex-direction: column; }
.balance-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.balance-value { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--gold); }
.balance-value.small { font-size: 1rem; color: var(--text); }
.balance-sep { width: 1px; height: 36px; background: var(--border); }

/* MESSAGE TOAST */
.game-message { text-align: center; padding: 12px 20px; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; margin-bottom: 20px; min-height: 48px; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.msg-idle { background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-muted); }
.msg-win { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.4); color: #4ade80; }
.msg-lose { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.msg-info { background: rgba(10,180,204,0.1); border: 1px solid rgba(10,180,204,0.3); color: var(--teal); }

/* BET CONTROLS */
.bet-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.bet-label { font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.bet-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  width: 48px; height: 48px; border-radius: 50%; border: 2.5px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; cursor: pointer; transition: all 0.2s;
  background: transparent; font-family: 'Poppins', sans-serif;
}
.chip:hover { transform: scale(1.1); }
.chip.active { box-shadow: 0 0 0 3px rgba(255,255,255,0.25); }
.chip-10 { color: #60a5fa; border-color: #60a5fa; }
.chip-25 { color: var(--green); border-color: var(--green); }
.chip-50 { color: #fb923c; border-color: #fb923c; }
.chip-100 { color: var(--gold); border-color: var(--gold); }
.chip-250 { color: #e879f9; border-color: #e879f9; }
.chip.active { background: rgba(255,255,255,0.08); }

.btn-game {
  padding: 13px 28px; border-radius: var(--radius); border: none; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-size: 0.9rem; font-weight: 700; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-spin { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #0a0e1a; }
.btn-spin:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(245,197,66,0.4); }
.btn-deal { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: #fff; }
.btn-deal:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(10,180,204,0.4); }
.btn-action { background: var(--bg-card2); color: var(--text); border: 1.5px solid var(--border-light); }
.btn-action:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.btn-game:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* STATS ROW */
.stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; flex: 1; min-width: 100px; text-align: center; }
.stat-card .sv { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.2rem; }
.stat-card .sl { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .sv.green { color: var(--green); }
.stat-card .sv.red { color: var(--red); }
.stat-card .sv.gold { color: var(--gold); }

/* FOOTER IN GAMES */
.game-footer { margin-top: 40px; padding: 20px; text-align: center; font-size: 0.78rem; color: var(--text-muted); border-top: 1px solid var(--border); max-width: 900px; margin-left: auto; margin-right: auto; }
.game-footer a { color: var(--text-muted); }
.game-footer a:hover { color: var(--teal); }

/* AGE MODAL */
.modal-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.92); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.hidden { display: none; }
.age-modal { background: var(--bg-card2); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 40px; max-width: 480px; width: 100%; text-align: center; }
.age-modal h2 { margin-bottom: 12px; }
.age-modal p { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 24px; }
.age-checkbox-wrap { display: flex; align-items: flex-start; gap: 12px; text-align: left; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; cursor: pointer; }
.age-checkbox-wrap input[type="checkbox"] { width: 20px; height: 20px; min-width: 20px; accent-color: var(--gold); cursor: pointer; margin-top: 2px; }
.age-checkbox-wrap label { font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; }
.age-confirm-btn { width: 100%; padding: 14px; border-radius: var(--radius); background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #0a0e1a; font-family: 'Poppins', sans-serif; font-size: 0.95rem; font-weight: 700; border: none; cursor: pointer; transition: all 0.2s; }
.age-confirm-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.age-confirm-btn:not(:disabled):hover { box-shadow: 0 4px 20px rgba(245,197,66,0.4); transform: translateY(-2px); }
.age-modal-icon { font-size: 3rem; margin-bottom: 16px; }
.age-modal-footer { margin-top: 14px; font-size: 0.76rem; color: var(--text-muted); }

/* COOKIE BANNER */
.cookie-banner { position: fixed; bottom: 20px; left: 20px; right: 20px; max-width: 560px; margin: 0 auto; background: var(--bg-card2); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 18px 22px; z-index: 9000; box-shadow: 0 8px 40px rgba(0,0,0,0.6); display: flex; align-items: flex-start; gap: 14px; transition: transform 0.4s ease, opacity 0.4s ease; }
.cookie-banner.hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
.cookie-icon { font-size: 1.6rem; flex-shrink: 0; }
.cookie-text h5 { font-size: 0.88rem; margin-bottom: 5px; }
.cookie-text p { font-size: 0.76rem; color: var(--text-secondary); }
.cookie-text a { color: var(--teal); }
.cookie-actions { display: flex; gap: 8px; margin-top: 10px; }
.cookie-btn-accept { padding: 7px 16px; background: var(--gold); color: #0a0e1a; border: none; border-radius: 8px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.cookie-btn-decline { padding: 7px 16px; background: transparent; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; font-size: 0.8rem; cursor: pointer; }

@media (max-width: 600px) {
  .balance-bar { flex-direction: column; gap: 8px; }
  .balance-sep { display: none; }
  .bet-controls { flex-direction: column; align-items: flex-start; }
}
