:root {
  /* =========================
     Color System
     ========================= */
  --color-bg: #050812;
  --color-bg-elevated: #0c1020;
  --color-bg-soft: #13182a;

  --color-text: #f5f7ff;
  --color-text-muted: #a8b0d3;
  --color-text-soft: #7c84aa;

  --color-primary: #5b8dff;
  --color-primary-soft: rgba(91, 141, 255, 0.16);
  --color-primary-strong: #2f63f2;

  --color-success: #3ad29f;
  --color-success-soft: rgba(58, 210, 159, 0.16);

  --color-warning: #ffcc4d;
  --color-warning-soft: rgba(255, 204, 77, 0.16);

  --color-danger: #ff4f6d;
  --color-danger-soft: rgba(255, 79, 109, 0.16);

  --color-gray-50: #f8f9ff;
  --color-gray-100: #e2e6ff;
  --color-gray-200: #c3c8e6;
  --color-gray-300: #9ca2c8;
  --color-gray-400: #7a81aa;
  --color-gray-500: #585f84;
  --color-gray-600: #3f4564;
  --color-gray-700: #2b3047;
  --color-gray-800: #1b2137;
  --color-gray-900: #111627;

  /* Accent / FX colors (subtle neon for gaming vibe) */
  --color-accent-cyan: #41e0ff;
  --color-accent-magenta: #ff5ed2;
  --color-accent-purple: #a56bff;

  /* =========================
     Typography
     ========================= */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Font sizes (rem-based scale) */
  --font-size-xs: 0.75rem;   /* ~12px */
  --font-size-sm: 0.875rem;  /* ~14px */
  --font-size-md: 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 heights */
  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

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

  /* =========================
     Radii, Shadows, Motion
     ========================= */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 45px rgba(5, 12, 40, 0.65);
  --shadow-glow-primary: 0 0 25px rgba(91, 141, 255, 0.7);

  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;
}

/* =========================
   Reset / Normalize
   ========================= */

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

html,
body,
h1,
 h2,
 h3,
 h4,
 h5,
 h6,
 p,
 figure,
 blockquote,
 dl,
 dd,
 ul,
 ol {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
}

ul,
ol {
  list-style: none;
}

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

img {
  height: auto;
}

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

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

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

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================
   Base Styles
   ========================= */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #16224a 0, #050812 55%, #02030a 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: 0.01em;
  color: #ffffff;
}

h1 {
  font-size: clamp(2.25rem, 2vw + 2rem, 3rem);
  margin-bottom: var(--space-12);
}

h2 {
  font-size: clamp(1.75rem, 1.4vw + 1.4rem, 2.25rem);
  margin-bottom: var(--space-10);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-8);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-6);
}

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

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

code,
 pre {
  font-family: var(--font-mono);
}

pre {
  background-color: var(--color-bg-soft);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  overflow-x: auto;
}

a {
  position: relative;
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal),
              text-shadow var(--transition-normal);
}

a:hover {
  color: var(--color-accent-cyan);
  text-shadow: 0 0 12px rgba(65, 224, 255, 0.75);
}

a:focus-visible {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

hr {
  border: 0;
  border-top: 1px solid rgba(132, 146, 214, 0.22);
  margin: var(--space-16) 0;
}

::selection {
  background: rgba(91, 141, 255, 0.45);
  color: #ffffff;
}

/* =========================
   Accessibility Helpers
   ========================= */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.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;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* =========================
   Layout Utilities
   ========================= */

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

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

.section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section--alt {
  background: linear-gradient(135deg, rgba(22, 34, 74, 0.7), rgba(5, 8, 18, 0.95));
}

/* Flex utilities */

.flex {
  display: flex;
}

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

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

.flex-row {
  flex-direction: row;
}

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

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

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

.justify-between {
  justify-content: space-between;
}

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

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

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

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

/* Grid utilities */

.grid {
  display: grid;
}

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

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

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

.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

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

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  color: #ffffff;
  background: radial-gradient(circle at 0 0, rgba(104, 161, 255, 0.38), rgba(47, 99, 242, 0.98));
  box-shadow: 0 15px 35px rgba(5, 8, 18, 0.9);
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              background var(--transition-normal),
              opacity var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: var(--shadow-glow-primary);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 3px;
}

.btn--ghost {
  background: rgba(9, 15, 40, 0.8);
  border-color: rgba(124, 132, 170, 0.6);
  color: var(--color-text);
}

.btn--ghost:hover {
  background: rgba(23, 34, 86, 0.95);
}

.btn--secondary {
  background: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-magenta));
}

.btn--danger {
  background: linear-gradient(135deg, var(--color-danger), #ff2060);
}

.btn--full {
  width: 100%;
}

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

/* --- Inputs & Form Controls --- */

.input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(136, 149, 214, 0.35);
  background-color: rgba(6, 10, 30, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              background-color var(--transition-normal),
              transform var(--transition-fast);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-text-soft);
}

.input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(91, 141, 255, 0.7);
  background-color: rgba(10, 16, 44, 0.98);
}

.input[disabled],
textarea[disabled],
select[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.label {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

.field-helper {
  margin-top: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
}

.field-error {
  margin-top: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* --- Card Component --- */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-12);
  background: linear-gradient(145deg, rgba(13, 18, 45, 0.98), rgba(7, 10, 28, 0.98));
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(140, 151, 214, 0.2);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(91, 141, 255, 0.18), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

.card__content {
  position: relative;
  z-index: 1;
}

.card--highlight {
  border-color: rgba(65, 224, 255, 0.6);
  box-shadow: var(--shadow-glow-primary);
}

.card--soft {
  background: rgba(9, 14, 38, 0.95);
  border-style: dashed;
  border-color: rgba(124, 132, 170, 0.7);
}

/* For screenshot / media areas */
.card-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(circle at 0 0, rgba(65, 224, 255, 0.12), rgba(16, 22, 56, 0.96));
  min-height: 180px;
}

.card-media__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* =========================
   Page-Specific Helpers
   (for guides, tips, FAQ, etc.)
   ========================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(91, 141, 255, 0.15);
  color: var(--color-text);
  border: 1px solid rgba(91, 141, 255, 0.7);
}

.badge--success {
  background: var(--color-success-soft);
  border-color: var(--color-success);
}

.badge--warning {
  background: var(--color-warning-soft);
  border-color: var(--color-warning);
}

.badge--danger {
  background: var(--color-danger-soft);
  border-color: var(--color-danger);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.tag {
  font-size: var(--font-size-xs);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(19, 26, 62, 0.9);
  color: var(--color-text-soft);
}

/* FAQ accordion basic styles (no JS behavior here) */

.faq-item {
  border-radius: var(--radius-md);
  background: rgba(7, 11, 30, 0.95);
  border: 1px solid rgba(124, 132, 170, 0.45);
  padding: var(--space-8) var(--space-10);
}

.faq-item + .faq-item {
  margin-top: var(--space-6);
}

.faq-item__question {
  font-weight: 600;
  color: var(--color-text);
}

.faq-item__answer {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
}

/* =========================
   Navigation & Header Basics
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  background: linear-gradient(to right, rgba(5, 8, 18, 0.96), rgba(5, 8, 18, 0.88));
  border-bottom: 1px solid rgba(116, 132, 214, 0.32);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__link {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  position: relative;
  padding-bottom: 0.2rem;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent-cyan));
  transition: width var(--transition-normal);
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link--active {
  color: #ffffff;
}

/* =========================
   Footer Basics
   ========================= */

.site-footer {
  border-top: 1px solid rgba(124, 132, 170, 0.4);
  background: radial-gradient(circle at top, rgba(15, 24, 60, 0.6), #040711 60%);
  padding-top: var(--space-16);
  padding-bottom: var(--space-10);
}

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

/* =========================
   Media Queries for base tweaks
   ========================= */

@media (max-width: 768px) {
  h1 {
    margin-bottom: var(--space-8);
  }

  .site-header__inner {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }

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

  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
}
