/* ===================================
   CIRCUIT LIFELINE MONITOR - Music Player
   =================================== */

.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: 1600px;
    margin: 0 auto;
    padding: 20px 30px;
}

/* PCB Traces Background */
.pcb-traces {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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/Rivets */
.console-bolts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.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; }

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

/* System Status Window */
.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;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    border-left: 3px solid #8b0000;
}

.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 Monitor / Progress Bar */
.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;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* Control Relays */
.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 */
.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;
    width: 100%;
    height: 100%;
    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 Meter */
.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;
    transition: background 0.3s ease;
}

/* Circuit Access Point */
.circuit-access {
    background: linear-gradient(135deg, #8b0000, #4a0e4e);
    border: 2px solid #8b0000;
    padding: 12px 20px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.circuit-access:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.6);
}

.access-light {
    width: 8px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Minimize Switch */
.minimize-switch {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #444;
    padding: 8px 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: #00ffff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.minimize-switch:hover {
    border-color: #8b0000;
}

.switch-indicator {
    width: 20px;
    height: 10px;
    background: #333;
    border: 1px solid #555;
    position: relative;
}

.switch-indicator::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    background: #00ffff;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

/* Playlist Toggle */
.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;
    transition: all 0.3s ease;
}

.playlist-btn:hover {
    background: rgba(139, 0, 0, 0.2);
    border-color: #8b0000;
}

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

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

/* Playlist Dropdown */
.playlist-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    max-height: 350px;
    background: rgba(15, 15, 15, 0.98);
    border-top: 2px solid #333;
    overflow-y: auto;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.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: 1200px) {
    .console-content {
        grid-template-columns: 150px 1fr 280px auto 80px;
        gap: 15px;
    }
    
    .system-status {
        font-size: 0.6rem;
        padding: 8px;
    }
}

@media (max-width: 968px) {
    .console-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .system-status {
        display: none;
    }
    
    .control-panel {
        justify-content: center;
        order: 3;
    }
    
    .volume-meter {
        display: none;
    }
    
    .circuit-access {
        display: none;
    }
    
    .minimize-switch {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .control-btn {
        width: 45px;
        height: 45px;
    }
    
    .play-relay {
        width: 55px;
        height: 55px;
    }
}
