:root {
  --bg0: #050a14;
  --bg1: #0a1224;
  --line: rgba(92, 240, 255, 0.12);
  --text: #e8f4ff;
  --muted: #8aa3c4;
  --accent: #5cf0ff;
  --accent2: #3ad4ff;
  --gold: #ffd978;
  --card: rgba(12, 22, 48, 0.82);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  --hero-glow: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(58, 212, 255, 0.18), transparent 55%);
  --light-section: #e8f2fb;
  --light-text: #0a1224;
  --light-muted: #3a4a62;
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg0);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

html:not(.captcha-done) body:has(#captcha-overlay) {
  overflow: hidden;
}

html.captcha-done #captcha-overlay {
  display: none !important;
}

a {
  color: var(--accent2);
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 80px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(5, 10, 20, 0.96), rgba(5, 10, 20, 0.88));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-header .logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.site-header .logo-link img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: center;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--accent);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 18, 40, 0.9);
  border: 1px solid rgba(92, 240, 255, 0.35);
  font-size: 0.82rem;
  color: var(--text);
  box-shadow: 0 0 20px rgba(58, 212, 255, 0.12);
}

.pill strong {
  color: var(--accent);
  font-weight: 700;
}

.hero {
  position: relative;
  padding: 56px 0 48px;
  text-align: center;
  background: var(--hero-glow);
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(92, 240, 255, 0.25);
}

.hero p.lead {
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: filter 0.2s, transform 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, #0f1f44, #0a1224);
  color: var(--text);
  border: 2px solid var(--accent2);
  box-shadow: 0 0 24px rgba(58, 212, 255, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(92, 240, 255, 0.4);
}

.btn-ghost:hover {
  background: rgba(92, 240, 255, 0.08);
}

.section-title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
  text-align: center;
}

.section-dark .section-title {
  text-align: left;
}

.light-band {
  background: var(--light-section);
  color: var(--light-text);
  padding: 56px 22px;
  margin: 0 -22px;
}

.light-band .section-title {
  color: var(--light-text);
}

.light-band p {
  color: var(--light-muted);
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .cards-3 {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 16px 48px rgba(15, 30, 60, 0.12);
}

.info-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--light-text);
}

.info-card p {
  font-size: 0.95rem;
  line-height: 1.55;
}

.section-dark {
  padding: 56px 0 32px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 800px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}

.game-card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(92, 240, 255, 0.35);
}

.game-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--bg1);
}

.game-card .body {
  padding: 22px;
}

.game-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.game-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.site-footer {
  margin-top: 48px;
  padding: 48px 22px 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(5, 10, 20, 0.6));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto 32px;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 360px;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(92, 240, 255, 0.35);
  color: var(--muted);
}

.support-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 40px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.support-strip a {
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.support-strip a:hover {
  opacity: 1;
}

.support-strip img {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: brightness(1.05);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--accent);
}

.disclaimer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.55;
}

.copyright {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.85;
}

.page-inner {
  padding-top: 32px;
  padding-bottom: 48px;
}

.page-inner h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.page-inner h2 {
  font-size: 1.15rem;
  margin: 28px 0 12px;
  color: var(--accent2);
}

.page-inner p,
.page-inner li {
  color: var(--muted);
  margin-bottom: 12px;
  max-width: 720px;
}

.page-inner ul {
  margin-left: 1.25rem;
  margin-bottom: 16px;
}

/* Captcha */
.captcha-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 5, 12, 0.92);
  backdrop-filter: blur(8px);
}

.captcha-overlay[hidden] {
  display: none !important;
}

.captcha-modal {
  width: 100%;
  max-width: 380px;
  background: var(--bg1);
  border: 1px solid rgba(92, 240, 255, 0.35);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.captcha-modal h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  text-align: center;
}

.captcha-modal > p {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 20px;
}

.slider-captcha {
  width: 100%;
  max-width: 300px;
  margin: 0 auto 20px;
}

.slider-captcha-panel {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 12px;
  background: #050a14;
}

.slider-captcha-panel canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 120px;
}

.slider-captcha-track-wrap {
  width: 100%;
}

.slider-captcha-track {
  position: relative;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(92, 240, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  touch-action: none;
}

.slider-captcha-track-bg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(58, 212, 255, 0.15), rgba(92, 240, 255, 0.08));
  pointer-events: none;
  transition: width 0.05s linear;
}

.slider-captcha-handle {
  position: absolute;
  left: 0;
  top: 4px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid rgba(92, 240, 255, 0.85);
  box-shadow: 0 0 16px rgba(58, 212, 255, 0.35);
  cursor: grab;
  user-select: none;
  touch-action: none;
  background-color: #0a1838;
}

.slider-captcha-handle:active {
  cursor: grabbing;
}

.slider-captcha-handle.is-ok {
  border-color: #5cff9a;
  box-shadow: 0 0 18px rgba(92, 255, 154, 0.45);
}

#captcha-continue {
  width: 100%;
}

#captcha-continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Game shell */
.game-page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.game-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.45;
  pointer-events: none;
}

.game-page .site-header {
  position: relative;
  z-index: 2;
}

.game-shell {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 22px 80px;
}

.game-panel {
  background: rgba(8, 14, 32, 0.88);
  border: 1px solid rgba(92, 240, 255, 0.22);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
}

.game-hint {
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.reels-frame {
  --reel-cell: 60px;
  --reel-gap: 6px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(5, 10, 25, 0.65);
  border: 1px solid rgba(92, 240, 255, 0.25);
  margin-bottom: 8px;
}

.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.reel-col {
  display: flex;
  flex-direction: column;
  gap: var(--reel-gap, 6px);
  /* 3 cells × 60px + 2 gaps = 192px — fixed height matches strip math in game-grid.js */
  height: 192px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  position: relative;
}

.reel-strip {
  display: flex;
  flex-direction: column;
  gap: var(--reel-gap, 6px);
  will-change: transform;
}

.cell {
  flex-shrink: 0;
  height: var(--reel-cell, 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(20, 40, 80, 0.5);
  border: 1px solid rgba(92, 240, 255, 0.12);
  font-size: 1.75rem;
}

.payline-mask {
  position: absolute;
  left: 4px;
  right: 4px;
  /* Middle row: one cell height + one gap from top (matches JS STRIDE) */
  top: calc(var(--reel-cell, 60px) + var(--reel-gap, 6px));
  height: var(--reel-cell, 60px);
  transform: none;
  border: 2px solid rgba(255, 217, 120, 0.55);
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(255, 217, 120, 0.15);
}

.controls-bar {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 700px) {
  .controls-bar {
    grid-template-columns: 1fr;
  }
}

.stat-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
}

.stat-box label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-box .value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

.round-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.round-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.round-btn {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(15, 30, 60, 0.8);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

.round-btn.active {
  border-color: var(--gold);
  background: rgba(255, 217, 120, 0.15);
  color: var(--gold);
}

.round-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.spin-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spin-wrap .current-round {
  font-size: 0.85rem;
  color: var(--muted);
}

.btn-spin {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: none;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  background: radial-gradient(circle at 30% 30%, #5cff9a, #12a85c);
  color: #041208;
  box-shadow: 0 8px 32px rgba(18, 168, 92, 0.45);
}

.btn-spin:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.legal-strip {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 16px;
}

/* Wheel */
.wheel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#wheel-canvas {
  max-width: min(420px, 100%);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(58, 212, 255, 0.25));
}

.wheel-pointer {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 22px solid var(--gold);
  filter: drop-shadow(0 0 8px rgba(255, 217, 120, 0.6));
  margin-bottom: -8px;
  position: relative;
  z-index: 2;
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.mode-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 30, 60, 0.6);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.88rem;
}

.mode-btn.active {
  border-color: var(--accent2);
  color: var(--accent);
  background: rgba(58, 212, 255, 0.12);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 520px;
}

@media (max-width: 500px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

.stat-mini {
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  font-size: 0.8rem;
}
.stat-mini span {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin-top: 4px;
}
