:root {
  --bg-0: #07040f;
  --bg-1: #10081c;
  --bg-2: #1a0f2e;
  --bg-3: #24143d;
  --bg-4: #2e1a4d;
  --line: rgba(168, 130, 255, 0.16);
  --text: #f6f1ff;
  --muted: #b7a8cf;
  --faint: #7d6d96;
  --purple: #8b5cf6;
  --purple-2: #a78bfa;
  --purple-d: #6d28d9;
  --yellow: #ffd60a;
  --yellow-2: #ffe566;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --green: #34d399;
  --red: #fb7185;
  --gold: #f5c542;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
  --side-w: 268px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Unbounded", "Outfit", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: #3b2760; border-radius: 99px; }

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(139, 92, 246, 0.18), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(255, 214, 10, 0.08), transparent 45%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 40%);
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: rgba(10, 6, 18, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: 0.2s ease;
}

.icon-btn:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.4);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.logo-mark {
  width: 38px;
  height: 38px;
}

.logo-word {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.logo-word span {
  color: var(--yellow);
}

.search {
  flex: 1;
  max-width: 560px;
  min-width: 0;
  position: relative;
}

.search input {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 0 16px 0 42px;
  outline: none;
}

.search input:focus {
  border-color: rgba(255, 214, 10, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 214, 10, 0.12);
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.chip {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-toggle {
  display: none;
}

.btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.18s ease;
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--purple-2);
}

.btn-yellow {
  background: linear-gradient(180deg, var(--yellow-2), var(--yellow));
  color: #1a1200;
  box-shadow: 0 8px 24px rgba(255, 214, 10, 0.25);
}

.btn-yellow:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-purple {
  background: linear-gradient(180deg, #a78bfa, #7c3aed);
  color: white;
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.balance-pill {
  height: 42px;
  padding: 0 8px 0 14px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.balance-pill b {
  color: var(--yellow);
}

/* Shell */
.shell {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: calc(100vh - var(--header-h));
}

.sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: auto;
  padding: 16px 12px 28px;
  border-right: 1px solid var(--line);
  background: rgba(12, 7, 22, 0.72);
}

.nav-group {
  margin-bottom: 18px;
}

.nav-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 6px 12px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.22), transparent);
  color: var(--text);
}

.nav-link.active {
  box-shadow: inset 3px 0 0 var(--yellow);
}

.side-widgets {
  display: grid;
  gap: 10px;
}

.mini-card {
  border-radius: 16px;
  padding: 14px;
  background:
    linear-gradient(160deg, rgba(255, 214, 10, 0.12), rgba(139, 92, 246, 0.16)),
    var(--bg-3);
  border: 1px solid var(--line);
}

.mini-card h4 {
  font-size: 13px;
  margin-bottom: 4px;
}

.mini-card p {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.content {
  min-width: 0;
  padding: 20px 22px 80px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  padding: 36px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 4, 16, 0.88) 0%, rgba(7, 4, 16, 0.45) 55%, rgba(7, 4, 16, 0.12) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-copy p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 18px;
}

.hero-art {
  justify-self: end;
  width: min(340px, 100%);
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.on {
  width: 22px;
  background: var(--yellow);
}

/* Jackpots */
.pots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.pot {
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.pot::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--glow);
  filter: blur(24px);
  opacity: 0.45;
}

.pot .kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pot .amount {
  font-family: var(--display);
  font-size: 22px;
  margin-top: 4px;
}

.pot.pulse { --glow: #22d3ee; }
.pot.surge { --glow: #a78bfa; }
.pot.flash { --glow: #ffd60a; }

.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 8px 12px;
  margin-bottom: 18px;
}

.ticker-label {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.08em;
}

.ticker-track {
  display: flex;
  gap: 22px;
  animation: marquee 28s linear infinite;
  white-space: nowrap;
}

.win {
  color: var(--muted);
  font-size: 13px;
}

.win b {
  color: var(--green);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Categories + games */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

.section-head h2 {
  font-size: 20px;
  font-weight: 700;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.tab {
  flex: none;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}

.tab.on,
.tab:hover {
  background: linear-gradient(180deg, var(--yellow-2), var(--yellow));
  color: #1a1200;
  border-color: transparent;
}

.game-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 168px;
  gap: 12px;
  overflow: auto;
  padding-bottom: 8px;
  margin-bottom: 22px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}

.game-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  isolation: isolate;
  cursor: pointer;
}

.game-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero {
  height: 200px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.card-banner-img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
}

.game-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.game-meta strong {
  display: block;
  font-size: 13px;
}

.game-meta span {
  font-size: 11px;
  color: #d4c8ea;
}

.game-tile .overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 16, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: 0.2s ease;
}

.game-tile:hover .overlay,
.game-tile:focus-within .overlay {
  opacity: 1;
}

@media (hover: none) {
  .game-tile .overlay {
    opacity: 1;
    background: linear-gradient(transparent 45%, rgba(8, 4, 16, 0.78));
    justify-content: flex-end;
    padding-bottom: 42px;
  }
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1a1200;
}

.badge.live {
  background: #ef4444;
  color: white;
  animation: pulse 1.6s infinite;
}

.fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
}

.fav.on {
  color: var(--yellow);
}

@keyframes pulse {
  50% { opacity: 0.65; }
}

/* Cards / pages */
.promo-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.card-banner {
  height: 120px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 22px;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin-bottom: 6px;
}

.card-body p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.vip-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.vip-tier {
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  min-height: 180px;
}

.vip-tier.current {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px rgba(255, 214, 10, 0.35);
}

.progress {
  height: 8px;
  background: var(--bg-4);
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0 16px;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--yellow));
}

/* Sports */
.sports-layout {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: 14px;
}

.sport-list button,
.match,
.slip {
  width: 100%;
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.sport-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.sport-list button.on {
  border-color: var(--yellow);
}

.match {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.odds button {
  background: var(--bg-4);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid var(--line);
}

.odds button:hover,
.odds button.on {
  border-color: var(--yellow);
  color: var(--yellow);
}

.slip {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

/* Player / wheel / claw */
.player {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}

.stage {
  min-height: 420px;
  border-radius: 20px;
  background: #05030a;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 10, 0.45);
}

.reels {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.reel {
  width: 90px;
  height: 240px;
  background: #140a24;
  border: 2px solid var(--yellow);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}

.panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.bet-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.wheel-wrap {
  width: min(420px, 90vw);
  aspect-ratio: 1;
  position: relative;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 10px solid var(--yellow);
  background: conic-gradient(
    #7c3aed 0 12.5%,
    #f59e0b 0 25%,
    #22d3ee 0 37.5%,
    #ec4899 0 50%,
    #34d399 0 62.5%,
    #8b5cf6 0 75%,
    #facc15 0 87.5%,
    #fb7185 0 100%
  );
  transition: transform 4s cubic-bezier(0.12, 0.7, 0.18, 1);
  box-shadow: inset 0 0 0 18px #12081c;
}

.pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid var(--yellow);
  z-index: 2;
}

.claw-arena {
  width: min(560px, 100%);
  height: 360px;
  background: linear-gradient(#1e1036, #0b0614);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

.claw {
  position: absolute;
  top: 0;
  width: 28px;
  height: 90px;
  background: linear-gradient(#cbd5e1, #64748b);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
  transition: left 0.15s linear, height 0.6s ease;
}

.prizes {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-around;
}

.prize {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
}

/* Auth / forms */
.auth-card {
  max-width: 440px;
  margin: 40px auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 0 12px;
}

.field input[type="checkbox"] {
  height: 18px;
  width: 18px;
  padding: 0;
}

.field textarea {
  height: 90px;
  padding: 10px 12px;
  resize: vertical;
}

.methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.method {
  border: 1px solid var(--line);
  background: var(--bg-3);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.method.on {
  border-color: var(--yellow);
}

/* Modals */
.overlay-scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 10, 0.72);
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(480px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}

.chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a78bfa, #6d28d9);
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.chat-box {
  position: fixed;
  right: 18px;
  bottom: 76px;
  width: min(340px, calc(100vw - 24px));
  height: 420px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.bubble {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-4);
  font-size: 13px;
}

.bubble.me {
  margin-left: auto;
  background: #5b21b6;
}

.chat-box form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.chat-box input {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 0 10px;
}

.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
  display: grid;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.age-gate {
  text-align: center;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-height: 360px;
  overflow: auto;
  display: none;
  z-index: 50;
}

.search-results.open {
  display: block;
}

.search-hit {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.search-hit img {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
}

.search-hit:hover {
  background: rgba(139, 92, 246, 0.16);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #1e1033;
  border: 1px solid var(--yellow);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 80;
}

.hidden {
  display: none !important;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.notice {
  background: rgba(255, 214, 10, 0.08);
  border: 1px solid rgba(255, 214, 10, 0.28);
  color: var(--yellow-2);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

@media (max-width: 1280px) {
  .chip {
    display: none;
  }

  .search {
    max-width: 380px;
  }
}

@media (max-width: 1100px) {
  .sports-layout,
  .player,
  .vip-track {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: var(--header-h);
    z-index: 35;
    width: min(300px, 86vw);
    transform: translateX(-110%);
    transition: 0.22s ease;
    background: #0c0716;
  }

  .sidebar.open {
    transform: none;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .pots {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 220px;
    padding: 24px;
  }

  .hero-art {
    display: none;
  }

  .search {
    display: none;
  }

  .search-toggle {
    display: grid;
  }

  .search.mobile-open {
    display: block;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 62px;
    max-width: none;
  }
}
