:root {
  --bg: #070b14;
  --bg-deep: #05080f;
  --panel: #0d1522;
  --panel-2: #111b2c;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #f4f7fb;
  --muted: #8b97ad;
  --green: #00e88f;
  --green-deep: #00b96f;
  --red: #ff3b5c;
  --gold: #ffc94d;
  --purple: #8b5cf6;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: block;
  padding: 9px 16px max(9px, env(safe-area-inset-bottom));
  background: rgba(7, 11, 20, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 34px;
  height: 34px;
}

.brand-text {
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand-text strong {
  color: var(--green);
}

.official-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.official-link svg {
  width: 15px;
  height: 15px;
}

.lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 8px auto 0;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.lang-btn {
  min-width: 44px;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.lang-btn.is-active {
  background: linear-gradient(180deg, #00f09b, #00c87c);
  color: #04130c;
  box-shadow: 0 3px 12px rgba(0, 232, 143, 0.28);
}

/* Hero */
.hero {
  position: relative;
  padding: 48px 18px 54px;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(0, 232, 143, 0.1), transparent 42%),
    radial-gradient(circle at 50% 118%, rgba(139, 92, 246, 0.2), transparent 48%),
    linear-gradient(180deg, #0a101d 0%, #070b14 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 74%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  width: 480px;
  height: 480px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 232, 143, 0.18), transparent 64%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px 12px;
  border: 1px solid rgba(0, 232, 143, 0.3);
  border-radius: 999px;
  background: rgba(0, 232, 143, 0.08);
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.55);
  animation: livePulse 2s ease-out infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 59, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); }
}

.hero h1 {
  margin: 0 0 14px;
  font-size: 2.45rem;
  line-height: 1.06;
  letter-spacing: 0;
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.5);
}

.hero h1 span {
  color: var(--green);
}

.hero-sub {
  max-width: 480px;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.bonus-clock {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 auto 24px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 201, 77, 0.28);
  border-radius: 10px;
  background: rgba(255, 201, 77, 0.07);
}

.clock-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bonus-clock strong {
  color: var(--gold);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.hero-actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}

.btn-primary,
.btn-ghost,
.btn-claim,
.btn-sticky {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  flex: 1 1 auto;
  background: linear-gradient(180deg, #00f09b, #00c87c);
  color: #04130c;
  box-shadow: 0 8px 24px rgba(0, 232, 143, 0.32);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary svg {
  width: 17px;
  height: 17px;
}

.btn-ghost {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 74px;
  padding: 12px 8px;
  background: #0a0f1a;
  text-align: center;
}

.stat-item span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-item strong {
  font-size: 0.98rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Sections */
.demo-section,
.how-section,
.bets-section {
  padding: 46px 18px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 22px;
  text-align: center;
}

.section-label {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.how-section {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Crash demo */
.crash-panel {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(0, 232, 143, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 232, 143, 0.055), transparent 34%),
    var(--panel);
  box-shadow: var(--shadow);
}

.crash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 12px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 59, 92, 0.32);
  border-radius: 999px;
  background: rgba(255, 59, 92, 0.08);
  color: #ff8298;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.live-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.5);
  animation: livePulse 2s ease-out infinite;
}

.balance-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.balance-pill span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.balance-pill strong {
  color: var(--green);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
}

.crash-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #081019;
}

#crash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.multiplier-readout {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 150px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(7, 12, 20, 0.78);
  backdrop-filter: blur(8px);
  text-align: center;
}

.multiplier-readout strong {
  font-size: 2.1rem;
  line-height: 1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(0, 232, 143, 0.45);
}

.multiplier-readout span {
  max-width: 210px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.crash-controls {
  padding: 14px 4px 2px;
}

.btn-cashout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 58px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #00f09b, #00c87c);
  color: #04130c;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-cashout:disabled {
  cursor: default;
  background: #1a2434;
  color: #66728a;
  box-shadow: none;
}

.btn-cashout:not(:disabled):active {
  transform: scale(0.985);
}

.btn-cashout span {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.btn-cashout small {
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0.85;
}

.crash-hint {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
}

.step {
  position: relative;
  min-height: 148px;
  padding: 54px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.step-num {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 232, 143, 0.12);
  border: 1px solid rgba(0, 232, 143, 0.35);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 900;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.2;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

/* Bets marquee */
.bets-marquee {
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.bets-track {
  display: flex;
  gap: 10px;
  width: max-content;
  padding: 12px 14px;
  animation: marquee 26s linear infinite;
}

.bet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #0d1624;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.bet-chip strong {
  color: var(--green);
}

.bet-chip.win {
  border-color: rgba(0, 232, 143, 0.28);
}

.bet-chip.loss {
  border-color: rgba(255, 59, 92, 0.24);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Claim */
.claim-section {
  padding: 0 18px 52px;
}

.claim-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 30px 22px;
  border: 1px solid rgba(0, 232, 143, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(0, 232, 143, 0.1), transparent 52%),
    var(--panel);
  text-align: center;
  box-shadow: var(--shadow);
}

.claim-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 0 14px;
  border-radius: 50%;
  background: rgba(0, 232, 143, 0.12);
  border: 1px solid rgba(0, 232, 143, 0.4);
  color: var(--green);
}

.claim-mark svg {
  width: 26px;
  height: 26px;
}

.claim-card h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.claim-card p {
  max-width: 420px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.btn-claim {
  background: linear-gradient(180deg, #00f09b, #00c87c);
  color: #04130c;
  box-shadow: 0 8px 24px rgba(0, 232, 143, 0.3);
}

.btn-claim svg {
  width: 17px;
  height: 17px;
}

/* Footer */
.footer {
  padding: 26px 18px max(30px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  text-align: center;
}

.footer p {
  max-width: 620px;
  margin: 0 auto 12px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 10px 10px 14px;
  border: 1px solid rgba(0, 232, 143, 0.3);
  border-radius: 12px;
  background: rgba(10, 16, 28, 0.95);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
}

.sticky-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sticky-copy span {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-sticky {
  min-height: 42px;
  padding: 9px 16px;
  background: linear-gradient(180deg, #00f09b, #00c87c);
  color: #04130c;
}

/* Confetti */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  pointer-events: none;
}

@media (min-width: 640px) {
  .topbar {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    padding: 64px 24px 68px;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  .hero-sub {
    font-size: 1.02rem;
  }

  .btn-primary,
  .btn-ghost {
    flex: 0 0 auto;
  }

  .demo-section,
  .how-section,
  .bets-section {
    padding: 60px 24px;
  }

  .section-head h2 {
    font-size: 1.9rem;
  }

  .steps {
    gap: 16px;
  }

  .step {
    min-height: 158px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .crash-stage {
    aspect-ratio: 16 / 9;
  }
}
