/* ============================================================
   ARKA TERRA MANDIRI — Immersive 3D Scrollytelling
   CSS — Full-screen Canvas + Floating Text Overlays
   V3 — Updated: Dot Nav, Audio Soundwave, Contrast Guards
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Inter:wght@300;400;500&family=JetBrains+Mono:wght@300;400&display=swap');

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #020206;
  color: #fff;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  height: 700vh; /* Scroll room for camera path */
}

body.loading {
  overflow: hidden !important;
  height: 100vh !important;
}

::selection {
  background: rgba(140, 120, 255, 0.3);
  color: #fff;
}

/* ===== CANVAS ===== */
#canvas-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

#scene-canvas {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
}

/* ===== TEXT SECTIONS (Floating Overlays) ===== */
.text-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  padding: clamp(32px, 6vw, 80px);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.text-section.active {
  pointer-events: auto;
}

/* Contrast Guard gradients behind text overlay blocks */
.text-section.pos-left {
  align-items: flex-start;
  padding-left: clamp(40px, 8vw, 140px);
  background: linear-gradient(to right, rgba(2, 2, 6, 0.8) 0%, rgba(2, 2, 6, 0.3) 45%, transparent 100%);
}

.text-section.pos-right {
  align-items: flex-end;
  padding-right: clamp(40px, 8vw, 140px);
  text-align: right;
  background: linear-gradient(to left, rgba(2, 2, 6, 0.8) 0%, rgba(2, 2, 6, 0.3) 45%, transparent 100%);
}

.text-section.pos-center {
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at center, rgba(2, 2, 6, 0.85) 0%, rgba(2, 2, 6, 0.35) 60%, transparent 100%);
}

.text-section.pos-bottom-left {
  justify-content: flex-end;
  align-items: flex-start;
  padding-left: clamp(40px, 8vw, 140px);
  padding-bottom: clamp(60px, 10vh, 120px);
  background: linear-gradient(45deg, rgba(2, 2, 6, 0.8) 0%, rgba(2, 2, 6, 0.2) 50%, transparent 100%);
}

/* Initial state for GSAP text transitions */
.text-section h1,
.text-section h2,
.text-section .title-large {
  opacity: 0;
  transform: translateY(30px);
}

.text-section p {
  opacity: 0;
  transform: translateY(20px);
}

.text-section .scroll-hint,
.text-section .cta-wrap,
.text-section .social-links,
.text-section .copyright {
  opacity: 0;
  transform: translateY(15px);
}

/* Typography styles */
.text-section h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.text-section .title-large {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.text-section h1 em,
.text-section h2 em,
.text-section .title-large em {
  font-style: italic;
  font-weight: 400;
}

.text-section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.text-section p {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(0.85rem, 1.3vw, 1.05rem);
  line-height: 1.9;
  max-width: 440px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.text-section .scroll-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 48px;
  animation: pulse-hint 2.5s ease-in-out infinite;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.45; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(5px); }
}

.text-section .cta-wrap {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.text-section .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all 0.4s ease;
  cursor: pointer;
  text-decoration: none;
  pointer-events: auto;
}

.cta-primary {
  background: rgba(255, 255, 255, 0.95);
  color: #020206;
}

.cta-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(255, 255, 255, 0.15);
}

.cta-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

.text-section .social-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
}

.social-link:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

.social-link svg {
  width: 16px;
  height: 16px;
}

.text-section .copyright {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 40px;
  letter-spacing: 0.05em;
}

/* ===== FLOATING NAV ===== */
.floating-nav {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(2, 2, 6, 0.4);
  backdrop-filter: blur(16px);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(2, 2, 6, 0.6);
}

.volume-control-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.volume-slider-pop {
  width: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
}

.volume-control-wrap:hover .volume-slider-pop {
  width: 90px;
  margin-right: 12px;
  opacity: 1;
}

.volume-slider-pop input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider-pop input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 8px #00f0ff;
  transition: transform 0.1s ease;
}

.volume-slider-pop input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.nav-btn .menu-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-btn .menu-lines span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
}

/* ===== SOUNDWAVE VISUALIZER ===== */
.soundwave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 14px;
  height: 12px;
}

.soundwave .bar {
  width: 1.5px;
  height: 2px;
  background-color: currentColor;
  border-radius: 0.5px;
  transition: height 0.05s ease;
}

/* ===== FLOATING LOGO ===== */
.floating-logo {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 100;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  transition: opacity 0.4s ease;
}

.floating-logo em {
  font-style: italic;
  font-weight: 400;
  opacity: 0.7;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 120px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  z-index: 100;
  overflow: hidden;
  display: none; /* Replaced by Dot Navigation sidebar, but left as structure */
}

.scroll-progress-fill {
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  transition: height 0.15s ease-out;
}

/* ===== SIDE DOT NAVIGATION ===== */
.dot-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 100;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dot::after {
  content: attr(data-label);
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  letter-spacing: 0.05em;
  background: rgba(2, 2, 6, 0.8);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.dot:hover {
  background: #fff;
  transform: scale(1.3);
}

.dot:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.dot.active {
  background: #8c78ff;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(140, 120, 255, 0.8);
}

/* ===== LOADING SCREEN ===== */
#loader {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: visibility 1.2s ease;
  overflow: hidden;
}

/* Cinematic Shutter Black Shroud */
#loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #020206;
  z-index: -2;
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.2s ease;
  transform-origin: center;
}

/* Glowing energy burst flash */
#loader::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.75) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.1);
  transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: -1;
}

/* Transition states when ENTER is clicked */
#loader.done::before {
  transform: scaleY(0);
  opacity: 0;
}

#loader.done::after {
  animation: energy-flash 1.0s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes energy-flash {
  0% {
    opacity: 0;
    transform: scale(0.1);
  }
  30% {
    opacity: 1;
    transform: scale(1.5);
  }
  100% {
    opacity: 0;
    transform: scale(3.5);
  }
}

#loader.done {
  visibility: hidden;
  pointer-events: none;
}

/* Smooth dissolve and scale-up for UI elements */
.loader-title,
.loader-ring,
.enter-btn,
.loader-footer {
  transition: opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1), transform 0.6s cubic-bezier(0.19, 1, 0.22, 1), filter 0.6s ease !important;
}

#loader.done .loader-title,
#loader.done .loader-ring,
#loader.done .enter-btn,
#loader.done .loader-footer {
  opacity: 0;
  transform: scale(1.4) translateY(-30px);
  filter: blur(10px);
}

.loader-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 40px;
  letter-spacing: 0.05em;
}

.loader-ring {
  position: relative;
  width: 100px;
  height: 100px;
}

.loader-ring svg {
  transform: rotate(-90deg);
}

.loader-ring circle {
  fill: transparent;
  stroke-width: 1;
  stroke-linecap: round;
}

.loader-ring .ring-bg {
  stroke: rgba(255, 255, 255, 0.08);
}

.loader-ring .ring-fill {
  stroke: rgba(255, 255, 255, 0.6);
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.3s ease;
}

.loader-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
}

.loader-ring {
  position: relative;
  width: 100px;
  height: 100px;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
}

#loader.ready .loader-ring {
  opacity: 0.5;
  transform: scale(0.95);
}

/* Enter button styling */
.enter-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: #00d2ff;
  background: rgba(0, 210, 255, 0.05);
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 14px 32px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.1), inset 0 0 10px rgba(0, 210, 255, 0.05);
  margin-top: 30px;
  z-index: 10;
  pointer-events: none;
}

#loader.ready .enter-btn {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.enter-btn:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: #00d2ff;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.35), inset 0 0 15px rgba(0, 210, 255, 0.1);
  color: #fff;
}

.loader-footer {
  position: absolute;
  bottom: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ===== MENU OVERLAY ===== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 6, 0.95);
  backdrop-filter: blur(30px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.menu-overlay a {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.menu-overlay a:hover {
  color: #fff;
  transform: translateX(8px);
}

.menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.menu-close:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .text-section h1,
  .text-section .title-large {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .text-section h2 {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
  }

  .text-section.pos-left,
  .text-section.pos-right,
  .text-section.pos-bottom-left,
  .text-section.pos-center {
    padding-left: 24px;
    padding-right: 24px;
    align-items: flex-start;
    text-align: left;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  }

  .text-section.pos-bottom-left {
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(2, 2, 6, 0.95) 0%, rgba(2, 2, 6, 0.6) 65%, transparent 100%) !important;
  }

  .text-section.pos-left,
  .text-section.pos-right {
    justify-content: center;
    background: radial-gradient(circle at center left, rgba(2, 2, 6, 0.92) 0%, rgba(2, 2, 6, 0.5) 75%, transparent 100%) !important;
  }

  .text-section.pos-center {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(2, 2, 6, 0.95) 0%, rgba(2, 2, 6, 0.6) 75%, transparent 100%) !important;
  }

  .floating-logo {
    font-size: 0.8rem;
  }

  .dot-nav {
    display: none; /* Hide side dots on mobile for clean screen space */
  }

  .text-section .cta-wrap {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .text-section {
    padding: 24px;
  }

  .floating-nav {
    top: 16px;
    right: 16px;
  }

  .floating-logo {
    top: 20px;
    left: 16px;
  }
}

/* ===== WEBGL FALLBACK STYLING ===== */
#webgl-fallback {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #080720 0%, #020206 100%);
  z-index: 0;
  overflow: hidden;
  display: none; /* Controlled by JS detector */
}

/* Beautiful moving nebula effects */
.fallback-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.35;
  mix-blend-mode: screen;
}

.fallback-glow-1 {
  width: 90vw;
  height: 90vw;
  background: radial-gradient(circle, rgba(140, 60, 255, 0.4) 0%, rgba(20, 10, 60, 0) 70%);
  left: -20vw;
  bottom: -20vw;
  animation: float-glow-1 22s ease-in-out infinite alternate;
}

.fallback-glow-2 {
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.25) 0%, rgba(5, 50, 100, 0) 70%);
  right: -10vw;
  top: -10vw;
  animation: float-glow-2 18s ease-in-out infinite alternate;
}

@keyframes float-glow-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, -5vh) scale(1.1); }
  100% { transform: translate(-3vw, 3vh) scale(0.95); }
}

@keyframes float-glow-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-4vw, 6vh) scale(0.9); }
  100% { transform: translate(6vw, -3vh) scale(1.15); }
}

/* CSS Starfield Background */
.fallback-stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
  box-shadow: 
    80vw 20vh #fff, 15vw 85vh rgba(255,255,255,0.7), 45vw 60vh rgba(255,255,255,0.8),
    90vw 75vh #fff, 5vw 40vh rgba(255,255,255,0.9), 30vw 10vh #fff,
    75vw 90vh rgba(255,255,255,0.6), 60vw 30vh #fff, 20vw 55vh rgba(255,255,255,0.85),
    10vw 95vh #fff, 50vw 15vh rgba(255,255,255,0.75), 85vw 50vh #fff,
    35vw 80vh rgba(255,255,255,0.5), 70vw 5vh #fff, 95vw 35vh rgba(255,255,255,0.9),
    25vw 25vh #fff, 55vw 70vh rgba(255,255,255,0.8), 40vw 92vh #fff,
    65vw 50vh rgba(255,255,255,0.7), 12vw 18vh #fff, 88vw 8vh rgba(255,255,255,0.65),
    98vw 85vh #fff, 3vw 68vh rgba(255,255,255,0.95), 48vw 38vh #fff,
    82vw 62vh rgba(255,255,255,0.8), 18vw 48vh #fff, 72vw 22vh rgba(255,255,255,0.7),
    58vw 88vh #fff, 28vw 60vh rgba(255,255,255,0.9), 38vw 5vh #fff,
    51vw 52vh rgba(255,255,255,0.6), 92vw 12vh #fff, 22vw 78vh rgba(255,255,255,0.85),
    78vw 98vh #fff, 68vw 42vh rgba(255,255,255,0.75), 8vw 80vh #fff;
  opacity: 0.8;
  animation: twinkle-stars 6s ease-in-out infinite alternate;
}

@keyframes twinkle-stars {
  0% { opacity: 0.5; }
  100% { opacity: 0.95; }
}

/* ===== CUSTOM REACTOR CURSOR ===== */
#core-cursor {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate3d(0, 0, 0) scale(0.5);
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  background: rgba(2, 2, 6, 0.15);
  backdrop-filter: blur(2px);
}
#core-cursor::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px dashed rgba(0, 210, 255, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2), inset 0 0 10px rgba(0, 210, 255, 0.1);
  animation: cursor-spin 12s linear infinite;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#core-cursor::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid #00d2ff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#core-cursor.cursor-hover::before {
  border-color: rgba(140, 120, 255, 0.85); /* violet */
  box-shadow: 0 0 20px rgba(140, 120, 255, 0.4), inset 0 0 10px rgba(140, 120, 255, 0.2);
}
#core-cursor.cursor-hover::after {
  border-color: #8c78ff;
  box-shadow: 0 0 15px rgba(140, 120, 255, 0.6);
}
#core-cursor span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: #00d2ff;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-shadow: 0 0 4px rgba(0, 210, 255, 0.7);
  animation: cursor-pulse 1.5s ease-in-out infinite alternate;
  z-index: 2;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
#core-cursor.cursor-hover span {
  color: #8c78ff;
  text-shadow: 0 0 4px rgba(140, 120, 255, 0.7);
}
#core-cursor.visible {
  opacity: 1;
}
@keyframes cursor-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes cursor-pulse {
  0% { opacity: 0.5; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}

/* ===== SYSTEMS ACTIVE MODAL ===== */
.systems-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 2, 6, 0.45);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
}
.systems-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.systems-modal .modal-content {
  background: radial-gradient(circle at top left, rgba(16, 12, 42, 0.9), rgba(4, 4, 16, 0.98));
  border: 1px solid rgba(0, 210, 255, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 210, 255, 0.15);
  padding: 40px;
  border-radius: 16px;
  width: 90%;
  max-width: 680px;
  position: relative;
  transform: scale(0.85) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.systems-modal.open .modal-content {
  transform: scale(1) translateY(0);
}
.systems-modal h2 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.8rem;
  color: #fff;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}
.modal-line {
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.6), transparent);
  margin-bottom: 24px;
}
.systems-modal .modal-close {
  position: absolute;
  top: 35px;
  right: 40px;
  background: transparent;
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: #00d2ff;
  border-radius: 100px;
  padding: 6px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
}
.systems-modal .modal-close:hover {
  background: rgba(0, 210, 255, 0.1);
  border-color: #00d2ff;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}
.system-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.system-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.system-card:hover {
  border-color: rgba(0, 210, 255, 0.25);
  background: rgba(0, 210, 255, 0.02);
}
.system-card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #fff;
}
.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-indicator.online {
  background: #00ffcc;
  box-shadow: 0 0 8px #00ffcc;
  animation: blink-indicator 1.5s ease-in-out infinite alternate;
}
@keyframes blink-indicator {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}
.system-card p {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}
@media (max-width: 580px) {
  .system-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .systems-modal .modal-content {
    padding: 30px 20px;
  }
  .systems-modal .modal-close {
    position: static;
    display: block;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
  }
}

/* ===== HOLOGRAPHIC HUD OVERLAY ===== */
#hud-overlay {
  position: fixed;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 5;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.hud-ring-outer {
  stroke: rgba(0, 210, 255, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 40 18;
  fill: none;
  transform-origin: 110px 110px;
  animation: spin-clockwise 24s linear infinite;
}

.hud-ring-inner {
  stroke: rgba(153, 85, 255, 0.4);
  stroke-width: 1;
  stroke-dasharray: 10 15;
  fill: none;
  transform-origin: 110px 110px;
  animation: spin-counter-clockwise 18s linear infinite;
}

.hud-ring-dot {
  fill: #00d2ff;
  animation: hud-dot-pulse 1s ease-in-out infinite alternate;
}

.hud-line {
  stroke: rgba(0, 210, 255, 0.4);
  stroke-width: 1;
}

.hud-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5rem;
  font-weight: 400;
  fill: #00d2ff;
  letter-spacing: 0.15em;
  text-shadow: 0 0 5px rgba(0, 210, 255, 0.6);
}

.hud-text-data {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.45rem;
  font-weight: 300;
  fill: rgba(153, 85, 255, 0.95);
  letter-spacing: 0.1em;
  text-shadow: 0 0 5px rgba(153, 85, 255, 0.5);
}

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

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

@keyframes hud-dot-pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

/* ===== CINEMATIC LENS FLARE ===== */
#lens-flare {
  position: fixed;
  pointer-events: none;
  z-index: 4;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle at center, rgba(0, 210, 255, 0.45) 0%, rgba(0, 150, 255, 0.12) 15%, rgba(153, 85, 255, 0.04) 35%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

#lens-flare::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.5) 40%, #ffffff 50%, rgba(0, 210, 255, 0.5) 60%, transparent);
  transform: translate(-50%, -50%) rotate(-15deg);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

/* ===== HOLOGRAPHIC SCANLINES & NOISE OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.22) 50%
  );
  background-size: 100% 4px;
  z-index: 999999;
  pointer-events: none;
  opacity: 0.25;
  animation: scanline-flicker 0.15s infinite;
}

@keyframes scanline-flicker {
  0% { opacity: 0.21; }
  50% { opacity: 0.25; }
  100% { opacity: 0.22; }
}

/* ===== HOLOGRAM FORM ===== */
.hologram-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.form-group label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #00d2ff;
  letter-spacing: 0.08em;
  text-shadow: 0 0 5px rgba(0, 210, 255, 0.2);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(2, 2, 8, 0.6);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: 6px;
  padding: 10px 14px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #00d2ff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
  background: rgba(4, 4, 16, 0.85);
}
.form-group select option {
  background: #040410;
  color: #fff;
}
.form-submit-btn {
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.15), rgba(140, 60, 255, 0.15));
  border: 1px solid #00d2ff;
  color: #00d2ff;
  border-radius: 6px;
  padding: 12px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  margin-top: 10px;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}
.form-submit-btn:hover {
  background: linear-gradient(90deg, #00d2ff, #8c3cff);
  color: #020208;
  border-color: transparent;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.45);
  transform: translateY(-2px);
}
.form-submit-btn:active {
  transform: translateY(0);
}
.form-status-msg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  margin-top: 15px;
  text-align: center;
  letter-spacing: 0.05em;
  min-height: 1.2rem;
  transition: color 0.3s ease;
}
.form-status-msg.success {
  color: #00ffaa;
  text-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
}
.form-status-msg.error {
  color: #ff3c64;
  text-shadow: 0 0 10px rgba(255, 60, 100, 0.4);
}
