/* RGB Video Output Simulator Styles */

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

body {
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    color: #00ff00;
    font-family: 'Courier New', monospace;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #00ff00;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.title {
    font-size: 2.5em;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    color: #ffaa00;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.control-panel {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.control-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.control-section:last-child {
    border-bottom: none;
}

.control-section h3 {
    color: #ffaa00;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-transform: uppercase;
}

.slider-group {
    margin-bottom: 15px;
}

.slider-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ff00;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ff00;
    cursor: pointer;
    border: none;
}

.red-slider::-webkit-slider-thumb { background: #ff0000; box-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
.green-slider::-webkit-slider-thumb { background: #00ff00; box-shadow: 0 0 5px rgba(0, 255, 0, 0.5); }
.blue-slider::-webkit-slider-thumb { background: #0000ff; box-shadow: 0 0 5px rgba(0, 0, 255, 0.5); }

.red-label { color: #ff6666; }
.green-label { color: #66ff66; }
.blue-label { color: #6666ff; }

.pattern-select {
    width: 100%;
    padding: 8px;
    background: #222;
    color: #00ff00;
    border: 1px solid #333;
    border-radius: 5px;
    font-family: inherit;
    margin-bottom: 15px;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9em;
}

.toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00ff00;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.preset-btn {
    padding: 8px 12px;
    background: #222;
    color: #00ff00;
    border: 1px solid #333;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8em;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #333;
    border-color: #00ff00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.display-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.canvas-container {
    position: relative;
    background: #000;
    border: 3px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#mainCanvas {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.scanline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.channel-displays {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.channel-canvas {
    flex: 1;
    text-align: center;
}

.channel-canvas label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    font-weight: bold;
}

.channel-canvas canvas {
    width: 100%;
    height: auto;
    border: 1px solid #333;
    border-radius: 5px;
    image-rendering: pixelated;
}

.info-panel {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.waveform-display {
    margin-bottom: 20px;
}

.waveform-display h4 {
    color: #ffaa00;
    margin-bottom: 10px;
    text-transform: uppercase;
}

#waveformCanvas {
    width: 100%;
    height: auto;
    border: 1px solid #333;
    border-radius: 5px;
    background: #0a0a0a;
}

.info-readouts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-section h4 {
    color: #ffaa00;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
}

.readout {
    background: #111;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 5px;
    font-size: 0.9em;
    line-height: 1.4;
}

.fun-fact {
    color: #ffaa00;
    font-style: italic;
}

.red-text { color: #ff6666; }
.green-text { color: #66ff66; }
.blue-text { color: #6666ff; }

.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid #333;
    border-radius: 10px;
}

.footer a {
    color: #ffaa00;
    text-decoration: none;
}

.footer a:hover {
    text-shadow: 0 0 5px #ffaa00;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        order: 2;
    }
    
    .display-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .info-readouts {
        grid-template-columns: 1fr;
    }
    
    .channel-displays {
        flex-direction: column;
    }
}

/* CRT Glow Effect */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 0, 0.5); }
    50% { box-shadow: 0 0 15px rgba(0, 255, 0, 0.8); }
}

.header {
    animation: glow 3s ease-in-out infinite;
}

/* Retro Terminal Scrolling Text */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.fun-fact::after {
    content: '_';
    animation: blink 1s infinite;
    color: #00ff00;
}