/* ==================================================================
   Variables
   ================================================================== */
:root {
  /* Color palette - dark, immersive, game-focused */
  --color-background: #050712;
  --color-surface: #0e101d;
  --color-surface-elevated: #15182a;

  --color-text: #f5f7ff;
  --color-text-muted: #a5adc7;

  --color-primary: #6173ff;
  --color-primary-soft: rgba(97, 115, 255, 0.12);
  --color-primary-strong: #4353ff;

  --color-success: #27c499;
  --color-warning: #ffbf47;
  --color-danger: #ff4b6a;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Accent / status backgrounds */
  --color-success-soft: rgba(39, 196, 153, 0.12);
  --color-warning-soft: rgba(255, 191, 71, 0.14);
  --color-danger-soft: rgba(255, 75, 106, 0.14);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-display: "Rajdhani", "Orbitron", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;

  --font-size-xs: 0.75rem;  /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem;   /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem;  /* 20px */
  --font-size-2xl: 1.5rem;  /* 24px */
  --font-size-3xl: 1.875rem;/* 30px */
  --font-size-4xl: 2.25rem; /* 36px */
  --font-size-5xl: 3rem;    /* 48px */

  --line-height-tight: 1.15;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* Shadows - subtle neon for game style */
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 40px rgba(5, 7, 18, 0.75);
  --shadow-glow-primary: 0 0 30px rgba(97, 115, 255, 0.45);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 320ms ease-out;
}

/* ==================================================================
   Reset / Normalize
   ================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
  margin: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

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

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================================================================
   Base
   ================================================================== */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #161a33 0, #050712 55%, #02030a 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 { font-size: var(--font-size-5xl); margin-bottom: var(--space-4); }

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

small {
  font-size: var(--font-size-sm);
}

code, pre {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular,
    Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

::selection {
  background: rgba(97, 115, 255, 0.35);
  color: #ffffff;
}

/* Links - subtle glow hover, no underline by default */
a {
  position: relative;
  transition: color var(--transition-base),
    text-shadow var(--transition-base),
    opacity var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
  text-shadow: 0 0 12px rgba(97, 115, 255, 0.6);
}

/* ==================================================================
   Accessibility & Focus Styles
   ================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

::-moz-focus-inner {
  border: 0;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================================================================
   Layout Utilities
   ================================================================== */
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-4);
  max-width: 1120px;
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

/* Grid helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Spacing helpers (y-axis) */
.section {
  padding-block: var(--space-12);
}

.section-lg {
  padding-block: var(--space-16);
}

.section-sm {
  padding-block: var(--space-8);
}

/* Width helpers */
.w-full {
  width: 100%;
}

/* ==================================================================
   Components
   ================================================================== */

/* Buttons */
.btn {
  --btn-bg: var(--color-surface-elevated);
  --btn-border: transparent;
  --btn-color: var(--color-text);
  --btn-bg-hover: #1d2240;
  --btn-shadow: var(--shadow-sm);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-inline: var(--space-5);
  padding-block: 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: background var(--transition-base),
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    opacity var(--transition-fast);
}

.btn-primary {
  --btn-bg: linear-gradient(135deg, #000000 0%, var(--color-primary-strong) 100%);
  --btn-border: rgba(255, 255, 255, 0.15);
  --btn-color: #ffffff;
  --btn-bg-hover: linear-gradient(135deg, var(--color-primary-strong) 0%, #2933ff 100%);
  --btn-shadow: var(--shadow-glow-primary);
}

.btn-ghost {
  --btn-bg: rgba(15, 18, 40, 0.7);
  --btn-border: rgba(255, 255, 255, 0.1);
  --btn-color: var(--color-text);
  --btn-bg-hover: rgba(24, 29, 70, 0.95);
  --btn-shadow: var(--shadow-sm);
}

.btn-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-full {
  width: 100%;
}

/* Inputs */
.input,
textarea,
select {
  width: 100%;
  padding-inline: var(--space-3);
  padding-block: 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(5, 7, 18, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  outline: none;
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.input::placeholder,
textarea::placeholder {
  color: rgba(165, 173, 199, 0.6);
}

.input:focus,
textarea:focus,
select:focus {
  border-color: rgba(97, 115, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(97, 115, 255, 0.6);
  background-color: rgba(9, 12, 30, 0.95);
}

.input[aria-invalid="true"],
.input.input-error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 1px rgba(255, 75, 106, 0.6);
}

.label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.helper-text {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.helper-text.error {
  color: var(--color-danger);
}

/* Card */
.card {
  position: relative;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(97, 115, 255, 0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(39, 196, 153, 0.08), transparent 55%),
    var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 40%, transparent 60%, rgba(97, 115, 255, 0.3));
  opacity: 0.18;
  mix-blend-mode: screen;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Hero-specific utilities for game vibe */
.hero {
  padding-block: var(--space-16);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-10);
  align-items: center;
}

.hero-kicker {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.26);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* Branded Google Play glyph inside Download button */
.btn-play-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2028.99%2031.99'%3E%3Cpath%20fill%3D'%23ea4335'%20d%3D'M13.54%2015.28.12%2029.34a3.66%203.66%200%200%200%205.33%202.16l15.1-8.6Z'%2F%3E%3Cpath%20fill%3D'%23fbbc04'%20d%3D'm27.11%2012.89-6.53-3.74-7.35%206.45%207.38%207.28%206.48-3.7a3.54%203.54%200%200%200%201.5-4.79%203.62%203.62%200%200%200-1.5-1.5z'%2F%3E%3Cpath%20fill%3D'%234285f4'%20d%3D'M.12%202.66a3.57%203.57%200%200%200-.12.92v24.84a3.57%203.57%200%200%200%20.12.92L14%2015.64Z'%2F%3E%3Cpath%20fill%3D'%2334a853'%20d%3D'm13.64%2016%206.94-6.85L5.5.51A3.73%203.73%200%200%200%203.63%200%203.64%203.64%200%200%200%20.12%202.65Z'%2F%3E%3C%2Fsvg%3E");
}

/* Tags / meta chips for mechanics & updates */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.32);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  background: rgba(15, 23, 42, 0.8);
}

/* Simple pill for status in news/updates */
.status-pill {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.status-pill--live {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.status-pill--beta {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.status-pill--soon {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

/* Featured list for mechanics / how-it-works */
.feature-list {
  display: grid;
  gap: var(--space-4);
}

.feature-item-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-1);
}

.feature-item-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

/* Updates timeline */
.timeline {
  position: relative;
  padding-left: var(--space-4);
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 0.8rem;
  width: 2px;
  background: linear-gradient(to bottom, rgba(148, 163, 184, 0.4), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-5);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: -0.1rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: radial-gradient(circle, #ffffff 0, var(--color-primary) 55%, rgba(15, 23, 42, 1) 100%);
  box-shadow: 0 0 0 3px rgba(97, 115, 255, 0.4);
}

.timeline-meta {
  font-size: var(--font-size-xs);
  color: var(--gray-400);
  margin-bottom: var(--space-1);
}

/* Footer basics (company / legal info) */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-block: var(--space-6);
  background: rgba(2, 6, 23, 0.9);
}

.site-footer-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ==================================================================
   Responsive Tweaks
   ================================================================== */
@media (max-width: 960px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .section {
    padding-block: var(--space-8);
  }

  .hero {
    padding-block: var(--space-12);
  }

  h1 {
    font-size: var(--font-size-4xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

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