/* =====================================
   Variables
   ===================================== */
:root {
  /* Color Palette - Futuristic Neon Sci-Fi */
  --color-bg: #050712; /* deep space / dark graphite */
  --color-bg-elevated: #0b0f1f;
  --color-surface: #111729;
  --color-surface-soft: #181f33;

  --color-text: #e6ecff;
  --color-text-muted: #9ba3c7;
  --color-text-soft: #7b84a9;

  --color-primary: #3b82f6; /* neon blue */
  --color-primary-soft: rgba(59, 130, 246, 0.15);

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

  --color-accent-cyan: #22d3ee; /* glowing cyan */
  --color-accent-green: #22c55e; /* toxic green */

  --color-success: #16a34a;
  --color-warning: #eab308;
  --color-danger: #ef4444;

  --color-neutral-50: #050712;
  --color-neutral-100: #0b0f1f;
  --color-neutral-200: #111729;
  --color-neutral-300: #181f33;
  --color-neutral-400: #1f2940;
  --color-neutral-500: #2b3550;
  --color-neutral-600: #3b4764;
  --color-neutral-700: #4b5676;
  --color-neutral-800: #6b7295;
  --color-neutral-900: #9ba3c7;

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

  /* Font sizes (rem) */
  --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.6;
  --line-height-relaxed: 1.8;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

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

  /* Shadows - subtle neon glow */
  --shadow-soft:
    0 10px 30px rgba(0, 0, 0, 0.65);
  --shadow-strong:
    0 0 0 1px rgba(59, 130, 246, 0.18),
    0 18px 45px rgba(15, 23, 42, 0.85);
  --shadow-neon:
    0 0 16px rgba(34, 211, 238, 0.45),
    0 0 32px rgba(59, 130, 246, 0.45);

  /* Transitions */
  --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 {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

picture {
  display: block;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
}

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

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

legend {
  padding: 0;
}

textarea {
  resize: vertical;
}

[hidden] {
  display: none !important;
}

/* =====================================
   Base Styles
   ===================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18) 0, transparent 55%),
    radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.18) 0, transparent 55%),
    var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 60vh;
}

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

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

h2 {
  font-size: clamp(var(--font-size-2xl), 2.4vw, var(--font-size-4xl));
  margin: var(--space-6) 0 var(--space-3);
}

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

h4 {
  font-size: var(--font-size-lg);
  margin: var(--space-3) 0 var(--space-1);
}

h5 {
  font-size: var(--font-size-md);
  margin: var(--space-2) 0 var(--space-1);
}

h6 {
  font-size: var(--font-size-sm);
  margin: var(--space-2) 0 var(--space-1);
}

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

strong,
b {
  font-weight: 600;
}

a {
  color: var(--color-accent-cyan);
  text-decoration: none;
  transition:
    color var(--transition-normal),
    text-shadow var(--transition-normal);
}

a:hover {
  color: var(--color-primary);
  text-shadow: 0 0 6px rgba(34, 211, 238, 0.6);
}

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

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

hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: var(--space-6) 0;
}

/* =====================================
   Accessibility & Motion
   ===================================== */
:focus-visible {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 3px;
}

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

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

@media (min-width: 1200px) {
  .container {
    padding-inline: var(--space-6);
  }
}

/* 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;
}

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

.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 utilities */
.grid {
  display: grid;
}

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

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

/* Spacing utilities (margin/padding shortcuts) */
.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-0 { padding-top: 0; }
.pt-sm { padding-top: var(--space-3); }
.pt-md { padding-top: var(--space-4); }
.pt-lg { padding-top: var(--space-6); }

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

/* Text utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }

/* Screen reader only */
.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;
}

/* =====================================
   Components
   ===================================== */
/* Buttons - primary high-tech style */
.btn {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: #2563eb;
  --btn-text: #0b1020;
  --btn-border: rgba(148, 163, 184, 0.4);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-border);
  background: linear-gradient(135deg, var(--btn-bg), var(--color-accent-purple));
  color: var(--btn-text) !important;
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 0 10px rgba(59, 130, 246, 0.5),
    0 12px 30px rgba(15, 23, 42, 0.85);
  transition:
    background var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    border-color var(--transition-normal);
}

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

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

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

.btn--secondary {
  --btn-bg: rgba(15, 23, 42, 0.9);
  --btn-bg-hover: rgba(30, 64, 175, 0.9);
  --btn-text: var(--color-text);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9));
  box-shadow: 0 0 16px rgba(15, 23, 42, 0.9);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(15, 23, 42, 0.9);
  --btn-text: var(--color-text);
  background: linear-gradient(135deg, transparent, transparent);
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: none;
}

.btn--danger {
  --btn-bg: var(--color-danger);
  --btn-bg-hover: #b91c1c;
}

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

/* Inputs & form controls */
.input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.16) 0, transparent 60%),
    #020617;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background var(--transition-normal);
}

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

.input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-accent-cyan);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.7),
    0 0 16px rgba(34, 211, 238, 0.4);
}

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

label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
}

/* Card component - for mutant cards, guides, etc. */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98)),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.35) 0, transparent 55%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      130deg,
      rgba(59, 130, 246, 0.3),
      rgba(34, 197, 94, 0.06),
      rgba(59, 130, 246, 0.02)
    );
  mix-blend-mode: soft-light;
  opacity: 0.45;
}

.card--highlight {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: var(--shadow-neon);
}

.card-header {
  position: relative;
  margin-bottom: var(--space-3);
}

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

.card-subtitle {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-soft);
}

.card-body {
  position: relative;
  color: var(--color-text-muted);
}

/* Tag / pill - useful for gene types or rarity labels */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.25) 0, transparent 55%),
    rgba(15, 23, 42, 0.9);
  color: var(--color-text);
}

.tag--primary {
  border-color: rgba(59, 130, 246, 0.8);
}

.tag--danger {
  border-color: rgba(239, 68, 68, 0.8);
}

/* Tables - for breeding charts, battle comparisons */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

th,
td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--font-size-xs);
  color: var(--color-text-soft);
  background: rgba(15, 23, 42, 0.8);
}

tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.35);
}

tr:hover td {
  background: rgba(37, 99, 235, 0.18);
}

/* Hero-specific utility (for main page epic section) */
.hero {
  position: relative;
  padding-block: var(--space-12);
  color: var(--color-text);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.45) 0, transparent 55%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.4) 0, transparent 55%);
  opacity: 0.85;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

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

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.5rem);
  line-height: var(--line-height-tight);
}

.hero-subtitle {
  max-width: 40rem;
  margin-top: var(--space-3);
  color: var(--color-text-muted);
}

/* End of base.css */
