:root {
  --bg: #171c22;
  --card: #2a3240;
  --card-2: #323c4a;
  --line: rgba(168, 198, 230, 0.1);
  --text: #f4f7fb;
  --muted: #a7b3c2;
  --lime: #9fd4ff;
  --lime-ink: #0b1824;
  --danger: #ff6b78;
  --ok: #9fd4ff;
  --rail: 84px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-family: Inter, "Noto Sans Georgian", ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); overflow-x: clip; max-width: 100%; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app { min-height: 100vh; }
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #141a22;
  border-right: 1px solid var(--line);
  z-index: 20;
}
.rail-btn {
  width: 64px;
  min-height: 58px;
  border-radius: 16px;
  background: #2a3240;
  color: #c5cbd2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid transparent;
}
.rail-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.rail-btn span { font-size: 9px; letter-spacing: 0.02em; text-align: center; line-height: 1.1; }
.rail-btn.on, .rail-btn:hover { color: var(--lime); border-color: rgba(159, 212, 255, 0.4); }

.shell { margin-left: var(--rail); padding: 18px 22px 48px; min-width: 0; }
.shell > main { min-width: 0; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #fff;
  font-family: Montserrat, Inter, sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0;
  padding: 10px 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 13px;
  white-space: nowrap;
}
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-lime:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: #fff; }
.btn-block { width: 100%; margin-top: 8px; }
.balance {
  background: #2a3240;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.langs {
  display: flex;
  gap: 2px;
  background: #2a3240;
  border-radius: 10px;
  padding: 4px;
}
.langs a {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #c5cbd2;
}
.langs a.on { background: var(--lime); color: var(--lime-ink); }
#clock {
  background: #2a3240;
  border-radius: 10px;
  padding: 8px 10px;
  color: #d5dbe2;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.icon-btn, .row-tools button, .hero-nav button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: #2a3240;
  color: #fff;
}
.icon-btn svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; }
.account-menu { position: relative; }
.account-menu summary {
  list-style: none;
  background: #2a3240;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #2a3240;
  border-radius: 12px;
  min-width: 180px;
  padding: 6px;
  box-shadow: var(--shadow);
  z-index: 30;
}
.account-pop a, .account-pop button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 8px;
}
.account-pop a:hover, .account-pop button:hover { background: #3a4554; }
.drawer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  background: #222933;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
}
.drawer a { background: #2c3642; border-radius: 10px; padding: 12px; }
.drawer .drawer-langs { display: none; }
.drawer .drawer-langs a { padding: 8px 14px; background: transparent; }
.drawer .drawer-langs a.on { background: var(--lime); }

.flash {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1c2c3c;
  color: #d7eeff;
}
.flash.error { background: #3a2226; color: #ffd0d4; }

.hero {
  position: relative;
  min-height: 230px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 40%, rgba(159, 212, 255, 0.28), transparent 28%),
    linear-gradient(100deg, #10141a 10%, #1a2838 70%, #0e1218);
  padding: 36px 40px;
}
.slide { display: none; max-width: 560px; position: relative; z-index: 1; }
.slide.on { display: block; }
.kicker { margin: 0 0 8px; color: var(--lime); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; }
.hero h1 { margin: 0; font-size: 44px; line-height: 0.95; letter-spacing: -1px; text-transform: uppercase; }
.hero-sub { color: var(--lime); font-weight: 800; letter-spacing: 0.04em; }
.hero-nav {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.hero-art { position: absolute; right: 90px; top: 36px; width: 180px; height: 160px; }
.lock, .coin {
  position: absolute;
  border-radius: 18px;
  background: linear-gradient(160deg, #f4e27a, #c9a227 40%, #6d5a12);
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.25);
}
.lock { width: 92px; height: 110px; right: 10px; top: 18px; border-radius: 22px; }
.lock:before {
  content: "";
  position: absolute;
  left: 22px; top: -28px;
  width: 48px; height: 42px;
  border: 8px solid #e7d36a;
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
}
.coin { width: 54px; height: 54px; border-radius: 50%; }
.c1 { left: 0; top: 18px; }
.c2 { left: 46px; bottom: 8px; }

.cats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.cat {
  background: var(--card);
  border-radius: 16px;
  min-height: 92px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
}
.cat:hover { background: var(--card-2); }
.cat b { letter-spacing: 0.06em; font-size: 14px; }
.cat span { font-size: 32px; }

.row-head, .page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 12px;
}
.row-head h2, .page-head h1, .league h2 { margin: 0; font-size: 28px; }
.section-title { margin: 22px 0 12px; font-size: 28px; }
.row-tools { display: flex; align-items: center; gap: 8px; }
.row-tools a { color: var(--muted); font-weight: 700; }
.scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.scroller::-webkit-scrollbar { height: 0; }
.game {
  position: relative;
  flex: 0 0 168px;
  height: 210px;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: start;
  background:
    radial-gradient(circle at 70% 20%, hsl(var(--h) 90% 62% / .9), transparent 36%),
    linear-gradient(165deg, hsl(var(--h) 62% 38%), hsl(calc(var(--h) + 28) 70% 14%));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.game { transition: transform .15s ease; }
.game:hover { transform: translateY(-2px); }
.game-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.game.has-img:after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.82));
}
.game.has-img:hover .game-img { transform: scale(1.05); }
.game-title, .game-prov, .game-badge { position: relative; z-index: 1; }
.game-badge { position: absolute; }
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.game-grid .game { width: auto; flex: none; height: 210px; }
.game-symbol { position: absolute; inset: 44px 12px auto; font-size: 54px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.game-title { font-weight: 800; font-size: 18px; line-height: 1.05; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.game-prov { color: rgba(255,255,255,.8); font-size: 11px; margin-top: 4px; letter-spacing: .04em; text-transform: uppercase; }
.game-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(0,0,0,.45);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}

.page-head p, .muted, .copy p, .legal { color: var(--muted); }
.page-head h1 { font-size: 34px; }
#game-search, .panel input, .panel select {
  background: #2a3240;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 220px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips a, .chips button {
  background: #2a3240;
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}
.chips .on { background: var(--lime); color: var(--lime-ink); }
.empty { color: var(--muted); }

.league { margin-top: 8px; }
.league h2 { font-size: 16px; color: var(--muted); margin: 18px 0 8px; letter-spacing: .04em; text-transform: uppercase; }
.match {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.teams { display: grid; gap: 4px; }
.when { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.live-pill {
  align-self: flex-start;
  background: #e23b4a;
  color: white;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
}
.odds { display: flex; gap: 8px; }
.odd {
  min-width: 74px;
  background: #1c242e;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.odd small { color: var(--muted); }
.odd b { color: var(--lime); font-size: 16px; }
.odd:hover { border-color: rgba(159, 212, 255, .55); }

.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.promo {
  min-height: 180px;
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(160deg, hsl(var(--h) 42% 34%), #161c24 70%);
}
.promo span { color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.promo h2 { margin: 10px 0; }
.promo p { margin: 0; color: #d5dbe2; }

.copy { margin-top: 36px; max-width: 760px; }
.copy h2 { font-size: 28px; }
.faq details { background: var(--card); border-radius: 12px; padding: 12px 14px; margin-top: 8px; }
.faq summary { cursor: pointer; font-weight: 700; }
.panel {
  max-width: 460px;
  margin: 20px auto;
  background: #222933;
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.panel h1 { margin: 0 0 8px; }
.panel form { display: grid; gap: 12px; margin-top: 16px; }
.panel label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.panel input, .panel select { width: 100%; min-width: 0; }
.pay-methods {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.pay-methods legend {
  grid-column: 1 / -1;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}
.panel label.pay-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  margin: 0;
  padding: 10px 12px;
  background: #323c4a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
}
.panel label.pay-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.panel label.pay-card:has(input:checked) {
  border-color: var(--lime);
  box-shadow: inset 0 0 0 1px var(--lime);
}
.pay-card.pay-offer {
  justify-content: space-between;
  background: #050505;
  gap: 12px;
}
.pay-logo {
  display: block;
  width: 148px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
  flex: none;
}
.pay-tag {
  margin-left: auto;
  max-width: 48%;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--lime);
  color: #102004;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
}
.pay-hint { margin: 0; }
.spin-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.spin-row strong { color: #fff; font-size: 16px; }
.pay-logo-lg {
  width: min(280px, 100%);
  height: 52px;
  margin: 10px 0 4px;
}
.pay-mark { width: 42px; height: 42px; flex: none; display: grid; }
.pay-mark svg { width: 42px; height: 42px; display: block; }
.pay-copy { min-width: 0; }
.pay-copy strong { display: block; font-size: 13px; line-height: 1.2; font-weight: 800; }
.check { grid-template-columns: auto 1fr; align-items: center; }
.account {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: stretch;
}
.balance-card, .profile {
  background: var(--card);
  border-radius: 18px;
  padding: 22px;
}
.balance-card p { margin: 0; color: var(--muted); }
.balance-card strong { display: block; font-size: 36px; margin: 8px 0 16px; }
.profile h1 { margin: 0 0 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
td.deposit { color: var(--lime); }
td.withdraw { color: #ffb4bc; }
.foot { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 22px; }
.foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.foot h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .08em; }
.foot a { display: block; color: var(--muted); padding: 4px 0; }
.foot a:hover { color: #fff; }
.legal { font-size: 13px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
}
.modal-card {
  width: min(420px, 100%);
  background: #222933;
  border-radius: 18px;
  padding: 22px;
}
.modal-card h3 { margin-top: 0; }

.player { display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 140px); }
.player-bar { display: flex; align-items: center; gap: 14px; }
.player-bar strong { display: block; font-size: 18px; }
.player-bar p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.player-frame {
  flex: 1;
  width: 100%;
  min-height: 72vh;
  border: 0;
  border-radius: 16px;
  background: #0c1016;
}

@media (max-width: 980px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .match { grid-template-columns: 1fr; }
  .account, .foot-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero-art { display: none; }
  #clock, .lang { display: none; }
}
@media (max-width: 760px) {
  .rail {
    inset: auto 0 0 0;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    height: calc(72px + env(safe-area-inset-bottom));
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-btn { flex: 0 0 68px; width: 68px; min-height: 56px; }
  .shell { margin: 0; padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); width: 100%; }

  .top { gap: 8px; margin-bottom: 12px; align-items: center; }
  .logo { font-size: 18px; }
  .top-actions { gap: 6px; min-width: 0; }
  .top-actions > .langs { display: none; }
  .drawer .drawer-langs { display: flex; grid-column: 1 / -1; justify-self: start; }
  .btn { padding: 9px 11px; font-size: 12px; }
  .btn-ghost { padding: 9px 6px; }
  .balance { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .account-menu summary { padding: 9px 10px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .icon-btn { width: 38px; height: 38px; flex: 0 0 auto; }
  .drawer { grid-template-columns: repeat(2, 1fr); }

  .hero { min-height: 0; padding: 60px 18px 22px; border-radius: 16px; }
  .hero h1 { font-size: 28px; letter-spacing: -0.5px; }
  .hero-sub { font-size: 14px; margin-bottom: 0; }
  .hero-nav { right: 12px; top: 12px; gap: 6px; }
  .hero-nav button { width: 34px; height: 34px; border-radius: 10px; }
  #slide-count { font-size: 14px; }

  .cats { gap: 8px; }
  .cats .cat:last-child { grid-column: 1 / -1; }
  .cat { min-height: 68px; padding: 12px 14px; border-radius: 14px; }
  .cat b { font-size: 13px; }
  .cat span { font-size: 26px; }

  .row-head, .page-head { margin: 22px 0 10px; }
  .row-head h2, .section-title, .copy h2 { font-size: 21px; }
  .page-head h1 { font-size: 26px; }
  .row-tools button { display: none; }
  .scroller { gap: 10px; margin: 0 -12px; padding: 0 12px 6px; scroll-padding: 0 12px; }
  .game { flex-basis: 132px; height: 172px; border-radius: 14px; padding: 10px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .game-grid .game { height: 180px; }
  .game-symbol { font-size: 42px; inset: 38px 10px auto; }
  .game-badge { left: 8px; top: 8px; font-size: 10px; }
  .game-title { font-size: 15px; }
  .player { min-height: 0; }
  .player-frame { min-height: 68vh; }

  #game-search { min-width: 0; width: 100%; }
  .match { padding: 12px; }
  .odds { flex-wrap: wrap; }
  .odd { flex: 1 1 0; min-width: 0; }
  .panel { padding: 20px 16px; margin: 8px 0; }
  .balance-card strong { font-size: 30px; }
  .modal-card { padding: 18px; }
}
@media (max-width: 380px) {
  .logo { font-size: 16px; }
  .btn-ghost { display: none; }
  .balance { display: none; }
}
