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

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #12121a; }
::-webkit-scrollbar-thumb { background: #3a1a1e; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ff2b2b; }

.zk-active ::-webkit-scrollbar-thumb { background: #0a3a1a; }
.zk-active ::-webkit-scrollbar-thumb:hover { background: #00ff41; }

@keyframes glitch {
  0% { text-shadow: 2px 0 #ff006e, -2px 0 #00b4d8; }
  20% { text-shadow: -3px 1px #ff006e, 3px -1px #ffd60a; }
  40% { text-shadow: 3px -2px #ff006e, -3px 2px #00b4d8; }
  60% { text-shadow: -2px 3px #ff2b2b, 2px -3px #00b4d8; }
  80% { text-shadow: 1px -1px #ff006e, -1px 1px #ffd60a; }
  100% { text-shadow: 2px 0 #ff006e, -2px 0 #00b4d8; }
}

@keyframes zk-glitch-text {
  0% { text-shadow: 2px 0 #00ff41, -2px 0 #ff006e; }
  25% { text-shadow: -3px 1px #00ff41, 3px -1px #000; }
  50% { text-shadow: 3px -2px #00ff41, -3px 2px #00ff41; }
  75% { text-shadow: -2px 3px #00ff41, 2px -3px #ff006e; }
  100% { text-shadow: 2px 0 #00ff41, -2px 0 #ff006e; }
}
.zk-glitch-text { animation: zk-glitch-text 0.25s infinite !important; }

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 10px rgba(255,43,43,0.35); }
  50% { box-shadow: 0 0 20px rgba(255,0,110,0.4); }
}

.zk-active [style*="animation: pulse-border"] {
  animation: zk-pulse-border 3s ease-in-out infinite !important;
}
@keyframes zk-pulse-border {
  0%, 100% { box-shadow: 0 0 10px rgba(0,255,65,0.35); }
  50% { box-shadow: 0 0 20px rgba(0,255,65,0.5); }
}

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

@keyframes deepfry-ui {
  0% { filter: contrast(1) saturate(1) brightness(1); }
  10% { filter: contrast(3) saturate(5) brightness(1.5) hue-rotate(10deg); }
  20% { filter: contrast(5) saturate(8) brightness(2) hue-rotate(0deg); }
  50% { filter: contrast(4) saturate(7) brightness(1.8) hue-rotate(20deg); }
  80% { filter: contrast(2) saturate(3) brightness(1.3) hue-rotate(0deg); }
  100% { filter: contrast(1) saturate(1) brightness(1); }
}

@keyframes fall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0.8; }
}

.glitch-text { animation: glitch 0.3s infinite; }

.scanline-overlay::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,43,43,0.12);
  animation: scanline 3s linear infinite;
  pointer-events: none;
}
.zk-active .scanline-overlay::after { background: rgba(0,255,65,0.18); }

.deepfry-active { animation: deepfry-ui 3s ease-in-out forwards; }

/* ZK Mode: subtle global datamosh/scanline tint over whole UI */
.zk-active {
  position: relative;
}
.zk-active::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background:
    repeating-linear-gradient(0deg, rgba(0,255,65,0.03) 0px, rgba(0,255,65,0.03) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: screen;
  animation: zk-drift 8s linear infinite;
}
@keyframes zk-drift {
  0% { background-position: 0 0; }
  100% { background-position: 0 40px; }
}

/* ZK cheat flash */
.zk-flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  background: rgba(0,255,65,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zk-flash-fade 0.9s ease-out forwards;
}
.zk-flash-text {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 900;
  font-size: 22vw;
  color: #00ff41;
  text-shadow: 8px 0 #ff006e, -8px 0 #000, 0 0 40px #00ff41;
  animation: zk-flash-glitch 0.9s steps(6) forwards;
}
@keyframes zk-flash-fade {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes zk-flash-glitch {
  0% { transform: translate(0,0) skewX(0deg); }
  20% { transform: translate(-20px, 10px) skewX(15deg); }
  40% { transform: translate(25px, -8px) skewX(-12deg); }
  60% { transform: translate(-10px, 5px) skewX(8deg); }
  80% { transform: translate(15px, -3px) skewX(-5deg); }
  100% { transform: translate(0,0) skewX(0deg); }
}

.emoji-rain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.falling-emoji {
  position: absolute;
  top: 0;
  animation: fall 2.5s linear infinite;
}

.btn-neon { transition: all 0.15s ease; border: 1px solid transparent; }
.btn-neon:hover { transform: scale(1.03); border-color: #ff2b2b; box-shadow: 0 0 15px rgba(255,43,43,0.45); }
.btn-neon:active { transform: scale(0.97); }
.zk-active .btn-neon:hover { border-color: #00ff41; box-shadow: 0 0 15px rgba(0,255,65,0.45); }
.btn-pink:hover { border-color: #ff006e; box-shadow: 0 0 15px rgba(255,0,110,0.4); }

.effect-block { transition: all 0.1s ease; cursor: pointer; }
.effect-block:hover { filter: brightness(1.3); transform: scaleY(1.1); }

.timeline-clip { transition: box-shadow 0.1s ease; }
.timeline-clip:hover { box-shadow: 0 0 8px rgba(255,43,43,0.5); }
.timeline-clip.selected { box-shadow: 0 0 12px rgba(0,180,216,0.8); border: 1px solid #00b4d8; }
.zk-active .timeline-clip:hover { box-shadow: 0 0 8px rgba(0,255,65,0.5); }

.drop-zone-active { background: rgba(0,255,65,0.06) !important; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 4px; background: #3a1a1e; border-radius: 2px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #ff2b2b; cursor: pointer; box-shadow: 0 0 6px rgba(255,43,43,0.6);
}
input[type="range"]::-webkit-slider-thumb:hover { background: #ff5555; box-shadow: 0 0 10px rgba(255,43,43,0.9); }
.zk-active input[type="range"] { background: #0a3a1a; }
.zk-active input[type="range"]::-webkit-slider-thumb { background: #00ff41; box-shadow: 0 0 6px rgba(0,255,65,0.6); }
.zk-active input[type="range"]::-webkit-slider-thumb:hover { background: #55ff77; box-shadow: 0 0 10px rgba(0,255,65,0.9); }

.tooltip-container { position: relative; }
.tooltip-container .tooltip-text {
  visibility: hidden; opacity: 0;
  position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e; color: #ff2b2b;
  padding: 4px 10px; border-radius: 4px;
  font-size: 11px; white-space: nowrap;
  border: 1px solid #ff2b2b; z-index: 999;
  transition: opacity 0.15s; pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
}
.tooltip-container:hover .tooltip-text { visibility: visible; opacity: 1; }
.zk-active .tooltip-container .tooltip-text { color: #00ff41; border-color: #00ff41; }