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

body {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    pointer-events: none;
    z-index: -1;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 1400px;
}

/* ====== TV SET ====== */
.tv-set {
    position: relative;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.6));
}

/* Antena */
.antenna {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 80px;
    z-index: -1;
}

.antenna-left,
.antenna-right {
    position: absolute;
    width: 3px;
    height: 80px;
    background: linear-gradient(to bottom, #666, #999);
    border-radius: 2px;
}

.antenna-left {
    left: 20px;
    transform: rotate(-25deg);
    transform-origin: bottom;
}

.antenna-right {
    right: 20px;
    transform: rotate(25deg);
    transform-origin: bottom;
}

/* Corpo da TV */
.tv-body {
    background: linear-gradient(145deg, #8b7355, #6b5644);
    border-radius: 30px 30px 10px 10px;
    padding: 40px;
    box-shadow: 
        inset 0 -10px 20px rgba(0, 0, 0, 0.3),
        inset 0 10px 20px rgba(255, 255, 255, 0.1),
        0 30px 60px rgba(0, 0, 0, 0.5);
    border: 8px solid #5a4433;
    position: relative;
    max-width: 900px;
}

/* Frame da Tela */
.screen-frame {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 
        inset 0 5px 15px rgba(0, 0, 0, 0.8),
        0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 25px;
}

.screen-glass {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.screen-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 2;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#youtubePlayer {
    width: 100%;
    height: 100%;
    border: none;
}

/* Scanlines - efeito de TV antiga */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        transparent 1px,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 3px
    );
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

/* Display do Canal */
.channel-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.led-light {
    width: 12px;
    height: 12px;
    background: #ff3333;
    border-radius: 50%;
    box-shadow: 
        0 0 10px #ff3333,
        0 0 20px #ff3333,
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00ff00;
    font-size: 12px;
    text-shadow: 0 0 10px #00ff00;
}

.channel-number {
    font-size: 20px;
    font-weight: bold;
}

/* Painel de Controle */
.control-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border-radius: 15px;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.5);
}

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

.control-label {
    font-size: 8px;
    color: #999;
    letter-spacing: 1px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #4a4a4a, #2a2a2a);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 
        0 5px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    font-family: Arial, sans-serif;
}

.control-btn.wide {
    width: 60px;
    font-size: 14px;
}

.control-btn:hover {
    background: linear-gradient(145deg, #5a5a5a, #3a3a3a);
    transform: translateY(-2px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.4);
}

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

/* Marca da TV */
.tv-brand {
    text-align: center;
    margin-top: 15px;
    color: #d4af37;
    font-size: 14px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Suporte da TV */
.tv-stand {
    width: 200px;
    height: 15px;
    background: linear-gradient(145deg, #5a4433, #4a3323);
    border-radius: 0 0 10px 10px;
    margin: 0 auto;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* Lista de Canais */
.channel-list {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 900px;
}

.channel-list h3 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#channelListContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.channel-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
    font-size: 10px;
}

.channel-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.channel-item.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
}

.channel-item .channel-num {
    display: block;
    font-size: 12px;
    color: #d4af37;
    margin-bottom: 5px;
}

/* Rodapé */
.footer {
    margin-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    padding: 20px;
}

/* ====== RESPONSIVIDADE ====== */

/* Tablets */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .tv-body {
        padding: 30px 20px;
    }
    
    .antenna {
        top: -60px;
        width: 80px;
        height: 60px;
    }
    
    .antenna-left,
    .antenna-right {
        height: 60px;
    }
    
    .screen-frame {
        padding: 15px;
    }
    
    .control-panel {
        padding: 15px;
        gap: 15px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
    
    .control-btn.wide {
        width: 55px;
    }
    
    .tv-brand {
        font-size: 12px;
    }
    
    .channel-list h3 {
        font-size: 12px;
    }
    
    #channelListContainer {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .channel-item {
        font-size: 9px;
        padding: 12px;
    }
}

/* Smartphones */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        gap: 20px;
    }
    
    .tv-body {
        padding: 20px 15px;
        border-width: 5px;
    }
    
    .antenna {
        top: -40px;
        width: 60px;
        height: 40px;
    }
    
    .antenna-left,
    .antenna-right {
        height: 40px;
        width: 2px;
    }
    
    .screen-frame {
        padding: 10px;
    }
    
    .channel-display {
        padding: 8px 15px;
        gap: 10px;
    }
    
    .channel-info {
        font-size: 10px;
    }
    
    .channel-number {
        font-size: 16px;
    }
    
    .control-panel {
        padding: 12px;
        gap: 12px;
    }
    
    .control-label {
        font-size: 7px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
    
    .control-btn.wide {
        width: 50px;
        font-size: 11px;
    }
    
    .tv-brand {
        font-size: 10px;
        letter-spacing: 2px;
    }
    
    .tv-stand {
        width: 150px;
        height: 12px;
    }
    
    .channel-list {
        padding: 15px;
    }
    
    .channel-list h3 {
        font-size: 11px;
    }
    
    #channelListContainer {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .channel-item {
        font-size: 8px;
        padding: 10px;
    }
    
    .channel-item .channel-num {
        font-size: 10px;
    }
    
    .footer {
        font-size: 8px;
        margin-top: 20px;
    }
}

/* Telas muito pequenas */
@media (max-width: 320px) {
    .tv-body {
        padding: 15px 10px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 11px;
    }
    
    .control-btn.wide {
        width: 45px;
        font-size: 10px;
    }
}
