/* ============================================================
   V17 Deep Web Gateway — UI Overlay Styles
   3D scene rendered by Three.js; this file styles the HUD only
   ============================================================ */

:root {
  --primary:   #7c3aed;
  --secondary: #ec4899;
  --accent:    #c084fc;
  --surface:   rgba(15, 5, 25, 0.85);
  --text:      #f3e8ff;
  --text-dim:  rgba(243, 232, 255, 0.5);
  --glow-purple: 0 0 20px rgba(124, 58, 237, 0.8);
  --glow-pink:   0 0 20px rgba(236, 72, 153, 0.8);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: #0a0a0a;
  overflow: hidden;
  font-family: 'Anonymous Pro', monospace;
  color: var(--text);
}

/* ── Three.js canvas fills entire viewport ── */
#three-container {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#three-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── Full-viewport overlay ── */
.ui-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* fog-like vignette over the 3D scene */
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%);
  pointer-events: none; /* children opt-in via pointer-events: auto */
}

/* ── Layer counter — top-left HUD ── */
.layer-counter {
  position: absolute;
  top: 24px;
  left: 24px;
  font-family: 'Anonymous Pro', monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-shadow: var(--glow-purple);
  pointer-events: none;
  transition: color 0.3s;
}

.layer-counter span { font-weight: 700; }

/* ── Central glassmorphism panel ── */
.main-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 48px;
  background: var(--surface);
  border: 1px solid rgba(192, 132, 252, 0.25);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--glow-purple), inset 0 1px 0 rgba(255,255,255,0.08);
  text-align: center;
  pointer-events: auto;
  max-width: 420px;
  width: 90%;
}

.panel-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0.7;
}

.panel-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  mix-blend-mode: screen;
}

.panel-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ── Status text ── */
.status-text {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--accent);
  min-height: 18px;
  text-shadow: 0 0 10px var(--accent);
  transition: color 0.4s;
}

/* ── Buttons ── */
.enter-btn,
.redirect-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 14px 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-smooth),
              box-shadow 0.2s var(--ease-smooth),
              opacity 0.3s;
}

.enter-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: var(--glow-purple);
}

.enter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(124,58,237,0.9), var(--glow-pink);
}

.enter-btn:active { transform: translateY(0); }

.redirect-btn {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: #fff;
  box-shadow: var(--glow-pink);
  animation: pulse-redirect 1.5s ease-in-out infinite alternate;
}

.redirect-btn:hover { transform: translateY(-2px) scale(1.03); }

/* ── Scan line decoration ── */
.scan-line {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
  opacity: 0.6;
  pointer-events: none;
  animation: scan-move 4s ease-in-out infinite alternate;
}

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Animations ── */
@keyframes pulse-redirect {
  from { box-shadow: 0 0 10px rgba(236,72,153,0.5); }
  to   { box-shadow: 0 0 28px rgba(236,72,153,0.9), 0 0 50px rgba(192,132,252,0.4); }
}

@keyframes scan-move {
  from { transform: scaleX(0.6); opacity: 0.3; }
  to   { transform: scaleX(1);   opacity: 0.7; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
