/* Design System - Otimizado para TV (10-foot UI) */

:root {
    --tv-bg: #141414;
    --tv-primary: #e50914;
    --tv-sidebar-width: 80px;
    --tv-sidebar-expanded: 240px;
    --tv-focus-glow: 0 0 15px rgba(229, 9, 20, 0.8);
    --tv-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--tv-bg);
    font-family: 'Inter', 'Roboto', sans-serif;
    overflow-x: hidden;
    padding-left: var(--tv-sidebar-width);
    /* Espaço para a sidebar */
}

/* Sidebar Estilo Netflix/YouTube */
.tv-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--tv-sidebar-width);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1000;
    transition: var(--tv-transition);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    overflow: hidden;
}

.tv-sidebar:hover,
.tv-sidebar:focus-within {
    width: var(--tv-sidebar-expanded);
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.tv-sidebar-app-name {
    color: var(--tv-primary);
    font-weight: 900;
    font-size: 1.5rem;
    padding: 0 24px;
    margin-bottom: 40px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
}

.tv-sidebar:hover .tv-sidebar-app-name,
.tv-sidebar:focus-within .tv-sidebar-app-name {
    opacity: 1;
}

.tv-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 24px;
    color: #b3b3b3;
    text-decoration: none;
    transition: var(--tv-transition);
    white-space: nowrap;
    border-left: 4px solid transparent;
}

.tv-nav-link i {
    font-size: 1.5rem;
    min-width: 32px;
}

.tv-nav-link span {
    margin-left: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s;
}

.tv-sidebar:hover .tv-nav-link span,
.tv-sidebar:focus-within .tv-nav-link span {
    opacity: 1;
}

.tv-nav-link.tv-focus,
.tv-nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--tv-primary);
}

/* Estilo de Foco (Focus Ring) para Cards e Botões */
.tv-focus {
    outline: none !important;
    transform: scale(1.1) !important;
    box-shadow: var(--tv-focus-glow) !important;
    z-index: 10;
    border-color: var(--tv-primary) !important;
}

button.tv-focus,
.btn.tv-focus {
    background-color: var(--tv-primary) !important;
    color: white !important;
}

/* Backdrop Dinâmico */
.tv-backdrop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    transition: background-image 0.8s ease-in-out;
}

.tv-backdrop-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(20, 20, 20, 0.4) 0%, rgba(20, 20, 20, 0.9) 80%);
}

/* Layout de Conteúdo */
.tv-content-container {
    padding: 40px 60px;
    min-height: 100vh;
}

.tv-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

/* Customização de Cards */
.movie-card {
    transition: var(--tv-transition);
}

.movie-card.tv-focus {
    transform: scale(1.15) !important;
}

/* Player Customizado para TV */
.tv-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 40px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tv-player-container:hover .tv-player-controls,
.tv-player-container.show-controls .tv-player-controls {
    opacity: 1;
}

/* =========================================
   📱 RESPONSIVIDADE (Mobile & Tablets) 
   ========================================= */
@media (max-width: 768px) {
    body {
        padding-left: 0;
        padding-bottom: 70px; /* Espaço para a bottom nav */
    }

    /* Transformar Sidebar em Bottom Nav */
    .tv-sidebar {
        top: auto;
        bottom: 0;
        height: 70px;
        width: 100vw !important;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    }

    .tv-sidebar .tv-sidebar-app-name {
        display: none; /* Ocultar logomarca na bottom nav */
    }

    .tv-sidebar nav {
        flex-direction: row !important;
        width: 100% !important;
        justify-content: space-evenly;
        margin-top: 0 !important;
        overflow-x: auto;
        padding-bottom: 0 !important;
    }

    .tv-nav-link {
        padding: 10px;
        flex-direction: column;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 0;
    }

    .tv-nav-link i {
        font-size: 1.5rem;
        margin-bottom: 2px;
    }

    .tv-nav-link span {
        display: none; /* Ocultar textos no mobile para focar em ícones */
    }

    .tv-nav-link.tv-focus, .tv-nav-link:hover {
        border-bottom-color: var(--tv-primary);
        background: transparent;
    }

    /* Layout do Conteúdo Principal Mobile */
    .tv-content-container {
        padding: 20px 20px 80px 20px;
    }

    /* Hero e Tipografia Mobile */
    .display-3 {
        font-size: 2.5rem;
    }
    
    .fs-4 {
        font-size: 1rem !important;
    }

    /* Ocultar elementos de perfil longos na navbar mobile */
    .tv-sidebar .mt-auto {
        border-top: none !important;
        padding-top: 0 !important;
        display: flex;
        align-items: center;
    }

    .tv-sidebar .d-flex.align-items-center.gap-3.px-3.mb-3 {
        display: none !important;
    }
}
/* Estilos para a Barra de Busca de PC */
.search-pc-container input:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
    width: 450px !important; /* Expande ao focar no PC */
}

.search-pc-container input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
