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

body {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.tv-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
}

.tv-cabinet {
    background: linear-gradient(145deg, #654321, #8B4513, #654321);
    border: 8px solid #5D4E37;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        inset 0 0 50px rgba(0,0,0,0.3),
        0 20px 40px rgba(0,0,0,0.4),
        0 0 0 4px #4A3728;
    position: relative;
    min-width: 700px;
}

.tv-cabinet::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #8B4513, #A0522D, #654321);
    border-radius: 24px;
    z-index: -1;
}

.tv-brand {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.screen-container {
    position: relative;
    background: #000;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.8),
        0 0 20px rgba(0,0,0,0.5);
}

#canvas {
    display: block;
    border-radius: 10px;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.6),
        0 0 30px rgba(255,255,255,0.1);
    background: #000;
}

.screen-bezel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 4px solid #333;
    border-radius: 15px;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.1);
}

.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(145deg, #5D4E37, #4A3728);
    border-radius: 10px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.power-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.power-btn {
    background: linear-gradient(145deg, #cc3300, #990000);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.3),
        inset 0 1px 2px rgba(255,255,255,0.2);
    transition: all 0.1s;
}

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

.power-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #660000;
    border: 2px solid #333;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
    transition: all 0.3s;
}

.power-light.on {
    background: #00ff00;
    box-shadow: 
        inset 0 1px 2px rgba(0,0,0,0.3),
        0 0 15px #00ff00,
        0 0 25px #00ff00;
}

.channel-display {
    background: #000;
    color: #ff0000;
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: bold;
    padding: 8px 16px;
    border: 2px solid #333;
    border-radius: 5px;
    text-shadow: 0 0 10px #ff0000;
    min-width: 60px;
    text-align: center;
}

.physical-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.channel-btn {
    background: linear-gradient(145deg, #4A3728, #2F2418);
    border: none;
    color: #FFD700;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.1s;
}

.channel-btn:active {
    transform: translateY(1px);
}

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

.volume-control label {
    color: #FFD700;
    font-size: 12px;
    font-weight: bold;
}

#volumeKnob {
    width: 80px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

#inputSelector {
    background: #333;
    color: #FFD700;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 5px;
    font-family: inherit;
}

.remote-control {
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border: 3px solid #333;
    border-radius: 15px;
    padding: 20px;
    width: 120px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.remote-header {
    text-align: center;
    color: #ccc;
    font-size: 12px;
    margin-bottom: 15px;
    font-weight: bold;
}

.remote-btn {
    width: 100%;
    background: linear-gradient(145deg, #444, #222);
    border: 1px solid #555;
    color: #ccc;
    padding: 8px;
    margin: 2px 0;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    transition: all 0.1s;
}

.remote-btn:active {
    background: linear-gradient(145deg, #222, #444);
    transform: scale(0.95);
}

.remote-btn.power {
    background: linear-gradient(145deg, #cc3300, #990000);
    color: white;
    margin-bottom: 10px;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin: 10px 0;
}

.remote-controls {
    margin-top: 10px;
}

.volume-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: none;
    z-index: 1000;
}

.volume-bar-container {
    width: 200px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #555;
}

.volume-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000);
    transition: width 0.2s;
}

/* Responsive design */
@media (max-width: 768px) {
    .tv-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .tv-cabinet {
        min-width: auto;
        max-width: 100%;
    }
    
    #canvas {
        width: 100%;
        height: auto;
        max-width: 640px;
    }
    
    .control-panel {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .physical-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .tv-cabinet {
        padding: 15px;
    }
    
    .screen-container {
        padding: 10px;
    }
    
    .remote-control {
        width: 100px;
        padding: 15px;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 15px;
    }
}

/* Add some wood grain texture effect */
.tv-cabinet::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0,0,0,0.1) 1px,
            rgba(0,0,0,0.1) 3px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(0,0,0,0.05) 20px,
            rgba(0,0,0,0.05) 22px
        );
    pointer-events: none;
    border-radius: 20px;
}