:root {
  --bg-dark: #0a0812;
  --bg-panel: #12101e;
  --bg-card: #1a1730;
  --neon-green: #39ff14;
  --neon-cyan: #00ffd5;
  --neon-purple: #b347ff;
  --neon-pink: #ff2a6d;
  --crt-glow: rgba(57, 255, 20, 0.15);
  --text-dim: #6a6889;
  --text-light: #c8c5e2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

.vhs-font { font-family: 'VT323', monospace; }
.press-start { font-family: 'Press Start 2P', monospace; }
.mono { font-family: 'JetBrains Mono', monospace; }

.scanline-overlay {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.3) 1px,
    rgba(0, 0, 0, 0.3) 2px
  );
  pointer-events: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2;
}

.crt-screen {
  border-radius: 16px;
  box-shadow:
    0 0 20px rgba(57, 255, 20, 0.1),
    0 0 60px rgba(57, 255, 20, 0.05),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.crt-screen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 16px;
  border: 2px solid rgba(57, 255, 20, 0.15);
  pointer-events: none;
  z-index: 3;
}

.vcr-btn {
  background: linear-gradient(180deg, #3a3556 0%, #252240 50%, #1a1730 100%);
  border: 1px solid #4a4570;
  border-bottom: 3px solid #0f0d1a;
  border-right: 2px solid #1a1730;
  color: var(--text-light);
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.1s;
  text-shadow: 0 0 4px rgba(57, 255, 20, 0.3);
}

.vcr-btn:hover {
  background: linear-gradient(180deg, #4a4570 0%, #3a3556 50%, #252240 100%);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 213, 0.2);
}

.vcr-btn:active {
  border-bottom-width: 1px;
  border-top-width: 3px;
  transform: translateY(2px);
}

.vcr-btn.active {
  background: linear-gradient(180deg, #2a2840 0%, #1a1730 100%);
  border-color: var(--neon-green);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
  color: var(--neon-green);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes tracking {
  0% { transform: translateX(0) scaleX(1); }
  10% { transform: translateX(-2px) scaleX(1.01); }
  20% { transform: translateX(3px) scaleX(0.99); }
  30% { transform: translateX(-1px) scaleX(1); }
  100% { transform: translateX(0) scaleX(1); }
}

@keyframes glitch {
  0% { clip-path: inset(0 0 100% 0); }
  5% { clip-path: inset(40% 0 30% 0); transform: translateX(-5px); }
  10% { clip-path: inset(80% 0 5% 0); transform: translateX(3px); }
  15% { clip-path: inset(10% 0 70% 0); transform: translateX(-2px); }
  20% { clip-path: inset(0 0 100% 0); transform: translateX(0); }
  100% { clip-path: inset(0 0 100% 0); }
}

.rec-blink {
  animation: blink 1s ease-in-out infinite;
}

.tracking-effect {
  animation: tracking 0.5s ease-out;
}

.drop-zone-glow {
  transition: all 0.3s;
}

.drop-zone-glow.drag-over {
  box-shadow: 0 0 40px rgba(57, 255, 20, 0.4), 0 0 80px rgba(57, 255, 20, 0.15);
  border-color: var(--neon-green) !important;
}

.log-console {
  background: #050510;
  border: 1px solid #1a1a30;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
}

.log-console::-webkit-scrollbar {
  width: 6px;
}

.log-console::-webkit-scrollbar-track {
  background: #0a0a1a;
}

.log-console::-webkit-scrollbar-thumb {
  background: #2a2a4a;
  border-radius: 3px;
}

.frame-slider {
  -webkit-appearance: none;
  appearance: none;
  background: #1a1730;
  border-radius: 4px;
  height: 6px;
  outline: none;
  width: 100%;
}

.frame-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: var(--neon-green);
  border: 2px solid #0a0812;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
  cursor: pointer;
  height: 18px;
  width: 18px;
}

.frame-slider::-moz-range-thumb {
  background: var(--neon-green);
  border: 2px solid #0a0812;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
  cursor: pointer;
  height: 18px;
  width: 18px;
}

.badge-supported {
  background: rgba(57, 255, 20, 0.15);
  border: 1px solid rgba(57, 255, 20, 0.4);
  color: var(--neon-green);
}

.badge-unsupported {
  background: rgba(255, 42, 109, 0.15);
  border: 1px solid rgba(255, 42, 109, 0.4);
  color: var(--neon-pink);
}

.badge-partial {
  background: rgba(255, 200, 0, 0.15);
  border: 1px solid rgba(255, 200, 0, 0.4);
  color: #ffc800;
}

.header-bg {
  background: linear-gradient(135deg, #0a0812 0%, #1a0a2e 50%, #0a0812 100%);
  border-bottom: 1px solid rgba(179, 71, 255, 0.2);
}

.neon-text-green {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5), 0 0 20px rgba(57, 255, 20, 0.3);
}

.neon-text-cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 255, 213, 0.5), 0 0 20px rgba(0, 255, 213, 0.3);
}

.neon-text-purple {
  color: var(--neon-purple);
  text-shadow: 0 0 10px rgba(179, 71, 255, 0.5), 0 0 20px rgba(179, 71, 255, 0.3);
}