:root {
    --bg-body: #09090b;
    --bg-card: #18181b;
    --border: #27272a;
    --accent: #e50914; /* Vermelho */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding-top: 0;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }

/* --- 1. CABEÇALHO (NAVBAR) --- */
.navbar-cinema {
    height: 80px; /* Altura fixa para não variar */
    width: 100%;
    position: fixed; /* Fixo no topo */
    top: 0; left: 0;
    z-index: 1050; /* Acima de tudo */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    /* Começa transparente com degradê para leitura */
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 0; /* Remove padding extra do bootstrap */
}

/* Estado quando rola a página */
.navbar-cinema.scrolled {
    background-color: rgba(9, 9, 11, 0.98); /* Quase preto sólido */
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Itens do Menu */
.nav-link {
    color: #ccc !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 15px !important;
    border-radius: 6px;
    transition: 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background-color: rgba(255,255,255,0.1);
}

/* --- 2. AVATAR DO CABEÇALHO --- */
/* Essa classe garante que a imagem não estoure */
.header-avatar {
    width: 40px;       /* Largura fixa */
    height: 40px;      /* Altura fixa */
    border-radius: 50%; 
    object-fit: cover; /* Corta a imagem para caber no círculo sem esticar */
    border: 2px solid var(--accent);
    background-color: #333;
    display: block;    /* Garante comportamento de bloco */
}

/* Fallback para quando não tem foto (Bolinha com inicial) */
.header-avatar-placeholder {
    width: 40px; height: 40px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white; font-weight: bold; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
}

/* --- 3. BARRA DE PESQUISA --- */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px; /* Limita a largura */
}
.search-input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 8px 20px 8px 40px; /* Espaço para o ícone */
    color: white;
    outline: none; transition: 0.3s;
}
.search-input:focus {
    background: rgba(0,0,0,0.8);
    border-color: var(--accent);
}
.search-icon {
    position: absolute; left: 15px; top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

/* --- 4. DROPDOWN (MENU DO USUÁRIO) --- */
.dropdown-menu-dark {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    margin-top: 15px; /* Afasta um pouco do topo */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.dropdown-item { color: #eee; padding: 10px 20px; }
.dropdown-item:hover { background-color: rgba(255,255,255,0.1); color: white; }
