/* ========================================================================== 
   Variables
   ========================================================================== */

:root {
  /* Colors - dark, immersive, cinematic */
  --color-bg: #050608; /* near-black background */
  --color-bg-elevated: #0f1115; /* dark card/panel */
  --color-bg-muted: #181b21;

  --color-text: #f4f5f7;
  --color-text-muted: #a3a7b3;
  --color-border-subtle: #252836;

  /* Brand & status colors inspired by Plague Inc. feel */
  --color-primary: #e11b2f; /* biohazard red */
  --color-primary-soft: rgba(225, 27, 47, 0.16);
  --color-accent-teal: #1bb3a6; /* medical teal */
  --color-accent-green: #8ee70b; /* toxic green */

  --color-success: #18a34a;
  --color-warning: #f0a500;
  --color-danger: #f44336;

  /* Neutral grays (cool / steel) */
  --gray-50: #0b0c10;
  --gray-100: #151823;
  --gray-200: #1f2330;
  --gray-300: #2b3040;
  --gray-400: #3b4254;
  --gray-500: #4b5468;
  --gray-600: #656f86;
  --gray-700: #8a93a7;
  --gray-800: #c1c6d4;
  --gray-900: #e6e8f0;

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

  /* Font sizes (clamp for responsiveness) */
  --fs-xs: 0.75rem;   /* 12px */
  --fs-sm: 0.875rem;  /* 14px */
  --fs-base: 1rem;    /* 16px */
  --fs-lg: 1.125rem;  /* 18px */
  --fs-xl: 1.25rem;   /* 20px */
  --fs-2xl: clamp(1.35rem, 1.2rem + 0.5vw, 1.6rem);
  --fs-3xl: clamp(1.7rem, 1.3rem + 1vw, 2.1rem);
  --fs-4xl: clamp(2.1rem, 1.6rem + 1.5vw, 2.6rem);

  /* Line heights */
  --lh-tight: 1.15;
  --lh-normal: 1.5;
  --lh-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-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, cinematic glow */
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-elevated: 0 22px 60px rgba(0, 0, 0, 0.75);
  --shadow-accent: 0 0 24px rgba(225, 27, 47, 0.6);

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

  /* Layout */
  --container-max-width: 1120px;
  --container-max-width-wide: 1320px;
}

/* ========================================================================== 
   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 {
  max-width: 100%;
  height: auto;
  display: block;
}

picture {
  display: block;
}

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

button,
input,
select,
textarea {
  margin: 0;
  font: inherit;
  color: inherit;
  background: none;
  border-radius: 0;
}

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

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

legend {
  padding: 0;
}

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

blockquote {
  margin: 0;
}

/* Remove list styles by default (often custom in cinematic UI) */
ul,
ol {
  list-style: none;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  background-color: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

/* Headings: strong hierarchy for immersive layout */

h1,
.h1 {
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

h2,
.h2 {
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

h3,
.h3 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-3);
}

h4,
.h4 {
  font-size: var(--fs-xl);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
}

h5,
.h5 {
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  margin-bottom: var(--space-2);
}

h6,
.h6 {
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  margin-bottom: var(--space-1);
}

p {
  margin-bottom: var(--space-4);
}

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

strong {
  font-weight: 600;
}

/* Links - neon / high contrast without default underline */

a {
  color: var(--color-accent-teal);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-base),
    text-shadow var(--transition-base);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-accent-green)
  );
  transition: width var(--transition-base);
}

a:hover {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(225, 27, 47, 0.7);
}

a:hover::after {
  width: 100%;
}



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

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-6) 0;
}

/* ========================================================================== 
   Accessibility & Motion
   ========================================================================== */

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

:focus:not(:focus-visible) {
  outline: none;
}

@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 */

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

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

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

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

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

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

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

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

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

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

/* Buttons - primary, ghost, subtle variants */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--color-primary);
  color: #fff!important;
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    color var(--transition-base);
}

.btn:hover {
  background-color: #ff2340;
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

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

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn--subtle {
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.btn--subtle:hover {
  background: rgba(225, 27, 47, 0.26);
}

.btn--accent {
  background: var(--color-accent-teal);
}

.btn--accent:hover {
  background: #22d0c1;
}

/* Input & form controls */

.input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: var(--color-bg-muted);
  color: var(--color-text);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-accent-teal);
  box-shadow: 0 0 0 1px var(--color-accent-teal);
}

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

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

/* Card - core building block for sections like guides, leaderboards, updates */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: radial-gradient(
      circle at top left,
      rgba(225, 27, 47, 0.12),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(27, 179, 166, 0.12),
      transparent 55%
    ),
    var(--color-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.03) 0,
      transparent 18%,
      transparent 82%,
      rgba(255, 255, 255, 0.03) 100%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: soft-light;
  opacity: 0.7;
}

.card__header {
  position: relative;
  z-index: 1;
  margin-bottom: var(--space-4);
}

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

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

.card__meta {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

/* Tag / pill - useful for difficulty, status, region, etc. */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: rgba(15, 17, 21, 0.9);
  color: var(--color-text-muted);
}

.tag--danger {
  border-color: rgba(225, 27, 47, 0.8);
  color: var(--color-primary);
}

.tag--success {
  border-color: rgba(142, 231, 11, 0.7);
  color: var(--color-accent-green);
}

.tag--accent {
  border-color: rgba(27, 179, 166, 0.8);
  color: var(--color-accent-teal);
}

/* Table base - for leaderboards / trackers */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.table thead {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.table th,
.table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table tbody tr:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.01);
}

.table tbody tr:hover {
  background-color: rgba(225, 27, 47, 0.06);
}

/* Badges for numeric stats (e.g., infection count) */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  padding: 0.25rem 0.45rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: rgba(225, 27, 47, 0.9);
  color: #fff;
}

.badge--muted {
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

/* Overlay / glass panel - for map overlays, HUD elements */

.panel-glass {
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
}

/* End of base.css */
