/* ===== Design tokens ===== */
:root {
  --bg: #f8fafc;
  --bg-alt: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #101322;
  --text-dim: #475569;
  --text-faint: #64748b;
  --accent-purple: #7c3aed;
  --accent-cyan: #0891b2;
  --accent-pink: #db2777;
  --accent-green: #15803d;
  --accent-gold: #b45309;
  --brand: var(--accent-purple);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-glow: 0 0 0 1px rgba(124,58,237,0.12), 0 20px 50px -20px rgba(124,58,237,0.25);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { color: var(--text-dim); margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul { padding: 0; margin: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-grad {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Background decor ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(139,92,246,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

.bg-glow {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
}
.bg-glow--one { width: 560px; height: 560px; top: -180px; left: -120px; background: var(--accent-purple); }
.bg-glow--two { width: 480px; height: 480px; top: 40%; right: -160px; background: var(--accent-cyan); opacity: 0.12; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 8px 24px -8px rgba(139,92,246,0.6);
}
.btn--primary:hover { box-shadow: 0 12px 32px -8px rgba(139,92,246,0.8); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--accent-purple); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248,250,252,0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.nav {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
}
.nav a:hover { color: var(--text); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 56px;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }

.hero-visual { position: relative; }
.arena-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-glow);
  padding: 12px;
  aspect-ratio: 1 / 1;
}

.orb--left { animation: bob 4s ease-in-out infinite; transform-origin: 90px 110px; }
.orb--right { animation: bob 4s ease-in-out infinite 0.6s; transform-origin: 330px 110px; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.vs-bolt { animation: spin-glow 6s linear infinite; transform-origin: 196px 86px; }
@keyframes spin-glow {
  0% { filter: drop-shadow(0 0 0 rgba(139,92,246,0)); }
  50% { filter: drop-shadow(0 0 6px rgba(139,92,246,0.6)); }
  100% { filter: drop-shadow(0 0 0 rgba(139,92,246,0)); }
}
.cell-pulse { animation: cell-fade 2.4s ease-in-out infinite; }
.cell-pulse--b { animation-delay: 0.4s; }
.cell-pulse--c { animation-delay: 0.8s; }
.cell-pulse--d { animation-delay: 1.2s; }
.cell-pulse--e { animation-delay: 1.6s; }
@keyframes cell-fade {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.95; }
}
.coin { animation: float-coin 5s ease-in-out infinite; }
.coin--1 { transform: translate(70px, 250px); }
.coin--2 { animation-delay: 1.2s; }
.coin--3 { animation-delay: 2.4s; }
@keyframes float-coin {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(180deg); }
}
.coin--1 { animation-name: float-coin-1; }
@keyframes float-coin-1 {
  0%, 100% { transform: translate(70px,250px) translateY(0); }
  50% { transform: translate(70px,250px) translateY(-14px); }
}

/* ===== Trust strip ===== */
.trust-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.trust-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px 24px;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.trust-tags { display: flex; gap: 12px; flex-wrap: wrap; }
.trust-tags span {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-head p { font-size: 1.02rem; }

/* ===== Games grid ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: 0 16px 40px -20px rgba(139,92,246,0.5);
}
.game-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  background: var(--surface-2);
}
.game-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.game-card p { font-size: 0.9rem; margin-bottom: 14px; }
.game-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.game-card-meta b { color: var(--accent-green); font-weight: 600; }
.games-more { text-align: center; margin-top: 32px; color: var(--text-faint); font-size: 0.92rem; }

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  position: relative;
}
.step-num {
  position: absolute;
  top: 18px; right: 20px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--border);
}
.step-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: 0.9rem; margin: 0; }

/* ===== Leaderboard ===== */
.board-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.leaderboard-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.leaderboard-table th, .leaderboard-table td {
  padding: 14px 18px;
  text-align: left;
  white-space: nowrap;
}
.leaderboard-table thead th {
  background: var(--surface-2);
  color: var(--text-faint);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.leaderboard-table tbody tr { border-top: 1px solid var(--border); }
.leaderboard-table tbody tr:hover { background: rgba(139,92,246,0.06); }
.leaderboard-table td:first-child { font-weight: 700; color: var(--accent-cyan); }
.leaderboard-table td.earnings { color: var(--accent-green); font-weight: 600; }
.board-wrap { overflow-x: auto; }
.board-loading { text-align: center; padding: 32px; color: var(--text-faint); }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 0.75rem; font-weight: 700;
  background: var(--surface-2); color: var(--accent-cyan);
}
.rank-badge--1 { background: #eab308; color: #3a2600; }
.rank-badge--2 { background: #cbd5e1; color: #1f2937; }
.rank-badge--3 { background: #d99a6c; color: #3a1f00; }

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.feature-icon { font-size: 1.7rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; margin: 0; }
.payout-methods { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.method-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
}

/* ===== Developers ===== */
.dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.dev-list { margin: 18px 0 26px; }
.dev-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.dev-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--brand);
}
.code-window {
  background: #0c1220;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}
.code-dots {
  display: flex; gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.code-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-2); }
.code-dots span:nth-child(1) { background: #ef4444; }
.code-dots span:nth-child(2) { background: #f59e0b; }
.code-dots span:nth-child(3) { background: #22c55e; }
.code-window pre {
  margin: 0;
  padding: 22px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  color: #cbd5e1;
}
.c-key { color: #ec4899; }
.c-fn { color: #22d3ee; }
.c-str { color: #4ade80; }
.c-num { color: #facc15; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.connect-list { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.connect-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.connect-item:hover { border-color: var(--accent-cyan); transform: translateX(2px); }
.connect-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent-cyan);
}
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dim);
}
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.18);
}
.form-status { min-height: 1.2em; font-size: 0.88rem; margin-top: 12px; margin-bottom: 0; }
.form-status.success { color: var(--accent-green); }
.form-status.error { color: #f87171; }

/* ===== CTA band ===== */
.cta-band {
  background: rgba(124,58,237,0.07);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-band-inner {
  text-align: center;
  padding: 80px 24px;
}
.cta-band-inner h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin-bottom: 28px; }

/* ===== Footer ===== */
.site-footer { padding: 56px 0 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}
.footer-brand p { max-width: 260px; font-size: 0.88rem; margin-top: 8px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.85rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.92rem; color: var(--text-dim); margin-bottom: 10px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding: 22px 24px;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .dev-grid, .contact-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .header-cta .btn--ghost { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  .games-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner, .footer-bottom { flex-direction: column; }
}
