/* ==========================================================================
   It Follows — Dark Mode Transition, Radar Ping Stalker & Side HUD
   ========================================================================== */

/* Global Animated Transition into Darkness */
body,
.hero-section,
.site-header,
.project-card,
.note-card,
.mini-project-card,
.bg-section-alt,
.site-footer,
.btn,
.social-icon {
  transition:
    background 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    color 1s ease,
    border-color 1s ease,
    box-shadow 1s ease;
}

/* ==========================================================================
   Dark Mode Palette & Button Contrast Adjustments
   ========================================================================== */
body.if-active {
  --bg-primary: #060911;
  --bg-secondary: #0c1220;
  --bg-tertiary: #162035;
  --bg-warm-tint: #090d18;
  --bg-card: #0c1220;
  --bg-card-hover: #162035;

  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-medium: rgba(255, 255, 255, 0.18);
  --border-glow: rgba(56, 189, 248, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.8);

  background-color: #060911;
  color: #f8fafc;
}

/* Subtle paper texture in dark mode */
body.if-active::before {
  opacity: 0.15;
  mix-blend-mode: overlay;
}

/* Darkened Hero Section */
body.if-active .hero-section {
  background:
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.15), transparent 35%),
    radial-gradient(circle at 20% 80%, rgba(220, 38, 38, 0.12), transparent 38%),
    linear-gradient(135deg, #03050a 0%, #070c18 55%, #0b1426 100%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.if-active .site-header {
  background: rgba(6, 9, 17, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.if-active .status-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

/* Button & Link High-Contrast Adjustments in Dark Mode */
body.if-active .btn-primary {
  background: #38bdf8;
  color: #040814;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
}

body.if-active .btn-primary:hover {
  background: #7dd3fc;
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.5);
}

body.if-active .btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
}

body.if-active .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

body.if-active .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

body.if-active .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #38bdf8;
  color: #38bdf8;
}

body.if-active .project-card,
body.if-active .note-card,
body.if-active .mini-project-card {
  background: #0c1220;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

body.if-active .project-card:hover,
body.if-active .note-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

body.if-active .bg-section-alt {
  background: #04060c;
}

body.if-active .site-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

body.if-active .social-icon {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

/* Fade out tree canopy shadows when It Follows is active */
body.if-active #canopyShadowsOverlay {
  opacity: 0;
  transition: opacity 1s ease;
}

/* ==========================================================================
   Radar Ping Creature & Concentric Ripples (Layered below Navbar)
   ========================================================================== */
#itFollowsOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40; /* Below sticky navbar (z-index: 100) */
  overflow: visible;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Ensure sticky site-header is always above game canvas & creatures */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* The Entity / Radar Blip Dot */
.if-creature {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 45;
  will-change: transform;
}

.if-creature-body {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Radar Ping Dot Core: Starts luminous on ping then slowly fades */
.if-creature-smoke {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, #38bdf8 0%, #0284c7 45%, #0369a1 70%, transparent 100%);
  box-shadow: 0 0 12px #38bdf8, 0 0 20px rgba(56, 189, 248, 0.6);
  opacity: 0.2;
  transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 1.8s ease, transform 1.8s ease;
}

/* When Pinged: Flash bright with full luminosity */
.if-creature.is-pinged .if-creature-smoke {
  opacity: 1;
  box-shadow: 0 0 16px #38bdf8, 0 0 30px rgba(56, 189, 248, 0.9);
  transform: scale(1.25);
  transition: none; /* instant snap to bright */
}

/* Subtle Glowing Center Core */
.if-creature-smoke::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px #ffffff;
}

/* Concentric Radar Pulse Ripples (Anchored to creature, moves along with the dot) */
.if-radar-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  border: 1.5px solid rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4), inset 0 0 8px rgba(56, 189, 248, 0.2);
  transform: translate(-50%, -50%) scale(0.4);
  animation: radarRippleExpand 1.6s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes radarRippleExpand {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.4);
    border-width: 2px;
  }
  50% {
    opacity: 0.6;
    border-width: 1.5px;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4.8);
    border-width: 1px;
  }
}

/* Blood / Squish Canvas */
#ifBloodCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 42;
}

/* Minimal Fixed Side HUD Widget (Always crystal clear above darkness) */
.if-hud {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 1000005;
  background: rgba(8, 14, 26, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9999px;
  padding: 0.5rem 1.05rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.18);
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  transition: all 0.2s ease;
  animation: hudSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hudSlideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.if-hud-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  transition: background 0.2s;
}

.if-hud.is-caught .if-hud-status-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.if-hud-info {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.if-hud-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.if-hud-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.if-hud-best {
  font-size: 0.75rem;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

.if-hud-best.is-new-best {
  color: #f59e0b;
  font-weight: 700;
}

.if-hud-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  font-family: inherit;
}

.if-hud-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.if-hud-btn-replay {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  display: none;
}

.if-hud.is-caught .if-hud-btn-replay {
  display: inline-flex;
}

.if-hud-btn-replay:hover {
  background: #0284c7;
  color: #ffffff;
}

/* ==========================================================================
   Retro Arcade High Score & Initials Modal
   ========================================================================== */
.if-arcade-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.if-arcade-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.if-arcade-modal {
  background: #090e1a;
  border: 2px solid #38bdf8;
  box-shadow:
    0 0 25px rgba(56, 189, 248, 0.35),
    0 20px 40px rgba(0, 0, 0, 0.8),
    inset 0 0 30px rgba(56, 189, 248, 0.08);
  border-radius: 16px;
  width: 90%;
  max-width: 440px;
  padding: 1.8rem 1.6rem;
  position: relative;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  color: #f8fafc;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.if-arcade-backdrop.is-open .if-arcade-modal {
  transform: scale(1) translateY(0);
}

/* CRT Scanlines Overlay */
.if-arcade-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.65;
}

.if-arcade-header {
  position: relative;
  z-index: 2;
  margin-bottom: 1.25rem;
}

.if-arcade-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.if-arcade-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.if-arcade-time-stat {
  font-size: 1.6rem;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.8);
  margin-bottom: 0.25rem;
}

.if-arcade-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 3-Letter Slot Machine Controls */
.if-initials-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.4rem 0;
}

.if-slot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.if-slot-arrow {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  font-size: 0.85rem;
  width: 44px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  user-select: none;
}

.if-slot-arrow:hover {
  background: #38bdf8;
  color: #030712;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.if-slot-box {
  width: 58px;
  height: 68px;
  background: #040711;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.if-slot-box.is-active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
  animation: ifArcadeSlotBlink 1.1s infinite;
}

@keyframes ifArcadeSlotBlink {
  0%, 100% { border-color: #38bdf8; box-shadow: 0 0 18px rgba(56, 189, 248, 0.6); }
  50% { border-color: #7dd3fc; box-shadow: 0 0 6px rgba(56, 189, 248, 0.3); }
}

.if-easter-egg-banner {
  position: relative;
  z-index: 2;
  margin: 0.85rem 0 0.25rem;
  padding: 0.5rem 0.95rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
  animation: eggGlow 0.35s ease-out;
}

@keyframes eggGlow {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.if-easter-egg-quote {
  font-size: 0.68rem;
  font-weight: 500;
  color: #cbd5e1;
  text-transform: none;
  font-style: italic;
  letter-spacing: normal;
}

.if-arcade-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.if-arcade-btn-submit {
  background: #38bdf8;
  color: #030712;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.if-arcade-btn-submit:hover {
  background: #7dd3fc;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.8);
  transform: translateY(-1px);
}

.if-arcade-btn-ghost {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.if-arcade-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Arcade Hall of Fame / Leaderboard Table Modal
   ========================================================================== */
.if-leaderboard-modal {
  max-width: 480px;
}

.if-leaderboard-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1.2rem 0;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.if-leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.if-leaderboard-row.is-gold {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

.if-leaderboard-row.is-silver {
  border-color: rgba(203, 213, 225, 0.4);
  background: rgba(203, 213, 225, 0.06);
}

.if-leaderboard-row.is-bronze {
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(217, 119, 6, 0.06);
}

.if-leaderboard-row.is-current-user {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
  animation: ifRowPulse 1.5s infinite;
}

@keyframes ifRowPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(56, 189, 248, 0.4); }
  50% { box-shadow: 0 0 6px rgba(56, 189, 248, 0.2); }
}

.if-rank-cell {
  font-weight: 900;
  width: 50px;
  text-align: left;
  color: #94a3b8;
}

.if-leaderboard-row.is-gold .if-rank-cell { color: #fbbf24; }
.if-leaderboard-row.is-silver .if-rank-cell { color: #e2e8f0; }
.if-leaderboard-row.is-bronze .if-rank-cell { color: #f59e0b; }

.if-initials-cell {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  color: #ffffff;
  flex: 1;
  text-align: left;
}

.if-time-cell {
  font-weight: 900;
  color: #38bdf8;
  text-align: right;
  min-width: 65px;
}

.if-date-cell {
  font-size: 0.72rem;
  color: #64748b;
  text-align: right;
  min-width: 60px;
  margin-left: 0.6rem;
}

/* ==========================================================================
   Dynamic Flashlight Vignette & Depth-of-Field Blur
   ========================================================================== */
.if-flashlight-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000000;
  opacity: 0;
  /* Fade the whole overlay in/out on game start/stop */
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  /* Flashlight Beam: Clear lit circle in center, permanent darkness outside.
     --flashlight-radius controls the SIZE of the bright hole.
     All stops are in % so they scale correctly as radius changes. */
  background: radial-gradient(
    circle var(--flashlight-radius, 260px) at var(--mouse-vx, 50vw) var(--mouse-vy, 50vh),
    rgba(56, 189, 248, 0.02) 0%,
    rgba(3,  7,  18, 0.25) 46%,
    rgba(3,  7,  18, 0.78) 85%,
    rgba(2,  4,  10, 0.94) 130%,
    rgba(2,  4,  10, 0.98) 200%
  );
  /* Depth-of-Field blur outside the beam */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* The mask cuts the dark overlay away at the bright hole.
     When --flashlight-radius shrinks, the transparent hole shrinks too → light goes out. */
  -webkit-mask-image: radial-gradient(
    circle var(--flashlight-radius, 260px) at var(--mouse-vx, 50vw) var(--mouse-vy, 50vh),
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.5) 77%,
    black 104%,
    black 200%
  );
  mask-image: radial-gradient(
    circle var(--flashlight-radius, 260px) at var(--mouse-vx, 50vw) var(--mouse-vy, 50vh),
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.5) 77%,
    black 104%,
    black 200%
  );
}

.if-flashlight-vignette.is-active {
  /* Always fully opaque — darkness never lifts. Only the hole (--flashlight-radius) changes. */
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle ambient glow ring at edge of beam */
.if-flashlight-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle var(--flashlight-radius, 260px) at var(--mouse-vx, 50vw) var(--mouse-vy, 50vh),
    transparent 0%,
    transparent 85%,
    rgba(56, 189, 248, 0.08) 96%,
    transparent 108%
  );
  pointer-events: none;
}


/* Full-screen blackout — covers even the flashlight beam during flicker dropout spikes.
   Opacity is driven by JS: 0 = invisible, 0.88–0.99 = whole screen cuts to near-black. */
.if-flashlight-blackout {
  position: fixed;
  inset: 0;
  background: #020409;
  pointer-events: none;
  z-index: 1000001; /* one above the vignette so it covers the lit hole */
  opacity: 0;
  /* No transition — flicker must be instant, not eased */
}

/* ==========================================================================
   Off-screen Creature Edge Radar Tracker
   ========================================================================== */
.if-edge-tracker {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1000010;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.25s ease;
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-left: -20px;
  margin-top: -20px;
}

.if-edge-tracker.is-visible {
  opacity: 1;
}

.if-edge-tracker-beacon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.4) 0%, rgba(239, 68, 68, 0.12) 60%, transparent 80%);
  border: 1.5px solid rgba(239, 68, 68, 0.75);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.65), inset 0 0 8px rgba(239, 68, 68, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ifBeaconPulse 1.2s infinite ease-in-out;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.if-edge-tracker-arrow {
  color: #f87171;
  font-size: 16px;
  line-height: 1;
  display: inline-block;
  transform-origin: center center;
  filter: drop-shadow(0 0 6px #ef4444);
  transition: transform 0.04s linear;
}

@keyframes ifBeaconPulse {
  0%, 100% {
    transform: scale(0.95);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.85);
  }
}

/* ==========================================================================
   Big Game Title Start Splash Card ("It Follows")
   ========================================================================== */
.if-intro-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000008;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.if-intro-splash.is-active {
  opacity: 1;
  transform: scale(1);
}

.if-intro-splash.is-fading-out {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.if-intro-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.8rem 2.4rem;
  background: rgba(8, 14, 26, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 32px rgba(56, 189, 248, 0.15);
  max-width: 90vw;
}

.if-intro-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
  display: inline-block;
}

.if-intro-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    0 0 20px rgba(56, 189, 248, 0.8),
    0 0 40px rgba(220, 38, 38, 0.45);
  margin-bottom: 0.65rem;
  line-height: 1.1;
}

.if-intro-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 500;
  color: #cbd5e1;
  max-width: 480px;
  line-height: 1.5;
  margin: 0;
}

.if-intro-desc strong {
  color: #38bdf8;
  font-weight: 700;
}

.if-intro-desc kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  color: #ffffff;
}


