@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Share Tech Mono', monospace;
  background: linear-gradient(135deg, #0a0a12 0%, #12081a 50%, #0a0a12 100%);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.neon-title {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite, title-pulse 2s ease-in-out infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 20px #ff00ff) drop-shadow(0 0 40px #00ffff);
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

@keyframes title-pulse {
  0%, 100% { filter: drop-shadow(0 0 20px #ff00ff) drop-shadow(0 0 40px #00ffff); }
  50% { filter: drop-shadow(0 0 30px #ff00ff) drop-shadow(0 0 60px #00ffff); }
}

.transport-btn {
  font-family: 'Orbitron', sans-serif;
  transition: all 0.2s ease;
}

.transport-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.transport-btn:active {
  transform: scale(0.98);
}

.drum-cell, .note-cell {
  cursor: pointer;
  transition: all 0.15s ease;
}

.drum-cell:hover, .note-cell:hover {
  transform: scale(1.1);
  filter: brightness(1.3);
}

.drum-cell:active, .note-cell:active {
  transform: scale(0.95);
}

.randomize-btn {
  transition: all 0.2s ease;
}

.randomize-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px currentColor;
}

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

.oscilloscope-canvas {
  background: #0a0a12;
}

.scanlines {
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
}

.scanlines-overlay {
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
}

.bpm-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: linear-gradient(90deg, #00ffff20, #00ffff60);
  border-radius: 4px;
  outline: none;
  border: 1px solid #00ffff40;
}

.bpm-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff;
  transition: all 0.2s ease;
}

.bpm-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff;
}

.bpm-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #00ffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff;
  border: none;
}

.oscilloscope-container {
  position: relative;
}

.oscilloscope-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 1;
  border-radius: 4px;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.98; }
  75% { opacity: 0.99; }
}

section {
  animation: flicker 0.1s infinite;
}

/* Playhead glow effect on active steps */
@keyframes step-glow {
  0%, 100% { box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff; }
  50% { box-shadow: 0 0 15px #fff, 0 0 30px #fff, 0 0 45px #fff; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .neon-title {
    font-size: 1.75rem;
  }
  
  .drum-cell, .note-cell {
    min-width: 18px;
    min-height: 24px;
  }
  
  section {
    padding: 0.75rem;
    overflow-x: auto;
  }
  
  section > div:last-child {
    min-width: max-content;
  }
}

/* Smooth scrolling for mobile */
@media (max-width: 1024px) {
  section {
    -webkit-overflow-scrolling: touch;
  }
}

/* Focus states for accessibility */
button:focus {
  outline: 2px solid #00ffff;
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}