:root {
  --bg: #062628;
  --bg-2: #083033;
  --card: #0c3c40;
  --card-2: #0e464a;
  --ink: #f5f7f6;
  --muted: #a8c4c0;
  --gold: #d4a24a;
  --gold-2: #e8c36a;
  --copper: #c8893a;
  --yellow: #ffe566;
  --neon: #7dff4d;
  --neon-dim: #3d8f2a;
  --red: #d3183a;
  --red-2: #9b1230;
  --line: rgba(212, 162, 74, 0.28);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --pill: 999px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(211, 24, 58, 0.18), transparent 50%),
    radial-gradient(900px 420px at 110% 0%, rgba(125, 255, 77, 0.08), transparent 45%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

img { max-width: 100%; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: var(--yellow); }
button, input, select { font: inherit; }

.wrap {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 38, 40, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
.logo {
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold-2);
  text-shadow: 0 0 18px rgba(232, 195, 106, 0.35);
  font-size: 1.05rem;
  white-space: nowrap;
}
.logo span { color: var(--copper); }

.nav {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--ink);
  padding: 8px 12px;
  border-radius: var(--pill);
  font-size: 0.92rem;
  white-space: nowrap;
}
.nav a:hover, .nav a.active {
  background: rgba(125, 255, 77, 0.12);
  color: var(--neon);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.chip-pill, .lang-pill, .btn {
  border: 0;
  border-radius: var(--pill);
  cursor: pointer;
}
.chip-pill {
  background: rgba(125, 255, 77, 0.12);
  color: var(--neon);
  padding: 7px 12px;
  font-weight: 700;
  white-space: nowrap;
}
.lang-pill {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 7px 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 700;
  color: #062628;
  background: linear-gradient(180deg, var(--neon), #5fd63a);
  box-shadow: 0 8px 20px rgba(125, 255, 77, 0.18);
}
.btn:hover { filter: brightness(1.05); }
.btn.gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1b1408;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.red {
  background: linear-gradient(180deg, #ef3354, var(--red));
  color: white;
}

.hero {
  margin: 22px 0 28px;
  padding: 28px 22px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(211, 24, 58, 0.95), rgba(120, 12, 36, 0.92)),
    var(--red);
  box-shadow: var(--shadow);
}
.hero .eyebrow {
  color: var(--yellow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 8px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.15;
  color: #fff;
}
.hero p { margin: 0 0 10px; color: #ffe9ee; max-width: 62ch; }
.hero-cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

h1, h2, h3 { color: var(--yellow); line-height: 1.2; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
p { color: var(--ink); }
.muted { color: var(--muted); }

.grid {
  display: grid;
  gap: 16px;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
th { color: var(--yellow); font-weight: 700; }

.banner {
  display: none;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(211, 24, 58, 0.18);
  border: 1px solid rgba(211, 24, 58, 0.45);
  color: #ffd0d8;
}

.filters {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
  flex-wrap: wrap;
}
.filter {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: 8px 14px;
  cursor: pointer;
}
.filter.active {
  background: rgba(125, 255, 77, 0.16);
  color: var(--neon);
  border-color: rgba(125, 255, 77, 0.4);
}

.game-art {
  height: 120px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #12484c, #0a2e31);
  border: 1px solid var(--line);
}
.game-art.slots {
  background: linear-gradient(135deg, #1a3c78, #0c2438);
}
.game-art.wheel {
  background: linear-gradient(135deg, #145c3a, #0c2e24);
}

.reels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.reel {
  height: 110px;
  border-radius: 14px;
  background: #04181a;
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  color: var(--neon);
}
.bet-row, .paytable {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.bet-row button, .paytable li {
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
}
.bet-row button.active {
  background: rgba(125, 255, 77, 0.18);
  color: var(--neon);
  border-color: var(--neon);
}
.paytable { list-style: none; padding: 0; color: var(--muted); }
.result {
  min-height: 1.4em;
  font-weight: 700;
  color: var(--neon);
}

.wheel-face {
  width: min(220px, 70vw);
  height: min(220px, 70vw);
  margin: 12px auto 18px;
  border-radius: 50%;
  border: 10px solid var(--gold);
  background: conic-gradient(#c81e3a 0 10deg, #111 10deg 20deg, #c81e3a 20deg 30deg, #111 30deg 40deg, #c81e3a 40deg 50deg, #111 50deg 60deg, #2f7a3a 60deg 70deg, #c81e3a 70deg 80deg, #111 80deg 90deg, #c81e3a 90deg 100deg, #111 100deg 180deg, #c81e3a 180deg 270deg, #111 270deg 360deg);
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(232, 195, 106, 0.25);
}
.wheel-face b {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #062628;
  border: 3px solid var(--gold-2);
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-size: 1.6rem;
}

.field { display: grid; gap: 6px; margin: 12px 0; }
.field label { color: var(--muted); font-size: 0.92rem; }
.login-box { max-width: 440px; margin: 24px auto; }
.msg { min-height: 1.3em; font-weight: 700; }
.msg.err { color: #ff8a9a; }
.msg.ok { color: var(--neon); }
.switch-row { display: flex; gap: 8px; margin: 0 0 14px; }
input, select {
  background: #04181a;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.balance {
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon);
  margin: 6px 0 4px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 8px 0;
}
.faq summary { cursor: pointer; color: var(--yellow); font-weight: 700; }

.admin-shell { max-width: 980px; margin: 24px auto; }
.game-admin-row td { font-size: 0.88rem; vertical-align: middle; }
.game-admin-row input { width: auto; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.tab {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: 8px 14px;
  cursor: pointer;
}
.tab.active { color: var(--neon); border-color: var(--neon); }
.panel { display: none; }
.panel.active { display: block; }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; }

footer {
  margin-top: 40px;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.fineprint { color: #8eada8; }

.lobby-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}
.lobby-bar h1 { margin: 0; font-size: 1.25rem; }
.search {
  width: 100%;
  margin: 8px 0 12px;
  background: #04181a;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: 12px 16px;
}

.deposit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(211, 24, 58, 0.92), rgba(90, 10, 28, 0.95));
  border: 1px solid rgba(232, 195, 106, 0.35);
}
.deposit-wallet span { display: block; color: var(--yellow); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.deposit-wallet strong { display: block; color: var(--neon); font-size: 1.6rem; line-height: 1.2; }
.deposit-wallet small { color: #ffd0d8; }
.deposit-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.method {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 10px;
  cursor: pointer;
  font-weight: 700;
}
.footer-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
  padding-top: 8px;
}
.footer-grid h3 { margin: 0 0 8px; font-size: 0.92rem; }
.footer-grid a { display: block; color: var(--muted); margin: 4px 0; }
.page-head { margin: 18px 0 12px; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 20px; }
.hub-grid a {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 12px;
  color: var(--yellow);
  font-weight: 700;
}
.hub-grid a span { display: block; color: var(--muted); font-weight: 500; font-size: 0.82rem; margin-top: 4px; }
.empty-row td { color: var(--muted); text-align: center; }

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 8px 0 24px;
}
.game-icon {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: #fff;
}
.game-icon:hover { border-color: var(--gold); color: #fff; }
.game-icon-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2.1rem;
}
.mine-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.mine-cell, .tower-cell {
  aspect-ratio: 1;
  border-radius: 12px;
  background: #04181a;
  border: 1px solid var(--line);
  color: var(--yellow);
  font-weight: 800;
  cursor: pointer;
}
.mine-cell:disabled, .tower-cell:disabled { opacity: 0.55; cursor: default; }
.mine-cell.gem { background: rgba(125, 255, 77, 0.16); color: var(--neon); }
.mine-cell.boom { background: rgba(211, 24, 58, 0.35); color: #ffd0d8; }
.tower-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.coin-face {
  width: 120px;
  height: 120px;
  margin: 12px auto;
  border-radius: 50%;
  border: 8px solid var(--gold);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--yellow);
  background: #04181a;
}
.banner-row { display: grid; gap: 10px; margin: 12px 0 4px; }
.home-banner {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  color: #fff;
}
.home-banner img { width: 100%; height: 140px; object-fit: cover; display: block; }
.home-banner strong, .home-banner span { display: block; padding: 8px 12px 0; color: var(--yellow); }
.home-banner span { color: var(--muted); padding-bottom: 12px; font-weight: 500; }
.qr-box { text-align: center; }
.qr-box img { max-width: 220px; border-radius: 12px; border: 1px solid var(--line); }
.pay-admin { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; background: #04181a; }
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 6px 7px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: var(--yellow);
}

@media (min-width: 520px) {
  .game-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 720px) {
  .game-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .game-icon-art { font-size: 2.4rem; }
}
@media (min-width: 980px) {
  .game-grid { grid-template-columns: repeat(7, 1fr); }
}

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .hub-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .hero { padding: 42px 36px; }
}
@media (min-width: 980px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
