/* =========================================================
   POPCORN HUB — STYLE.CSS
   Tema: sala de cinema — marquise, bilhete e telão
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000000;
    --bg-soft: #0a0a0a;
    --card: #141414;
    --card-hover: #1f1f1f;
    --text: #f5f5f5;
    --muted: #aaaab3;
    --red: #e50914;
    --red-dark: #831010;
    --red-glow: rgba(229, 9, 20, 0.45);
    --gold: #f0b429;
    --green: #22c55e;
    --yellow: #facc15;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
    --font-body: "Work Sans", Arial, Helvetica, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(
            ellipse 80% 50% at top,
            rgba(133, 8, 15, 0.35) 0,
            transparent 55%
        ),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
}

/* Barra de rolagem em tema Netflix (Chrome/Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: var(--red-dark);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red);
}

/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Modo Alto Contraste: fundo puro-preto, texto puro-branco,
   bordas sempre visíveis e decorações reduzidas. */
body.high-contrast {
    --bg-soft: #000;
    --card: #000;
    --card-hover: #050505;
    --text: #ffffff;
    --muted: #ffffff;
    --border: #ffffff;
    --gold: #ffe066;
    background: #000;
}

body.high-contrast .marquee-lights,
body.high-contrast .film-strip,
body.high-contrast .poster-art::after,
body.high-contrast .hero-banner::before {
    display: none !important;
}

body.high-contrast .movie-card,
body.high-contrast .action-btn,
body.high-contrast .genre-btn,
body.high-contrast .btn-dia,
body.high-contrast .btn-horario,
body.high-contrast .sessao-container,
body.high-contrast .modal-box,
body.high-contrast .search-form input {
    border: 2px solid #ffffff !important;
}

body.high-contrast .hero-banner {
    background: #000;
}

body.high-contrast a,
body.high-contrast button {
    text-decoration: underline;
}

/* =========================================================
   FAIXA DE PELÍCULA (topo/rodapé)
   ========================================================= */

.film-strip {
    height: 10px;
    width: 100%;
    background-color: #000;
    background-image:
        repeating-linear-gradient(
            90deg,
            #000 0,
            #000 10px,
            var(--bg-soft) 10px,
            var(--bg-soft) 20px
        );
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.96);
    border-bottom: 1px solid rgba(229, 9, 20, 0.35);
    backdrop-filter: blur(15px);
}

/* Luzes de marquise: pontos vermelhos "correndo" no topo do header,
   o único momento de movimento contínuo e proposital da página. */
.marquee-lights {
    height: 6px;
    width: 100%;
    background-image:
        repeating-radial-gradient(
            circle,
            var(--red) 0 1.6px,
            transparent 1.7px 20px
        );
    background-size: 20px 6px;
    opacity: 0.7;
    animation: chase 1.4s linear infinite;
}

@keyframes chase {
    from { background-position: 0 0; }
    to { background-position: 20px 0; }
}

.header-content {
    width: min(1400px, 94%);
    margin: auto;
    padding: 18px 0;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-display);
    letter-spacing: 1px;
    font-size: 2.1rem;
    white-space: nowrap;
}

.logo span {
    background: linear-gradient(
        90deg,
        #fff,
        #e50914
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* =========================================================
   BUSCA
   ========================================================= */

.search-form {
    flex: 1 1 260px;
}

.search-form input {
    width: 100%;
    padding: 13px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: none;
    background: #141414;
    color: white;
    font-size: 1rem;
    transition: 0.25s ease;
}

.search-form input::placeholder {
    color: #888;
}

.search-form input:focus {
    border-color: var(--red);
    box-shadow:
        0 0 0 3px rgba(229, 9, 20, 0.12);
}

/* =========================================================
   BOTÃO ACESSIBILIDADE
   ========================================================= */

.btn-contraste {
    border: 1px solid var(--border);
    background: #141414;
    color: #ddd;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.9rem;
    transition: 0.2s ease;
}

.btn-contraste:hover {
    border-color: var(--gold);
    color: white;
}

.btn-contraste[aria-pressed="true"] {
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1300;
    font-weight: 800;
}

/* =========================================================
   FILTROS
   ========================================================= */

.genre-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.genre-btn {
    border: 1px solid var(--border);
    background: #141414;
    color: #ddd;
    padding: 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s ease;
}

.genre-btn:hover {
    border-color: var(--red);
    color: white;
}

.genre-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: white;
}

/* =========================================================
   HERO
   ========================================================= */

.hero-banner {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.97),
            rgba(0, 0, 0, 0.65),
            rgba(0, 0, 0, 0.25)
        ),
        linear-gradient(
            180deg,
            #4a0508,
            #000000
        );
    border-bottom: 1px solid rgba(229, 9, 20, 0.35);
}

/* Feixe de luz vermelha atrás do texto, como o holofote de uma sala de cinema,
   pulsando continuamente para dar vida ao fundo do banner. */
.hero-banner::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(
        ellipse at center,
        var(--red-glow),
        transparent 65%
    );
    pointer-events: none;
    animation: heroGlowPulse 7s ease-in-out infinite;
}

/* Segundo feixe, mais suave, deslizando lentamente pelo fundo */
.hero-banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: -25%;
    width: 55%;
    height: 100%;
    background: radial-gradient(
        ellipse 50% 60% at center,
        rgba(229, 9, 20, 0.22),
        transparent 70%
    );
    pointer-events: none;
    animation: heroGlowSweep 12s ease-in-out infinite;
}

@keyframes heroGlowPulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

@keyframes heroGlowSweep {
    0%, 100% { transform: translateX(0%); }
    50% { transform: translateX(140%); }
}

.hero-content {
    position: relative;
    width: min(1400px, 94%);
    margin: auto;
    padding: 70px 0;
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.hero-content h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.hero-content p {
    color: #ccc;
    max-width: 560px;
    font-size: 1.08rem;
    margin-bottom: 28px;
}

.hero-btn {
    display: inline-block;
    background: var(--red);
    color: white;
    text-decoration: none;
    padding: 13px 22px;
    border-radius: 8px;
    font-weight: 800;
    transition: 0.25s ease;
}

.hero-btn:hover {
    background: #ff1823;
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px rgba(229, 9, 20, 0.45);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.compra-wrapper {
    position: relative;
}

/* Selo "assento comprado" exibido perto do botão Explorar filmes */
.compra-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid var(--red);
    color: #ffd7d7;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s ease;
}

.compra-badge:hover {
    background: rgba(229, 9, 20, 0.28);
}

.compra-badge[hidden] {
    display: none;
}

@keyframes badgePop {
    0% { transform: scale(0.85); opacity: 0; }
    60% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.compra-badge-pop {
    animation: badgePop 0.35s ease;
}

/* Prévia (dropdown) com os filmes cujos ingressos já foram comprados.
   position:fixed (com posição calculada via JS) para não ser cortada pelo
   overflow:hidden do .hero-banner, que fica em volta do selo de compra. */
.compra-preview {
    position: fixed;
    z-index: 200;
    width: min(300px, 82vw);
    max-height: 320px;
    overflow-y: auto;
    background: #141414;
    border: 1px solid rgba(229, 9, 20, 0.4);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.compra-preview[hidden] {
    display: none;
}

.compra-preview-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.icone-ticket {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.compra-preview-lista {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compra-preview-item {
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.compra-preview-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.compra-preview-poster {
    flex-shrink: 0;
    width: 40px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    background: #000;
}

.compra-preview-info {
    min-width: 0;
}

.compra-preview-info strong {
    display: block;
    font-size: 0.88rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compra-preview-info span {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
}

.compra-preview-vazio {
    color: var(--muted);
    font-size: 0.85rem;
}

/* =========================================================
   DESTAQUE ESPECIAL (esteira com os filmes mais premiados)
   ========================================================= */

.destaque-section {
    width: 100%;
    margin: 45px 0 0;
    padding: 28px 0 32px;
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.08), transparent);
    border-top: 1px solid rgba(229, 9, 20, 0.25);
    border-bottom: 1px solid rgba(229, 9, 20, 0.25);
}

.destaque-section[hidden] {
    display: none;
}

.destaque-header {
    width: min(1400px, 94%);
    margin: 0 auto 18px;
}

.destaque-selo {
    display: inline-block;
    background: var(--red);
    color: white;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* A esteira ocupa a largura toda; a máscara nas bordas suaviza a entrada/saída dos cards */
.destaque-esteira {
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}

.destaque-trilha {
    display: flex;
    gap: 18px;
    width: max-content;
    padding: 0 18px;
    animation: destaqueRolagem 40s linear infinite;
}

.destaque-esteira:hover .destaque-trilha {
    animation-play-state: paused;
}

@keyframes destaqueRolagem {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.destaque-card {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: inherit;
    padding: 0;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.destaque-card:hover {
    transform: translateY(-5px);
    border-color: var(--red);
}

.destaque-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.destaque-card-info {
    padding: 10px;
}

.destaque-card-info strong {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.destaque-card-info span {
    font-size: 0.72rem;
    color: var(--muted);
}

/* =========================================================
   MAIN
   ========================================================= */

main {
    width: min(1400px, 94%);
    margin: auto;
}

.movies-section,
.favorites-section {
    padding: 55px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.5px;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.section-count {
    color: var(--muted);
    font-size: 0.95rem;
}

/* =========================================================
   GRID
   ========================================================= */

.movie-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(190px, 1fr));
    gap: 22px;
}

/* =========================================================
   CARD
   ========================================================= */

.movie-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    animation: cardIn 0.45s ease both;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px) scale(1.015);
    box-shadow: var(--shadow);
    border-color: rgba(229, 9, 20, 0.5);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   POSTER
   ========================================================= */

.movie-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #101014;
}

/* Pôster tipográfico: a base visual de todo cartaz. Fica sempre
   visível e só é encoberto quando a imagem real termina de carregar,
   então nenhum filme aparece "quebrado". */
.poster-art {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 14px;
    background-image:
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.05) 0 2px,
            transparent 2px 14px
        ),
        linear-gradient(
            190deg,
            var(--poster-a, #3a0d10),
            var(--poster-b, #0c0c12) 75%
        );
}

.poster-art .poster-icon {
    align-self: flex-start;
    font-size: 1.8rem;
    margin-bottom: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.poster-art .poster-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 0.98;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.poster-art .poster-caption {
    margin-top: 8px;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.75);
}

.movie-poster img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.35s ease;
}

.movie-poster img.loaded {
    opacity: 1;
}

.movie-card:hover .movie-poster img.loaded {
    transform: scale(1.07);
}

/* =========================================================
   OVERLAY
   ========================================================= */

.movie-overlay {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    gap: 12px;
    padding: 15px;
    background:
        linear-gradient(
            transparent 30%,
            rgba(0, 0, 0, 0.92)
        );
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .movie-overlay,
.movie-card:focus-within .movie-overlay {
    opacity: 1;
}

.movie-genre {
    align-self: flex-start;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    font-size: 0.75rem;
    color: white;
}

.details-btn {
    border: 0;
    border-radius: 7px;
    padding: 11px;
    background: var(--red);
    color: white;
    cursor: pointer;
    font-weight: 800;
    transition: 0.2s ease;
}

.details-btn:hover {
    background: #ff1721;
}

/* =========================================================
   FAVORITO DO CARD
   ========================================================= */

.card-favorite {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
    transition: 0.2s ease;
}

.card-favorite:hover {
    transform: scale(1.1);
    color: #ff3340;
}

.card-favorite.active {
    color: #ff1e2d;
}

.card-favorite svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

/* =========================================================
   INFORMAÇÕES DO CARD
   ========================================================= */

.movie-card-content {
    padding: 15px;
}

.movie-card-content h3 {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 10px;
}

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-rating {
    color: var(--gold);
    font-weight: 800;
}

/* =========================================================
   BADGES
   ========================================================= */

.age-badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    min-width: 30px;
    text-align: center;
    padding: 5px 8px;
    border-radius: 5px;
    background: var(--green);
    color: #06100a;
    font-size: 0.75rem;
    font-weight: 900;
}

.age-10,
.age-12,
.age-14 {
    background: var(--yellow);
}

.age-16,
.age-18 {
    background: #ef4444;
    color: white;
}

.watched-badge {
    position: absolute;
    z-index: 3;
    bottom: 10px;
    left: 10px;
    padding: 5px 8px;
    border-radius: 5px;
    background: var(--green);
    color: #06100a;
    font-size: 0.75rem;
    font-weight: 900;
}

/* =========================================================
   FAVORITOS
   ========================================================= */

.favorites-section {
    border-top: 1px solid var(--border);
}

.empty-message {
    padding: 35px 20px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
    border: 1px dashed var(--border);
    border-radius: 10px;
}

/* =========================================================
   MODAL PRINCIPAL
   ========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(7px);
}

.modal.active {
    display: flex;
}

.modal-box {
    position: relative;
    z-index: 2;
    width: min(950px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    background: #141414;
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
}

.modal-close:hover {
    background: var(--red);
    transform: rotate(90deg);
}

/* =========================================================
   TRAILER
   ========================================================= */

.trailer-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.trailer-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* =========================================================
   DETALHES
   ========================================================= */

.movie-details {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 28px;
}

.movie-info {
    flex: 1;
    min-width: 0;
}

.movie-info h2 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.5px;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1;
    margin-bottom: 14px;
}

.movie-info p {
    color: #c4c4ca;
    line-height: 1.7;
}

.movie-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.movie-meta span {
    padding: 7px 10px;
    border-radius: 6px;
    background: #1a1a1a;
    color: #ddd;
    font-size: 0.85rem;
}

/* =========================================================
   AÇÕES
   ========================================================= */

.movie-actions-label {
    text-align: center;
    margin-bottom: 10px;
}

.movie-actions-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: #1a1a1a;
    color: #ddd;
    cursor: pointer;
    transition: 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    border-color: #777;
}

#favorite-btn.active {
    color: #ff1e2d;
    border-color: #ff1e2d;
}

#like-btn.active {
    color: var(--green);
    border-color: var(--green);
}

#dislike-btn.active {
    color: #ef4444;
    border-color: #ef4444;
}

#watched-btn.active {
    color: var(--green);
    border-color: var(--green);
}

/* =========================================================
   EQUIPE (criadores do projeto)
   ========================================================= */

.equipe-section {
    width: min(1400px, 94%);
    margin: 0 auto;
    padding: 50px 0;
    border-top: 1px solid var(--border);
}

.equipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.equipe-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.equipe-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 9, 20, 0.5);
}

.equipe-card img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    margin: 0 auto 16px;
    display: block;
    border: 3px solid var(--red);
}

.equipe-card h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: white;
}

.equipe-card p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 35px 20px;
    text-align: center;
    color: #888;
}

.site-footer strong {
    color: #ccc;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .header-content {
        justify-content: center;
    }

    .logo {
        width: 100%;
        text-align: center;
    }

    .search-form {
        flex-basis: 100%;
    }

    .genre-filters {
        width: 100%;
        justify-content: center;
    }

    .hero-banner {
        min-height: 360px;
    }

    .movie-grid {
        grid-template-columns:
            repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .movie-actions-buttons {
        justify-content: center;
    }
}

/* =========================================================
   CELULAR
   ========================================================= */

@media (max-width: 520px) {

    .header-content {
        padding: 12px 0;
        gap: 12px;
    }

    .logo {
        font-size: 1.7rem;
    }

    .genre-filters {
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .genre-btn {
        flex-shrink: 0;
        padding: 8px 12px;
    }

    .hero-banner {
        min-height: 330px;
    }

    .hero-content {
        padding: 50px 0;
    }

    .hero-content h2 {
        font-size: 2.4rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    main {
        width: 92%;
    }

    .movies-section,
    .favorites-section {
        padding: 35px 0;
    }

    .movie-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .movie-card:hover {
        transform: translateY(-3px);
    }

    .movie-overlay {
        opacity: 1;
        background:
            linear-gradient(
                transparent 45%,
                rgba(0, 0, 0, 0.8)
            );
    }

    .details-btn {
        padding: 8px;
        font-size: 0.75rem;
    }

    .movie-card-content {
        padding: 10px;
    }

    .movie-card-content h3 {
        font-size: 0.85rem;
    }

    .movie-card-meta {
        font-size: 0.72rem;
    }

    .modal {
        padding: 8px;
    }

    .modal-box {
        max-height: 96vh;
        border-radius: 10px;
    }

    .movie-details {
        padding: 18px;
        gap: 20px;
    }

    .movie-actions-buttons {
        display: grid;
        grid-template-columns:
            repeat(2, 1fr);
    }

    .action-btn {
        width: 100%;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }
}

/* =========================================================
   TELAS MUITO PEQUENAS
   ========================================================= */

@media (max-width: 350px) {

    .movie-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .movie-card-content h3 {
        font-size: 0.78rem;
    }

    .movie-card-meta {
        flex-direction: column;
        gap: 2px;
    }
}

/* =========================================================
   REDUÇÃO DE ANIMAÇÕES
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Divisor do Modal */
.modal-divider {
    border: 0;
    height: 1px;
    background: #333;
    margin: 25px 0;
}

/* Container de Sessões */
.sessao-container {
    background: #141414;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.sessao-container h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.sessao-label {
    color: #aaa;
    font-size: 0.9rem;
    margin: 10px 0 5px 0;
}

.preco-regra {
    color: #ffb3b3;
    background: rgba(229, 9, 20, 0.12);
    border: 1px solid rgba(229, 9, 20, 0.35);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.preco-regra strong {
    color: var(--red);
}

/* Lista de Dias de Setembro */
.dias-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.btn-dia {
    background: #1a1a1a;
    color: #aaa;
    border: 1px solid #333;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-dia:hover, .btn-dia.active {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
}

/* Lista de Horários */
.horarios-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-horario {
    background: #2a2a36;
    color: #fff;
    border: 1px solid #444;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-horario:hover, .btn-horario.active {
    background: var(--gold);
    color: #000;
    font-weight: bold;
    border-color: var(--gold);
}

/* Legenda de Assentos */
.assentos-legenda {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #ccc;
}

.assentos-legenda li {
    display: flex;
    align-items: center;
    gap: 5px;
}

.exemplo-assento {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.exemplo-assento.livre { background-color: #444451; }
.exemplo-assento.selecionado { background-color: var(--gold); }
.exemplo-assento.ocupado { background-color: #e50914; }

/* Tela do Cinema */
.cinema-screen {
    background: #ffffff;
    height: 8px;
    width: 70%;
    max-width: 320px;
    border-radius: 50% / 100%;
    margin: 10px auto 25px auto;
    box-shadow: 0 3px 24px 4px rgba(255, 255, 255, 0.55);
    text-align: center;
    color: #888;
    font-size: 9px;
    letter-spacing: 2px;
}

/* Grade de Assentos */
.assentos-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 300px;
    margin: 0 auto 20px auto;
}

/* Cada fileira: rótulo da letra à esquerda + poltronas numeradas, como num cinema real */
.assentos-linha {
    display: grid;
    grid-template-columns: 18px repeat(8, 1fr);
    gap: 8px;
    align-items: center;
    justify-items: center;
    width: 100%;
}

.assentos-cabecalho {
    margin-bottom: 2px;
}

.assento-letra,
.assento-numero-coluna {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    line-height: 1;
}

.assento {
    background-color: #444451;
    height: 24px;
    width: 24px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.assento:hover:not(.ocupado) {
    transform: scale(1.15);
}

.assento.selecionado {
    background-color: var(--gold);
}

.assento.ocupado {
    background-color: #e50914;
    cursor: not-allowed;
}

/* Resumo da Reserva */
.resumo-reserva {
    text-align: center;
    border-top: 1px dashed #333;
    padding-top: 15px;
    color: #ddd;
}

.preco-destaque {
    font-size: 1.1rem;
    color: var(--gold);
    margin: 8px 0;
}

.btn-confirmar {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background 0.2s;
}

.btn-confirmar:hover:not(:disabled) {
    background: #ff1721;
}

.btn-confirmar:disabled {
    background: #555;
    cursor: not-allowed;
}

/* =========================================================
   MODAL DE SUCESSO — "bilhete" de confirmação
   ========================================================= */

.modal-sucesso-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(7px);
}

.modal-sucesso-overlay.active {
    display: flex;
}

.modal-sucesso-content {
    position: relative;
    width: min(400px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    text-align: center;
    background: linear-gradient(180deg, #1a0505, #000000);
    border: 1px dashed rgba(229, 9, 20, 0.5);
    border-radius: 14px;
    padding: 34px 26px;
    animation: modalIn 0.3s ease;
}

.sucesso-icon {
    font-size: 3rem;
    margin-bottom: 6px;
}

.modal-sucesso-content h2 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.5px;
    font-size: 1.9rem;
    margin-bottom: 12px;
}

.modal-sucesso-content p {
    color: #ccc;
    margin-bottom: 4px;
}

.sucesso-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 14px 16px;
    border-top: 1px dashed #333;
    border-bottom: 1px dashed #333;
    color: #ddd;
}

.sucesso-total-box strong {
    color: var(--gold);
    font-size: 1.3rem;
}

.btn-fechar-sucesso {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 6px;
    background: var(--red);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-fechar-sucesso:hover {
    background: #ff1721;
}
