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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    color: #00ff00;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.tv-set {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
    position: relative;
}

.screen-bezel {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

#canvas {
    display: block;
    border-radius: 10px;
    background: #000;
    border: 3px solid #333;
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.9);
    position: relative;
    z-index: 1;
}

.screen-glare {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border-radius: 10px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 30%,
        transparent 70%,
        rgba(255, 255, 255, 0.05) 100%
    );
    pointer-events: none;
    z-index: 3;
}

.scanlines {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border-radius: 10px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 2;
    animation: scanlineflicker 0.1s infinite linear;
}

@keyframes scanlineflicker {
    0% { opacity: 1; }
    50% { opacity: 0.98; }
    100% { opacity: 1; }
}

.power-led {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 4;
}

.power-led.on {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
}

.power-led.off {
    background: #ff0000;
    box-shadow: 0 0 5px #ff0000;
}

.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 20px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 10px;
    border: 1px solid #333;
    gap: 30px;
    min-width: 640px;
}

.controls-left,
.controls-center,
.controls-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.controls-center {
    flex: 1;
    justify-content: center;
}

.power-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff4444, #cc2222);
    border: 3px solid #333;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.power-button:hover {
    background: linear-gradient(145deg, #ff6666, #dd3333);
    transform: translateY(-2px);
}

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

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.control-group label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
}

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

.channel-controls button {
    width: 30px;
    height: 20px;
    background: linear-gradient(145deg, #444, #222);
    border: 1px solid #555;
    color: #00ff00;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
}

.channel-controls button:hover {
    background: linear-gradient(145deg, #555, #333);
}

#channelDisplay {
    font-size: 18px;
    font-weight: bold;
    color: #00ff00;
    padding: 5px 10px;
    background: #000;
    border: 1px solid #333;
    border-radius: 3px;
    min-width: 40px;
    text-align: center;
}

input[type="range"] {
    width: 80px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, #00ff00, #00cc00);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, #00ff00, #00cc00);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

select {
    background: #000;
    color: #00ff00;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 5px 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.degauss-button {
    background: linear-gradient(145deg, #666, #333);
    border: 1px solid #555;
    color: #ffff00;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.degauss-button:hover {
    background: linear-gradient(145deg, #777, #444);
    transform: translateY(-1px);
}

.degauss-button:active {
    transform: translateY(0);
}

.info-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    min-width: 640px;
}

.channel-info {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    border-radius: 5px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
}

.current-channel {
    color: #00ff00;
    font-weight: bold;
}

.signal-strength {
    color: #ffff00;
}

.instructions {
    text-align: center;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.instructions p {
    margin: 2px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .tv-set {
        padding: 15px;
    }
    
    #canvas {
        width: 100%;
        max-width: 480px;
        height: auto;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 15px;
        min-width: auto;
        width: 100%;
    }
    
    .controls-left,
    .controls-center,
    .controls-right {
        width: 100%;
        justify-content: center;
    }
    
    .info-panel {
        min-width: auto;
        width: 100%;
    }
}

/* Retro glow effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 255, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* CRT monitor ambient lighting */
.tv-set::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(ellipse at center, rgba(0, 255, 0, 0.1) 0%, transparent 60%);
    border-radius: 30px;
    z-index: -1;
}