:root {
  --bg: #020611;
  --text: #e6f1ff;
  --neon-blue: #00e6ff;
  --neon-green: #00ff99;
  --grid-color: rgba(0,255,255,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background animation */
.energy-core, .moving-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.energy-core {
  background: radial-gradient(circle, rgba(0,255,255,0.12) 0%, transparent 70%);
  filter: blur(120px);
  animation: pulse 8s infinite alternate;
}
@keyframes pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(1.2); opacity: 1; }
}

.moving-grid {
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: drift 25s linear infinite;
}
@keyframes drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 80px 80px, 80px 80px; }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(2,8,20,0.85);
  display: flex;
  justify-content: center;
  gap: 36px;
  padding: 18px 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}
nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: 0.3s;
}
nav a:hover {
  color: var(--neon-green);
  text-shadow: 0 0 8px var(--neon-green);
}

/* Hero */
header {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
}
header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(48px, 8vw, 90px);
  letter-spacing: 6px;
  color: var(--neon-blue);
  text-shadow: 0 0 20px rgba(0,255,255,0.5);
  margin-bottom: 12px;
}
.subtitle {
  color: var(--neon-green);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.tagline {
  font-size: 15px;
  opacity: 0.85;
  color: var(--text);
  margin-bottom: 32px;
  transition: opacity 0.4s;
}
.enter-btn {
  background: linear-gradient(135deg, #00ff99, #00b8ff);
  color: #000;
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 999px;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(0,255,255,0.4);
  text-decoration: none;
  transition: 0.3s;
}
.enter-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0,255,255,0.7);
}

/* Showcase */
.showcase {
  position: relative;
  z-index: 1;
  padding: 120px 20px;
  text-align: center;
}
.showcase h2 {
  color: var(--neon-blue);
  font-size: clamp(30px, 6vw, 48px);
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 2px;
  font-family: 'Orbitron', sans-serif;
}
.showcase p {
  max-width: 800px;
  margin: 0 auto 28px;
  line-height: 1.6;
  font-size: 16px;
  opacity: 0.9;
}
.cta-btn {
  background: linear-gradient(135deg, #00ff99, #00b8ff);
  color: #000;
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 999px;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(0,255,255,0.3);
  text-decoration: none;
  transition: 0.3s;
}
.cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0,255,255,0.6);
}

/* Footer */
footer {
  position: relative;
  text-align: center;
  padding: 40px 0;
  background: rgba(0,0,0,0.4);
  color: var(--text);
  font-size: 14px;
  z-index: 2;
}
footer span {
  color: var(--neon-green);
}
/* ---------- MOBILE HEADER FIX ---------- */
@media (max-width: 768px) {
  header h1 {
    font-size: clamp(36px, 10vw, 60px);
    letter-spacing: 3px;
    line-height: 1.1;
    word-break: break-word;
  }

  .subtitle {
    font-size: 16px;
  }

  .tagline {
    font-size: 14px;
    max-width: 90%;
    margin: 0 auto 24px;
  }

  header {
    padding: 80px 16px 60px;
  }
}
/* ---------- MOBILE NAV FIX ---------- */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 10px;
  }

  nav a {
    font-size: 13px;
    letter-spacing: 0.5px;
  }
}
/* ---------- PARTICLE FIELD (UPGRADED) ---------- */
.particle-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--neon-green);
  opacity: 0.75;
  border-radius: 50%;
  filter: blur(2px);
  animation: floatUp linear forwards, shimmer 3s infinite ease-in-out;
}

@keyframes floatUp {
  from { transform: translateY(100vh) translateX(0); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  to   { transform: translateY(-10vh) translateX(var(--drift)); opacity: 0; }
}

@keyframes shimmer {
  0%, 100% { filter: blur(2px) brightness(1); }
  50% { filter: blur(3px) brightness(2); }
}
canvas#lab3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3 !important;
  pointer-events: none;
}
.energy-core,
.moving-grid {
  z-index: 1 !important;
  opacity: 0.15 !important;
}
nav, header, section, footer {
  position: relative;
  z-index: 5;
}
/* === FORCE 3D BACKGROUND TO FRONT === */
canvas#lab3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2 !important;
  pointer-events: none;
  background: radial-gradient(circle at center, #001018 0%, #000 100%);
}

/* push the animated grid layers below it */
.energy-core,
.moving-grid {
  z-index: 1 !important;
  opacity: 0.15 !important;
}

/* make sure text, nav, and buttons stay above everything */
nav, header, section, footer {
  position: relative;
  z-index: 10 !important;
}
/* --- Debug visibility: force 3D background above everything --- */
canvas#lab3d {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999 !important;
  background: #000;
}
.energy-core, .moving-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

canvas#lab3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
}

/* make sure nav and content sit above the visuals */
nav, header, footer, #consoleOverlay {
  position: relative;
  z-index: 10;
}


