/* Drum Machine - CRT/LED Aesthetic */

:root {
  --drum-bg: #0c0c10;
  --drum-panel: #141418;
  --drum-text: #c8d8c8;
  --drum-accent: #ff9933;
  --drum-border: rgba(255, 255, 255, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Courier New', monospace;
  background: var(--drum-bg);
  color: var(--drum-text);
  overflow-x: hidden;
}

/* Subtle scanlines */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.1) 1px,
    rgba(0, 0, 0, 0.1) 2px
  );
  pointer-events: none;
  z-index: 9999;
}

.drum-container {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 40px;
  position: relative;
}

.drum-title {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 6px;
  color: var(--drum-accent);
  text-shadow:
    0 0 6px rgba(255, 153, 51, 0.4);
  margin: 0;
}

.drum-subtitle {
  margin-top: 6px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #707878;
}

/* Controls */
.drum-controls {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 1;
}

.drum-button {
  background: var(--drum-panel);
  border: 2px solid var(--drum-border);
  color: var(--drum-text);
  padding: 12px 30px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.1s;
  text-transform: uppercase;
  border-radius: 2px;
}

.drum-button:hover {
  background: #1a1a1e;
  border-color: var(--drum-accent);
  box-shadow: 0 0 10px rgba(255, 153, 51, 0.3);
}

.drum-button.play-btn {
  min-width: 120px;
  font-size: 1.25rem;
  padding: 15px 40px;
  border-color: var(--drum-accent);
}

.drum-button.playing {
  background: var(--drum-accent);
  color: #000;
  animation: drum-pulse 1s infinite;
}

@keyframes drum-pulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 153, 51, 0.5);
  }
  50% {
    box-shadow:
      0 0 25px rgba(255, 153, 51, 0.7),
      0 0 40px rgba(255, 153, 51, 0.3);
  }
}

.drum-button.small {
  padding: 8px 20px;
  font-size: 0.875rem;
}

.tempo-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.tempo-control label {
  font-size: 0.875rem;
  letter-spacing: 2px;
  color: #707878;
}

.tempo-slider {
  width: 200px;
  height: 4px;
  background: var(--drum-panel);
  outline: none;
  border-radius: 2px;
  -webkit-appearance: none;
}

.tempo-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--drum-accent);
  cursor: pointer;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 153, 51, 0.5);
}

.tempo-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--drum-accent);
  cursor: pointer;
  border-radius: 2px;
  border: none;
  box-shadow: 0 0 10px rgba(255, 153, 51, 0.5);
}

.pattern-controls {
  display: flex;
  gap: 10px;
}

/* Sequencer Grid */
.sequencer-grid {
  background: var(--drum-panel);
  padding: 30px;
  border-radius: 4px;
  border: 2px solid var(--drum-border);
  max-width: 900px;
  width: 100%;
  z-index: 1;
}

.drum-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.drum-row:last-child {
  margin-bottom: 0;
}

.drum-label {
  width: 80px;
  font-size: 0.875rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: right;
  margin-right: 20px;
  color: #707878;
}

.steps {
  display: flex;
  gap: 4px;
  flex: 1;
}

.step {
  width: 100%;
  max-width: 40px;
  height: 40px;
  background: #0a0a0e;
  border: 2px solid #2a2a30;
  cursor: pointer;
  transition: all 0.05s;
  padding: 0;
  border-radius: 2px;
}

.step:hover {
  border-color: #444;
  background: #12121a;
}

.step.active {
  box-shadow:
    0 0 10px currentColor,
    inset 0 0 8px rgba(255, 255, 255, 0.1);
}

.step.current {
  border-width: 3px;
  box-shadow:
    0 0 15px currentColor,
    0 0 25px currentColor;
}

.step.beat {
  border-left-width: 3px;
  border-left-color: #444;
}

/* Drum machine themed nav controls */
.drum-back {
  border-color: #333;
  color: #707878;
}

.drum-back:hover {
  background: transparent;
  border-color: var(--drum-accent);
  color: var(--drum-accent);
  box-shadow: 0 0 10px rgba(255, 153, 51, 0.3);
}

/* Hide main content in viz-only mode */
body.viz-only .drum-header,
body.viz-only .drum-controls,
body.viz-only .sequencer-grid {
  opacity: 0.1;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .drum-title {
    font-size: 1.25rem;
    letter-spacing: 4px;
  }

  .drum-controls {
    flex-direction: column;
    gap: 20px;
  }

  .sequencer-grid {
    padding: 15px;
  }

  .drum-label {
    width: 60px;
    font-size: 0.75rem;
    margin-right: 10px;
  }

  .step {
    max-width: 30px;
    height: 30px;
  }

  .steps {
    gap: 2px;
  }

  /* Reduce scanlines on mobile */
  body::before {
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.08) 2px,
      rgba(0, 0, 0, 0.08) 4px
    );
  }
}
