@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

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

body {
    font-family: 'Courier Prime', monospace;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #00ff41;
    min-height: 100vh;
    overflow-x: auto;
}

.header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    border-bottom: 2px solid #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.header h1 {
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 0 10px #00ff41;
    margin-bottom: 5px;
}

.header p {
    color: #ffb000;
    font-size: 1.1em;
    letter-spacing: 1px;
}

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

.control-panel, .info-panel {
    flex: 0 0 250px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ff41;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    height: fit-content;
}

.monitor-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.monitor-bezel {
    position: relative;
    background: linear-gradient(145deg, #3a3a3a, #1a1a1a);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 65, 0.1);
    border: 3px solid #2a2a2a;
}

.monitor-bezel::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid #4a4a4a;
    border-radius: 10px;
    pointer-events: none;
}

.power-led {
    position: absolute;
    bottom: 10px;
    right: 15px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff41;
    box-shadow: 0 0 10px #00ff41;
    animation: pulse 2s infinite;
}

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

#canvas {
    border: 2px solid #000;
    border-radius: 4px;
    background: #000;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.section {
    margin-bottom: 20px;
}

.section h3 {
    color: #ffb000;
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #ffb000;
    padding-bottom: 5px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85em;
    color: #00ff41;
}

select, input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
    background: #000;
    color: #00ff41;
    border: 1px solid #00ff41;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.8em;
}

select {
    padding: 5px;
}

input[type="range"] {
    height: 20px;
    appearance: none;
    background: #000;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00ff41;
    cursor: pointer;
    box-shadow: 0 0 5px #00ff41;
}

input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00ff41;
    cursor: pointer;
    box-shadow: 0 0 5px #00ff41;
    border: none;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-size: 0.8em;
}

.radio-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    margin-bottom: 0;
}

.pattern-btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
    background: #000;
    color: #00ff41;
    border: 1px solid #00ff41;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
}

.pattern-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.pattern-btn.active {
    background: #00ff41;
    color: #000;
    font-weight: bold;
}

.signal-display {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #00ff41;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 0.8em;
}

.signal-display div {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.signal-meter {
    margin-bottom: 15px;
}

.meter-label {
    font-size: 0.8em;
    margin-bottom: 5px;
    color: #ffb000;
}

.meter-bar {
    height: 20px;
    background: #000;
    border: 1px solid #00ff41;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    transition: width 0.3s, background-color 0.3s;
}

.signal-excellent { background: #00ff41; }
.signal-good { background: #ffff00; }
.signal-fair { background: #ff8000; }
.signal-poor { background: #ff0000; }

.status-good { color: #00ff41; }
.status-warning { color: #ffb000; }
.status-error { color: #ff4444; }

.fact-text {
    font-size: 0.8em;
    line-height: 1.4;
    color: #cccccc;
    min-height: 60px;
    transition: opacity 0.5s;
}

.controls-section button {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 10px;
    background: #000;
    color: #ffb000;
    border: 1px solid #ffb000;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
}

.controls-section button:hover {
    background: rgba(255, 176, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 176, 0, 0.3);
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.8em;
    border-top: 1px solid #333;
    margin-top: 40px;
}

footer a {
    color: #00ff41;
    text-decoration: none;
}

footer a:hover {
    text-shadow: 0 0 5px #00ff41;
}

/* Retro mode styles */
.retro-mode {
    animation: crtFlicker 0.15s infinite linear;
}

@keyframes crtFlicker {
    0% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.98; }
    100% { opacity: 1; }
}

.retro-mode .monitor-bezel {
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 65, 0.3),
        0 0 60px rgba(255, 176, 0, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .control-panel, .info-panel {
        flex: none;
        width: 100%;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .monitor-container {
        min-height: 300px;
    }
    
    .monitor-bezel {
        padding: 15px;
    }
    
    #canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.4em;
        letter-spacing: 1px;
    }
    
    .header p {
        font-size: 0.9em;
    }
    
    .main-container {
        padding: 10px;
        gap: 10px;
    }
    
    .control-panel, .info-panel {
        padding: 10px;
    }
}

/* Checkbox styling */
input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    accent-color: #00ff41;
}

/* Focus styles for accessibility */
button:focus, select:focus, input:focus {
    outline: 2px solid #00ff41;
    outline-offset: 2px;
}