/* --- ESTILOS GERAIS --- */
:root {
    /* Cores Principais */
    --primary-color: #020202;      /* Cinza escuro para o fundo do body */
    --secondary-color: #72352f71;  /* vermelho claro para o cabeçalho e rodapé */
    --accent-color: #6a0509;      /* Vermelho para bordas e destaques (mantido) */

    /* Cores de Texto */
    --text-color: #FFFFFF;
    --text-muted-color: #fbf9f9;

    /* Fontes */
    --font-family: 'Orbitron', sans-serif;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --hover-scale: 1.05;
}

html {
    scroll-behavior: smooth;
}

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

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* --- ESTRUTURA PRINCIPAL DA PÁGINA --- */

/* Cabeçalho */
.site-header {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 20px 5%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent-color);
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header.scrolled {
    background-color: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo {
    justify-self: start;
}

.logo img {
    width: 200px;
    height: auto;
}

.main-nav {
    display: flex;
    gap: 30px;
    font-size: 1.1rem;
    justify-self: center;
}

.main-nav a {
    padding: 5px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: RED]var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    justify-self: end;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color:#f6f4f4;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Layout Principal (2 Colunas) */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
    padding: 40px 5%;
}

/* Rodapé */
.site-footer {
    background-color: #1a1a1a;
    color: var(--text-color);
    padding: 40px 5%;
    border-top: 2px solid var(--accent-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.footer-section h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    margin-bottom: 10px;
    color: var(--text-muted-color);
}

.social-media a i {
    font-size: 32px;
    margin: 0 10px;
    color: var(--text-muted-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-media a:hover i {
    color: var(--accent-color);
    transform: scale(1.1);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: var(--text-muted-color);
}

/* --- COMPONENTES --- */

/* Títulos de Seção */
.topic-section {
    margin-bottom: 60px;
    text-align: center;
}

.topic-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    color: var(--text-color);
}

.topic-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
}

/* Galeria de Filmes e Séries */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

.gallery-item {
    background-color: #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(128, 17, 20, 0.3);
}

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.item-info {
    padding: 20px;
}

.item-info h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    text-align: left;
    min-height: 44px;
    color: var(--text-color);
}

.synopsis {
    font-size: 0.9rem;
    color: var(--text-muted-color);
    text-align: left;
    line-height: 1.5;
}

/* Galeria de Trailers */
.trailers-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.trailer iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 1px solid #333;
    border-radius: 8px;
}

.trailer h3 {
    font-size: 1.2rem;
    margin-top: 15px;
    text-align: center;
}

/* Barra Lateral */
.sidebar {
    background-color: #1f1f1f;
    padding: 25px;
    border-radius: 8px;
    border-left: 2px solid var(--accent-color);
    align-self: start;
    position: sticky;
    top: 140px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.sidebar.visible {
    opacity: 1;
    transform: translateY(0);
}


.sidebar h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar h3 .fa-solid {
    color: var(--accent-color);
}

.sidebar ul {
    list-style: none;
    margin-bottom: 30px;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: var(--text-muted-color);
    transition: color 0.3s ease, background-color 0.3s ease;
    display: block;
    padding: 5px;
    border-radius: 4px;
}

.sidebar ul li a:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- ESTILOS DE PÁGINAS ESPECÍFICAS (LOGIN/CADASTRO) --- */

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-form {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 5%;
}

.form-container {
    text-align: center;
    padding: 40px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    border: 2px solid var(--accent-color);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.form-container h1 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.form-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
    transition: transform .2s, opacity .3s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.form-btn:hover {
    transform: scale(1.03);
    opacity: .9;
}

.google-btn {
    background-color: #DB4437;
}

.facebook-btn {
    background-color: #4267B2;
}

.register-link-btn {
    background-color: var(--accent-color);
}

.back-to-login-btn {
    background-color: var(--accent-color);
}

.separator {
    margin: 20px 0;
    font-weight: 700;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-muted-color);
    text-decoration: underline;
}

.form-input-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-muted-color);
}

.form-input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    background-color: #2a2a2a;
    border-radius: 5px;
    color: var(--text-color);
}

.form-input-group input::placeholder {
    color: #888;
}

.form-input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(128, 17, 20, 0.5);
}

#form-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: 700;
    display: none;
}

#form-message.success {
    background-color: #28a745;
    color: #fff;
    display: block;
}

#form-message.error {
    background-color: #dc3545;
    color: #fff;
    display: block;
}


/* --- RESPONSIVIDADE --- */

@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-top: 40px;
        border-left: none;
        border-top: 2px solid var(--accent-color);
    }
}

@media (max-width: 768px) {
    .site-header {
        display: flex;
        justify-content: space-between;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(20, 20, 20, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-top: 2px solid var(--accent-color);
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        padding: 15px;
    }

    .hamburger-menu {
        display: block;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .topic-section h2 {
        font-size: 2rem;
    }

    .trailers-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .form-container {
        padding: 25px;
    }

    .form-container h1 {
        font-size: 1.8rem;
    }
}


/* --- ESTILOS DE IMPRESSÃO --- */
@media print {
    body {
        background-color: white;
        color: black;
        font-family: 'Times New Roman', Times, serif;
    }

    .site-header,
    #trailers,
    .footer-section h4,
    .social-media,
    .form-container,
    .sidebar,
    .hamburger-menu,
    .gallery-item img {
        display: none;
    }

    .main-form,
    .content-with-sidebar {
        padding: 0;
        display: block;
    }

    .topic-section h2,
    .item-info h3 {
        font-weight: 700;
        text-align: left;
        margin-bottom: 10px;
        border: none;
        color: black;
        transform: none;
        left: 0;
        display: block;
        padding: 0;
    }

    .topic-section h2::after {
        display: none;
    }

    .gallery {
        display: block;
    }

    .gallery-item {
        box-shadow: none;
        border-bottom: 1px solid #ccc;
        page-break-inside: avoid;
        padding: 15px 0;
    }

    .synopsis {
        color: #333;
    }

    .site-footer {
        background-color: white !important;
        border: none;
        color: black;
    }

    .copyright,
    .footer-content {
        border: none;
        padding: 0;
        color: black;
    }

    .footer-section {
        display: block;
        text-align: left;
        margin-bottom: 20px;
    }
}
