/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-background: #050713;
  --color-surface: #0c0f1d;
  --color-surface-elevated: #141827;

  --color-text: #f5f7ff;
  --color-text-muted: #a0a5c4;
  --color-text-soft: #7a80a5;

  --color-primary: #3b82f6; /* neon / electric blue */
  --color-primary-soft: rgba(59, 130, 246, 0.16);
  --color-primary-strong: #60a5fa;

  --color-accent-purple: #a855f7;
  --color-accent-purple-soft: rgba(168, 85, 247, 0.18);

  --color-success: #22c55e;
  --color-success-soft: rgba(34, 197, 94, 0.15);

  --color-warning: #fbbf24;
  --color-warning-soft: rgba(251, 191, 36, 0.16);

  --color-danger: #ef4444;
  --color-danger-soft: rgba(239, 68, 68, 0.16);

  --color-border-subtle: #1e2235;
  --color-border-strong: #2b3047;

  --color-overlay: rgba(5, 7, 19, 0.85);

  /* Neutral grays for flexible use */
  --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;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px */
  --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.3;
  --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-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-9: 2.25rem;  /* 36px */
  --space-10: 2.5rem;  /* 40px */
  --space-11: 2.75rem; /* 44px */
  --space-12: 3rem;    /* 48px */
  --space-14: 3.5rem;  /* 56px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 0.125rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-pill: 999px;

  /* Shadows - tuned for dark, high-energy UI */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow-primary: 0 0 0 1px rgba(59, 130, 246, 0.4), 0 0 24px rgba(59, 130, 246, 0.5);
  --shadow-glow-purple: 0 0 0 1px rgba(168, 85, 247, 0.4), 0 0 24px rgba(168, 85, 247, 0.45);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 260ms ease-out;

  /* Layout */
  --container-max-width: 1200px;
  --container-max-width-wide: 1440px;

  /* Focus ring */
  --focus-ring-color: rgba(59, 130, 246, 0.9);
  --focus-ring-offset: 2px;
  --focus-ring-width: 2px;
}

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

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

ol, ul {
  list-style: none;
}

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

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

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

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

/* Remove default focus outline; we'll handle focus-visible explicitly */
:focus {
  outline: none;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #111827 0, var(--color-background) 45%, #020617 100%);
  color: var(--color-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

/* Headings - bold, gamer-centric display */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(var(--font-size-3xl), 2.4vw + 1.5rem, var(--font-size-5xl));
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(var(--font-size-2xl), 1.6vw + 1.3rem, var(--font-size-4xl));
  margin-bottom: var(--space-3);
}

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

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

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
}

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

strong {
  font-weight: 600;
}

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

/* Links - subtle neon hover, no underline */
a {
  color: var(--color-primary-strong);
  text-decoration: none;
  transition: color var(--transition-normal), text-shadow var(--transition-normal), opacity var(--transition-fast);
}

a:hover {
  color: #bfdbfe;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}

a:active {
  opacity: 0.8;
}

/* ==========================================================================
   Accessibility & Motion
   ========================================================================== */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

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

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

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

.container--wide {
  max-width: var(--container-max-width-wide);
}

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

.section--tight {
  padding-block: var(--space-6);
}

/* 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-column {
  display: flex;
  flex-direction: column;
}

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

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

.gap-sm {
  gap: var(--space-3);
}

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

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

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-4);
}

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

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

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

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

/* Spacing utilities (margin / padding, limited set) */
.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-2); }
.mt-sm { margin-top: var(--space-3); }
.mt-md { margin-top: var(--space-4); }
.mt-lg { margin-top: var(--space-6); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-2); }
.mb-sm { margin-bottom: var(--space-3); }
.mb-md { margin-bottom: var(--space-4); }
.mb-lg { margin-bottom: var(--space-6); }

.pt-sm { padding-top: var(--space-3); }
.pt-md { padding-top: var(--space-4); }
.pt-lg { padding-top: var(--space-6); }

.pb-sm { padding-bottom: var(--space-3); }
.pb-md { padding-bottom: var(--space-4); }
.pb-lg { padding-bottom: var(--space-6); }

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

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

/* ==========================================================================
   Components - Buttons
   ========================================================================== */
.button {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-strong);
  --btn-color: #0b1120;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-border);

  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;

  background: radial-gradient(circle at 10% 0, rgba(148, 163, 253, 0.6) 0, transparent 40%),
              linear-gradient(135deg, var(--btn-bg) 0, var(--color-accent-purple) 100%);
  color: var(--btn-color);

  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              background var(--transition-normal),
              opacity var(--transition-fast);
}

.button:hover {
  background: linear-gradient(135deg, var(--btn-bg-hover) 0, var(--color-accent-purple) 100%);
  transform: translateY(-1px) scale(1.01);
  box-shadow: var(--shadow-glow-primary);
}

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

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

.button--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(15, 23, 42, 0.8);
  --btn-color: var(--color-text);
  --btn-border: rgba(148, 163, 253, 0.4);

  background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.18) 0, transparent 40%);
  box-shadow: var(--shadow-xs);
}

.button--ghost:hover {
  background-color: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow-glow-purple);
}

.button--secondary {
  --btn-bg: var(--color-surface-elevated);
  --btn-bg-hover: #111827;
  --btn-color: var(--color-text);
  --btn-border: var(--color-border-strong);

  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow-sm);
}

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

/* Icon alignment in buttons */
.button > svg,
.button > img {
  width: 1.1rem;
  height: 1.1rem;
}

/* ==========================================================================
   Components - Form Inputs
   ========================================================================== */
.input,
.select,
.textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);

  background-color: rgba(15, 23, 42, 0.85);
  color: var(--color-text);

  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-snug);

  transition: border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              background-color var(--transition-fast);
}

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

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: var(--color-primary-strong);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 0 0 2px var(--focus-ring-color);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 0 0 2px var(--color-danger-soft);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

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

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

/* ==========================================================================
   Components - Card (product / review / content)
   ========================================================================== */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.17) 0, transparent 50%),
              radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.22) 0, transparent 60%),
              linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 253, 0.25);
  box-shadow: var(--shadow-md);
  padding: var(--space-5);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.18), transparent 35%, transparent 65%, rgba(168, 85, 247, 0.18));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover::before {
  opacity: 1;
}

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

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

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

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

.card-footer {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* Compact card variant for grids (e.g., product tiles) */
.card--compact {
  padding: var(--space-4);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Helper: Badges / Pills (e.g., platform, status)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge--primary {
  background: var(--color-primary-soft);
  border-color: rgba(59, 130, 246, 0.6);
  color: #dbeafe;
}

.badge--success {
  background: var(--color-success-soft);
  border-color: rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
}

.badge--warning {
  background: var(--color-warning-soft);
  border-color: rgba(251, 191, 36, 0.7);
  color: #fef3c7;
}

.badge--danger {
  background: var(--color-danger-soft);
  border-color: rgba(239, 68, 68, 0.7);
  color: #fee2e2;
}

/* ==========================================================================
   Misc Utilities for High-Contrast Gamer UI
   ========================================================================== */
.text-muted {
  color: var(--color-text-muted);
}

.text-soft {
  color: var(--color-text-soft);
}

.text-accent {
  color: var(--color-accent-purple);
}

.bg-surface {
  background-color: var(--color-surface);
}

.bg-surface-elevated {
  background-color: var(--color-surface-elevated);
}

.border-subtle {
  border: 1px solid var(--color-border-subtle);
}

.border-strong {
  border: 1px solid var(--color-border-strong);
}

.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-pill { border-radius: var(--radius-pill); }

/* Limit content width for long-form descriptions (e.g., system requirements) */


.prose p + p {
  margin-top: var(--space-3);
}

/* End of base.css */
