:root {
    --crt-glow: #00ff44;
    --crt-amber: #ffaa00;
    --bezel-dark: #2a1f0a;
    --bezel-light: #8b6914;
    --wood-grain: #5d4409;
    --screen-bg: #0a0a0a;
    --phosphor: rgba(0, 255, 68, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: radial-gradient(ellipse at center, #1a1208 0%, #0d0a04 70%, #000 100%);
    font-family: 'IBM Plex Mono', monospace;
    color: #ddd;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes scanline-move {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
    92% { opacity: 0.97; }
}

@keyframes static-noise {
    0% { background-position: 0 0; }
    10% { background-position: -5% -10%; }
    20% { background-position: -15% 5%; }
    30% { background-position: 7% -25%; }
    40% { background-position: -5% 25%; }
    50% { background-position: -15% 10%; }
    60% { background-position: 15% 0; }
    70% { background-position: 0 15%; }
    80% { background-position: 3% 35%; }
    90% { background-position: -10% 10%; }
    100% { background-position: 0 0; }
}

@keyframes boot-expand {
    0% { transform: scale(0.01); opacity: 1; }
    50% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shutdown {
    0% { transform: scaleY(1) scaleX(1); }
    50% { transform: scaleY(0.01) scaleX(1); }
    100% { transform: scaleY(0) scaleX(0); opacity: 0; }
}

@keyframes channel-static {
    0% { opacity: 1; }
    25% { opacity: 0.8; }
    50% { opacity: 1; }
    75% { opacity: 0.9; }
    100% { opacity: 1; }
}

@keyframes vhs-track {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 68, 0.2), 0 0 40px rgba(0, 255, 68, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 68, 0.3), 0 0 60px rgba(0, 255, 68, 0.15); }
}

@keyframes dust-float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 0.5; }
    50% { transform: translateY(-10px) translateX(-5px); opacity: 0.2; }
    75% { transform: translateY(-30px) translateX(15px); opacity: 0.4; }
}

.crt-screen {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    animation: flicker 0.1s infinite, glow-pulse 4s ease-in-out infinite;
}

.crt-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 0, 0, 0.15) 1px,
        rgba(0, 0, 0, 0.15) 2px
    );
    pointer-events: none;
    z-index: 10;
}

.crt-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
    z-index: 11;
}

.crt-curvature {
    transform: perspective(800px) rotateX(1deg);
    border-radius: 20px;
}

.scanline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.03);
    animation: scanline-move 8s linear infinite;
    pointer-events: none;
    z-index: 12;
}

.static-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.vhs-tracking {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    animation: vhs-track 3s linear infinite;
    pointer-events: none;
    z-index: 9;
}

.knob {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #999, #333);
    border: 3px solid #222;
    cursor: grab;
    position: relative;
    transition: transform 0.1s;
    user-select: none;
}

.knob:active {
    cursor: grabbing;
}

.knob::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 14px;
    background: #111;
    border-radius: 2px;
}

.power-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #cc3333, #660000);
    border: 3px solid #222;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5);
    transition: all 0.3s;
}

.power-btn.on {
    background: radial-gradient(circle at 35% 35%, #33cc33, #006600);
    box-shadow: 0 0 12px rgba(51, 204, 51, 0.5);
}

.channel-display {
    font-family: 'VT323', monospace;
    font-size: 28px;
    color: #ff6600;
    background: #111;
    padding: 4px 10px;
    border-radius: 4px;
    border: 2px solid #333;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 102, 0, 0.5);
    min-width: 50px;
}

.osd-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: 'VT323', monospace;
    font-size: 24px;
    color: #00ff44;
    text-shadow: 0 0 8px rgba(0, 255, 68, 0.8), 2px 2px 0 rgba(0, 0, 0, 0.8);
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.osd-overlay.visible {
    opacity: 1;
}

.volume-bar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.volume-bar.visible {
    opacity: 1;
}

.volume-segment {
    width: 12px;
    height: 20px;
    border: 2px solid #00ff44;
    border-radius: 2px;
}

.volume-segment.filled {
    background: #00ff44;
    box-shadow: 0 0 6px rgba(0, 255, 68, 0.5);
}

.tv-bezel {
    background: linear-gradient(145deg, #8b6914 0%, #5d4409 50%, #3d2f0a 100%);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.8),
        inset 0 2px 4px rgba(255,255,255,0.1),
        inset 0 -2px 4px rgba(0,0,0,0.3);
    position: relative;
    border: 6px solid #2a1f0a;
}

.wood-grain {
    background-image: 
        linear-gradient(145deg, #8b6914 0%, #5d4409 50%, #3d2f0a 100%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.05) 2px,
            rgba(0,0,0,0.05) 4px
        );
}

.antenna-rod {
    width: 3px;
    height: 70px;
    background: linear-gradient(to top, #666, #ccc);
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.3s ease;
    transform-origin: bottom center;
}

.antenna-rod:hover {
    filter: brightness(1.2);
}

.remote-control {
    background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
    border-radius: 16px;
    padding: 20px 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    border: 2px solid #555;
    width: 180px;
}

.remote-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: linear-gradient(145deg, #555, #333);
    border: 1px solid #666;
    color: #ddd;
    font-family: 'VT323', monospace;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
}

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

.panel-slide {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dust-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: dust-float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 20;
}

.genre-tag {
    font-family: 'VT323', monospace;
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0, 255, 68, 0.15);
    border: 1px solid rgba(0, 255, 68, 0.3);
    color: #00ff44;
}

.scrollbar-retro::-webkit-scrollbar {
    width: 8px;
}

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

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

.scrollbar-retro::-webkit-scrollbar-thumb:hover {
    background: #666;
}

@media (max-width: 1024px) {
    .tv-bezel {
        padding: 16px;
        border-radius: 16px;
    }
}

@media (max-width: 640px) {
    .tv-bezel {
        padding: 10px;
        border-radius: 12px;
    }
}