/* ==========================================================================
   NEO: GRID CONTROL — OFFICIAL PORTAL & KNOWLEDGE BASE
   OmniNet 2084 Tactical Cyberpunk Design System
   Vanilla CSS — Zero External Dependencies
   ========================================================================== */

/* --- Custom Variables & Cyber Palette --- */
:root {
  --bg-deep: #030712;
  --bg-surface: #0a0f1d;
  --bg-card: rgba(13, 19, 36, 0.75);
  --bg-card-hover: rgba(18, 27, 51, 0.9);
  --bg-hud: rgba(6, 11, 23, 0.85);

  /* Factions & Neons */
  --neon-neo: #00ff9d;           /* Resistance Emerald */
  --neon-neo-dim: rgba(0, 255, 157, 0.15);
  --neon-neo-glow: rgba(0, 255, 157, 0.45);

  --neon-overlord: #00e5ff;      /* Syndicate Cyan */
  --neon-overlord-dim: rgba(0, 229, 255, 0.15);
  --neon-overlord-glow: rgba(0, 229, 255, 0.45);

  --neon-purple: #a855f7;        /* Firewall Artifact */
  --neon-amber: #facc15;         /* Energy / Champion Gold */
  --neon-red: #ef4444;           /* Decay Alert / EMP */
  --neon-rose: #fb7185;

  /* Text colors */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #030712;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-cyan: rgba(0, 229, 255, 0.3);
  --border-neo: rgba(0, 255, 157, 0.35);

  /* Fonts */
  --font-display: 'Orbitron', 'Space Grotesk', -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Interactive Spotlight */
  --spotlight-x: 50%;
  --spotlight-y: 50%;
}

/* --- Global Reset & Box Sizing --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  font-size: 16px;
  background-color: var(--bg-deep);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--neon-overlord-dim);
  color: var(--neon-overlord);
}

/* --- Cyber Grid & Ambient Glow Layers --- */
.cyber-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.grid-cyber-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.7;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.ambient-orb-neo {
  top: -150px;
  left: -100px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(0, 255, 157, 0.12) 0%, rgba(0, 255, 157, 0.02) 50%, transparent 75%);
}

.ambient-orb-overlord {
  top: 15%;
  right: -150px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, rgba(168, 85, 247, 0.05) 50%, transparent 75%);
}

.ambient-orb-gold {
  bottom: 20%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.06) 0%, transparent 70%);
}

.cursor-spotlight {
  position: fixed;
  inset: 0;
  background: radial-gradient(750px circle at var(--spotlight-x) var(--spotlight-y), rgba(0, 229, 255, 0.04), transparent 75%);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.2s ease;
}

/* --- Container & Layout --- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* --- Telemetry HUD Bar --- */
.telemetry-bar {
  background: var(--bg-hud);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.4rem 0;
  position: relative;
  z-index: 40;
}

.telemetry-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.telemetry-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--neon-neo);
  box-shadow: 0 0 8px var(--neon-neo);
  animation: pulse-dot 1.8s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.telemetry-metrics {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.telemetry-accent {
  color: var(--neon-overlord);
  font-weight: 600;
}

/* --- Main Navigation Header --- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.brand-name span {
  color: var(--neon-overlord);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Nav links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.2rem;
  position: relative;
  transition: color 0.25s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-overlord);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 1.5px;
  background: var(--neon-overlord);
  box-shadow: 0 0 6px var(--neon-overlord);
  transition: width 0.25s ease;
}

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

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Switcher */
.lang-selector {
  display: flex;
  background: rgba(13, 19, 36, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  background: var(--neon-overlord-dim);
  color: var(--neon-overlord);
  font-weight: 700;
}

/* Audio Sound Button */
.sound-toggle-btn {
  background: rgba(13, 19, 36, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-toggle-btn:hover {
  border-color: var(--border-cyan);
  color: var(--neon-overlord);
}

/* Mobile Hamburger */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.4rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-overlord), #00b4d8);
  color: #030712;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.6);
  background: linear-gradient(135deg, #33ebff, var(--neon-overlord));
}

.btn-neo {
  background: linear-gradient(135deg, var(--neon-neo), #00cc7d);
  color: #030712;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.35);
}

.btn-neo:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 255, 157, 0.6);
}

.btn-outline {
  background: rgba(13, 19, 36, 0.6);
  border-color: var(--border-cyan);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: var(--neon-overlord-dim);
  border-color: var(--neon-overlord);
  color: var(--neon-overlord);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.72rem;
}

.btn-lg {
  padding: 0.95rem 1.8rem;
  font-size: 0.92rem;
}

/* --- Hero Section --- */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--border-cyan);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-overlord);
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  align-self: flex-start;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--neon-neo) 0%, #fff 50%, var(--neon-overlord) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.metric-val.neo-green { color: var(--neon-neo); }
.metric-val.cyan { color: var(--neon-overlord); }
.metric-val.gold { color: var(--neon-amber); }

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Hero Visual Card */
.hero-visual {
  position: relative;
}

.hero-card-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-cyan);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(0, 229, 255, 0.15);
  background: var(--bg-surface);
}

.hero-card-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-card-frame:hover .hero-card-img {
  transform: scale(1.02);
}

.hero-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(3, 7, 18, 0.95) 0%, rgba(3, 7, 18, 0.6) 60%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-overlay-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-neo);
  background: rgba(0, 255, 157, 0.12);
  border: 1px solid rgba(0, 255, 157, 0.4);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-overlord);
}

/* --- Section Shared Styles --- */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-overlord);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-cyan);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 30px -10px rgba(0, 229, 255, 0.15);
}

/* --- DECAY ENGINE MECHANICS SECTION --- */
.mechanics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.mechanic-card {
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.mechanic-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.icon-decay {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--neon-red);
}

.icon-firewall {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: var(--neon-purple);
}

.icon-tempo {
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: var(--neon-amber);
}

.mechanic-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.mechanic-card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.mechanic-pill-row {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Decay Timeline Visualizer */
.decay-stages-strip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
}

.stage-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
}

.stage-node-preview {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #0f172a;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
}

.stage-1 .stage-node-preview {
  border-color: var(--neon-neo);
  color: var(--neon-neo);
  box-shadow: 0 0 16px rgba(0, 255, 157, 0.4);
}

.stage-2 .stage-node-preview {
  border-color: rgba(0, 255, 157, 0.4);
  color: rgba(0, 255, 157, 0.6);
  opacity: 0.65;
  transform: scale(0.92);
}

.stage-3 .stage-node-preview {
  border-color: var(--neon-red);
  color: var(--neon-red);
  box-shadow: inset 0 0 12px rgba(239, 68, 68, 0.5), 0 0 14px rgba(239, 68, 68, 0.6);
  animation: pulse-decay-node 1.1s infinite ease-in-out;
}

@keyframes pulse-decay-node {
  0%, 100% { opacity: 0.35; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(0.98); }
}

.stage-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.stage-desc {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* --- INTERACTIVE 3X3 SIMULATOR SECTION --- */
.sim-section {
  background: radial-gradient(circle at 50% 30%, rgba(14, 22, 40, 0.8) 0%, rgba(3, 7, 18, 0.95) 75%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.sim-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

/* Interactive Board */
.sim-board-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sim-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 420px;
  background: var(--bg-hud);
  border: 1px solid var(--border-cyan);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.player-turn-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.turn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.turn-neo .turn-dot { background: var(--neon-neo); box-shadow: 0 0 8px var(--neon-neo); }
.turn-neo { color: var(--neon-neo); }

.turn-overlord .turn-dot { background: var(--neon-overlord); box-shadow: 0 0 8px var(--neon-overlord); }
.turn-overlord { color: var(--neon-overlord); }

.sim-board {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 50% 50%, rgba(14, 22, 40, 0.95) 0%, rgba(8, 13, 26, 0.98) 100%);
  border: 2px solid var(--border-cyan);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 229, 255, 0.2);
  border-radius: 20px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
}

.sim-cell {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
}

.sim-cell:hover:not(.occupied):not(.shielded) {
  background: rgba(25, 35, 55, 0.9);
  border-color: var(--neon-overlord);
  transform: scale(0.98);
}

.sim-cell.occupied {
  cursor: not-allowed;
}

/* Corner markers on cells */
.sim-cell::before, .sim-cell::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  pointer-events: none;
  border-color: rgba(0, 229, 255, 0.4);
}
.sim-cell::before { top: 5px; left: 5px; border-top: 1.5px solid; border-left: 1.5px solid; }
.sim-cell::after { bottom: 5px; right: 5px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

/* Marks */
.cell-mark {
  width: 70%;
  height: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mark-neo {
  color: var(--neon-neo);
  filter: drop-shadow(0 0 8px rgba(0, 255, 157, 0.8));
}

.mark-overlord {
  color: var(--neon-overlord);
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.8));
}

/* Decay states */
.mark-fresh {
  opacity: 1;
  transform: scale(1);
}

.mark-medium {
  opacity: 0.65;
  transform: scale(0.92);
}

.sim-cell.cell-decay-alert {
  border-color: var(--neon-red) !important;
  box-shadow: inset 0 0 14px rgba(239, 68, 68, 0.6), 0 0 14px rgba(239, 68, 68, 0.65) !important;
  animation: cell-danger-pulse 1.05s infinite ease-in-out !important;
}

.mark-decaying {
  animation: pulse-decay 1.05s infinite ease-in-out;
}

@keyframes pulse-decay {
  0%, 100% { opacity: 0.35; transform: scale(0.86); filter: drop-shadow(0 0 8px #ef4444); }
  50% { opacity: 0.95; transform: scale(0.98); filter: drop-shadow(0 0 14px #ef4444); }
}

@keyframes cell-danger-pulse {
  0%, 100% { border-color: rgba(239, 68, 68, 0.7); box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.4); }
  50% { border-color: #ff2222; box-shadow: inset 0 0 16px rgba(239, 68, 68, 0.8), 0 0 18px rgba(239, 68, 68, 0.8); }
}

/* Shielded cell by Firewall */
.sim-cell.shielded {
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.8), inset 0 0 10px rgba(168, 85, 247, 0.4) !important;
  border-color: var(--neon-purple) !important;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, rgba(17, 24, 39, 0.9) 75%) !important;
  cursor: not-allowed;
}

/* Winning line highlight */
.sim-cell.cell-win {
  border-color: var(--neon-neo) !important;
  box-shadow: 0 0 25px rgba(0, 255, 157, 0.85), inset 0 0 15px rgba(0, 255, 157, 0.5) !important;
  animation: win-cell-glow 1s infinite alternate ease-in-out;
}

@keyframes win-cell-glow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.35); }
}

/* Sim Controls Under Board */
.sim-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  width: 100%;
  max-width: 420px;
}

/* Simulator Instructions & Log */
.sim-meta-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sim-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.sim-mode-toggle {
  display: flex;
  background: rgba(3, 7, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
}

.sim-mode-btn {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-mode-btn.active {
  background: var(--neon-overlord-dim);
  color: var(--neon-overlord);
  font-weight: 700;
}

.sim-queue-monitor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.queue-box {
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem;
}

.queue-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.queue-slots {
  display: flex;
  gap: 0.4rem;
}

.queue-slot {
  flex: 1;
  height: 24px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.queue-slot.filled-neo {
  background: rgba(0, 255, 157, 0.2);
  border: 1px solid var(--neon-neo);
  color: var(--neon-neo);
}

.queue-slot.filled-overlord {
  background: rgba(0, 229, 255, 0.2);
  border: 1px solid var(--neon-overlord);
  color: var(--neon-overlord);
}

.queue-slot.decaying {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--neon-red);
  color: var(--neon-red);
  animation: pulse-decay 1.1s infinite;
}

/* Event Log */
.sim-log-box {
  background: #030712;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sim-log-entry {
  color: var(--text-dim);
}

.sim-log-entry.log-action { color: var(--text-main); }
.sim-log-entry.log-decay { color: var(--neon-red); }
.sim-log-entry.log-win { color: var(--neon-neo); font-weight: 700; }

/* --- FACTIONS SECTION --- */
.factions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.faction-card {
  border-radius: 20px;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s ease;
}

.faction-neo {
  background: linear-gradient(145deg, rgba(0, 255, 157, 0.06) 0%, rgba(13, 19, 36, 0.8) 50%);
  border: 1px solid rgba(0, 255, 157, 0.25);
}

.faction-neo:hover {
  border-color: var(--neon-neo);
  box-shadow: 0 15px 45px -10px rgba(0, 255, 157, 0.25);
}

.faction-overlord {
  background: linear-gradient(145deg, rgba(0, 229, 255, 0.06) 0%, rgba(13, 19, 36, 0.8) 50%);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.faction-overlord:hover {
  border-color: var(--neon-overlord);
  box-shadow: 0 15px 45px -10px rgba(0, 229, 255, 0.25);
}

.faction-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.faction-title-block h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.faction-neo h3 { color: var(--neon-neo); }
.faction-overlord h3 { color: var(--neon-overlord); }

.faction-ideology {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.faction-crest-icon {
  width: 52px;
  height: 52px;
}

.faction-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.faction-traits {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.trait-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trait-label { color: var(--text-dim); }
.trait-val { color: var(--text-main); font-weight: 600; }

/* Global Faction Balance Meter */
.balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.balance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.balance-bar-wrap {
  width: 100%;
  height: 14px;
  background: #030712;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border-subtle);
}

.balance-bar-neo {
  background: linear-gradient(90deg, #00ff9d, #00cc7d);
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.5);
  transition: width 0.6s ease;
}

.balance-bar-overlord {
  background: linear-gradient(90deg, #00b4d8, #00e5ff);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
  transition: width 0.6s ease;
}

.balance-footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* --- COMBAT ARTIFACTS & MODULES SECTION --- */
.artifacts-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.artifact-card {
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.artifact-firewall {
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(160deg, rgba(168, 85, 247, 0.08) 0%, rgba(13, 19, 36, 0.8) 60%);
}

.artifact-firewall:hover {
  border-color: var(--neon-purple);
  box-shadow: 0 15px 40px -10px rgba(168, 85, 247, 0.25);
}

.artifact-emp {
  border-color: rgba(0, 229, 255, 0.3);
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.08) 0%, rgba(13, 19, 36, 0.8) 60%);
}

.artifact-emp:hover {
  border-color: var(--neon-overlord);
  box-shadow: 0 15px 40px -10px rgba(0, 229, 255, 0.25);
}

.artifact-energy {
  border-color: rgba(250, 204, 21, 0.3);
  background: linear-gradient(160deg, rgba(250, 204, 21, 0.08) 0%, rgba(13, 19, 36, 0.8) 60%);
}

.artifact-energy:hover {
  border-color: var(--neon-amber);
  box-shadow: 0 15px 40px -10px rgba(250, 204, 21, 0.25);
}

.artifact-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 1rem;
}

.artifact-firewall .artifact-badge { background: rgba(168, 85, 247, 0.2); color: var(--neon-purple); }
.artifact-emp .artifact-badge { background: rgba(0, 229, 255, 0.2); color: var(--neon-overlord); }
.artifact-energy .artifact-badge { background: rgba(250, 204, 21, 0.2); color: var(--neon-amber); }

.artifact-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.artifact-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.artifact-spec-list {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* Energy Simulator Box in Section */
.energy-interactive-box {
  background: var(--bg-surface);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 16px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.energy-visual-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.energy-battery-cells {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.cell-slot {
  height: 38px;
  border-radius: 6px;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.25);
  transition: all 0.3s ease;
  position: relative;
}

.cell-slot.charged {
  background: linear-gradient(to top, #eab308, #fef08a);
  border-color: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

.cell-slot.charging {
  border-color: var(--neon-overlord);
  animation: charging-pulse 1.2s infinite ease-in-out;
}

@keyframes charging-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.9; }
}

/* --- KNOWLEDGE BASE / WIKI SECTION --- */
.wiki-search-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  min-width: 260px;
}

.search-input {
  width: 100%;
  background: rgba(13, 19, 36, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: #fff;
  transition: all 0.25s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--neon-overlord);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.search-icon-svg {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.chip-btn {
  background: rgba(13, 19, 36, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  color: #fff;
  border-color: var(--border-cyan);
}

.chip-btn.active {
  background: var(--neon-overlord-dim);
  border-color: var(--neon-overlord);
  color: var(--neon-overlord);
  font-weight: 700;
}

.wiki-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.wiki-article-card {
  padding: 1.75rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}

.wiki-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.wiki-category-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--neon-overlord);
  background: rgba(0, 229, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.wiki-read-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.wiki-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.wiki-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.wiki-article-expand {
  display: none;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.65;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
}

.wiki-article-card.open .wiki-article-expand {
  display: block;
}

.wiki-toggle-btn {
  margin-top: auto;
  align-self: flex-start;
  background: transparent;
  border: none;
  color: var(--neon-overlord);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
}

.wiki-toggle-btn:hover {
  text-decoration: underline;
}

/* --- TELEGRAM STARS 9% AFFILIATE SECTION --- */
.affiliate-box {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.05) 0%, rgba(13, 19, 36, 0.9) 50%, rgba(168, 85, 247, 0.05) 100%);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 20px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  box-shadow: 0 20px 50px -15px rgba(250, 204, 21, 0.12);
}

.affiliate-info h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: #fff;
  margin-bottom: 1rem;
}

.affiliate-info h3 span {
  color: var(--neon-amber);
}

.affiliate-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.affiliate-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.affiliate-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

.affiliate-features-list li span.icon {
  color: var(--neon-amber);
  font-size: 1rem;
  flex-shrink: 0;
}

/* Interactive Calculator */
.calc-card {
  background: rgba(3, 7, 18, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-slider-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.slider-input {
  width: 100%;
  accent-color: var(--neon-amber);
  cursor: pointer;
}

.calc-result-box {
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.calc-result-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon-amber);
  line-height: 1.1;
}

.calc-result-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* --- NEWS & CHANGELOG SECTION --- */
.news-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.changelog-card {
  border-radius: 16px;
  padding: 1.75rem 2rem;
  position: relative;
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.version-pill {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-overlord);
  background: var(--neon-overlord-dim);
  border: 1px solid var(--border-cyan);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
}

.changelog-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.changelog-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.85rem;
}

.changelog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.changelog-list li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.55;
}

.changelog-list li::before {
  content: '⚡';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.72rem;
  color: var(--neon-overlord);
}

/* --- FAQ ACCORDION SECTION --- */
.faq-wrap {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.faq-item:hover {
  border-color: var(--border-cyan);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
  color: var(--neon-overlord);
  flex-shrink: 0;
}

.faq-item[open] .faq-icon-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1rem;
}

/* --- CREATOR N & NEOAI STUDIO SECTION --- */
.studio-section {
  background: radial-gradient(circle at 50% 50%, rgba(13, 19, 36, 0.9) 0%, rgba(3, 7, 18, 0.98) 100%);
  border-top: 1px solid var(--border-subtle);
  padding: 5rem 0;
}

.studio-card-big {
  border: 1px solid var(--border-cyan);
  border-radius: 24px;
  padding: 3.5rem 3rem;
  background: rgba(10, 15, 29, 0.7);
  box-shadow: 0 20px 60px -20px rgba(0, 229, 255, 0.15);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}

.studio-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.studio-hex-crest {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 16px rgba(0, 245, 255, 0.4));
}

.studio-name-big {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 0.35rem;
}

.studio-name-big span {
  color: var(--neon-overlord);
}

.creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-neo);
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.3);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.studio-motto {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.studio-details-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.studio-quote-box {
  background: rgba(3, 7, 18, 0.65);
  border-left: 3px solid var(--neon-overlord);
  padding: 1.25rem 1.5rem;
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.65;
  font-style: italic;
}

.studio-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.portfolio-mini-card {
  background: rgba(13, 19, 36, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.portfolio-mini-card:hover {
  transform: translateY(-3px);
  border-color: var(--neon-overlord);
  box-shadow: 0 10px 25px rgba(0, 229, 255, 0.15);
  background: rgba(13, 19, 36, 0.85);
}

.portfolio-mini-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio-mini-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.studio-links-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- FOOTER --- */
.main-footer {
  background: #02050c;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-nav a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--neon-overlord);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
}

/* --- QR MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-window {
  background: #090e1c;
  border: 1px solid var(--border-cyan);
  border-radius: 24px;
  padding: 2.25rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 25px 70px rgba(0, 229, 255, 0.25);
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.modal-qr-frame {
  background: #fff;
  padding: 1rem;
  border-radius: 16px;
  margin: 1.5rem 0;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
}

.modal-qr-svg {
  width: 180px;
  height: 180px;
  display: block;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .mechanics-grid {
    grid-template-columns: 1fr;
  }
  .sim-container {
    grid-template-columns: 1fr;
  }
  .factions-grid {
    grid-template-columns: 1fr;
  }
  .artifacts-showcase {
    grid-template-columns: 1fr;
  }
  .studio-card-big {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.75rem;
    gap: 2rem;
  }
  .affiliate-box {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  .energy-interactive-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #060a16;
    border-bottom: 1px solid var(--border-cyan);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
  }
  .nav-menu.mobile-open {
    display: flex;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .hero-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .wiki-cards-grid {
    grid-template-columns: 1fr;
  }
  .decay-stages-strip {
    grid-template-columns: 1fr;
  }
}
