:root {
  --bg: #050a08;
  --felt: #0d3d2e;
  --panel: rgba(8, 22, 18, 0.82);
  --line: rgba(212, 175, 55, 0.18);
  --text: #f4f7f5;
  --muted: #8fb5a3;
  --gold: #d4af37;
  --green: #22c55e;
  --red: #ef4444;
  --max: 1280px;
  --radius: 16px;
  --hh: 78px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
.site-bg { position: fixed; inset: 0; z-index: -10; overflow: hidden; }
.bg-felt {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34, 197, 94, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(212, 175, 55, 0.08), transparent 50%),
    linear-gradient(180deg, #050a08 0%, var(--felt) 45%, #050a08 100%);
}
.bg-pattern {
  position: absolute; inset: 0; opacity: 0.025;
  background-image: repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 0, transparent 50%);
  background-size: 12px 12px;
}
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--hh);
  background: rgba(5, 10, 8, 0.92); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), #8b6914);
  display: grid; place-items: center; font-weight: 900; font-size: 0.75rem; color: #1a1200;
}
.brand-text strong {
  display: block; font-size: 0.9rem; font-weight: 800; color: var(--gold);
  font-family: Orbitron, sans-serif;
}
.brand-text span { font-size: 0.7rem; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--muted); font-weight: 600; font-size: 0.88rem;
  padding: 7px 14px; border-radius: 8px; transition: color 0.2s, background 0.2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--gold); background: rgba(212, 175, 55, 0.08); }
.wallet-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px 6px 6px;
}
.wallet-pill .coin-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #fde68a, var(--gold));
  color: #1a1200; font-weight: 900; font-size: 0.65rem;
  display: grid; place-items: center;
}
.wallet-pill strong { font-size: 0.9rem; color: var(--gold); }
.wallet-pill span { font-size: 0.72rem; color: var(--muted); }
.btn-gold {
  background: linear-gradient(135deg, #fde68a, var(--gold));
  color: #1a1200; font-weight: 800; font-size: 0.82rem;
  padding: 8px 16px; border-radius: 20px; border: none; cursor: pointer;
}
.btn-ghost {
  background: transparent; color: var(--gold); font-weight: 700; font-size: 0.82rem;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer;
}
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.hero {
  min-height: 42vh; display: flex; align-items: center;
  padding: calc(var(--hh) + 48px) 0 48px; text-align: center;
}
.hero .container { width: 100%; }
.eyebrow {
  display: inline-block; color: var(--gold); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 12px;
}
.hero h1 {
  font-family: Orbitron, Inter, sans-serif;
  font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; margin-bottom: 14px;
}
.hero p { color: var(--muted); font-size: 0.98rem; max-width: 620px; margin: 0 auto 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.legal-strip {
  margin-top: 20px; font-size: 0.78rem; color: var(--muted);
  background: rgba(0,0,0,0.25); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 16px; display: inline-block;
}
.section { padding: 64px 0; }
.section-header { text-align: center; margin-bottom: 36px; }
.section-header h2 {
  font-family: Orbitron, Inter, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 700;
}
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;
}
.game-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(212, 175, 55, 0.45); }
.game-card--live { cursor: pointer; }
.game-card--soon { opacity: 0.72; }
.game-cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.game-card h3 { font-size: 1.1rem; margin: 8px 0 6px; font-family: Orbitron, Inter, sans-serif; }
.game-card p { font-size: 0.84rem; color: var(--muted); margin-bottom: 14px; }
.badge {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 20px; text-transform: uppercase;
}
.badge--live { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.35); }
.badge--soon { background: rgba(212, 175, 55, 0.12); color: var(--gold); border: 1px solid var(--line); }
.flip-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; max-width: 520px; margin: 0 auto; text-align: center;
}
.flip-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.flip-controls button {
  min-width: 110px; padding: 12px 18px; border-radius: 10px; font-weight: 700;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--text); cursor: pointer;
}
.flip-controls button.selected { border-color: var(--gold); background: rgba(212, 175, 55, 0.15); color: var(--gold); }
.bet-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.bet-row button {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-weight: 700; cursor: pointer;
}
.bet-row button.active { color: var(--gold); border-color: var(--gold); }
.flip-result { min-height: 1.5rem; font-weight: 700; margin-top: 12px; }
.flip-result--win { color: #4ade80; }
.flip-result--lose { color: #f87171; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.65);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 420px; background: #0a1612; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.modal h2 { font-family: Orbitron, Inter, sans-serif; font-size: 1.2rem; margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 0.88rem; margin-bottom: 18px; }
.modal label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.modal input {
  width: 100%; margin-bottom: 14px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(0,0,0,0.35); color: var(--text);
}
.modal-error { color: #f87171; font-size: 0.82rem; min-height: 1.2rem; margin-bottom: 8px; }
.customize-note {
  background: rgba(212, 175, 55, 0.06); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-top: 12px;
}
.customize-note h3 { font-size: 1rem; margin-bottom: 10px; color: var(--gold); }
.customize-note ul { margin-left: 18px; color: var(--muted); font-size: 0.88rem; }
.customize-note li { margin-bottom: 6px; }
.site-footer {
  border-top: 1px solid var(--line); padding: 28px 0; margin-top: 40px;
  color: var(--muted); font-size: 0.82rem;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
@media (max-width: 720px) {
  .site-nav { display: none; }
  .wallet-pill span.player-name { display: none; }
}
.auth-tabs { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.auth-tab { flex:1; padding:8px 10px; border-radius:8px; border:1px solid var(--line); background:transparent; color:var(--muted); font-weight:700; cursor:pointer; }
.auth-tab.active { color:var(--gold); border-color:var(--gold); background:rgba(212,175,55,0.1); }
.shop-note { text-align:center; color:var(--muted); margin-bottom:20px; }
.shop-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.shop-card { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:18px; display:flex; flex-direction:column; gap:8px; }
.shop-card strong { color:var(--gold); }
.shop-card span { font-size:1.1rem; font-weight:800; }
.shop-card em { font-size:0.78rem; color:var(--muted); font-style:normal; }
#wallet-guest { display:flex; gap:8px; align-items:center; }

.bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 35%;
  filter: brightness(0.72) saturate(0.95) contrast(1.05);
  transform: scale(1.02);
}
.bg-felt {
  background:
    radial-gradient(ellipse 90% 70% at 50% 20%, rgba(34, 197, 94, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(5, 10, 8, 0.45) 0%, rgba(5, 10, 8, 0.35) 45%, rgba(5, 10, 8, 0.65) 100%);
  mix-blend-mode: multiply;
}
.bg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(5, 10, 8, 0.2) 55%, rgba(5, 10, 8, 0.75) 100%);
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.65);
}

.shop-price { font-size:1.1rem; font-weight:800; }
.shop-buy {
  margin-top:8px; padding:10px 14px; border:none; border-radius:8px;
  background:linear-gradient(135deg,#ffc439,#f5a623); color:#111;
  font-weight:800; cursor:pointer; font-size:0.9rem;
}
.shop-buy:hover:not(:disabled) { filter:brightness(1.05); }
.shop-buy:disabled { opacity:0.7; cursor:wait; }
.shop-soon { font-size:0.78rem; color:var(--muted); font-style:normal; }
.shop-note--success { color:#4ade80; }
.shop-note--warn { color:#fbbf24; }
.shop-note--pending { color:var(--gold); }
