:root {
  --bg: #0f131a;
  --bg-2: #121824;
  --text: #e8f0ff;
  --muted: #a9b7d0;
  --accent: #6aa8ff;
  --green: #3bdc7f;
  --gold: #ffd466;
  --card: #1a2131;
  --card-2: #20283a;
  --shadow: rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  /* Smoother overall background with gentle bottom blend */
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 900px at 12% 10%, #121a2c 0%, #101624 55%, #0d121b 78%, #0b0f14 100%),
    linear-gradient(180deg, rgba(42,127,255,0.08) 0%, rgba(42,127,255,0.02) 55%, rgba(12,16,22,0.85) 100%);
  background-blend-mode: normal, soft-light;
  background-attachment: fixed;
}

/* Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #0f131a 0%, #121824 40%, #101621 100%);
  border-bottom: 1px solid rgba(58, 114, 200, 0.35);
  box-shadow: 0 2px 0 rgba(58,114,200,0.25) inset, 0 10px 24px rgba(0,0,0,0.35);
}
.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.topbar .brand { font-weight: 800; letter-spacing: 0.6px; color: var(--text); font-size: 18px; }
.topbar .brand .accent { color: var(--accent); text-shadow: 0 1px 12px rgba(106,168,255,0.35); }
.topnav { display: flex; justify-content: center; gap: 26px; }
.topnav a {
  color: #cfe3ff;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
}
.topnav a svg { opacity: 0.9; width: 16px; height: 16px; }
.topnav a:hover { color: var(--accent); opacity: 1; }
.topnav a.active { color: #fff; position: relative; }
.topnav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -12px;
  width: 36px;
  height: 2px;
  background: #2a7fff;
  border-radius: 2px;
}

.page-header {
  text-align: center;
  padding: 56px 16px 22px;
}
.page-header h1 { font-weight: 800; margin: 0; letter-spacing: 0.3px; }
.page-header .accent { color: var(--accent); text-shadow: 0 1px 12px rgba(106,168,255,0.35); }
/* old pill nav removed */
.controls { margin-top: 10px; color: var(--muted); }
.controls select {
  margin-left: 8px;
  background: var(--card);
  color: var(--text);
  border: 1px solid #2b3550;
  border-radius: 8px;
  padding: 8px 10px;
}
.controls .id-entry { margin-left: 16px; display: inline-flex; align-items: center; gap: 8px; }
.controls input {
  background: var(--card);
  color: var(--text);
  border: 1px solid #2b3550;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 220px;
}
.controls button, .table-actions button {
  background: #2a3a5f;
  color: var(--text);
  border: 1px solid #385080;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
.controls button:hover, .table-actions button:hover { filter: brightness(1.1); }

.content { max-width: 980px; margin: 0 auto; padding: 16px; }

/* Bonuses Section */
.bonuses { margin-top: 8px; }
.bonuses-title { text-align: center; font-weight: 800; font-size: 28px; margin: 8px 0 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.bonuses-subtitle { text-align: center; color: var(--muted); margin: 0 0 16px; }
.bonus-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .bonus-grid { grid-template-columns: 1fr; } }
/* Multi-row grids for bonuses */
.bonus-grid.top { grid-template-columns: 1fr; }
.bonus-grid.bottom { grid-template-columns: 1fr; }
@media (min-width: 640px) { .bonus-grid.top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .bonus-grid.top { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 900px) { .bonus-grid.bottom { grid-template-columns: 1fr 1fr; } }
/* Extra spacing between cards and rows */
.bonus-grid.top { gap: 22px; margin-bottom: 18px; }
.bonus-grid.bottom { gap: 22px; }

/* Make bonus cards more square and centered */
.bonuses .bonus-grid { justify-items: stretch; }
.bonuses .bonus-card {
  width: 100%;
  max-width: none;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
@media (max-width: 520px) {
  .bonuses .bonus-card { min-height: 280px; }
}
.bonus-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid #2a344e;
  border-radius: 14px;
  box-shadow: 0 12px 26px var(--shadow);
  padding: 18px 16px 16px;
}
.bonuses .card-header { margin-bottom: 4px; }
.bonuses .card-actions { display: flex; gap: 10px; }
.bonus-card .card-header { color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0.8px; margin-bottom: 8px; display: inline-flex; align-items: center; gap: 8px; }
.card-logo { width: 22px; height: 22px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35)); }
.card-logo.chips { width: 28px; height: 28px; }
.bonus-card h3 { margin: 4px 0 6px; font-weight: 800; font-size: 20px; color: #cfe3ff; text-transform: uppercase; letter-spacing: 0.4px; }
.bonus-card p { margin: 0 0 12px; color: var(--muted); }
.reward-list { margin: 0 0 12px; color: var(--muted); padding-left: 18px; }
.reward-list li { margin: 4px 0; }

/* Rewards page specific layout: centered 2-up grid and larger cards */
.rewards-page .bonus-grid.top { grid-template-columns: 1fr; justify-items: center; }
@media (min-width: 720px) { .rewards-page .bonus-grid.top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .rewards-page .bonus-grid.top { grid-template-columns: 1fr 1fr; } }
.rewards-page .bonus-card { max-width: 520px; min-height: 300px; padding: 22px 20px 18px; }
.rewards-page .bonus-card h3 { font-size: 24px; }
.rewards-page .card-logo { width: 30px; height: 30px; }
.rewards-page .card-logo.chips { width: 34px; height: 34px; }

/* Home hero */
.hero { text-align: center; padding: 84px 16px 36px; position: relative; }
.hero h1 { font-size: 56px; font-weight: 800; letter-spacing: 0.6px; color: #fff; margin: 0 0 10px; }
.hero-title { font-size: 72px; text-transform: uppercase; background: linear-gradient(90deg, #cfe3ff 0%, #8ab6ff 35%, #ffd466 60%, #cfe3ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 6px 24px rgba(42,127,255,0.25); animation: glowShift 6s ease-in-out infinite; }
.hero-decor img { position: absolute; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.45)); will-change: transform; animation: floatHero 7s ease-in-out infinite; opacity: 0.95; }
.hero-decor .d1 { left: 8%; top: -20px; width: 160px; animation-duration: 7.6s; }
.hero-decor .d2 { right: 10%; top: 0; width: 150px; animation-duration: 7s; }
.hero-decor .d3 { left: 14%; bottom: -10px; width: 140px; animation-duration: 8s; }
.hero-decor .d4 { right: 12%; bottom: -20px; width: 150px; animation-duration: 7.4s; }
.hero-ctas { display: flex; justify-content: center; gap: 14px; margin-top: 16px; }
.scroll-hint { margin-top: 24px; font-size: 12px; letter-spacing: 0.6px; color: var(--muted); animation: pulseHint 2.4s ease-in-out infinite; }
.hero-ctas .btn { transition: transform 0.15s ease, box-shadow 0.2s ease; }
.hero-ctas .btn:hover { transform: translateY(-1px); }
.hero-ctas .btn-primary { box-shadow: 0 10px 22px rgba(42,127,255,0.40); }
.hero-ctas .btn-secondary { box-shadow: 0 8px 18px rgba(0,0,0,0.35); }

@keyframes glowShift { 0% { text-shadow: 0 6px 24px rgba(42,127,255,0.25); } 50% { text-shadow: 0 6px 24px rgba(255,212,102,0.35); } 100% { text-shadow: 0 6px 24px rgba(42,127,255,0.25); } }
@keyframes floatHero { 0% { transform: translateY(0) } 50% { transform: translateY(-18px) } 100% { transform: translateY(0) } }
@keyframes pulseHint { 0% { opacity: 0.7 } 50% { opacity: 1 } 100% { opacity: 0.7 } }

@media (max-width: 800px) {
  .hero-title { font-size: 44px; }
  .hero-decor .d1, .hero-decor .d4 { display: none; }
  .hero-decor .d2 { right: 6%; top: 0; width: 110px; }
  .hero-decor .d3 { left: 6%; bottom: -10px; width: 110px; }
}
.hero .hero-sub { color: var(--muted); max-width: 760px; margin: 0 auto 16px; }
.hero-ctas { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.scroll-hint { margin-top: 20px; font-size: 12px; letter-spacing: 0.6px; color: var(--muted); }
.bonus-card.wide { grid-column: span 1; }
@media (min-width: 800px) { .bonus-card.wide { grid-column: span 1; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 700; border-radius: 10px; padding: 10px 14px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: #2a7fff; color: #fff; border-color: #2267d6; box-shadow: 0 6px 14px rgba(42,127,255,0.35); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: #1f2b45; color: #cfe3ff; border-color: #2a344e; }
.btn-secondary:hover { filter: brightness(1.06); }

.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; align-items: end; margin-top: 20px; }
.podium-card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid #2a344e;
  border-radius: 14px;
  box-shadow: 0 16px 34px var(--shadow);
  padding: 32px 20px 34px;
  text-align: center;
  position: relative;
  min-height: 320px;
}
.podium-card .crown { position: absolute; top: -32px; left: 50%; transform: translateX(-50%); height: 74px; }
.podium-card .avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid #2f3b5f; }
.podium-card .name { margin-top: 10px; font-weight: 700; font-size: 19px; }
.podium-card .wager { margin-top: 6px; color: var(--muted); font-size: 16px; }
.podium-card .prize { margin-top: 12px; font-weight: 800; color: var(--gold); font-size: 28px; display: inline-block; padding: 8px 14px; border-radius: 12px; background: rgba(255,212,102,0.12); border: 1px solid rgba(255,212,102,0.35); text-shadow: 0 2px 16px rgba(255,212,102,0.50); }
.podium .first { transform: translateY(-22px); }
/* Push down second and third slightly for clearer tier separation */
.podium .second, .podium .third { transform: translateY(8px); }

.timer { display: flex; justify-content: center; margin: 18px 0 20px; }
.timer-inner {
  background: var(--card);
  border: 1px solid #2a344e;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 6px 16px var(--shadow);
}
.timer .label { text-transform: uppercase; font-size: 12px; color: var(--muted); margin-right: 8px; }
.timer #countdown { font-weight: 800; letter-spacing: 0.5px; }

.table-wrap { background: transparent; margin-top: 36px; }
.lb-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid #2a344e; border-radius: 12px; overflow: hidden; }
.lb-table thead th { font-weight: 700; text-align: left; color: var(--muted); padding: 12px; background: #161d2c; }
.lb-table tbody td { padding: 12px; border-top: 1px solid #24314f; }
.lb-table tbody tr:hover { background: #1b2335; }
.lb-table .rank { color: var(--muted); }
.lb-table .user { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.lb-table .avatar-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid #3a4a72; }
.lb-table .wagered { color: #cfe3ff; }
.lb-table .prize { color: var(--green); font-weight: 700; text-shadow: 0 0 10px rgba(59,220,127,0.35); }

.status { text-align: center; color: var(--muted); padding: 14px; }
.table-actions { display: flex; justify-content: center; padding: 12px; }
.skeleton { background: linear-gradient(90deg, #1c2436 25%, #202a40 50%, #1c2436 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; color: transparent; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Stats Panel */
/* Stats panel styles removed per request */

/* Section divider */
.section-divider { height: 1px; max-width: 720px; margin: 8px auto 22px; background: linear-gradient(90deg, transparent, rgba(42,127,255,0.35), transparent); border-radius: 2px; }

/* Home features strip */
.features { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: stretch; justify-items: stretch; padding: 10px 0 0; }
@media (min-width: 800px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border: 1px solid #2a344e; border-radius: 12px; box-shadow: 0 10px 20px var(--shadow); padding: 12px 14px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.feature img { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45)); }
.feature .label { font-weight: 800; color: #cfe3ff; text-transform: uppercase; font-size: 12px; letter-spacing: 0.8px; }

.home-bonuses { margin-top: 6px; }
/* Tighter, balanced grid for home preview */
.home-bonuses .bonus-grid.top { grid-template-columns: 1fr; }
@media (min-width: 640px) { .home-bonuses .bonus-grid.top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .home-bonuses .bonus-grid.top { grid-template-columns: 1fr 1fr; } }
.home-bonuses .bonus-card { min-height: 220px; }

/* Accent text utility */
.accent { color: var(--accent); text-shadow: 0 1px 12px rgba(106,168,255,0.25); }

.decor { position: fixed; pointer-events: none; opacity: 0.85; }
.decor-left { left: 20px; bottom: 120px; }
.decor-right { right: 40px; top: 90px; }
.decor-bottom-right { right: 40px; bottom: 40px; }
.decor-top-left { left: 40px; top: 60px; }
.decor img { width: 220px; height: auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.35)); will-change: transform; animation: floatY 6s ease-in-out infinite; }
.decor-left img { animation-duration: 7s; animation-delay: 0.2s; }
.decor-right img { animation-duration: 6.5s; animation-delay: 0.5s; }
.decor-bottom-right img { animation-duration: 8s; animation-delay: 0.8s; }
.decor-top-left img { animation-duration: 7.8s; animation-delay: 0.35s; }

@keyframes floatY {
  0% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-20px) translateX(3px); }
  50% { transform: translateY(0) translateX(0); }
  75% { transform: translateY(-20px) translateX(-3px); }
  100% { transform: translateY(0) translateX(0); }
}

@media (max-width: 800px) {
  .podium { grid-template-columns: 1fr; }
  .podium .first { transform: none; }
  .podium .second, .podium .third { transform: none; }
  .decor { display: none; }
}