/* ============================================================
   VARIÁVEIS E RESET
============================================================ */
:root {
    --primary-bg: #040714;
    --sidebar-bg: rgba(9, 11, 19, 0.95);
    --accent-color: #00e5ff; 
    --accent-glow: rgba(0, 229, 255, 0.5);
    --text-main: #f9f9f9;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth; /* Adicionado para navegação suave */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* Melhora a leitura da fonte */
}

/* ============================================================
   SIDEBAR NAV
============================================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 90px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    z-index: 2000; /* Aumentado para ficar sempre no topo */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.logo-horizontal {
    width: 55px;
    margin-bottom: 40px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: 0.3s;
}

.logo-horizontal:hover { transform: scale(1.1); }

.nav-links {
    list-style: none;
    flex-grow: 1;
    width: 100%;
}

.nav-links li {
    font-size: 24px;
    margin: 35px 0;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
    text-align: center;
    position: relative;
}

.nav-links li:hover, .nav-links li.active {
    opacity: 1;
    color: var(--accent-color);
    transform: scale(1.2);
    text-shadow: 0 0 15px var(--accent-glow);
}

/* Indicador lateral no item ativo */
.nav-links li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 3px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
    border-radius: 0 5px 5px 0;
}

.user-profile {
    margin-bottom: 20px;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.user-profile img:hover { border-color: var(--accent-color); transform: scale(1.1); }

/* ============================================================
   CONTEÚDO E BUSCA
============================================================ */
.content {
    margin-left: 90px;
    padding-bottom: 50px;
    min-height: 100vh;
    animation: pageFadeIn 0.6s ease-out;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-section { padding: 30px 4% 10px; }

#searchInput {
    width: 100%;
    max-width: 600px; /* Limitado para não ficar gigante em 4K */
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 30px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-color);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.15);
}

/* ============================================================
   HERO BANNER
============================================================ */
.hero {
    height: 85vh;
    background-size: cover;
    background-position: center 15%;
    position: relative;
    transition: background-image 0.8s ease-in-out;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(75deg, var(--primary-bg) 30%, transparent 100%),
                linear-gradient(to top, var(--primary-bg) 5%, transparent 40%);
    display: flex;
    align-items: center;
    padding: 0 6%;
}

.hero-content { max-width: 700px; }
.hero-content h1 { font-size: 3.8rem; font-weight: 800; margin-bottom: 15px; line-height: 1.1; letter-spacing: -1px; }
.hero-overview { font-size: 1.15rem; opacity: 0.85; line-height: 1.6; margin-bottom: 30px; }

.btn-play {
    padding: 15px 45px;
    background: var(--text-main);
    color: black;
    border: none;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    margin-right: 15px;
    transition: var(--transition);
    letter-spacing: 1px;
}

.btn-play:hover { 
    background: var(--accent-color); 
    transform: translateY(-4px); 
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.3); 
}

.btn-info {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-info:hover { 
    border-color: var(--accent-color); 
    color: var(--accent-color); 
    transform: rotate(90deg) scale(1.1); 
}

/* ============================================================
   CARDS E CARROSSEL
============================================================ */
.row { padding: 40px 0 20px 4%; position: relative; }
.row h3 { 
    margin-bottom: 20px; 
    font-weight: 600; 
    font-size: 1.4rem;
    color: rgba(255,255,255,0.9);
}

.carousel-container { position: relative; overflow: visible; }

.movie-list {
    display: flex;
    gap: 20px;
    overflow-x: scroll;
    padding: 15px 0;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to right, black 95%, transparent 100%);
}

.movie-list::-webkit-scrollbar { display: none; }

.card {
    min-width: 190px;
    height: 285px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: #1a1d29;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card:hover {
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    z-index: 100;
    outline: 3px solid rgba(255,255,255,0.8);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 45px;
    height: 70px;
    z-index: 150;
    cursor: pointer;
    opacity: 0;
    transition: 0.3s;
    border-radius: 5px;
    backdrop-filter: blur(5px);
}

.handle.right { right: 2%; }
.handle.left { left: 0%; }

.carousel-container:hover .handle { opacity: 1; }
.handle:hover { background: var(--accent-color); color: black; }

/* ============================================================
   PLAYER OVERLAY
============================================================ */
.player-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

.player-overlay.active { display: flex; animation: fadeIn 0.4s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.player-content {
    width: 95%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 100px rgba(0, 229, 255, 0.2);
}

.player-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-btn {
    position: absolute;
    top: -60px;
    right: 0;
    font-size: 50px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover { color: var(--accent-color); transform: rotate(90deg); }

/* ============================================================
   RESPONSIVO (MOBILE)
============================================================ */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 75px;
        bottom: 0;
        top: auto;
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: center;
    }
    
    .logo-container, .user-profile, .nav-links li.active::before { display: none; }
    
    .nav-links {
        display: flex;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        margin: 0;
        padding: 0 10px;
    }
    
    .nav-links li { 
        margin: 0; 
        font-size: 26px; 
        flex: 1; 
        padding: 15px 0; /* Aumenta área de toque */
    }

    .content { margin-left: 0; padding-bottom: 100px; }

    .hero { height: 70vh; }
    .hero-content h1 { font-size: 2.4rem; }
    .hero-overlay { background: linear-gradient(to top, var(--primary-bg) 15%, transparent 100%); align-items: flex-end; padding-bottom: 40px; }
    
    .card { min-width: 145px; height: 215px; }
    .row { padding-top: 20px; }
    .handle { display: none; } /* Mobile usa scroll touch */
    .movie-list { gap: 12px; }
}
