:root {
  --bg-deep: #0d0d1a;
  --bg-primary: #1a1a2e;
  --bg-panel: #16213e;
  --bg-card: #1c2a4a;
  --neon: #39ff14;
  --neon-dim: rgba(57, 255, 20, 0.15);
  --neon-glow: rgba(57, 255, 20, 0.4);
  --red: #ff3b5c;
  --red-dim: rgba(255, 59, 92, 0.2);
  --yellow: #ffd700;
  --white: #e8e8e8;
  --gray: #8892a4;
}

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

body {
  background: var(--bg-deep);
  color: var(--white);
  font-family: 'Bricolage Grotesque', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(57,255,20,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(255,59,92,0.03) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.008) 2px, rgba(255,255,255,0.008) 4px);
  pointer-events: none;
  z-index: 0;
}

.font-mono { font-family: 'IBM Plex Mono', monospace; }
.font-display { font-family: 'Bricolage Grotesque', sans-serif; }

@keyframes pulse-speaker {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.6; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes progress-glow {
  0% { box-shadow: 0 0 5px var(--neon), 0 0 10px var(--neon); }
  50% { box-shadow: 0 0 15px var(--neon), 0 0 30px var(--neon); }
  100% { box-shadow: 0 0 5px var(--neon), 0 0 10px var(--neon); }
}

.animate-slide-up {
  animation: slide-up 0.5s ease-out forwards;
}

.speaker-pulse {
  animation: pulse-speaker 1.5s ease-in-out infinite;
  display: inline-block;
}

.neon-border {
  border: 2px dashed var(--neon);
  transition: all 0.3s ease;
}

.neon-border:hover, .neon-border.drag-over {
  border-color: var(--neon);
  box-shadow: 0 0 20px var(--neon-dim), inset 0 0 20px var(--neon-dim);
  background: rgba(57, 255, 20, 0.03);
}

.glow-card {
  background: var(--bg-card);
  border: 1px solid rgba(57, 255, 20, 0.1);
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.glow-card:hover {
  border-color: rgba(57, 255, 20, 0.25);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.1);
}

.btn-neon {
  background: linear-gradient(135deg, var(--neon), #2bcc0e);
  color: #0d0d1a;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-neon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--neon-glow);
}

.btn-neon:active {
  transform: translateY(0);
}

.btn-neon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--neon);
  border: 1px solid var(--neon);
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--neon-dim);
  box-shadow: 0 0 15px var(--neon-dim);
}

.progress-bar-fill {
  animation: progress-glow 2s ease-in-out infinite;
  transition: width 0.5s ease;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'IBM Plex Mono', monospace;
}

.chip-bleeped {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255, 59, 92, 0.3);
  text-decoration: line-through;
}

.chip-kept {
  background: rgba(57, 255, 20, 0.1);
  color: var(--neon);
  border: 1px solid rgba(57, 255, 20, 0.3);
}

.chip:hover {
  transform: scale(1.05);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-panel);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--neon);
  cursor: pointer;
  box-shadow: 0 0 10px var(--neon-glow);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--neon);
  cursor: pointer;
  box-shadow: 0 0 10px var(--neon-glow);
  border: none;
}

.step-indicator {
  position: relative;
}

.step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.step-dot.active {
  background: var(--neon);
  color: var(--bg-deep);
  box-shadow: 0 0 20px var(--neon-glow);
}

.step-dot.completed {
  background: rgba(57, 255, 20, 0.3);
  color: var(--neon);
  border: 2px solid var(--neon);
}

.step-dot.inactive {
  background: var(--bg-panel);
  color: var(--gray);
  border: 2px solid rgba(255,255,255,0.1);
}

.step-line {
  height: 3px;
  flex: 1;
  margin: 0 8px;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.waveform-bar {
  transition: height 0.1s ease;
}

video {
  border-radius: 8px;
  background: #000;
}

.manual-region {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(255, 59, 92, 0.3);
  border: 1px solid var(--red);
  border-radius: 3px;
  cursor: pointer;
  min-width: 8px;
}

.manual-region:hover {
  background: rgba(255, 59, 92, 0.5);
}

.timeline-container {
  position: relative;
  height: 40px;
  background: var(--bg-panel);
  border-radius: 6px;
  overflow: hidden;
  cursor: crosshair;
}

@media (max-width: 768px) {
  .step-dot {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}