/* ===================================
  MUSIC PLAYER STYLES
  =================================== */

.recovery-console {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%);
  border-top: 3px solid #333;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
  transition: transform 0.3s ease;
}

.recovery-console.minimized {
  transform: translateY(calc(100% - 60px));
}

.console-frame {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 30px;
}

/* PCB background */
.pcb-traces {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 50px,
      rgba(0, 255, 255, 0.05) 50px,
      rgba(0, 255, 255, 0.05) 51px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 50px,
      rgba(0, 255, 255, 0.05) 50px,
      rgba(0, 255, 255, 0.05) 51px
    );
  pointer-events: none;
}

/* Bolts */
.console-bolts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bolt {
  position: absolute;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #555, #222);
  border-radius: 50%;
  border: 2px solid #333;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.bolt:nth-child(1) { top: 10px; left: 20px; }
.bolt:nth-child(2) { top: 10px; right: 20px; }
.bolt:nth-child(3) { bottom: 10px; left: 20px; }
.bolt:nth-child(4) { bottom: 10px; right: 20px; }

.console-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 180px 1fr 350px auto 120px 80px;
  gap: 20px;
  align-items: center;
}

/* System status */
.system-status {
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  color: #00ffff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #00ffff;
  padding: 10px;
  line-height: 1.4;
  border-left: 3px solid #8b0000;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.system-status div {
  margin-bottom: 3px;
}

/* Track readout */
.track-readout {
  min-width: 0;
}

.readout-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.65rem;
  color: #4a0e4e;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.track-title-wrapper {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #333;
  padding: 8px 12px;
  margin-bottom: 5px;
  overflow: hidden;
}

.track-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00ffff;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
  animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.9);
  }
}

.lyric-scroll {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.9rem;
  color: #8b0000;
  font-style: italic;
  opacity: 0.9;
}

/* EKG / progress */
.ekg-monitor {
  flex: 1;
  min-width: 250px;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 8px;
}

.time-segment {
  font-weight: 700;
  letter-spacing: 1px;
}

.time-segment.flashing {
  animation: flash 0.5s ease-in-out infinite;
}

@keyframes flash {
  0%,
  100% {
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
  }
  50% {
    color: #999;
    text-shadow: none;
  }
}

.separator {
  color: #4a0e4e;
}

.ekg-container {
  position: relative;
  height: 50px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #333;
  overflow: hidden;
}

.ekg-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(139, 0, 0, 0.5);
  transform: translateY(-50%);
  transition: background 0.3s ease;
}

.ekg-line.playing {
  background: rgba(0, 255, 255, 0.4);
}

.ekg-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(139, 0, 0, 0.6), rgba(139, 0, 0, 0.8));
  border-right: 2px solid #8b0000;
  transition: width 0.1s linear;
  box-shadow: 2px 0 10px rgba(139, 0, 0, 0.5);
}

.playhead-sync {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Courier New", monospace;
  font-size: 0.6rem;
  color: #00ffff;
  background: rgba(0, 0, 0, 0.9);
  padding: 2px 4px;
  border: 1px solid #00ffff;
  white-space: nowrap;
}

.progress-slider {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

/* Controls */
.control-panel {
  display: flex;
  gap: 12px;
  align-items: center;
}

.control-btn {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border: 2px solid #444;
  color: #00ffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.control-btn:hover {
  border-color: #8b0000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 0, 0, 0.5);
}

.control-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.7);
}

.relay-btn {
  flex-direction: column;
  font-size: 0.65rem;
  letter-spacing: 1px;
}

.relay-label {
  margin-bottom: 3px;
}

.relay-indicator {
  width: 6px;
  height: 6px;
  background: #333;
  border-radius: 50%;
  border: 1px solid #555;
  transition: background 0.3s ease;
}

.relay-btn:hover .relay-indicator {
  background: #8b0000;
  box-shadow: 0 0 8px rgba(139, 0, 0, 0.8);
}

.play-relay {
  width: 65px;
  height: 65px;
  border-color: #8b0000;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.2), rgba(74, 14, 78, 0.2));
}

.relay-ring {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-segment {
  position: absolute;
  width: 8px;
  height: 3px;
  background: #444;
  transition: background 0.3s ease;
}

.ring-segment:nth-child(1) { top: 8px; left: 50%; transform: translateX(-50%); }
.ring-segment:nth-child(2) { right: 8px; top: 50%; transform: translateY(-50%); }
.ring-segment:nth-child(3) { bottom: 8px; left: 50%; transform: translateX(-50%); }
.ring-segment:nth-child(4) { left: 8px; top: 50%; transform: translateY(-50%); }

.play-relay.playing .ring-segment {
  background: #8b0000;
  box-shadow: 0 0 8px rgba(139, 0, 0, 0.8);
  animation: pulse-ring 1s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.play-symbol {
  position: relative;
  z-index: 1;
  font-size: 1.5rem;
}

/* Volume */
.volume-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border: 1px solid #333;
}

.meter-label {
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  color: #00ffff;
  letter-spacing: 1px;
}

.volume-slider {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  width: 6px;
  height: 60px;
  background: #222;
  border: 1px solid #444;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #8b0000;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(139, 0, 0, 0.8);
}

.meter-bars {
  display: flex;
  gap: 3px;
}

.meter-bar {
  width: 3px;
  height: 8px;
  background: #333;
}


/* Playlist */
.playlist-toggle {
  position: absolute;
  top: -45px;
  right: 30px;
}

.playlist-btn {
  background: rgba(26, 26, 26, 0.95);
  border: 2px solid #333;
  border-bottom: none;
  padding: 10px 20px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: #00ffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px 6px 0 0;
}

.toggle-arrow {
  transition: transform 0.3s ease;
}

.playlist-btn.active .toggle-arrow {
  transform: rotate(180deg);
}

.playlist-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  max-height: 400px;
  background: rgba(15, 15, 15, 0.98);
  border-top: 2px solid #333;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: #8b0000 #1a1a1a;
}

.playlist-dropdown::-webkit-scrollbar {
  width: 8px;
}

.playlist-dropdown::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.playlist-dropdown::-webkit-scrollbar-thumb {
  background: #8b0000;
  border-radius: 4px;
}

.playlist-dropdown::-webkit-scrollbar-thumb:hover {
  background: #b00000;
}

.playlist-dropdown.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.playlist-header {
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #8b0000;
  padding: 15px 30px;
  border-bottom: 1px solid #333;
  letter-spacing: 2px;
}

.playlist-tracks {
  padding: 10px 0;
}

.playlist-track {
  display: grid;
  grid-template-columns: 50px 1fr 80px;
  align-items: center;
  padding: 12px 30px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.playlist-track:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #8b0000;
}

.playlist-track.active {
  background: rgba(139, 0, 0, 0.1);
  border-left-color: #00ffff;
}

.playlist-track-number {
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  color: #4a0e4e;
  font-weight: 700;
}

.playlist-track-name {
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  color: #fff;
}

.playlist-track.active .playlist-track-name {
  color: #00ffff;
}

.playlist-track-duration {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.9rem;
  color: #999;
  text-align: right;
}

/* Responsive */
@media (max-width: 968px) {
  .console-content {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .system-status {
    display: none;
  }

  .control-panel {
    justify-content: center;
  }

  .volume-meter {
    display: none;
  }

  .minimize-switch {
    position: absolute;
    top: 10px;
    right: 10px;
  }
  
  .console-frame {
    padding: 15px 20px;
  }
}

/* Mobile optimized touch targets */
@media (max-width: 768px) {
  .control-btn {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }
  
  .play-relay {
    width: 64px;
    height: 64px;
  }
  
  .control-panel {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .control-btn {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }
  
  .play-relay {
    width: 60px;
    height: 60px;
  }
  
  .control-panel {
    gap: 12px;
  }
  
  .console-frame {
    padding: 12px 16px;
  }
  
  body {
    padding-bottom: 140px;
  }
}
