* {
    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;
    justify-content: center;
    padding: 20px;
}

#tv-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

#tv-set {
    background: linear-gradient(135deg, #8B4513, #654321, #8B4513);
    border: 8px solid #654321;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    width: 800px;
    max-width: 90vw;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 30px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.4);
}

#screen-bezel {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a, #2a2a2a);
    border: 6px solid #333;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

#tv-screen {
    width: 100%;
    height: auto;
    border-radius: 4px;
    background: #000;
    cursor: pointer;
    display: block;
}

#scanlines {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 3px
    );
    pointer-events: none;
    border-radius: 4px;
}

#control-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #8B4513, #654321);
    border-radius: 10px;
    border: 2px solid #5a3a1a;
}

.dial {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #444, #222);
    border: 4px solid #666;
    position: relative;
    cursor: pointer;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.5),
        0 2px 5px rgba(0, 0, 0, 0.3);
}

.dial.small {
    width: 60px;
    height: 60px;
}

.dial.tiny {
    width: 45px;
    height: 45px;
}

.dial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, #666, #333);
    border: 2px solid #888;
}

.dial-pointer {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 25px;
    background: #fff;
    border-radius: 2px;
    transform-origin: center 35px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

.dial.small .dial-pointer {
    height: 20px;
    transform-origin: center 27px;
}

.dial.tiny .dial-pointer {
    height: 15px;
    transform-origin: center 20px;
}

.dial-numbers {
    position: absolute;
    inset: -15px;
    font-size: 12px;
    color: #ccc;
    font-weight: bold;
}

.dial-numbers span {
    position: absolute;
    transform-origin: center;
}

.dial-numbers span[data-channel="2"] { top: 0; left: 50%; transform: translateX(-50%); }
.dial-numbers span[data-channel="3"] { top: 15%; right: 15%; }
.dial-numbers span[data-channel="4"] { top: 35%; right: 0; transform: translateX(50%); }
.dial-numbers span[data-channel="5"] { bottom: 35%; right: 0; transform: translateX(50%); }
.dial-numbers span[data-channel="6"] { bottom: 15%; right: 15%; }
.dial-numbers span[data-channel="7"] { bottom: 0; left: 50%; transform: translateX(-50%); }
.dial-numbers span[data-channel="8"] { bottom: 15%; left: 15%; }
.dial-numbers span[data-channel="9"] { bottom: 35%; left: 0; transform: translateX(-50%); }
.dial-numbers span[data-channel="10"] { top: 35%; left: 0; transform: translateX(-50%); }
.dial-numbers span[data-channel="11"] { top: 15%; left: 15%; }
.dial-numbers span[data-channel="12"] { top: 50%; right: -20px; }
.dial-numbers span[data-channel="13"] { top: 50%; left: -20px; }

.control-button {
    background: linear-gradient(135deg, #555, #333);
    border: 3px solid #666;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
}

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

#brand-label {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #d4af37;
    font-family: serif;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

#tv-stand {
    width: 120px;
    height: 80px;
    background: radial-gradient(ellipse, #666, #444);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    margin-top: 20px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

#tv-stand::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 40px;
    background: linear-gradient(135deg, #777, #555);
    border-radius: 50%;
    border: 2px solid #888;
}

#channel-info {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #0f0;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    border: 2px solid #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

#channel-info span {
    display: block;
    margin: 5px 0;
}

footer {
    margin-top: 40px;
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

footer a {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #tv-set {
        grid-template-columns: 1fr;
        width: 95vw;
        padding: 20px;
    }
    
    #control-panel {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .dial {
        width: 60px;
        height: 60px;
    }
    
    .dial.small {
        width: 45px;
        height: 45px;
    }
    
    .dial.tiny {
        width: 35px;
        height: 35px;
    }
    
    #brand-label {
        font-size: 14px;
    }
    
    #channel-info {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 20px;
    }
    
    #tv-screen {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    #tv-set {
        padding: 15px;
    }
    
    .dial-numbers {
        font-size: 10px;
    }
    
    .control-button {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Add vintage TV glow effect */
#screen-bezel::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: radial-gradient(ellipse at center, 
        rgba(100, 200, 255, 0.05) 0%, 
        rgba(100, 200, 255, 0.02) 60%,
        transparent 100%);
    pointer-events: none;
    border-radius: 4px;
}

/* Subtle animation for powered off state */
#tv-screen[data-power="off"] {
    filter: brightness(0);
}