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

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

.tv-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

/* TV Screen */
.tv-bezel {
    background: linear-gradient(145deg, #8B4513, #A0522D);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.5),
        0 10px 30px rgba(0,0,0,0.6);
    position: relative;
}

.tv-bezel::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: 
        repeating-linear-gradient(
            90deg,
            rgba(139, 69, 19, 0.3),
            rgba(139, 69, 19, 0.3) 2px,
            rgba(160, 82, 45, 0.3) 2px,
            rgba(160, 82, 45, 0.3) 4px
        );
    border-radius: 15px;
    pointer-events: none;
}

.tv-screen {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}

#canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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;
    border-radius: 10px;
}

.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 70%,
        rgba(0,0,0,0.2) 100%
    );
    pointer-events: none;
    border-radius: 10px;
}

/* Control Panel */
.control-panel {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #444;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.title {
    font-size: 24px;
    color: #00ffff;
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 0 0 10px #00ffff;
    font-weight: bold;
}

.subtitle {
    font-size: 12px;
    color: #ffaa00;
    text-align: center;
    margin-bottom: 25px;
    font-style: italic;
}

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

.control-section {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
}

.control-section h3 {
    color: #ffaa00;
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group {
    margin-bottom: 12px;
}

.control-group label {
    display: block;
    font-size: 11px;
    color: #cccccc;
    margin-bottom: 5px;
}

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

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

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

.control-group select,
.control-group input[type="text"],
.control-group input[type="file"] {
    width: 100%;
    padding: 6px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #00ff00;
    font-family: inherit;
    font-size: 11px;
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #00ff00;
}

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

.effect-btn {
    padding: 8px 12px;
    background: linear-gradient(145deg, #333, #222);
    border: 1px solid #555;
    border-radius: 6px;
    color: #00ff00;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.effect-btn:hover {
    background: linear-gradient(145deg, #444, #333);
    box-shadow: 0 0 10px rgba(0,255,0,0.3);
    transform: translateY(-1px);
}

.effect-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 5px rgba(0,255,0,0.5);
}

.info-panel {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    border: 1px solid #333;
}

.info-panel p {
    font-size: 11px;
    color: #aaaaaa;
    margin-bottom: 8px;
    line-height: 1.4;
}

.easter-egg {
    color: #ffaa00 !important;
    font-style: italic;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #666;
    font-size: 12px;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .tv-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .control-panel {
        order: -1;
    }
    
    .button-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .tv-bezel {
        padding: 15px;
    }
    
    .title {
        font-size: 18px;
    }
    
    .button-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .control-section {
        padding: 10px;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
    
    .effect-btn {
        padding: 10px;
        font-size: 11px;
    }
}

/* Retro animations */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}

.tv-screen {
    animation: flicker 3s infinite ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}