/* =============================================
   StarFoxGames.com — Global Stylesheet
   Theme: Deep-space HUD, Arwing cockpit aesthetic
   ============================================= */

:root {
  /* Colors */
  --bg-deep: #050816;
  --bg-panel: #0d1224;
  --bg-card: #131a35;
  --border: #1f2a52;
  --border-glow: #2d3d75;

  --primary: #00d4ff;     /* Arwing cyan */
  --primary-dim: #0891b2;
  --accent: #ff5252;      /* Fox red */
  --gold: #ffd166;        /* Highlight */
  --green: #06d6a0;       /* HUD green */
  --purple: #b388ff;      /* Andross */

  --text: #e6ebff;
  --text-muted: #8892b8;
  --text-dim: #5a6585;

  /* Spacing */
  --container: 1200px;
  --radius: 4px;
  --radius-lg: 8px;

  /* Typography */
  --font-head: 'Orbitron', 'Rajdhani', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at top, rgba(0, 212, 255, 0.08), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(179, 136, 255, 0.05), transparent 50%);
  background-attachment: fixed;
}

/* Animated starfield */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, white, transparent),
    radial-gradient(1px 1px at 80% 60%, white, transparent),
    radial-gradient(2px 2px at 50% 80%, rgba(0, 212, 255, 0.6), transparent),
    radial-gradient(1px 1px at 90% 20%, white, transparent),
    radial-gradient(1px 1px at 10% 70%, rgba(255, 209, 102, 0.7), transparent),
    radial-gradient(1px 1px at 35% 50%, white, transparent),
    radial-gradient(2px 2px at 65% 35%, rgba(0, 212, 255, 0.4), transparent);
  background-size: 600px 600px;
  background-repeat: repeat;
  opacity: 0.4;
  z-index: -2;
  animation: starDrift 120s linear infinite;
}

@keyframes starDrift {
  from { background-position: 0 0; }
  to { background-position: -600px 600px; }
}

/* Grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; color: var(--primary); }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--text); }
p + p { margin-top: 0.5rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover { color: var(--gold); text-shadow: 0 0 8px currentColor; }

ul, ol { margin: 0 0 1rem 1.5rem; }
li { margin-bottom: 0.4rem; }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-panel);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--green);
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============== HEADER ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  color: var(--bg-deep);
  font-weight: 900;
  font-size: 1rem;
}

.brand span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  text-shadow: none;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.nav-cta {
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  border-radius: var(--radius);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg-deep) !important;
  box-shadow: 0 0 20px rgba(255, 82, 82, 0.5);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.2rem;
}

@media (max-width: 880px) {
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .menu-toggle { display: block; }
}

/* ============== HERO ============== */
.hero {
  position: relative;
  padding: 6rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.hero-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.hero h1 {
  background: linear-gradient(135deg, #fff 0%, var(--primary) 60%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  text-shadow: 0 0 60px rgba(0, 212, 255, 0.3);
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2rem;
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  color: var(--bg-deep);
  box-shadow: 0 0 0 rgba(0, 212, 255, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
  color: var(--bg-deep);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-glow);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ============== CARDS / PANELS ============== */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.panel::before, .panel::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--primary);
  opacity: 0.6;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.panel:hover {
  border-color: var(--primary-dim);
  transform: translateY(-3px);
}

.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 2.5rem;
  text-align: center;
}

.section-head .eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-head p {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* ============== GAME GRID ============== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(0, 212, 255, 0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 10px 40px rgba(0, 212, 255, 0.15);
}
.game-card:hover::before { opacity: 1; }

.game-card .year {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.game-card h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.game-card .platform {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.game-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.game-card .read-more {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.game-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(255, 82, 82, 0.15);
}
.game-card.featured .year { color: var(--accent); }

.badge-new {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.6); }
  50% { box-shadow: 0 0 0 10px rgba(255, 82, 82, 0); }
}

/* ============== TIMELINE ============== */
.timeline {
  position: relative;
  padding: 2rem 0;
  margin-left: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--primary), transparent);
}

.tl-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: 4px; top: 8px;
  width: 18px; height: 18px;
  background: var(--bg-deep);
  border: 2px solid var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--primary);
}

.tl-item .year-tag {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.tl-item h4 {
  color: var(--text);
  margin: 0.25rem 0;
  font-size: 1.1rem;
}

.tl-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ============== TABLE ============== */
.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-card);
  font-family: var(--font-head);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(0, 212, 255, 0.04); }

/* ============== STATS / INFOBOX ============== */
.infobox {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.infobox::before {
  content: '⬢ INTEL';
  position: absolute;
  top: -10px; left: 1rem;
  background: var(--bg-deep);
  padding: 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 0.15em;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat {
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
}

.stat .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat .value {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--text);
  margin-top: 0.25rem;
}

/* ============== CALLOUT ============== */
.callout {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--primary);
  background: rgba(0, 212, 255, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.callout.warning { border-color: var(--gold); background: rgba(255, 209, 102, 0.06); }
.callout.danger { border-color: var(--accent); background: rgba(255, 82, 82, 0.06); }
.callout strong { color: var(--primary); }
.callout.warning strong { color: var(--gold); }
.callout.danger strong { color: var(--accent); }

/* ============== PROSE ============== */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { margin-top: 2.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.prose h3 { margin-top: 2rem; }
.prose ul li::marker { color: var(--primary); }

/* ============== BREADCRUMBS ============== */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 1rem 0;
  letter-spacing: 0.05em;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 0.5rem; color: var(--border-glow); }

/* ============== COMPARE TABLE ============== */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (max-width: 720px) {
  .compare-grid { grid-template-columns: 1fr; }
}

.compare-col {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.compare-col.left { border-color: var(--primary-dim); }
.compare-col.right { border-color: var(--accent); }
.compare-col h3 { color: var(--text); }
.compare-col .tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  border-radius: 50px;
  margin-bottom: 0.5rem;
}
.compare-col.left .tag { background: rgba(0, 212, 255, 0.1); color: var(--primary); }
.compare-col.right .tag { background: rgba(255, 82, 82, 0.1); color: var(--accent); }

/* ============== FOOTER ============== */
.site-footer {
  margin-top: 5rem;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.footer-col h5 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.footer-bottom .disclaimer {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-style: italic;
}

/* ============== UTILITIES ============== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-gold { color: var(--gold); }

.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}
