:root {
  --bg-deep: #0d0f1a;
  --bg-primary: #131627;
  --bg-card: #1a1e35;
  --bg-card-hover: #222747;
  --accent-blue: #3b82f6;
  --accent-blue-glow: #2563eb;
  --accent-orange: #f97316;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-yellow: #eab308;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --border: #2a2f4a;
  --corrupt-bg: #2d1b3d;
  --corrupt-accent: #ff2975;
  --corrupt-glow: #39ff14;
  --corrupt-dark: #1a0f24;
}

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

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
}

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

.bg-grid {
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.drop-zone {
  border: 2px dashed var(--border);
  transition: all 0.3s ease;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent-blue);
  background: rgba(59,130,246,0.05);
}

.drop-zone-corrupt {
  border: 2px dashed #5a2d6a;
  transition: all 0.3s ease;
}
.drop-zone-corrupt:hover, .drop-zone-corrupt.drag-over {
  border-color: var(--corrupt-accent);
  background: rgba(255,41,117,0.08);
}

.glow-blue { box-shadow: 0 0 20px rgba(59,130,246,0.2); }
.glow-orange { box-shadow: 0 0 20px rgba(249,115,22,0.3); }
.glow-green { box-shadow: 0 0 20px rgba(34,197,94,0.3); }
.glow-red { box-shadow: 0 0 20px rgba(239,68,68,0.4); }
.glow-corrupt { box-shadow: 0 0 25px rgba(255,41,117,0.4), 0 0 50px rgba(57,255,20,0.1); }

.progress-bar-fill {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

.progress-bar-corrupt {
  background: linear-gradient(90deg, #ff2975, #ff6b35, #39ff14, #ff2975);
  background-size: 300% 100%;
  animation: shimmer 1.5s linear infinite;
}

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

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

.toast-enter {
  animation: slide-in 0.3s ease-out;
}

.waveform-bar {
  animation: wave 0.8s ease-in-out infinite alternate;
}

@keyframes wave {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1); }
}

@keyframes glitch-screen {
  0% { transform: translate(0); filter: none; }
  10% { transform: translate(-3px, 2px); filter: hue-rotate(90deg); }
  20% { transform: translate(3px, -1px); filter: saturate(3) brightness(1.2); }
  30% { transform: translate(-1px, 3px); clip-path: inset(20% 0 30% 0); }
  40% { transform: translate(2px, -2px); filter: hue-rotate(180deg); }
  50% { transform: translate(0); filter: none; }
  60% { transform: translate(-2px, 1px); filter: invert(0.3); }
  70% { transform: translate(1px, -3px); clip-path: inset(40% 0 10% 0); }
  80% { transform: translate(-1px, 2px); filter: hue-rotate(270deg) saturate(2); }
  90% { transform: translate(2px, 0); filter: contrast(1.5); }
  100% { transform: translate(0); filter: none; }
}

.glitch-active {
  animation: glitch-screen 0.5s ease-in-out;
}

@keyframes skull-bounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-5deg); }
  50% { transform: scale(0.9) rotate(5deg); }
  75% { transform: scale(1.1) rotate(-3deg); }
}

.skull-bounce {
  animation: skull-bounce 0.6s ease-in-out;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-blue);
  cursor: pointer;
  transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.corrupt-slider::-webkit-slider-thumb {
  background: var(--corrupt-accent) !important;
}
.corrupt-slider {
  background: linear-gradient(90deg, #2d1b3d, #5a2d6a) !important;
}

select, input[type="number"] {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.corrupt-card {
  background: var(--corrupt-dark);
  border: 1px solid #3d1f50;
}

.corrupt-section-title {
  color: var(--corrupt-accent);
  text-shadow: 0 0 10px rgba(255,41,117,0.3);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

@keyframes fadeTagline {
  0% { opacity: 0; transform: translateY(6px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

.tagline-fade {
  animation: fadeTagline 4s ease-in-out;
}

.subtitle-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.split-preview-container {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
}
.split-preview-container .split-label {
  position: absolute;
  top: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  pointer-events: none;
  z-index: 5;
}
.split-preview-container .split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--corrupt-accent);
  z-index: 4;
  pointer-events: none;
}

canvas.fullscreen-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: black !important;
  object-fit: contain;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.35s ease-out; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(255,41,117,0.3); }
  50% { box-shadow: 0 0 30px rgba(255,41,117,0.6), 0 0 60px rgba(57,255,20,0.15); }
}
.pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }