/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Space+Grotesk:wght@300;400;600;700&family=Share+Tech+Mono&display=swap');

/* Color Variables & Base Reset */
:root {
  --bg-color: #050505;
  --bg-card: #0c0c0e;
  --panel-bg: rgba(12, 12, 14, 0.75);
  --panel-border: rgba(255, 159, 0, 0.15);
  --accent-color: #ff9f00;
  --accent-glow: rgba(255, 159, 0, 0.5);
  --text-primary: #ffffff;
  --text-secondary: #9a9aa2;
  --text-muted: #52525b;
  --font-display: 'Bebas Neue', sans-serif;
  --font-sans: 'Space Grotesk', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --glow-intensity: 1.0;
  --glow-blur: 8px;
  
  /* Default Suit Colors (Spider-Man Red & Blue) */
  --suit-base: #e6193c;
  --suit-base-dark: #9e0a24;
  --suit-accent: #0a47c4;
  --suit-accent-dark: #052670;
  --suit-border: #0d0d12;
  --web-line-color: rgba(0, 0, 0, 0.45);
  --muscle-cut-color: rgba(0, 0, 0, 0.28);
}

/* Palette Overrides */
.theme-amber {
  --accent-color: #ff9f00;
  --accent-glow: rgba(255, 159, 0, 0.5);
  --suit-base: #e6193c;
  --suit-base-dark: #9e0a24;
  --suit-accent: #0a47c4;
  --suit-accent-dark: #052670;
  --suit-border: #0d0d12;
  --web-line-color: rgba(0, 0, 0, 0.45);
  --muscle-cut-color: rgba(0, 0, 0, 0.28);
}

.theme-blue {
  --accent-color: #00e5ff;
  --accent-glow: rgba(0, 229, 255, 0.5);
  --suit-base: #005fa3;
  --suit-base-dark: #003057;
  --suit-accent: #00e5ff;
  --suit-accent-dark: #008ea6;
  --suit-border: #00293d;
  --web-line-color: rgba(0, 0, 0, 0.42);
  --muscle-cut-color: rgba(0, 0, 0, 0.28);
}

.theme-red {
  --accent-color: #ff124f;
  --accent-glow: rgba(255, 18, 79, 0.5);
  --suit-base: #ff124f;
  --suit-base-dark: #990024;
  --suit-accent: #240a10;
  --suit-accent-dark: #120205;
  --suit-border: #0a0103;
  --web-line-color: rgba(0, 0, 0, 0.52);
  --muscle-cut-color: rgba(0, 0, 0, 0.35);
}

.theme-green {
  --accent-color: #39ff14;
  --accent-glow: rgba(57, 255, 20, 0.5);
  --suit-base: #10b981;
  --suit-base-dark: #064e3b;
  --suit-accent: #0f172a;
  --suit-accent-dark: #020617;
  --suit-border: #022c22;
  --web-line-color: rgba(0, 0, 0, 0.52);
  --muscle-cut-color: rgba(0, 0, 0, 0.35);
}

.theme-white {
  --accent-color: #ffffff;
  --accent-glow: rgba(255, 255, 255, 0.5);
  --suit-base: #e2e8f0;
  --suit-base-dark: #94a3b8;
  --suit-accent: #475569;
  --suit-accent-dark: #1e293b;
  --suit-border: #475569;
  --web-line-color: rgba(0, 0, 0, 0.35);
  --muscle-cut-color: rgba(0, 0, 0, 0.25);
}

.theme-stealth {
  --accent-color: #2c2c2e;
  --accent-glow: rgba(44, 44, 46, 0.2);
  --suit-base: #27272a;
  --suit-base-dark: #18181b;
  --suit-accent: #09090b;
  --suit-accent-dark: #020203;
  --suit-border: #1c1c1f;
  --web-line-color: rgba(255, 255, 255, 0.18);
  --muscle-cut-color: rgba(255, 255, 255, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) #0c0c0e;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--accent-glow);
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Typography Utility */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.glitch-text {
  position: relative;
  text-shadow: 0 0 calc(var(--glow-blur) * var(--glow-intensity)) var(--accent-glow);
  color: var(--text-primary);
  transition: text-shadow 0.3s ease, color 0.3s ease;
}

/* Header / Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.8), transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.logo {
  font-size: 2.2rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

.logo span {
  color: var(--accent-color);
  text-shadow: 0 0 calc(8px * var(--glow-intensity)) var(--accent-glow);
  transition: all 0.3s ease;
}

nav a {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 30px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.3s, text-shadow 0.3s;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-color);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--accent-color);
  text-shadow: 0 0 5px var(--accent-glow);
}

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

/* Hero Section Wrapper for scroll pinning */
.hero-wrapper {
  position: relative;
  height: 200vh;
  /* Determines the scroll speed of the video */
  background-color: var(--bg-color);
}

/* Hero Section */
.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.7;
  filter: contrast(1.05);
  transition: opacity 0.5s ease;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 80%, var(--bg-color) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 8rem;
  line-height: 0.9;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  animation: title-intro 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content p.subtitle {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-color);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 30px;
  text-shadow: 0 0 8px var(--accent-glow);
  opacity: 0;
  animation: fade-in-up 1s ease 0.6s forwards;
}

/* Cinematic Preloader styling */
.preloader {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.preloader-bar-bg {
  width: 150px;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.preloader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width 0.3s ease;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  gap: 10px;
  opacity: 0.6;
  transition: opacity 0.3s, color 0.3s;
}

.scroll-indicator:hover {
  opacity: 1;
  color: var(--accent-color);
}

.scroll-indicator span {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-secondary), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-indicator span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: var(--accent-color);
  animation: scroll-line 2s infinite ease-in-out;
}

/* Tagline Section */
.tagline-section {
  padding: 100px 20px;
  text-align: center;
  background-color: var(--bg-color);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  position: relative;
}

.tagline-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.tagline-text {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.tagline-text span {
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 1px dashed var(--accent-color);
}

.tech-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  gap: 15px;
}

.tech-divider .line {
  width: 100px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--panel-border), transparent);
}

.tech-divider .diamond {
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Customizer Section */
.customizer-section {
  padding: 100px 40px;
  position: relative;
  background: radial-gradient(circle at 10% 20%, rgba(255, 159, 0, 0.02) 0%, transparent 60%);
}

.customizer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
  text-align: left;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.section-title-wrapper .title-line {
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(to right, var(--panel-border), transparent);
}

.section-header h2 {
  font-size: 3.5rem;
  color: var(--text-primary);
}

.section-header p.subtitle {
  font-family: var(--font-mono);
  color: var(--accent-color);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  margin-top: 5px;
}

.customizer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: center;
}

/* Hologram Viewer (Left Column) */
.hologram-viewer {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

/* HUD corners */
.hologram-viewer::before,
.hologram-viewer::after,
.hologram-corners::before,
.hologram-corners::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent-color);
  border-style: solid;
  opacity: 0.4;
  transition: border-color 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.hologram-viewer::before {
  top: 15px;
  left: 15px;
  border-width: 2px 0 0 2px;
}

.hologram-viewer::after {
  top: 15px;
  right: 15px;
  border-width: 2px 2px 0 0;
}

.hologram-corners::before {
  bottom: 15px;
  left: 15px;
  border-width: 0 0 2px 2px;
}

.hologram-corners::after {
  bottom: 15px;
  right: 15px;
  border-width: 0 2px 2px 0;
}

.hologram-viewer:hover::before,
.hologram-viewer:hover::after,
.hologram-viewer:hover .hologram-corners::before,
.hologram-viewer:hover .hologram-corners::after {
  opacity: 0.8;
  border-color: var(--accent-color);
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 30px 30px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  pointer-events: none;
  z-index: 1;
}

.radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 159, 0, 0.04) 50%, transparent 100%);
  background-size: 100% 200%;
  animation: radar-sweep-animation 6s linear infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

.hologram-circle {
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px dashed rgba(255, 159, 0, 0.15);
  border-radius: 50%;
  z-index: 1;
  animation: spin-clockwise 30s linear infinite;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hologram-circle::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 50%;
}

.hologram-circle::after {
  content: '';
  position: absolute;
  width: 460px;
  height: 460px;
  border: 1px dotted rgba(255, 159, 0, 0.05);
  border-radius: 50%;
  animation: spin-counter-clockwise 45s linear infinite;
}

/* SVG Wraith Illustration container */
.wraith-svg-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 40px;
}

.wraith-svg-container svg {
  height: 90%;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.9));
  transform: translateY(10px);
  animation: suit-float 4s ease-in-out infinite;
}

/* SVG Shading / Glowing Styles */
.suit-base {
  fill: var(--suit-base);
  stroke: var(--suit-border);
  stroke-width: 1.5px;
  transition: fill 0.4s ease, stroke 0.4s ease;
}

.suit-accent-plates {
  fill: var(--suit-accent);
  stroke: var(--suit-border);
  stroke-width: 1px;
  transition: fill 0.4s ease, stroke 0.4s ease;
}

.suit-shadows {
  fill: #08080a;
  opacity: 0.6;
}

.suit-highlights {
  fill: #2c2c31;
  opacity: 0.15;
}

/* Targetable circuit lines inside SVG */
.circuit-line {
  fill: none;
  stroke: var(--accent-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5px;
  opacity: calc(0.35 + 0.65 * var(--glow-intensity));
  filter: drop-shadow(0 0 calc(var(--glow-blur) * var(--glow-intensity)) var(--accent-glow));
  transition: stroke 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.2s ease;
  animation: circuit-pulse 3s ease-in-out infinite;
}

.circuit-line-dim {
  stroke-width: 1.5px;
  opacity: calc(0.2 + 0.4 * var(--glow-intensity));
}

.visor-glow {
  fill: var(--accent-color);
  filter: drop-shadow(0 0 calc(6px * var(--glow-intensity)) var(--accent-glow));
  opacity: calc(0.6 + 0.4 * var(--glow-intensity));
  transition: fill 0.4s ease, filter 0.4s ease, opacity 0.2s ease;
}

/* Control Panel Styling (Right Column) */
.control-deck {
  background-color: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 40px;
  backdrop-filter: blur(15px);
  position: relative;
  transition: border-color 0.4s ease;
}

.control-deck::before {
  content: 'INTERFACE v2.8';
  position: absolute;
  top: 12px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.panel-section {
  margin-bottom: 35px;
}

.panel-section:last-of-type {
  margin-bottom: 25px;
}

.panel-section h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid var(--accent-color);
  padding-left: 10px;
  transition: border-left 0.4s ease;
}

.panel-section h3 span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-left: auto;
}

.swatch-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.swatch-button {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 15px 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.swatch-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Swatch Palettes */
.swatch-amber .color-dot {
  background-color: #ff9f00;
  box-shadow: 0 0 8px rgba(255, 159, 0, 0.5);
}

.swatch-blue .color-dot {
  background-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.swatch-red .color-dot {
  background-color: #ff124f;
  box-shadow: 0 0 8px rgba(255, 18, 79, 0.5);
}

.swatch-green .color-dot {
  background-color: #39ff14;
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.swatch-white .color-dot {
  background-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.swatch-stealth .color-dot {
  background-color: #2c2c2e;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.swatch-button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.swatch-button.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.swatch-button.active::before {
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
}

.swatch-button.active .color-dot {
  transform: scale(1.15);
}

/* Range Slider Styling */
.slider-container {
  padding: 10px 5px;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.glow-slider {
  flex-grow: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.glow-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  border: none;
}

.glow-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
  cursor: pointer;
  margin-top: -6px;
  /* center thumb vertically */
  transition: transform 0.1s, background-color 0.3s, box-shadow 0.3s;
}

.glow-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.glow-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  border: none;
}

.glow-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
  cursor: pointer;
  transition: transform 0.1s, background-color 0.3s, box-shadow 0.3s;
}

.glow-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.slider-value {
  font-family: var(--font-mono);
  color: var(--accent-color);
  font-size: 1.1rem;
  width: 50px;
  text-align: right;
  text-shadow: 0 0 5px var(--accent-glow);
  transition: all 0.3s ease;
}

/* Diagnostic Display Panel */
.diagnostics-panel {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 15px 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.diag-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.diag-row:last-child {
  margin-bottom: 0;
}

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

.diag-val {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.diag-val.status-ok {
  color: var(--accent-color);
  text-shadow: 0 0 4px var(--accent-glow);
}

/* Action Buttons */
.button-row {
  display: flex;
  gap: 15px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #000000;
  border: 1px solid var(--accent-color);
  font-weight: bold;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Tech Specs Cards */
.specs-section {
  padding: 80px 40px;
  background-color: #08080a;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  position: relative;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.spec-card {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 30px;
  transition: all 0.3s ease;
}

.spec-card:hover {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}

.spec-icon {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.spec-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.spec-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Footer Section */
footer {
  background-color: #050506;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 50px 40px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.footer-logo span {
  color: var(--accent-color);
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* Keyframes & Animations */
@keyframes title-intro {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(5px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll-line {
  0% {
    top: -30%;
  }

  50% {
    top: 100%;
  }

  100% {
    top: -30%;
  }
}

@keyframes radar-sweep-animation {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 200%;
  }
}

@keyframes spin-clockwise {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin-counter-clockwise {
  0% {
    transform: rotate(360deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes suit-float {
  0% {
    transform: translateY(10px);
  }

  50% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(10px);
  }
}

@keyframes circuit-pulse {
  0% {
    stroke-opacity: 0.75;
  }

  50% {
    stroke-opacity: 0.95;
    filter: drop-shadow(0 0 calc((var(--glow-blur) + 2px) * var(--glow-intensity)) var(--accent-glow));
  }

  100% {
    stroke-opacity: 0.75;
  }
}

/* Responsive Grid / Swatches Stack Vertically on Small Screens */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 5rem;
  }

  .customizer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hologram-viewer {
    height: 500px;
  }

  .hologram-circle {
    width: 320px;
    height: 320px;
  }

  .hologram-circle::before {
    width: 280px;
    height: 280px;
  }

  .hologram-circle::after {
    width: 360px;
    height: 360px;
  }

  .specs-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  header {
    padding: 15px 20px;
  }

  nav {
    display: none;
    /* Hide nav links on very small mobile for clean HUD aesthetic */
  }

  .hero-content h1 {
    font-size: 4rem;
  }

  .hero-content p.subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
  }

  .tagline-text {
    font-size: 1.4rem;
  }

  .customizer-section {
    padding: 60px 20px;
  }

  .control-deck {
    padding: 25px 20px;
  }

  /* Swatches stack vertically or fit nicely in 2 columns */
  .swatch-picker {
    grid-template-columns: 1fr;
    /* Stack vertically as per requirements */
    gap: 10px;
  }

  .swatch-button {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 15px;
    gap: 15px;
  }

  .swatch-button::before {
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
  }

  .button-row {
    flex-direction: column;
  }
}

/* ==========================================
   INTERACTIVE HUD EXPANSIONS STYLING
   ========================================== */

.implants-section, .armory-section, .mission-map-section {
  padding: 100px 40px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.implants-container, .armory-container, .map-container, .specs-container {
  max-width: 1200px;
  margin: 0 auto;
}

.implants-grid, .armory-grid, .map-grid, .specs-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.body-scanner, .city-map-panel {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.body-scanner::before, .body-scanner::after,
.city-map-panel::before, .city-map-panel::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border-color: var(--accent-color);
  border-style: solid;
  opacity: 0.4;
  pointer-events: none;
  transition: border-color 0.4s ease;
}
.body-scanner::before { top: 15px; left: 15px; border-width: 2px 0 0 2px; }
.body-scanner::after { top: 15px; right: 15px; border-width: 2px 2px 0 0; }

.city-map-panel::before { bottom: 15px; left: 15px; border-width: 0 0 2px 2px; }
.city-map-panel::after { bottom: 15px; right: 15px; border-width: 0 2px 2px 0; }

.scanner-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 159, 0, 0.08) 50%, transparent 100%);
  background-size: 100% 200%;
  animation: radar-sweep-animation 4s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.wireframe-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  padding: 20px;
}

.body-outline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1.5px;
  transition: stroke 0.3s ease;
}

.scan-link {
  stroke: rgba(255, 159, 0, 0.2);
  stroke-width: 1px;
  stroke-dasharray: 4 4;
}

.scan-node {
  cursor: pointer;
  pointer-events: all;
}

.scan-node circle:first-child {
  fill: rgba(0, 0, 0, 0.6);
  stroke: var(--accent-color);
  stroke-width: 1.5px;
  transition: fill 0.3s, stroke 0.3s, r 0.3s, filter 0.3s;
}

.scan-node .node-core {
  fill: var(--accent-color);
  transition: fill 0.3s, r 0.3s;
}

.scan-node:hover circle:first-child,
.scan-node.active circle:first-child {
  r: 13px;
  stroke-width: 2px;
  filter: drop-shadow(0 0 5px var(--accent-color));
}

.scan-node:hover .node-core,
.scan-node.active .node-core {
  r: 6px;
}

.telemetry-readout {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 15px 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Weapon Blueprint Picker */
.weapon-picker {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.weapon-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 20px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  text-align: left;
}

.weapon-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  padding: 2px 6px;
  border-radius: 4px;
  text-shadow: 0 0 3px var(--accent-glow);
  transition: all 0.3s ease;
}

.weapon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding-left: 25px;
}

.weapon-btn.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding-left: 25px;
}

.blueprint-viewer {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.blueprint-frame {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(0,0,0,0.8);
}

.blueprint-frame svg {
  z-index: 2;
  padding: 20px;
}

.blueprint-grid-line {
  transition: stroke 0.4s ease;
}

.blueprint-line {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
  transition: stroke 0.4s ease, filter 0.4s ease, stroke-width 0.3s ease;
}

.blueprint-line.pulse {
  animation: blueprint-flow 1.5s infinite linear;
  stroke-dasharray: 10 15;
}

@keyframes blueprint-flow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -25; }
}

.blueprint-line.overcharged {
  stroke: #ff124f !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 8px rgba(255, 18, 79, 0.8)) !important;
}

/* Active Hacking Map */
.map-sector {
  fill: rgba(255, 159, 0, 0.04);
  stroke: rgba(255, 159, 0, 0.2);
  stroke-width: 1.5px;
  cursor: pointer;
  transition: fill 0.3s, stroke 0.3s, filter 0.3s;
}

.map-sector:hover {
  fill: rgba(255, 159, 0, 0.15);
  stroke: var(--accent-color);
}

.map-sector.active {
  fill: rgba(255, 159, 0, 0.25);
  stroke: var(--accent-color);
  filter: drop-shadow(0 0 5px var(--accent-glow));
}

.map-sector.decrypted {
  fill: rgba(57, 255, 20, 0.1) !important;
  stroke: #39ff14 !important;
}

.map-sector.decrypted:hover {
  fill: rgba(57, 255, 20, 0.2) !important;
}

.map-sector.decrypted.active {
  fill: rgba(57, 255, 20, 0.25) !important;
  stroke: #39ff14 !important;
  filter: drop-shadow(0 0 5px rgba(57, 255, 20, 0.5)) !important;
}

.map-road {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 2px;
}

.map-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  fill: var(--text-secondary);
  pointer-events: none;
  letter-spacing: 0.05em;
  text-anchor: middle;
}

.decryption-panel {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Specs Tab Dashboard */
.specs-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  align-items: flex-start;
}

.specs-tabs {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.spec-tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 20px;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  text-align: left;
}

.spec-tab-icon {
  font-size: 1.4rem;
  color: var(--accent-color);
  text-shadow: 0 0 5px var(--accent-glow);
  transition: all 0.3s ease;
}

.spec-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding-left: 25px;
}

.spec-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding-left: 25px;
}

.specs-content-panel {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Theme recolor links for custom nodes & maps */
.theme-blue .scan-node circle:first-child,
.theme-blue .map-sector {
  stroke: var(--accent-color);
}
.theme-red .scan-node circle:first-child,
.theme-red .map-sector {
  stroke: var(--accent-color);
}
.theme-green .scan-node circle:first-child,
.theme-green .map-sector {
  stroke: var(--accent-color);
}

/* Responsive adjustments for futuristic HUD */
@media (max-width: 992px) {
  .implants-grid, .armory-grid, .map-grid, .specs-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .body-scanner, .city-map-panel {
    height: 400px;
  }
}

@media (max-width: 600px) {
  .audio-toggle {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }
  
  header {
    flex-direction: column;
    gap: 10px;
  }
  
  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* ==========================================
   FUTURISTIC HUD EXTENSIONS STYLING
   ========================================== */

/* Audio HUD Toggle */
.audio-toggle {
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px var(--accent-glow);
  margin-left: 20px;
}

.audio-toggle:hover {
  background: var(--accent-color);
  color: var(--bg-color);
  box-shadow: 0 0 10px var(--accent-color);
}

/* Tactical Stat Matrix Gauges */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 15px 10px;
}

.stat-gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.radial-gauge {
  width: 50px;
  height: 50px;
  transform: rotate(-90deg);
}

.radial-gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 3px;
}

.radial-gauge-fill {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 3.5px;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), stroke 0.4s ease;
}

.gauge-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 5px;
}

.gauge-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.gauge-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-color);
  font-weight: bold;
  text-shadow: 0 0 3px var(--accent-glow);
  transition: color 0.4s ease;
}

/* Neural Terminal Console */
.terminal-panel {
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
  transition: border-color 0.4s ease;
}

.terminal-logs {
  height: 120px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 5px;
  scrollbar-width: thin;
}

.log-line {
  margin-bottom: 5px;
  color: var(--text-secondary);
  line-height: 1.3;
  word-break: break-all;
}

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

.log-line.success-line {
  color: var(--accent-color);
  text-shadow: 0 0 3px var(--accent-glow);
}

.log-line.error-line {
  color: #ff124f;
  text-shadow: 0 0 3px rgba(255, 18, 79, 0.5);
}

.terminal-input-wrapper {
  display: flex;
  align-items: center;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.terminal-prompt {
  color: var(--accent-color);
  margin-right: 8px;
  font-weight: bold;
}

#terminal-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

#terminal-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Target Tracker HUD Reticle */
.hud-target-reticle {
  position: absolute;
  width: 100px;
  height: 100px;
  pointer-events: none;
  z-index: 5;
  display: none;
  transition: opacity 0.2s ease;
  opacity: 0;
}

.hud-target-reticle.active {
  display: block;
  opacity: 1;
}

.reticle-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px dashed var(--accent-color);
  border-radius: 50%;
  animation: spin-clockwise 10s linear infinite;
  box-shadow: 0 0 5px var(--accent-glow);
}

.reticle-box::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-color);
}

.reticle-data {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(5, 5, 5, 0.85);
  border: 1px solid var(--accent-color);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.reticle-coords,
.reticle-dist {
  line-height: 1.3;
}

/* Chameleon Cloaking glitched effects */
.hologram-viewer.cloaked svg {
  animation: cloak-flicker 2s infinite ease-in-out;
}

.hologram-viewer.cloaked .hologram-circle {
  animation: spin-clockwise 10s linear infinite, cloak-glow-pulse 2s infinite;
}

@keyframes cloak-flicker {
  0%,
  100% {
    opacity: 0.35;
    filter: drop-shadow(0 0 3px var(--accent-glow)) blur(0.5px);
  }
  5% {
    opacity: 0.05;
    filter: blur(3px);
  }
  6% {
    opacity: 0.4;
  }
  35% {
    opacity: 0.3;
  }
  36% {
    opacity: 0.08;
    filter: blur(2px);
  }
  38% {
    opacity: 0.35;
  }
  70% {
    opacity: 0.25;
  }
  72% {
    opacity: 0.1;
  }
  75% {
    opacity: 0.45;
  }
}

@keyframes cloak-glow-pulse {
  0%,
  100% {
    border-color: rgba(44, 44, 46, 0.2);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.05);
  }
}

/* Scanline overlay for stealth mode */
.hologram-viewer.cloaked::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 3px 100%;
  z-index: 3;
  pointer-events: none;
}

/* Responsive adjustments for futuristic HUD */
@media (max-width: 600px) {
  .audio-toggle {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }
  
  header {
    flex-direction: column;
    gap: 10px;
  }
  
  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* ==========================================
   GAME DESIGN & STYLING EXTENSIONS (WRAITH GAME)
   ========================================== */

/* HUD Stats Panel in Header */
.hud-stats-panel {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  align-items: center;
}

.hud-stat {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-stat-label {
  color: var(--text-muted);
  font-weight: bold;
}

.hud-bar-bg {
  width: 70px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.hud-bar {
  height: 100%;
  background: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-glow);
  transition: width 0.3s ease;
}

#hud-shield-text, #hud-energy-text {
  width: 32px;
  text-align: right;
  color: var(--text-primary);
}

#hud-system-status {
  color: var(--accent-color);
  font-weight: bold;
  text-shadow: 0 0 4px var(--accent-glow);
}

/* Modals */
.game-modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-modal.active {
  display: flex;
  opacity: 1;
}

.game-modal-content {
  width: 90%;
  max-width: 800px;
  background-color: var(--bg-card);
  border: 1px solid var(--accent-color) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 15px var(--accent-glow);
  position: relative;
  animation: modal-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modal-slide-in {
  0% {
    transform: scale(0.92) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.close-btn:hover {
  color: var(--accent-color) !important;
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Breach Protocol Hacking Grid */
.hacking-grid-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  margin-top: 15px;
}

.hacking-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.hacking-cell {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  user-select: none;
}

.hacking-cell:hover:not(.disabled) {
  background: rgba(255, 159, 0, 0.05);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 0 5px var(--accent-glow);
}

.hacking-cell.active-dir:not(.disabled) {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.hacking-cell.selected {
  background: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: #000000 !important;
  font-weight: bold;
  box-shadow: 0 0 8px var(--accent-glow);
  cursor: default;
}

.hacking-cell.disabled {
  opacity: 0.15;
  cursor: not-allowed;
  border-style: dashed;
}

.target-sequence-list {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sequence-box {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.sequence-box.active {
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-glow);
}

.sequence-box.matched {
  background: rgba(57, 255, 20, 0.1);
  border-color: #39ff14;
  color: #39ff14;
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

.timer-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* Calibration Interactive UI */
.calibration-bar-container {
  width: 100%;
  margin: 15px 0;
}

.calibration-bar-bg {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.calibration-target-zone {
  position: absolute;
  left: 85%;
  width: 12%;
  height: 100%;
  background: rgba(57, 255, 20, 0.3);
  border-left: 2px solid #39ff14;
  border-right: 2px solid #39ff14;
}

.calibration-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Weapon Overcharge Interactive UI */
.overcharge-bar-container {
  width: 100%;
  margin: 15px 0;
}

.overcharge-bar-bg {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.overcharge-target-zone {
  position: absolute;
  left: 70%;
  width: 15%;
  height: 100%;
  background: rgba(57, 255, 20, 0.3);
  border-left: 2px solid #39ff14;
  border-right: 2px solid #39ff14;
}

.overcharge-cursor {
  position: absolute;
  left: 0%;
  width: 6px;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
}

/* Heist Infiltration Simulator */
.heist-simulator-section {
  padding: 100px 40px;
  background: radial-gradient(circle at 90% 10%, rgba(255, 18, 79, 0.02) 0%, transparent 60%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.heist-container {
  max-width: 1200px;
  margin: 0 auto;
}

.heist-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}

.heist-visuals-panel {
  position: relative;
  height: 350px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.heist-terminal-output {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heist-feed-line {
  opacity: 0;
  animation: heist-line-fade 0.3s forwards;
  word-break: break-all;
}

@keyframes heist-line-fade {
  0% { transform: translateY(5px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.heist-feed-line.text-system { color: var(--text-muted); }
.heist-feed-line.text-info { color: var(--text-secondary); }
.heist-feed-line.text-event { color: var(--accent-color); text-shadow: 0 0 3px var(--accent-glow); }
.heist-feed-line.text-success { color: #39ff14; text-shadow: 0 0 3px rgba(57, 255, 20, 0.4); }
.heist-feed-line.text-error { color: #ff124f; text-shadow: 0 0 3px rgba(255, 18, 79, 0.4); }

.heist-stats {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  margin-bottom: 20px;
}

.heist-stat-card {
  display: flex;
  flex-direction: column;
}

/* Responsiveness overrides */
@media (max-width: 992px) {
  .heist-grid {
    grid-template-columns: 1fr;
  }
  .hacking-grid-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hud-stats-panel {
    display: none; /* Hide in header on small mobile screens to prevent clutter */
  }
}

/* Heist Active Console Input */
.heist-prompt {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-color);
  margin-bottom: 10px;
  text-shadow: 0 0 5px var(--accent-glow);
}

.heist-prompt code {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#heist-command-input {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 10px;
}

#heist-command-input:focus {
  border-color: var(--accent-color);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 0 0 8px var(--accent-glow);
}

.heist-timer-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.heist-timer-bar {
  height: 100%;
  background: #ff124f;
  box-shadow: 0 0 5px rgba(255, 18, 79, 0.5);
  width: 100%;
  transition: width 0.1s linear;
}

@keyframes flashWarning {
  0%, 100% {
    background: rgba(255, 18, 79, 0.06);
    border-color: #ff124f;
  }
  50% {
    background: rgba(255, 18, 79, 0.35);
    border-color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 18, 79, 0.6);
  }
}

.harmonics-alert.flash-warn {
  animation: flashWarning 0.3s ease 3;
}

/* Directive Briefing Cards & Overlays */
.directive-card {
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 22px;
  font-family: var(--font-mono);
  box-shadow: 0 0 20px rgba(0,0,0,0.8), inset 0 0 10px rgba(255,18,79,0.05);
  text-align: left;
  line-height: 1.55;
  width: 100%;
  box-sizing: border-box;
}

.directive-card h4 {
  color: var(--accent-color);
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 18, 79, 0.2);
  padding-bottom: 8px;
}

.directive-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.directive-card ul {
  padding-left: 18px;
  margin-bottom: 20px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.directive-card ul li {
  margin-bottom: 8px;
}

.directive-card code {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.78rem;
}

.directive-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(6px);
  padding: 30px;
  box-sizing: border-box;
  border-radius: 8px;
}

/* Memory Grid Cell Styling */
.memory-cell {
  background: rgba(255, 18, 79, 0.04);
  border: 1px solid rgba(255, 18, 79, 0.25);
  border-radius: 4px;
  height: 50px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: inset 0 0 5px rgba(255, 18, 79, 0.05);
}

.memory-cell:hover:not(:disabled) {
  background: rgba(255, 18, 79, 0.12);
  border-color: rgba(255, 18, 79, 0.6);
  box-shadow: 0 0 8px rgba(255, 18, 79, 0.25);
}

.memory-cell.flash {
  background: #ff124f !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 15px #ff124f, 0 0 5px #ffffff !important;
}

.memory-cell.success-flash {
  background: #39ff14 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 15px #39ff14, 0 0 5px #ffffff !important;
}

.memory-cell:disabled {
  cursor: default;
}

/* Futuristic Heist Celebration */
.celebration-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.celebration-overlay.active {
  opacity: 1;
}

.celebration-card {
  background: rgba(12, 12, 14, 0.85);
  border: 2px solid #39ff14;
  border-radius: 8px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.25), inset 0 0 15px rgba(57, 255, 20, 0.05);
  position: relative;
  overflow: hidden;
  font-family: var(--font-mono);
  animation: slideInDown 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.celebration-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(180deg, rgba(57, 255, 20, 0), #39ff14, rgba(57, 255, 20, 0));
  animation: celebration-scan 3s linear infinite;
  pointer-events: none;
}

.celebration-glitch-text {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: #39ff14;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
  position: relative;
}

.celebration-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.celebration-stats {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  margin-bottom: 25px;
}

.celebration-stats .stat-box {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 15px 10px;
}

.celebration-stats .stat-val {
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  margin-bottom: 5px;
}

.celebration-stats .stat-lbl {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes celebration-scan {
  0% { top: -5%; }
  100% { top: 105%; }
}

@keyframes slideInDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Spider-Man Web Grid lines */
.web-line {
  fill: none;
  stroke: var(--web-line-color);
  stroke-width: 0.8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.4s ease;
}

/* Anatomical Muscle Cut Lines */
.muscle-cut {
  fill: none;
  stroke: var(--muscle-cut-color);
  stroke-width: 1.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.4s ease;
}

/* Interactive Hanging Spider-Man Widget */
.spidey-swing-widget {
  position: fixed;
  top: -125px; /* Spidey hangs just at the top edge */
  right: 40px;
  width: 80px;
  height: 250px;
  z-index: 1000;
  transform-origin: top center;
  animation: web-swing 5s ease-in-out infinite;
  cursor: pointer;
  pointer-events: auto;
  transition: top 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.spidey-swing-widget:hover {
  filter: drop-shadow(0 4px 15px var(--accent-glow)) brightness(1.1);
}

.spidey-swing-widget.dropped {
  top: 0px; /* drops down fully into view */
}

.spidey-swing-widget.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.6);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

/* Full Screen Swing-By Spider-Man */
.screen-spidey-swinger {
  position: fixed;
  top: -20px; /* Pivot height relative to window top */
  left: 50%;
  width: 60px;
  height: 380px;
  margin-left: -30px;
  z-index: 1200;
  transform-origin: 50% -300px;
  pointer-events: none;
  display: none;
}

.screen-spidey-swinger.active-ltr {
  display: block;
  animation: full-screen-swing-ltr 3.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.screen-spidey-swinger.active-rtl {
  display: block;
  animation: full-screen-swing-rtl 3.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Flipped class for screen swinger Spidey figure scaling */
.screen-spidey-swinger.flipped g.spidey-g {
  transform: scaleX(-1);
  transform-origin: 30px 20px; /* pivot around center of Spidey figure */
}

/* Keyframes for Pendulum Swings */
@keyframes web-swing {
  0% { transform: rotate(-12deg); }
  50% { transform: rotate(12deg); }
  100% { transform: rotate(-12deg); }
}

@keyframes full-screen-swing-ltr {
  0% {
    transform: rotate(-90deg);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    transform: rotate(90deg);
    opacity: 0;
  }
}

@keyframes full-screen-swing-rtl {
  0% {
    transform: rotate(90deg);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    transform: rotate(-90deg);
    opacity: 0;
  }
}

/* ==========================================
   MOBILE & VIEWPORT RESPONSIVENESS OVERRIDES
   ========================================== */

/* Max width 768px (Tablets / Medium Mobile) */
@media (max-width: 768px) {
  /* Reduce large section padding to save screen space */
  .implants-section, .armory-section, .mission-map-section, .heist-simulator-section, .specs-section, .customizer-section {
    padding: 50px 15px !important;
  }

  /* Font Scaling */
  .hero-content h1 {
    font-size: 3.2rem !important;
  }
  .section-header h2 {
    font-size: 2rem !important;
  }
  .section-header p.subtitle {
    font-size: 0.8rem !important;
  }

  /* Collapse specs tabs layout */
  .specs-tabs {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  .spec-tab-btn {
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    gap: 8px !important;
    flex: 1 1 calc(50% - 8px) !important;
    justify-content: center !important;
  }
}

/* Max width 600px (Mobile Portrait / Phones) */
@media (max-width: 600px) {
  /* Fixed Header 2-Tier Layout */
  header {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 15px !important;
    align-items: center !important;
    background: rgba(5, 5, 8, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
  
  .logo {
    font-size: 1.6rem !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 2px !important;
  }

  /* Make nav links visible and horizontal on mobile */
  nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    font-size: 0.72rem !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .audio-toggle {
    margin-left: 0 !important;
    margin-top: 4px !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 0.75rem !important;
    padding: 6px 10px !important;
  }

  /* Scaled down SVG scanner visualizers */
  .hologram-viewer, .body-scanner, .city-map-panel, .blueprint-frame {
    height: 320px !important;
  }

  /* Customizer Swatches 2-Column Grid */
  .swatch-picker {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .swatch-button {
    font-size: 0.72rem !important;
    padding: 10px 12px !important;
    gap: 8px !important;
    justify-content: center !important;
  }

  /* Armory Weapons 2x2 grid */
  .weapon-picker {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .weapon-btn {
    flex: 1 1 calc(50% - 8px) !important;
    font-size: 0.72rem !important;
    padding: 10px 12px !important;
    text-align: center !important;
    justify-content: center !important;
  }
  
  /* Specs coefficient slider card layout */
  .specs-content-panel .diagnostics-panel {
    padding: 10px !important;
  }
  
  /* Hacking target sequence row wrapping */
  .target-sequence-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* scaled down hanging spider-man widget so it stays clear of viewport text */
  .spidey-swing-widget {
    transform: scale(0.62) !important;
    transform-origin: top center !important;
    right: 12px !important;
    top: -142px !important;
  }
  .spidey-swing-widget.dropped {
    top: -15px !important;
  }
  
  /* Screen Spidey swing size adaptation */
  .screen-spidey-swinger {
    transform-origin: 50% -250px !important;
    height: 300px !important;
  }
}

/* Max width 480px (Very Small Phones / Portability) */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.7rem !important;
  }
  .section-header h2 {
    font-size: 1.6rem !important;
  }
  .section-header p.subtitle {
    font-size: 0.72rem !important;
  }
  
  /* Reduce heights further for compact fit */
  .hologram-viewer, .body-scanner, .city-map-panel, .blueprint-frame {
    height: 280px !important;
  }
  
  .hologram-circle {
    width: 200px !important;
    height: 200px !important;
  }
  .hologram-circle::before {
    width: 170px !important;
    height: 170px !important;
  }
  .hologram-circle::after {
    width: 230px !important;
    height: 230px !important;
  }

  /* Auto scaling cell size inside Hacking Grid modal to prevent horizontal overflow */
  .hacking-cell {
    height: 38px !important;
    font-size: 0.95rem !important;
  }
  .hacking-grid {
    padding: 10px !important;
    gap: 5px !important;
  }
  
  /* Tab select collapse to 100% width on very narrow phone viewports */
  .spec-tab-btn {
    flex: 1 1 100% !important;
    font-size: 0.78rem !important;
    padding: 10px 12px !important;
    justify-content: flex-start !important;
  }

  /* Compact Heist lock screen panel and details */
  .heist-lock-screen {
    padding: 22px 16px !important;
  }
  .checklist-wrapper {
    padding: 12px 10px !important;
    font-size: 0.72rem !important;
  }
}