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

:root {
  --bg-deep: #030712;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 0, 127, 0.45);
  --magenta-glow: #ff007f;
  --cyan-glow: #38bdf8;
  --purple-glow: #8b5cf6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: #f1f5f9;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #020408;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--magenta-glow);
}

/* Background Canvas */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Scanlines & Grid Texture Overlay */
.scanlines-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    rgba(18, 16, 26, 0) 50%, 
    rgba(0, 0, 0, 0.35) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 127, 0.015),
    rgba(56, 189, 248, 0.015)
  );
  background-size: 100% 4px, 6px 100%;
  opacity: 0.7;
}

.ambient-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(255, 0, 127, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 64px 64px, 64px 64px;
}

/* Content Container */
.content-wrapper {
  position: relative;
  z-index: 10;
}

/* Glassmorphism Cards */
.cyber-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.cyber-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 127, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cyber-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 12px 35px -10px rgba(255, 0, 127, 0.22);
}

.cyber-card:hover::before {
  opacity: 1;
}

/* HUD Navigation */
.hud-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Pulse radar indicator */
.pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  background-color: rgba(16, 185, 129, 0.4);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Interactive Buttons */
.cyber-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 0, 127, 0.12);
  border: 1px solid rgba(255, 0, 127, 0.5);
  color: #fff;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.cyber-btn:hover {
  background: rgba(255, 0, 127, 0.25);
  border-color: #ff007f;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.45);
  transform: translateY(-2px);
}

.cyber-btn-secondary {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}

.cyber-btn-secondary:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

/* Logo glow presentation */
.logo-glow {
  filter: drop-shadow(0 0 25px rgba(255, 0, 127, 0.4)) drop-shadow(0 0 50px rgba(56, 189, 248, 0.2));
  transition: filter 0.4s ease, transform 0.4s ease;
}

.logo-glow:hover {
  filter: drop-shadow(0 0 35px rgba(255, 0, 127, 0.7)) drop-shadow(0 0 70px rgba(139, 92, 246, 0.4));
  transform: scale(1.03);
}

/* Terminal HUD styling */
.terminal-window {
  background: rgba(2, 4, 10, 0.92);
  border: 1px solid rgba(255, 0, 127, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(255, 0, 127, 0.04);
  border-radius: 12px;
}

.terminal-header {
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-output {
  height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.terminal-input-wrapper {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 9, 20, 0.8);
}

/* Glitch Title Animation */
@keyframes text-flicker {
  0% { opacity: 0.95; }
  50% { opacity: 1; }
  52% { opacity: 0.85; }
  54% { opacity: 1; }
  80% { opacity: 0.97; }
  100% { opacity: 1; }
}

.hero-title {
  animation: text-flicker 5s infinite;
  background: linear-gradient(135deg, #ffffff 30%, #f43f5e 80%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Metrics counter glow */
.metric-value {
  background: linear-gradient(180deg, #ffffff 40%, #ff007f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tag / Badge */
.cyber-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 0, 127, 0.1);
  border: 1px solid rgba(255, 0, 127, 0.3);
  color: #ff007f;
}

.cyber-tag-cyan {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

/* Language Switcher */
.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

.lang-btn:hover:not(.active) {
  color: #cbd5e1;
}

/* Sound toggle button */
.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  transition: all 0.25s ease;
}

.audio-btn.active {
  color: #ff007f;
  border-color: rgba(255, 0, 127, 0.4);
  background: rgba(255, 0, 127, 0.1);
}
