/* ============================================================
   ROYALCASHWIN CASINO — styles.css
   Color palette: 
     --bg:        #0d0d10  (deep charcoal)
     --surface:   #16161c  (card surfaces)
     --surface2:  #1e1e28  (elevated surfaces)
     --border:    #2a2a38
     --gold:      #d4a017  (primary brand)
     --gold-light:#f0c040
     --silver:    #a0aec0
     --text:      #e8e6e1
     --text-muted:#888899
============================================================ */

:root {
  --bg:          #0d0d10;
  --surface:     #16161c;
  --surface2:    #1e1e28;
  --border:      #2a2a38;
  --gold:        #d4a017;
  --gold-light:  #f0c040;
  --gold-dim:    #8a6610;
  --silver:      #a0aec0;
  --red:         #e53e3e;
  --green:       #38a169;
  --text:        #e8e6e1;
  --text-muted:  #888899;
  --radius:      10px;
  --radius-lg:   16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ── Utility ────────────────────────────────────────────── */
.gold-text   { color: var(--gold-light); }
.silver-text { color: var(--silver); }

/* ============================================================
   HEADER
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,16,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-crown {
  font-size: 26px;
  color: var(--gold);
  line-height: 1;
}
.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}
.logo-badge {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: -2px;
}

/* Nav */
.main-nav {
  display: flex;
  gap: 4px;
}
.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.nav-btn:hover { color: var(--text); background: var(--surface2); }
.nav-btn.active { color: var(--gold-light); background: rgba(212,160,23,0.12); }

/* Header Wallet */
.header-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.wallet-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 600;
}
.wallet-chip.gold { border-color: rgba(212,160,23,0.4); }
.wallet-chip.gold .chip-icon { color: var(--gold-light); }
.wallet-chip.silver { border-color: rgba(160,174,192,0.3); }
.wallet-chip.silver .chip-icon { color: var(--silver); }
.chip-icon { font-size: 12px; }
.chip-amount { min-width: 40px; text-align: right; }

.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--surface2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, transform 0.15s;
}
.avatar-btn:hover { border-color: var(--gold-light); transform: scale(1.05); }
.avatar-letter {
  font-size: 16px;
  line-height: 1;
}

/* ============================================================
   TICKER BAR
============================================================ */
.ticker-bar {
  background: rgba(212,160,23,0.06);
  border-bottom: 1px solid rgba(212,160,23,0.15);
  height: 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker-label {
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 0 4px 4px 0;
  flex-shrink: 0;
  margin-right: 12px;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ticker-inner {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
  font-size: 13px;
  color: var(--text-muted);
}
.ticker-inner .ticker-item { flex-shrink: 0; }
.ticker-inner .ticker-item strong { color: var(--gold-light); }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   MAIN / VIEWS
============================================================ */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.view { display: none; }
.view.active { display: block; }

/* ============================================================
   WELCOME BANNER
============================================================ */
.welcome-banner {
  background: linear-gradient(135deg, #16141a 0%, #1e1a10 100%);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,160,23,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.welcome-title {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.2;
}
.welcome-sub { color: var(--text-muted); font-size: 15px; }
.welcome-bonus-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.daily-timer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   FILTER TABS
============================================================ */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.filter-tab:hover { border-color: var(--gold-dim); color: var(--text); }
.filter-tab.active {
  background: rgba(212,160,23,0.12);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ============================================================
   GAME GRID / CARDS
============================================================ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  cursor: pointer;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,160,23,0.5);
  box-shadow: 0 8px 32px rgba(212,160,23,0.1);
}
.game-card.hidden { display: none; }

.game-card-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}
.new-badge { background: var(--green); color: #fff; }

.game-card-art {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
  overflow: hidden;
}
.slots-art  { background: linear-gradient(135deg, #1a0a2e, #2d1060); }
.scratch-art{ background: linear-gradient(135deg, #0a1a1a, #0d3030); }
.wheel-art  { background: linear-gradient(135deg, #1a1200, #3d2e00); }
.coin-art   { background: linear-gradient(135deg, #1a1000, #302000); }

.slot-preview, .scratch-preview {
  display: flex;
  gap: 10px;
  background: rgba(0,0,0,0.5);
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 28px;
  letter-spacing: 4px;
}
.wheel-preview-icon {
  font-size: 60px;
  color: var(--gold);
  animation: wheelRotateSlow 8s linear infinite;
}
.coin-preview {
  font-size: 60px;
  color: var(--gold-light);
  animation: coinBob 2s ease-in-out infinite;
}

@keyframes wheelRotateSlow {
  to { transform: rotate(360deg); }
}
@keyframes coinBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-8px) scale(1.05); }
}

.game-card-info { padding: 16px; }
.game-card-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.game-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-rtp {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  padding: 9px 20px;
  font-size: 14px;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
}
.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-light), #ffd060);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,160,23,0.35);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover:not(:disabled) { border-color: var(--gold-dim); color: var(--text); }
.btn-play {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 8px;
}
.btn-play:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-play.secondary { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }
.btn-play.secondary:hover { border-color: var(--gold-dim); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-pulse {
  animation: btnPulse 2.5s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,160,23,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(212,160,23,0); }
}

/* ============================================================
   SECTION HEADER
============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-light);
}

/* ============================================================
   LEADERBOARD
============================================================ */
.lb-tabs {
  display: flex;
  gap: 6px;
}
.lb-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.lb-tab.active { background: rgba(212,160,23,0.12); border-color: var(--gold); color: var(--gold-light); }

.lb-table-wrap {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.lb-table {
  width: 100%;
  border-collapse: collapse;
}
.lb-table th {
  background: var(--surface2);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}
.lb-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.lb-table tr:hover td { background: rgba(255,255,255,0.02); }
.lb-table tr.me td { background: rgba(212,160,23,0.06); }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
}
.rank-1 { background: var(--gold); color: #000; }
.rank-2 { background: var(--silver); color: #000; }
.rank-3 { background: #cd7f32; color: #fff; }
.rank-n { background: var(--surface2); color: var(--text-muted); }

.player-title {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(212,160,23,0.12);
  color: var(--gold-light);
  border: 1px solid rgba(212,160,23,0.2);
}

/* ============================================================
   PROFILE
============================================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  grid-column: 1 / -1;
}
.profile-avatar-wrap { flex-shrink: 0; text-align: center; }
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: var(--surface2);
  margin-bottom: 8px;
}
.profile-badge {
  font-size: 11px;
  padding: 3px 10px;
  background: rgba(212,160,23,0.12);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 10px;
  color: var(--gold-light);
  white-space: nowrap;
}
.profile-username {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.profile-member {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.stats-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  margin-bottom: 4px;
}
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.wallet-card, .achievements-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.wallet-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--gold-light);
}
.wallet-balances { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.balance-row { display: flex; justify-content: space-between; align-items: center; }
.balance-label { font-size: 14px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.balance-amount { font-size: 22px; font-weight: 700; font-family: 'Cinzel', serif; }

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.achievement {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  transition: border-color 0.2s;
}
.achievement.unlocked { border-color: rgba(212,160,23,0.4); }
.achievement.locked { opacity: 0.45; filter: grayscale(1); }
.ach-icon { font-size: 28px; margin-bottom: 6px; display: block; }
.ach-name { font-size: 11px; font-weight: 600; color: var(--text); display: block; margin-bottom: 2px; }
.ach-desc { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   MODALS
============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: var(--surface);
  border: 1px solid rgba(212,160,23,0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease;
}
.modal-sm { max-width: 380px; }

@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 20px;
  text-align: center;
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

/* ── SLOTS ────────────────────────────────────────────────── */
.slots-machine {
  margin: 0 auto 16px;
  width: fit-content;
  position: relative;
}
.reels-window {
  display: flex;
  gap: 6px;
  background: #000;
  border: 3px solid var(--gold);
  border-radius: 12px;
  padding: 8px;
  overflow: hidden;
  height: 110px;
}
.reel-col {
  width: 68px;
  overflow: hidden;
  position: relative;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
}
.reel-strip {
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: transform 0.1s linear;
}
.reel-symbol {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  user-select: none;
}
.payline {
  position: absolute;
  left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 3px;
  background: rgba(212,160,23,0.6);
  pointer-events: none;
  border-radius: 2px;
}
.slots-result, .scratch-result, .coin-result, .wheel-result {
  text-align: center;
  min-height: 28px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-muted);
}
.result-win  { color: var(--gold-light) !important; }
.result-lose { color: var(--text-muted) !important; }

.slots-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.bet-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bet-display {
  font-size: 14px;
  min-width: 100px;
  text-align: center;
}

/* ── SCRATCH ──────────────────────────────────────────────── */
.scratch-cost-row {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.scratch-area {
  position: relative;
  width: 320px;
  margin: 0 auto 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
}
#scratchCanvas {
  position: absolute;
  top: 0; left: 0;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23d4a017' opacity='0.8'/%3E%3C/svg%3E") 12 12, crosshair;
  border-radius: var(--radius);
  z-index: 2;
}
.scratch-prizes {
  height: 200px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--surface2);
}
.scratch-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 28px;
  padding: 8px;
}
.scratch-cell-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
}
.scratch-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

/* ── WHEEL ────────────────────────────────────────────────── */
.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}
.wheel-pointer {
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
  margin-bottom: -6px;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(212,160,23,0.6));
}
#wheelCanvas {
  border-radius: 50%;
  border: 4px solid var(--gold);
  box-shadow: 0 0 32px rgba(212,160,23,0.25);
}
.wheel-timer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  min-height: 20px;
}

/* ── COIN FLIP ────────────────────────────────────────────── */
.coin-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  perspective: 600px;
}
.coin {
  width: 100px; height: 100px;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform 0.1s;
  position: relative;
}
.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  backface-visibility: hidden;
}
.coin-heads {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
}
.coin-tails {
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  color: var(--silver);
  transform: rotateY(180deg);
  border: 2px solid var(--border);
}
.coin.flipping {
  animation: coinFlip 1.2s ease-in-out;
}
@keyframes coinFlip {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(1080deg); }
}
.coin.heads { transform: rotateY(0deg); }
.coin.tails { transform: rotateY(180deg); }

.coin-controls { display: flex; flex-direction: column; gap: 12px; }
.coin-pick-row { display: flex; gap: 10px; }
.coin-pick { flex: 1; }
.coin-pick.active {
  background: rgba(212,160,23,0.12);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ── PAYTABLE ─────────────────────────────────────────────── */
.paytable {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}
.pt-row:first-child span:last-child { font-size: 14px; }

/* ── FORM ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 7px;
  font-weight: 500;
}
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--gold-dim); }

.avatar-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.avatar-option {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.avatar-option:hover { transform: scale(1.1); border-color: var(--gold-dim); }
.avatar-option.selected { border-color: var(--gold); background: rgba(212,160,23,0.1); }

/* ============================================================
   TOAST
============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 14px;
  color: var(--text);
  max-width: 300px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}
.toast.toast-win  { border-left-color: var(--gold); }
.toast.toast-loss { border-left-color: var(--text-muted); }
.toast.toast-error{ border-left-color: var(--red); }
.toast.toast-info { border-left-color: #4a90e2; }
.toast.hiding { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0);    opacity: 1; } to { transform: translateX(110%); opacity: 0; } }

/* ============================================================
   WIN OVERLAY
============================================================ */
.win-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 800;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.win-overlay.show { display: flex; animation: fadeIn 0.2s; }
.win-box {
  text-align: center;
  animation: winBounce 0.5s cubic-bezier(0.22,1,0.36,1);
}
.win-title {
  font-family: 'Cinzel', serif;
  font-size: 52px;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(212,160,23,0.8);
  margin-bottom: 12px;
}
.win-amount {
  font-family: 'Cinzel', serif;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}
.win-coins {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 32px;
  animation: coinsFloat 1s ease-out;
}
@keyframes winBounce {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes coinsFloat {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ============================================================
   FEATURES SECTION
============================================================ */
.features-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 20px;
}
.features-container {
  max-width: 1200px;
  margin: 0 auto;
}
.features-title {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 40px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(212,160,23,0.4);
  transform: translateY(-4px);
}
.feature-icon {
  font-size: 40px;
  color: var(--gold);
  margin-bottom: 16px;
}
.feature-name {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   HOW TO PLAY SECTION
============================================================ */
.howto-section {
  background: var(--bg);
  padding: 60px 20px;
}
.howto-container {
  max-width: 1200px;
  margin: 0 auto;
}
.howto-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step-counter;
}
.howto-step {
  position: relative;
  padding: 24px 20px;
  text-align: center;
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   RESPONSIBLE GAMING SECTION
============================================================ */
.responsible-section {
  background: linear-gradient(135deg, #1a1008 0%, #0d0d10 100%);
  border-top: 1px solid rgba(212,160,23,0.2);
  border-bottom: 1px solid rgba(212,160,23,0.2);
  padding: 40px 20px;
}
.responsible-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.responsible-badge {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.2);
}
.responsible-content {
  flex: 1;
}
.responsible-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 10px;
}
.responsible-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.responsible-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.responsible-link {
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.responsible-link:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 20px 24px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand {
  max-width: 260px;
}
.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
}
.footer-links {
  display: flex;
  gap: 48px;
}
.footer-col {}
.footer-heading {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-list a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-list a:hover {
  color: var(--text);
}
.footer-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}
.footer-bottom {
  text-align: center;
}
.footer-age-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(229,62,62,0.08);
  border: 1px solid rgba(229,62,62,0.2);
  border-radius: var(--radius);
}
.age-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.age-text {
  font-size: 13px;
  color: var(--text-muted);
  text-align: left;
}
.footer-disclaimer {
  margin-bottom: 16px;
}
.footer-disclaimer p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}
.footer-help {
  margin-bottom: 20px;
  padding: 14px 20px;
  background: rgba(212,160,23,0.06);
  border: 1px solid rgba(212,160,23,0.15);
  border-radius: var(--radius);
  display: inline-block;
}
.footer-help p {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-help strong {
  color: var(--gold-light);
}
.footer-copy p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .header-inner { padding: 0 14px; }
  .logo-text { font-size: 15px; }
  .main-nav { display: none; }
  .site-main { padding: 16px 14px 60px; }
  .welcome-banner { flex-direction: column; padding: 22px 20px; text-align: center; }
  .welcome-title { font-size: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; text-align: center; }
  .stats-grid { grid-column: 1; }
  .wallet-card, .achievements-card { grid-column: 1; }
  .modal-box { padding: 20px 16px; }
  .scratch-area { width: 100%; }
  #scratchCanvas { position: absolute; }
  
  /* Features responsive */
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .features-title { font-size: 22px; }
  .features-section { padding: 40px 16px; }
  
  /* How to play responsive */
  .howto-steps { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .howto-section { padding: 40px 16px; }
  
  /* Responsible section responsive */
  .responsible-container { flex-direction: column; text-align: center; }
  .responsible-badge { width: 64px; height: 64px; font-size: 22px; }
  .responsible-links { justify-content: center; }
  
  /* Footer responsive */
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-brand { max-width: 100%; text-align: center; }
  .footer-brand .logo { justify-content: center; }
  .footer-links { flex-wrap: wrap; gap: 24px; justify-content: center; }
  .footer-col { min-width: 140px; text-align: center; }
  .footer-age-warning { flex-direction: column; text-align: center; }
  .age-text { text-align: center; }
}

@media (max-width: 480px) {
  .game-grid { grid-template-columns: 1fr; }
  .wallet-chip .chip-amount { min-width: 30px; font-size: 13px; }
  .win-title { font-size: 36px; }
  .win-amount { font-size: 26px; }
  
  /* Features on small screens */
  .features-grid { grid-template-columns: 1fr; }
  .howto-steps { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 20px; }
}

/* Bottom nav for mobile */
@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding: 8px 0;
  }
  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
  }
  .mobile-nav-btn .mn-icon { font-size: 20px; line-height: 1; }
  .mobile-nav-btn.active { color: var(--gold-light); }
}
