/* ============================================================
   CasinoGab - CSS Principal
   Mobile-First, Dark Casino Theme
   ============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg-deep:    #070b0f;
  --bg-dark:    #0d1117;
  --bg-card:    #141b24;
  --bg-card2:   #1a2332;
  --border:     #1e2d3d;
  --border-glow:#2a4060;

  --gold:       #c9a84c;
  --gold-light: #f0c060;
  --gold-dim:   #8a6d2e;
  --green:      #00c853;
  --green-dim:  #007a32;
  --red:        #e53935;
  --red-dim:    #8b0000;
  --blue:       #1e88e5;
  --purple:     #7c4dff;

  --text-primary:  #e8eaf6;
  --text-secondary:#8899a6;
  --text-muted:    #4a5568;

  --topbar-h:   52px;
  --bnav-h:     62px;
  --sidebar-w:  220px;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --shadow-card: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 20px rgba(201,168,76,0.2);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  height: 100%;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Top Bar ─────────────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: linear-gradient(180deg, #0a0e15 0%, #0d1117 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 100;
  gap: 8px;
}

.top-bar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.top-bar__logo img {
  height: 32px;
  width: 32px;
  object-fit: contain;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.logo-accent { color: var(--gold); }

.top-bar__center { flex: 1; display: flex; justify-content: center; }

.balance-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
}

.balance-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.balance-chip small {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 400;
}

.top-bar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon, .notif-btn, .avatar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.2s;
  text-decoration: none;
}

.btn-deposit { color: var(--green); border-color: var(--green-dim); }
.btn-deposit:hover { background: var(--green); color: #fff; }

.notif-btn svg, .btn-icon svg { width: 18px; height: 18px; }
.notif-btn:hover { border-color: var(--gold); color: var(--gold); }

.avatar-btn {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border: none;
  font-weight: 700;
  font-size: 14px;
  color: #000;
}

/* ── App Layout ──────────────────────────────────────────── */
.app-body {
  padding-top: var(--topbar-h);
  padding-bottom: var(--bnav-h);
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: calc(100vh - var(--topbar-h) - var(--bnav-h));
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-dark);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: var(--bnav-h);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 90;
}

.sidebar.open { transform: translateX(0); }

@media (min-width: 1024px) {
  .sidebar { transform: translateX(0); position: sticky; }
  .main-content { margin-left: var(--sidebar-w); }
}

.sidebar-nav {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(201,168,76,0.15), transparent);
  color: var(--gold);
  border-left: 2px solid var(--gold);
}

.nav-item--small { font-size: 12px; opacity: 0.7; }
.nav-item--danger:hover { background: rgba(229,57,53,0.15); color: var(--red); }

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Bottom Navigation ───────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bnav-h);
  background: linear-gradient(0deg, #080c11 0%, #0d1117 100%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 100;
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 10px;
}

.bnav-item svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s;
}

.bnav-item:hover, .bnav-item.active {
  color: var(--gold);
}

.bnav-item.active svg { transform: scale(1.1); }

.bnav-item--cta {
  color: #000 !important;
}

.bnav-item--cta svg {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  padding: 8px;
  width: 40px;
  height: 40px;
  color: #000;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.card--gold {
  border-color: var(--gold-dim);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(201,168,76,0.05) 100%);
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-light);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: all 0.2s;
  cursor: pointer;
  min-height: 40px;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #000;
}
.btn--primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn--green {
  background: linear-gradient(135deg, var(--green-dim), var(--green));
  color: #fff;
}
.btn--green:hover { filter: brightness(1.1); }

.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

.btn--danger {
  background: var(--red-dim);
  color: #fff;
}
.btn--danger:hover { background: var(--red); }

.btn--full { width: 100%; }

.btn--sm { padding: 6px 14px; font-size: 12px; min-height: 32px; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s;
  min-height: 42px;
  -webkit-appearance: none;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.form-input.error { border-color: var(--red); }
.form-error { color: var(--red); font-size: 11px; margin-top: 4px; }
.form-hint { color: var(--text-muted); font-size: 11px; margin-top: 4px; }

.phone-group {
  display: flex;
  gap: 8px;
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 14px;
  white-space: nowrap;
  color: var(--text-primary);
  min-width: 80px;
}

.phone-group .form-input { flex: 1; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid;
}

.alert--success { background: rgba(0,200,83,0.1); border-color: var(--green-dim); color: #80e27e; }
.alert--error   { background: rgba(229,57,53,0.1); border-color: var(--red-dim); color: #ff8a80; }
.alert--warning { background: rgba(201,168,76,0.1); border-color: var(--gold-dim); color: var(--gold-light); }
.alert--info    { background: rgba(30,136,229,0.1); border-color: #1565c0; color: #82b1ff; }

.alert-close { background: none; border: none; color: inherit; font-size: 18px; opacity: 0.7; padding: 0; line-height: 1; }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-dark);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(30,45,61,0.5);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge--green   { background: rgba(0,200,83,0.15);  color: var(--green); }
.badge--red     { background: rgba(229,57,53,0.15); color: var(--red); }
.badge--gold    { background: rgba(201,168,76,0.15); color: var(--gold); }
.badge--blue    { background: rgba(30,136,229,0.15); color: var(--blue); }
.badge--gray    { background: rgba(100,100,100,0.15); color: var(--text-secondary); }
.badge--orange  { background: rgba(255,152,0,0.15); color: #ffb74d; }

/* ── Game Cards ───────────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) { .games-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .games-grid { grid-template-columns: repeat(4, 1fr); } }

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.0), rgba(201,168,76,0.05));
  opacity: 0;
  transition: opacity 0.2s;
}

.game-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.game-card:hover::before { opacity: 1; }

.game-card__icon { font-size: 36px; margin-bottom: 8px; display: block; }
.game-card__name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.game-card__meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo img {
  height: 64px;
  width: 64px;
  border-radius: 50%;
}

.auth-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ── Dashboard Stats ──────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 480px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.stat-card__label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-card__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-light);
}

.stat-card__sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ── Game Interface ───────────────────────────────────────── */
.game-arena {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.game-result {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  background: var(--bg-deep);
  border: 1px solid var(--border);
}

.game-result.win {
  border-color: var(--green-dim);
  background: rgba(0,200,83,0.05);
}

.game-result.loss {
  border-color: var(--red-dim);
  background: rgba(229,57,53,0.05);
}

.result-value {
  font-size: 36px;
  font-weight: 800;
}

.result-value.win { color: var(--green); }
.result-value.loss { color: var(--red); }

.bet-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bet-quick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bet-quick-btn {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.bet-quick-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── Wallet ───────────────────────────────────────────────── */
.wallet-balance {
  background: linear-gradient(135deg, #0d1a2e, #1a2a4a);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.wallet-balance::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(201,168,76,0.1) 0%, transparent 70%);
}

.wallet-balance__label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.wallet-balance__amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: -1px;
}

.wallet-balance__currency { font-size: 16px; color: var(--gold-dim); margin-left: 6px; }

.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

/* ── KYC Status ───────────────────────────────────────────── */
.kyc-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid;
  margin-bottom: 16px;
  font-size: 13px;
}

.kyc-status--pending  { border-color: #f57c00; background: rgba(245,124,0,0.1); color: #ffb74d; }
.kyc-status--approved { border-color: var(--green-dim); background: rgba(0,200,83,0.1); color: var(--green); }
.kyc-status--rejected { border-color: var(--red-dim); background: rgba(229,57,53,0.1); color: var(--red); }
.kyc-status--submitted { border-color: var(--blue); background: rgba(30,136,229,0.1); color: #82b1ff; }

/* ── Roulette ─────────────────────────────────────────────── */
.roulette-wheel {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid var(--gold);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 800;
  transition: all 0.5s;
  background: radial-gradient(circle, #1a2a1a 0%, #0a150a 100%);
  box-shadow: 0 0 30px rgba(201,168,76,0.3), inset 0 0 30px rgba(0,0,0,0.5);
  position: relative;
}

.roulette-wheel.spinning {
  animation: roulette-spin 3s cubic-bezier(0.1,0.5,0.1,1) forwards;
}

@keyframes roulette-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(1440deg); }
}

.roulette-number { font-size: 42px; font-weight: 900; color: white; }
.roulette-number.red-num { color: #ef5350; text-shadow: 0 0 10px rgba(239,83,80,0.5); }
.roulette-number.black-num { color: #e8eaf6; }
.roulette-number.zero-num { color: var(--green); text-shadow: 0 0 10px rgba(0,200,83,0.5); }

/* ── Mines Grid ───────────────────────────────────────────── */
.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-width: 320px;
  margin: 0 auto;
}

.mine-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.mine-cell:hover:not(.revealed):not(.mine) {
  border-color: var(--gold-dim);
  background: rgba(201,168,76,0.08);
  transform: scale(1.05);
}

.mine-cell.revealed {
  background: linear-gradient(135deg, #0d2a0d, #1a3a1a);
  border-color: var(--green-dim);
  cursor: default;
}

.mine-cell.mine {
  background: linear-gradient(135deg, #2a0d0d, #3a1a1a);
  border-color: var(--red-dim);
  cursor: default;
  animation: mine-explode 0.3s ease;
}

@keyframes mine-explode {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ── Blackjack Cards ──────────────────────────────────────── */
.bj-hand {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
  min-height: 80px;
}

.playing-card {
  width: 52px;
  height: 72px;
  background: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.playing-card.red-card { color: #c62828; }
.playing-card.hidden-card { background: linear-gradient(135deg, #1a237e, #283593); color: white; font-size: 20px; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}

.page-btn.active, .page-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── Section Headers ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--gold);
  border-radius: 2px;
}

/* ── Slots ────────────────────────────────────────────────── */
.slot-machine {
  background: var(--bg-deep);
  border: 2px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.slot-reels {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 16px 0;
}

.slot-reel {
  width: 72px;
  height: 80px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.slot-reel.spinning {
  animation: reel-spin 0.1s linear infinite;
}

@keyframes reel-spin {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

/* ── Loader ───────────────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Admin Layout ─────────────────────────────────────────── */
.admin-layout .main-content {
  background: #09111c;
  min-height: 100vh;
}

.admin-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-dark);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .admin-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Utility Classes ──────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-gold    { color: var(--gold-light); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-muted   { color: var(--text-secondary); }
.text-xs      { font-size: 11px; }
.text-sm      { font-size: 12px; }
.fw-bold      { font-weight: 700; }
.mt-1  { margin-top: 4px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 12px; }
.mt-4  { margin-top: 16px; }
.mb-1  { margin-bottom: 4px; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 12px; }
.mb-4  { margin-bottom: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Responsive ───────────────────────────────────────────── */
@media (min-width: 768px) {
  .main-content { padding: 20px 24px; }
  .games-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Coin Flip ────────────────────────────────────────────── */
.coin {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  perspective: 600px;
}

.coin-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.coin.flipping .coin-inner {
  animation: coin-flip 1.5s ease forwards;
}

@keyframes coin-flip {
  0%   { transform: rotateY(0); }
  100% { transform: rotateY(1080deg); }
}

.coin-face, .coin-back {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  backface-visibility: hidden;
}

.coin-face {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border: 3px solid var(--gold-light);
}

.coin-back {
  background: linear-gradient(135deg, #555, #888);
  border: 3px solid #aaa;
  transform: rotateY(180deg);
}

/* ── Dice ─────────────────────────────────────────────────── */
.dice {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: all 0.3s;
}

.dice.rolling {
  animation: dice-roll 0.5s ease;
}

@keyframes dice-roll {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25%  { transform: rotate(15deg) scale(1.1); }
  75%  { transform: rotate(-15deg) scale(1.1); }
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Cookie Banner ────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: var(--bnav-h);
  left: 0; right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 95;
  font-size: 12px;
}

.cookie-banner p { flex: 1; color: var(--text-secondary); }
.cookie-banner a { color: var(--gold); }
