/* Cyvora Emerald Cyber Security Theme & Motion System */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-dark: #020d0a; /* Deep Emerald Black */
  --surface-dark: #051a14;
  --surface-card: rgba(6, 32, 25, 0.65);
  --accent-mint: #00e699; /* Cyvora Primary Mint Emerald */
  --accent-emerald: #10c985;
  --accent-neon: #00ff9d;
  --border-emerald: rgba(0, 230, 153, 0.15);
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: #f0fdf4;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

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

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

/* Dynamic Atmosphere Glows */
body::before {
  content: '';
  position: fixed;
  top: -10%; right: -5%;
  width: 65vw; height: 65vw;
  background: radial-gradient(circle, rgba(0, 230, 153, 0.12) 0%, rgba(16, 201, 133, 0.04) 45%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(40px);
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%; left: -5%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(5, 40, 30, 0.3) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(50px);
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(5, 26, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 230, 153, 0.12);
}

.glass-card {
  background: var(--surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 230, 153, 0.1);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 230, 153, 0.35);
  box-shadow: 0 12px 30px -10px rgba(0, 230, 153, 0.25);
}

/* 2. Magnetic Inputs & Breathing Ring */
.cyberscan-breathing-ring {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  background: rgba(4, 20, 16, 0.85) !important;
}

.cyberscan-breathing-ring:focus {
  animation: breathing-glow 2.5s ease-in-out infinite alternate;
  border-color: var(--accent-mint) !important;
  outline: none;
}

@keyframes breathing-glow {
  0% {
    box-shadow: 0 0 8px rgba(0, 230, 153, 0.3), inset 0 0 5px rgba(0, 230, 153, 0.1);
  }
  100% {
    box-shadow: 0 0 24px rgba(0, 230, 153, 0.75), 0 0 10px rgba(16, 201, 133, 0.5), inset 0 0 12px rgba(0, 230, 153, 0.25);
  }
}

/* Input click scale feedback */
.input-scaledown {
  transform: scale(0.98) !important;
}

/* 3D Tilt Audit Button */
.btn-tilt-wrap {
  perspective: 800px;
}

.audit-btn-3d {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #00b874, #00e699, #10c985);
  background-size: 200% 200%;
  color: #020d0a !important;
}

.audit-btn-3d:hover {
  box-shadow: 0 0 25px rgba(0, 230, 153, 0.6), 0 0 10px rgba(0, 255, 157, 0.5);
}

/* Text Shimmer Sweep Animation */
.shimmer-text {
  position: relative;
  display: inline-block;
  background: linear-gradient(90deg, #020d0a 0%, #ffffff 40%, #020d0a 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textSweep 3.5s infinite linear;
  font-weight: 800;
}

@keyframes textSweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 3. In-Progress Scanline & Matrix Flash */
.input-container-rel {
  position: relative;
  overflow: hidden;
}

.scanline-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ff9d, #00e699, transparent);
  box-shadow: 0 0 12px #00ff9d, 0 0 6px #00e699;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
}

.scanline-active {
  opacity: 1;
  animation: scanlineSweep 1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes scanlineSweep {
  0% { top: 0%; }
  50% { top: 96%; }
  100% { top: 0%; }
}

/* Matrix Flash Effect */
.matrix-flash-bg {
  animation: matrixFlashAnim 0.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes matrixFlashAnim {
  0% {
    background-color: rgba(0, 230, 153, 0.35);
    box-shadow: inset 0 0 20px rgba(0, 230, 153, 0.6);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

/* 4. Elastic Slide-In & CRT Flicker Reveal */
.elastic-slide-up {
  animation: elasticSlideUp 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes elasticSlideUp {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* CRT Text Flicker Effect */
.crt-flicker {
  animation: crtTextFlicker 0.6s ease-in-out 1;
}

@keyframes crtTextFlicker {
  0% { opacity: 0.2; text-shadow: 2px 0 0 red, -2px 0 0 blue; }
  15% { opacity: 0.9; text-shadow: 0 0 0 transparent; }
  30% { opacity: 0.4; text-shadow: 1px 0 0 #00e699, -1px 0 0 #10c985; }
  45% { opacity: 1; text-shadow: 0 0 8px rgba(0, 230, 153, 0.8); }
  70% { opacity: 0.8; text-shadow: 0 0 0 transparent; }
  100% { opacity: 1; text-shadow: none; }
}

/* Pulse Emerald for indicator */
.pulse-emerald {
  background-color: #00e699 !important;
  animation: pulse-glow-emerald 2s infinite;
}

@keyframes pulse-glow-emerald {
  0%, 100% { box-shadow: 0 0 6px rgba(0, 230, 153, 0.6); }
  50% { box-shadow: 0 0 16px rgba(0, 230, 153, 1); }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(0, 230, 153, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-mint); }
