:root {
  --background: #0f0f1a;
  --panel: #f8f7fc;
  --card: #ffffff;
  --text: #2d2b36;
  --muted: #7a7686;
  --primary: #7c5cfc;
  --primary-light: #9b82ff;
  --accent: #00d4aa;
  --yellow: #fbbf24;
  --orange: #f97316;
  --green: #34d399;
  --purple: #7c5cfc;
  --purple-dark: #5b3fd4;
  --border: rgba(124, 92, 252, 0.2);
  --shadow: rgba(0, 0, 0, 0.15);
}

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

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: linear-gradient(165deg, #0f0f1a 0%, #1a1333 30%, #0f172a 70%, #0c0c18 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.62;
}

a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

p {
  margin: 12px 0 0;
}

ul {
  margin: 14px 0 0;
  padding-left: 24px;
}

li {
  margin: 8px 0;
}

hr {
  height: 2px;
  margin: 28px 0 18px;
  border: 0;
  background: linear-gradient(90deg, var(--primary), var(--yellow), var(--green));
}

/* ── Navbar ─────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.navbar-brand:hover {
  text-decoration: none;
}

.navbar-brand span {
  font-size: 28px;
}

.navbar-links {
  display: flex;
  gap: 6px;
}

.navbar-links a {
  padding: 8px 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
}

.navbar-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

/* ── Shared layouts ─────────────────────────────── */

.site-shell {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  color: #ffffff;
}

/* ── Homepage hero ──────────────────────────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 0 24px;
  text-align: center;
}

.hero-emoji {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 20px;
  animation: hero-bounce 2.4s ease-in-out infinite;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  max-width: 520px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
}

.hero-tagline {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

/* ── Store badges ───────────────────────────────── */

.store-badges {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.32);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.store-badge:hover {
  transform: translateY(-3px);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.store-badge .badge-icon {
  font-size: 26px;
}

.store-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.store-badge .badge-small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.65;
}

/* ── Section titles ─────────────────────────────── */

.section-title {
  text-align: center;
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  font-weight: 500;
  margin-top: 8px;
}

/* ── How to play ────────────────────────────────── */

.how-section {
  margin-top: 64px;
}

.how-steps {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  justify-content: center;
}

.how-step {
  flex: 1;
  max-width: 260px;
  text-align: center;
  padding: 28px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  transition: transform 0.15s, background 0.15s;
}

.how-step:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.4);
}

.step-emoji {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 12px;
}

.step-title {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.step-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.45;
}

/* ── Features grid ──────────────────────────────── */

.features-section {
  margin-top: 64px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.feature-card {
  padding: 26px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  text-align: center;
  transition: transform 0.15s, background 0.15s;
}

.feature-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
}

.feature-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
}

.feature-title {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.feature-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.45;
}

/* ── Legal links on homepage ────────────────────── */

.legal-section {
  margin-top: 64px;
}

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

.legal-link {
  display: block;
  padding: 24px;
  color: var(--text);
  text-decoration: none;
  background: #ffffff;
  border: 1px solid rgba(124, 92, 252, 0.15);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s;
}

.legal-link:hover {
  transform: translateY(-4px);
  text-decoration: none;
}

.legal-link .link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  border-radius: 14px;
}

.legal-link strong {
  display: block;
  color: var(--purple-dark);
  font-size: 20px;
  font-weight: 900;
}

.legal-link p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/* ── Footer ─────────────────────────────────────── */

.site-footer {
  margin-top: 64px;
  padding: 32px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #ffffff;
}

.footer-brand {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: 800;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 14px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-copy {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
}

/* ── Legal card (privacy, terms pages) ──────────── */

.legal-wrapper {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0 8px;
}

.legal-breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.legal-breadcrumb a:hover {
  color: #ffffff;
}

.legal-breadcrumb .sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

.legal-breadcrumb .current {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
}

.legal-card {
  width: min(920px, calc(100% - 32px));
  margin: 8px auto 40px;
  padding: clamp(24px, 4vw, 48px);
  background: var(--card);
  border: 1px solid rgba(124, 92, 252, 0.12);
  border-radius: 24px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
}

.legal-card::before {
  content: "";
  display: block;
  width: 76px;
  height: 10px;
  margin-bottom: 24px;
  background: linear-gradient(90deg, var(--primary), var(--yellow), var(--green));
  border-radius: 999px;
}

.legal-card h1 {
  color: var(--primary);
  font-size: 32px;
  font-weight: 900;
}

.legal-card h2 {
  margin-top: 32px;
  color: var(--purple-dark);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
}

.legal-card h3 {
  margin-top: 22px;
  color: var(--purple-dark);
  font-size: 17px;
  font-weight: 800;
}

.legal-card p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

.legal-card a {
  color: var(--purple);
}

.legal-card ul {
  padding-left: 22px;
}

.legal-card li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.effective-date {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  background: var(--panel);
  border-radius: 8px;
}

.contact-box {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.contact-box p {
  margin: 4px 0;
  font-size: 15px;
}

/* ── Legal page footer ──────────────────────────── */

.legal-footer {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.legal-footer .footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.legal-footer .footer-links a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.legal-footer .footer-links a:hover {
  color: #ffffff;
}

.legal-footer .footer-copy {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
}

/* ── Responsive ─────────────────────────────────── */

@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }

  .navbar-brand {
    font-size: 17px;
  }

  .navbar-brand span {
    font-size: 22px;
  }

  .navbar-links a {
    padding: 6px 12px;
    font-size: 13px;
  }

  .hero {
    padding: 48px 0 20px;
  }

  .hero-emoji {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-steps {
    flex-direction: column;
    align-items: center;
  }

  .how-step {
    max-width: 100%;
    width: 100%;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }
}

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

  .store-badges {
    flex-direction: column;
    align-items: center;
  }

  .store-badge {
    width: 100%;
    justify-content: center;
  }

  .legal-card {
    border-radius: 18px;
  }

  .legal-card h1 {
    font-size: 26px;
  }
}
