/**
 * AudioPilot - Cockpit Control Styles
 * Professional aerospace-themed interface
 */

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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #00ff41;
    overflow-x: hidden;
    min-height: 100vh;
}

.cockpit-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 10px;
    padding: 10px;
    min-height: 100vh;
}

.header {
    grid-column: 1 / -1;
    text-align: center;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    color: #000;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.status-panel {
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid #00ff41;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.control-panel {
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid #ff6b35;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.audio-control-panel {
    background: rgba(255, 255, 0, 0.1);
    border: 2px solid #ffff00;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.3);
}

.visualization-panel {
    grid-column: 1 / -1;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.debug-panel {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #666;
    border-radius: 15px;
    padding: 15px;
    max-height: 150px;
    overflow-y: auto;
}

.panel-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cockpit-button {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 2px solid #00ff41;
    color: #00ff41;
    padding: 12px 8px;
    margin: 5px 0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.cockpit-button:hover {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.cockpit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cockpit-button.active {
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    color: #000;
    border-color: #ff6b35;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.7);
}

.cockpit-button:disabled {
    background: #333;
    color: #666;
    border-color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.status-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    font-size: 12px;
}

.status-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: pulse 2s infinite;
}

.status-light.connected {
    background: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

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

.knob-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
}

.knob {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, #333, #111);
    border: 3px solid #00ff41;
    position: relative;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.knob::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 20px;
    background: #ff6b35;
    border-radius: 2px;
    transform-origin: 50% 25px;
}

.knob-label {
    margin-top: 8px;
    font-size: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.canvas-container {
    position: relative;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ffff;
    border-radius: 8px;
    overflow: hidden;
}

.visualization-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.meter-container {
    display: flex;
    gap: 10px;
    height: 100px;
}

.vu-meter {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff41;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.debug-text {
    font-size: 10px;
    line-height: 1.4;
    color: #888;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
}

/* Screen wake overlay */
.screen-wake-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    opacity: 0.01;
}

.screen-wake-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Equalizer Styles */
.eq-section {
    margin: 15px 0;
}

.eq-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: #ffff00;
}

.eq-controls {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 120px;
}

.eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eq-slider-container {
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
}

.eq-slider {
    writing-mode: bt-lr; /* IE */
    -webkit-appearance: slider-vertical; /* WebKit */
    width: 20px;
    height: 70px;
    background: linear-gradient(to top, #ff0000, #ffff00, #00ff00);
    outline: none;
    border-radius: 10px;
}

.eq-value {
    font-size: 10px;
    color: #ffff00;
    margin-top: 5px;
    min-width: 35px;
    text-align: center;
}

.eq-label {
    font-size: 10px;
    text-align: center;
    color: #ccc;
    line-height: 1.2;
}

/* Pitch Control Styles */
.pitch-section {
    margin: 15px 0;
    border-top: 1px solid #666;
    padding-top: 15px;
}

.pitch-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: #ffff00;
}

.pitch-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pitch-knob-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pitch-knob {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, #444, #222);
    border: 2px solid #ffff00;
    position: relative;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
}

.pitch-knob::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background: #ff6b35;
    border-radius: 1px;
    transform-origin: 50% 22px;
}

.pitch-label {
    margin-top: 8px;
    font-size: 10px;
    text-align: center;
    color: #ccc;
}

.pitch-value {
    font-size: 10px;
    color: #ffff00;
    margin-top: 3px;
}

.pitch-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.preset-btn {
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #ffff00;
    color: #ffff00;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: linear-gradient(145deg, #444, #333);
    box-shadow: 0 0 8px rgba(255, 255, 0, 0.5);
}

.preset-btn.active {
    background: linear-gradient(145deg, #ffff00, #ffcc00);
    color: #000;
}

/* Effects Styles */
.effects-section {
    margin: 15px 0;
    border-top: 1px solid #666;
    padding-top: 15px;
}

.effects-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    color: #ffff00;
}

.effects-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.effect-btn {
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #ffff00;
    color: #ffff00;
    padding: 8px 6px;
    border-radius: 5px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 45px;
}

.effect-btn:hover {
    background: linear-gradient(145deg, #444, #333);
    box-shadow: 0 0 8px rgba(255, 255, 0, 0.5);
}

.effect-btn.active {
    background: linear-gradient(145deg, #ffff00, #ffcc00);
    color: #000;
    box-shadow: 0 0 12px rgba(255, 255, 0, 0.7);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cockpit-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto auto;
    }
    
    .visualization-panel {
        grid-column: 1;
    }
    
    .debug-panel {
        grid-column: 1;
    }
    
    .header {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .eq-controls {
        height: 100px;
    }
    
    .eq-slider {
        height: 60px;
    }
    
    .pitch-knob {
        width: 40px;
        height: 40px;
    }
}
