/* ========================================
   TV ULTRA REALISTA - RESPONSIVO PERFEITO
   ======================================== */

/* 1. CONTAINER PRINCIPAL - RESPONSIVO */
.hero-visual {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.hero-device {
    width: 100%;
    position: relative;
}

/* 2. TV MODERNA - PROPORÇÃO 16:9 PERFEITA */
.modern-tv {
    position: relative;
    width: 100%;
    perspective: 2000px;
    animation: tvEntrance 1s ease-out;
}

@keyframes tvEntrance {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 3. CONTAINER DA TV COM FLUTUAÇÃO */
.tv-container {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    animation: tvFloat 8s ease-in-out infinite;
}

@keyframes tvFloat {
    0%, 100% {
        transform: translateY(0) rotateY(0deg);
    }
    25% {
        transform: translateY(-8px) rotateY(1deg);
    }
    50% {
        transform: translateY(-12px) rotateY(0deg);
    }
    75% {
        transform: translateY(-8px) rotateY(-1deg);
    }
}

/* 4. MOLDURA DA TV - ULTRA FINA */
.tv-bezel {
    position: relative;
    width: 100%;
    background: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 2px 4px rgba(255, 255, 255, 0.03);
}

/* 5. GLOW EFFECT SUTIL */
.tv-bezel::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(
        ellipse at center,
        rgba(102, 126, 234, 0.15) 0%,
        rgba(118, 75, 162, 0.1) 50%,
        transparent 70%
    );
    border-radius: 20px;
    filter: blur(15px);
    z-index: -1;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* 6. TELA DA TV - PROPORÇÃO 16:9 GARANTIDA */
.tv-screen {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        inset 0 0 60px rgba(0, 0, 0, 0.9),
        inset 0 0 120px rgba(0, 0, 0, 0.6);
}

/* 7. CONTEÚDO DENTRO DA TELA - ABSOLUTE POSITIONING */
.tv-screen > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 8. PLAYER DE VÍDEO - SEM CORTAR */
.tv-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* IMPORTANTE: contain em vez de cover */
    background: #000;
    z-index: 5;
}

/* 9. INTERFACE IPTV */
.iptv-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    z-index: 4;
    transition: opacity 0.5s ease;
}

/* 10. QUANDO VÍDEO ESTÁ TOCANDO */
.tv-screen.video-playing .iptv-content {
    opacity: 0;
    pointer-events: none;
}

.tv-screen.video-playing:hover .iptv-content {
    opacity: 0.9;
    pointer-events: auto;
}

/* 11. BARRA SUPERIOR */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tv-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 700;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.tv-logo i {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: #667eea;
}

.signal-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    font-weight: 600;
}

.signal-status i {
    animation: signalPulse 2s ease-in-out infinite;
}

@keyframes signalPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 12. CONTEÚDO PRINCIPAL */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.channel-showcase {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.featured-channel {
    width: 100%;
    max-width: 600px;
}

.channel-info h3 {
    color: white;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.channel-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* 13. BARRA INFERIOR */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.quality-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hd-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: clamp(0.65rem, 1.2vw, 0.75rem);
    font-weight: 700;
    letter-spacing: 1px;
}

.live-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
}

.live-info i {
    color: #ef4444;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

/* 14. REFLEXO NA TELA */
.screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 25%,
        transparent 75%,
        rgba(255, 255, 255, 0.04) 100%
    );
    pointer-events: none;
    z-index: 10;
}

/* 15. BASE DA TV - PROPORCIONAL */
.tv-base {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: clamp(15px, 3vw, 25px);
}

.base-neck {
    width: clamp(60px, 10vw, 90px);
    height: clamp(30px, 5vw, 45px);
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.base-stand {
    width: clamp(150px, 25vw, 220px);
    height: clamp(12px, 2vw, 18px);
    background: linear-gradient(180deg, #0a0a0a 0%, #000 100%);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    position: relative;
}

.base-stand::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

/* 16. LOGO DA MARCA */
.tv-brand-label {
    position: absolute;
    bottom: clamp(20px, 3vw, 30px);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.25);
    font-size: clamp(0.6rem, 1vw, 0.75rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 17. CONTROLES LATERAIS - RESPONSIVOS */
.remote-controls {
    position: absolute;
    right: clamp(-50px, -8vw, -70px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2vw, 15px);
    z-index: 20;
}

.control-button {
    width: clamp(40px, 6vw, 55px);
    height: clamp(40px, 6vw, 55px);
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(1rem, 2vw, 1.3rem);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.control-button:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    border-color: rgba(102, 126, 234, 0.3);
}

.control-button:active {
    transform: scale(0.95);
}

/* 18. CONTROLE DE ÁUDIO */
.audio-control {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 15;
}

.audio-btn {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 2vw, 1.3rem);
}

.audio-btn:hover {
    background: rgba(102, 126, 234, 0.9);
    border-color: rgba(102, 126, 234, 0.5);
    transform: scale(1.1);
}

/* 19. CARDS FLUTUANTES */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 15;
}

.floating-card {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: clamp(10px, 2vw, 15px);
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.floating-card i {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: #667eea;
}

.card-1 {
    top: 10%;
    right: -5%;
    animation: floatCard1 6s ease-in-out infinite;
}

.card-2 {
    bottom: 15%;
    left: -5%;
    animation: floatCard2 7s ease-in-out infinite;
}

.card-3 {
    top: 50%;
    right: -8%;
    animation: floatCard3 8s ease-in-out infinite;
}

@keyframes floatCard1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -15px); }
}

@keyframes floatCard2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, 15px); }
}

@keyframes floatCard3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-15px, 10px); }
}

/* 20. RESPONSIVO - MOBILE */
@media (max-width: 768px) {
    .hero-visual {
        padding: 10px;
    }
    
    .tv-bezel {
        padding: 6px;
        border-radius: 12px;
    }
    
    .tv-screen {
        border-radius: 8px;
    }
    
    .remote-controls {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: 20px;
        transform: none;
        gap: 15px;
    }
    
    .floating-card {
        display: none; /* Ocultar cards flutuantes no mobile */
    }
    
    .tv-base {
        margin-top: 15px;
    }
    
    .top-bar,
    .bottom-bar {
        padding: 8px 12px;
    }
}

/* 21. RESPONSIVO - TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    .remote-controls {
        right: -60px;
    }
    
    .floating-card {
        padding: 12px;
    }
}

/* 22. RESPONSIVO - DESKTOP GRANDE */
@media (min-width: 1400px) {
    .hero-visual {
        max-width: 1000px;
    }
}

/* 23. LOADING STATE */
.tv-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(50px, 8vw, 70px);
    height: clamp(50px, 8vw, 70px);
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 20;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 24. SCANLINES SUTIS (OPCIONAL) */
.tv-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.05) 0px,
        transparent 1px,
        transparent 2px,
        rgba(0, 0, 0, 0.05) 3px
    );
    pointer-events: none;
    z-index: 8;
    opacity: 0.2;
}

/* 25. GARANTIR QUE VÍDEO NÃO SEJA CORTADO */
.tv-video-player {
    object-fit: contain !important; /* NUNCA usar cover */
    object-position: center !important;
}

/* 26. FALLBACK PARA NAVEGADORES ANTIGOS */
@supports not (aspect-ratio: 16 / 9) {
    .tv-screen {
        padding-bottom: 56.25%;
    }
}
