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

body {
  background: #0a0a0f;
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #12121a;
}
::-webkit-scrollbar-thumb {
  background: #9333ea55;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px #9333ea55, 0 0 40px #9333ea22; }
  50% { box-shadow: 0 0 30px #9333ea88, 0 0 60px #9333ea44; }
}

@keyframes borderPulse {
  0%, 100% { border-color: #9333ea55; }
  50% { border-color: #ec489988; }
}

@keyframes ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

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

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.glass-panel {
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(147, 51, 234, 0.15);
  border-radius: 16px;
}

.neon-border {
  border: 1px solid rgba(147, 51, 234, 0.3);
  box-shadow: inset 0 0 20px rgba(147, 51, 234, 0.05);
}

.btn-neon {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.btn-neon::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #9333ea, #ec4899, #06b6d4, #9333ea);
  background-size: 400% 400%;
  animation: gradientShift 3s ease infinite;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-neon:hover::before {
  opacity: 1;
}
.btn-neon:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(147, 51, 234, 0.5);
}

.knob-container {
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.beat-pad {
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.beat-pad:active {
  transform: scale(0.92);
}
.beat-pad::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
}

.transport-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid rgba(147, 51, 234, 0.3);
  background: rgba(26, 26, 46, 0.8);
}
.transport-btn:hover {
  border-color: #9333ea;
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.4);
  transform: scale(1.1);
}
.transport-btn.active {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.15);
}

.track-card {
  animation: slideIn 0.3s ease forwards;
  transition: all 0.2s ease;
}
.track-card:hover {
  border-color: rgba(147, 51, 234, 0.5);
  background: rgba(147, 51, 234, 0.08);
}

.drop-zone {
  border: 2px dashed rgba(147, 51, 234, 0.3);
  animation: borderPulse 2s ease infinite;
  transition: all 0.3s ease;
}
.drop-zone.drag-over {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.08);
  box-shadow: 0 0 40px rgba(236, 72, 153, 0.15);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #9333ea, #06b6d4);
  outline: none;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.6);
  cursor: pointer;
}

.waveform-canvas {
  image-rendering: pixelated;
}

.ai-remix-btn {
  background: linear-gradient(135deg, #9333ea, #ec4899, #06b6d4);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite, pulseGlow 2s ease infinite;
  transition: all 0.3s ease;
}
.ai-remix-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(147, 51, 234, 0.6), 0 0 80px rgba(236, 72, 153, 0.3);
}

.timeline-track {
  transition: all 0.2s ease;
}
.timeline-track:hover {
  filter: brightness(1.2);
}

@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr !important;
  }
}