:root {
    --bg-color: #0c0b0b;
    --card-bg: #1a1817;
    --text-primary: #e6e1de;
    --text-secondary: #8f8681;
    --accent-color: #e87c03;
    --accent-hover: #ff9838;
    --transition-speed: 0.3s;
    --card-glow: 232, 124, 3;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(232,124,3,0.06), transparent 100%),
        radial-gradient(circle at 50% -20%, rgba(232,124,3,0.15) 0%, transparent 50%),
        radial-gradient(circle at center, transparent 60%, #000 100%),
        linear-gradient(to bottom, #0c0b0b 0%, #141211 100%);
    background-attachment: fixed;
    position: relative;
}

/* Grain sutil no fundo — textura sem dor de cabeça */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 9998;
    opacity: 1;
}

.background-effects {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 900;        /* acima das capas mas abaixo do modal */
    pointer-events: none;
    overflow: hidden;
}

/* Esconde meteoros quando modal está aberto ou no player */
.modal:not(.hidden) ~ .background-effects,
body.in-player .background-effects {
    display: none;
}

.meteor {
    position: absolute;
    height: 1.5px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(180,200,255,0.9) 50%, rgba(255,255,255,0.4) 100%);
    box-shadow: 0 0 6px 1px rgba(180,210,255,0.5);
    pointer-events: none;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    display: flex; align-items: center;
    padding: 20px 4%;
    background: linear-gradient(to bottom, rgba(12,11,11,0.95) 0%, rgba(12,11,11,0.8) 50%, transparent 100%);
    backdrop-filter: blur(5px);
    position: sticky; top: 0; z-index: 100;
    justify-content: space-between;
}
.logo { font-size: 1.4rem; font-weight: 600; color: var(--text-primary); cursor: pointer; letter-spacing: -0.5px; }
.breadcrumbs { font-size: 0.9rem; color: var(--text-secondary); }
.breadcrumb-item { cursor: pointer; transition: color 0.2s; }
.breadcrumb-item:hover { color: var(--text-primary); }
.breadcrumb-separator { margin: 0 8px; opacity: 0.5; }
.nav-actions { display: flex; align-items: center; gap: 15px; }
.logout-btn { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: color 0.2s; }
.logout-btn:hover { color: var(--accent-color); }
.settings-icon-link { text-decoration: none; color: #ccc; margin-right: 15px; display: flex; align-items: center; transition: color 0.2s; }
.settings-icon-link:hover { color: #fff; }
.search-container input {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid #333;
    padding: 8px 15px;
    border-radius: 4px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s, width 0.3s;
    width: 200px;
    font-family: 'Outfit', sans-serif;
}
.search-container input:focus { border-color: var(--accent-color); width: 250px; }
.items-count { padding: 0 4%; margin-top: 10px; font-size: 0.8rem; color: var(--text-secondary); text-align: right; }

/* ============================================================
   GRID — cards ligeiramente menores
   ============================================================ */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13%, 1fr));
    gap: 22px;
    padding: 20px 4%;
    margin-top: 10px;
    flex: 1;
}

/* ============================================================
   CARD WRAPPER
   ============================================================ */
.card-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    z-index: 1;
    animation: cardEntrance 0.5s cubic-bezier(0.22,1,0.36,1) backwards;
    animation-delay: calc(var(--item-index, 0) * 0.04s);
    transition: transform 0.38s cubic-bezier(0.22,1,0.36,1);
    will-change: transform;
}

.card-wrapper:hover { z-index: 500 !important; }

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(28px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Baralho */
.card-wrapper.neighbor-left-1  { transform: translateX(-44px) scale(0.91); }
.card-wrapper.neighbor-left-2  { transform: translateX(-22px) scale(0.96); }
.card-wrapper.neighbor-right-1 { transform: translateX(44px)  scale(0.91); }
.card-wrapper.neighbor-right-2 { transform: translateX(22px)  scale(0.96); }

/* ============================================================
   CARD BASE
   ============================================================ */
.card {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition:
        width     0.38s cubic-bezier(0.22, 1, 0.36, 1),
        left      0.38s cubic-bezier(0.22, 1, 0.36, 1),
        right     0.38s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.38s ease,
        border-color 0.38s ease;
    will-change: width, left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 1px solid transparent;
}

/* Colapso instantâneo ao trocar de card (Netflix style) */
.card-wrapper.no-transition .card,
.card-wrapper.no-transition .poster-layer,
.card-wrapper.no-transition .card-backdrop,
.card-wrapper.no-transition .card-details-panel,
.card-wrapper.no-transition .details-content,
.card-wrapper.no-transition .corner-play-btn {
    transition: none !important;
}

/* ============================================================
   CARD EXPANDIDO — classe .is-expanded
   ============================================================ */
.card-wrapper.is-expanded .card {
    width: 185%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    border-color: rgba(255,255,255,0.09);
    box-shadow:
        0 25px 70px rgba(0,0,0,0.95),
        0 0 0 1px rgba(255,255,255,0.07),
        0 0 80px rgba(var(--card-glow),0.12);
    background-color: #0a0908;
}

.card-wrapper.expand-right.is-expanded .card {
    left: 0;
    transform: none;
}

.card-wrapper.expand-left.is-expanded .card {
    left: auto;
    right: 0;
    transform: none;
}

/* ============================================================
   POSTER LAYER — desliza suavemente para a esquerda
   ============================================================ */
.poster-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center top;
    /* Só anima width e border-radius — height fixo evita truncação */
    transition:
        width 0.42s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.42s ease,
        box-shadow 0.42s ease;
    will-change: width;
    z-index: 2;
}

.card-wrapper.is-expanded .poster-layer {
    width: 30%;
    border-radius: 0 4px 4px 0;
    box-shadow: 6px 0 28px rgba(0,0,0,0.9);
}

/* ============================================================
   BACKDROP
   ============================================================ */
.card-backdrop {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: opacity;
    z-index: 1;
}

.card-backdrop::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(10,9,8,0.88) 0%, rgba(10,9,8,0.48) 32%, rgba(10,9,8,0.12) 52%, transparent 72%),
        linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 18%, transparent 72%, rgba(0,0,0,0.7) 100%);
    pointer-events: none; z-index: 1;
}

.card-wrapper.is-expanded .card-backdrop.loaded {
    opacity: 1;
    animation: backdropReveal 0.45s ease forwards;
}

@keyframes backdropReveal {
    0%   { opacity: 0;   filter: brightness(2) saturate(0); }
    15%  { opacity: 0.9; filter: brightness(1.4) saturate(0.4); }
    35%  { opacity: 0.5; filter: brightness(0.7) saturate(0.7); }
    100% { opacity: 1;   filter: brightness(1) saturate(1); }
}

/* ============================================================
   CARD-CONTENT (título simples)
   ============================================================ */
.card-content {
    position: absolute; bottom: 0; left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(12,11,11,0.98), rgba(12,11,11,0.4) 60%, transparent);
    z-index: 3;
    transition: opacity 0.25s ease;
}

.card-wrapper.is-expanded .card-content { opacity: 0; pointer-events: none; }

.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-type { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================================
   PAINEL DE DETALHES — lado direito, preenche verticalmente
   ============================================================ */
.card-details-panel {
    position: absolute;
    top: 0; right: 0;
    width: 70%;
    height: 100%;
    padding: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease 0.08s;
    will-change: opacity;
    z-index: 4;
    display: flex;
    align-items: stretch;
}

.card-wrapper.is-expanded .card-details-panel { opacity: 1; pointer-events: auto; }

.hover-release {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.3px;
}

/* Esconde meteoros quando modal aberto */
body.modal-open .background-effects { display: none; }

/* Botão play grande no canto inferior direito */
.corner-play-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #000;
    border: 3px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding-left: 4px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.22s ease 0.12s, transform 0.3s cubic-bezier(0.34,1.56,0.64,1) 0.12s, background 0.2s ease, box-shadow 0.2s ease;
    will-change: transform, opacity;
    box-shadow: 0 6px 24px rgba(0,0,0,0.75), 0 0 0 0 rgba(232,124,3,0);
}
.card-wrapper.is-expanded .corner-play-btn {
    opacity: 1;
    transform: scale(1);
}
.corner-play-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 24px rgba(0,0,0,0.75), 0 0 28px rgba(232,124,3,0.7);
    transform: scale(1.1) !important;
}

/* Corpo — 13% de padding nas laterais */
.details-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 11px;
    /* ~13% do painel expandido nas laterais, espaço vertical generoso */
    padding: 14% 13% 14% 10%;
    text-shadow: 0 1px 6px rgba(0,0,0,0.9), 0 2px 15px rgba(0,0,0,0.7);
    width: 100%;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.25s ease 0.08s, transform 0.25s cubic-bezier(0.22,1,0.36,1) 0.08s;
    will-change: transform, opacity;
    overflow: hidden;
}
.card-wrapper.is-expanded .details-content { opacity: 1; transform: translateX(0); }

/* TOPO */
.hover-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.play-icon-circle {
    width: 28px; height: 28px; min-width: 28px;
    background: rgba(255,255,255,0.9);
    color: #000;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: bold; padding-left: 2px;
    margin-top: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    cursor: pointer; flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s ease;
    position: relative;
}
.play-icon-circle:hover { transform: scale(1.1); background: var(--accent-color); }

.hover-title-block { flex: 1; min-width: 0; }

.hover-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover-original-title {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}

/* Divisória */
.hover-divider {
    width: 100%; height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.22), transparent);
}

/* ESTRELAS */
.hover-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.hover-stars { display: flex; align-items: center; gap: 3px; }

.star { font-size: 1.5rem; line-height: 1; }
.star-full  { color: #f5c518; }
.star-half  { color: #f5c518; opacity: 0.6; }
.star-empty { color: rgba(255,255,255,0.18); }

.hover-score-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f5c518;
    margin-left: 7px;
}

.hover-score-src {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    margin-left: 3px;
}

.hover-year-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px;
    padding: 2px 8px;
    white-space: nowrap;
}

/* GÊNEROS */
.hover-genres { display: flex; flex-wrap: wrap; gap: 5px; }

.hover-genre-tag {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.82);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2px;
    padding: 3px 9px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.06);
}

/* SINOPSE */
.hover-synopsis-wrap { flex: 1; display: flex; align-items: flex-start; overflow: hidden; }

.hover-desc {
    font-size: 0.88rem;
    color: rgba(218,213,208,0.93);
    line-height: 1.6;
    overflow: hidden;
}

/* ============================================================
   EFEITO DE BORDA QUEIMADA — estética A24 / película
   ============================================================ */

/* Gerado via SVG inline como data URI — ruído nas bordas */
.card-wrapper.is-expanded .card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    border-radius: 6px;

    /* Vinheta nas bordas — degradê radial que escurece as extremidades */
    background:
        /* Canto superior esquerdo */
        radial-gradient(ellipse 30% 20% at 0% 0%,   rgba(0,0,0,0.7) 0%, transparent 100%),
        /* Canto superior direito */
        radial-gradient(ellipse 30% 20% at 100% 0%, rgba(0,0,0,0.7) 0%, transparent 100%),
        /* Canto inferior esquerdo */
        radial-gradient(ellipse 30% 20% at 0% 100%,   rgba(0,0,0,0.7) 0%, transparent 100%),
        /* Canto inferior direito */
        radial-gradient(ellipse 30% 20% at 100% 100%, rgba(0,0,0,0.7) 0%, transparent 100%),
        /* Borda superior */
        linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 12%),
        /* Borda inferior */
        linear-gradient(0deg,   rgba(0,0,0,0.45) 0%, transparent 12%),
        /* Borda esquerda */
        linear-gradient(90deg,  rgba(0,0,0,0.35) 0%, transparent 8%),
        /* Borda direita */
        linear-gradient(270deg, rgba(0,0,0,0.35) 0%, transparent 8%);

    opacity: 0;
    transition: opacity 0.4s ease 0.25s;
}

.card-wrapper.is-expanded .card::before {
    opacity: 1;
}

/* Linha de pixel burn horizontal — efeito de rolo de filme */
.card-wrapper.is-expanded .card .card-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;

    /* Ruído de pixel simulado: gradiente repetido bem fino */
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.03) 2px,
            rgba(0,0,0,0.03) 3px
        ),
        /* Pixel "queimado" nas bordas — ruído com clip irregular */
        repeating-linear-gradient(
            90deg,
            rgba(0,0,0,0.0) 0px,
            rgba(0,0,0,0.0) 4px,
            rgba(255,255,255,0.012) 4px,
            rgba(255,255,255,0.012) 5px
        );

    /* Máscara que concentra o efeito nas bordas */
    -webkit-mask-image:
        radial-gradient(ellipse 100% 100% at 50% 50%,
            transparent 55%,
            rgba(0,0,0,0.3) 70%,
            rgba(0,0,0,0.8) 85%,
            rgba(0,0,0,1.0) 100%
        );
    mask-image:
        radial-gradient(ellipse 100% 100% at 50% 50%,
            transparent 55%,
            rgba(0,0,0,0.3) 70%,
            rgba(0,0,0,0.8) 85%,
            rgba(0,0,0,1.0) 100%
        );
}

/* ============================================================
   CATEGORY CARD — visual simples, SEM expansão
   ============================================================ */
.card.category-card {
    border: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(135deg, #1a1817, #24211f);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.card-wrapper.category-wrapper { transition: transform 0.3s ease; }

/* Override total: nunca deixa category-card expandir */
.card-wrapper.category-wrapper .card,
.card-wrapper.category-wrapper.is-expanded .card {
    width: 100% !important;
    left: 0 !important; right: auto !important;
    transform: none !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.card-wrapper.category-wrapper:hover .card.category-card {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 25px rgba(194,77,44,0.15), 0 8px 30px rgba(0,0,0,0.6) !important;
    transform: scale(1.04) !important;
}

/* Esconde elementos de filme nas categorias */
.card-wrapper.category-wrapper .card-details-panel { display: none !important; }
.card-wrapper.category-wrapper .card-backdrop      { display: none !important; }
.card-wrapper.category-wrapper .poster-layer       { display: none !important; }

/* card-content das categorias sempre visível */
.card-wrapper.category-wrapper .card-content {
    opacity: 1 !important;
    pointer-events: auto !important;
    text-align: center;
    background: linear-gradient(to top, rgba(12,11,11,0.95), transparent);
    z-index: 2;
}

.card.category-card .card-title {
    font-size: 1.5rem;
    white-space: normal;
    text-align: center;
    transition: text-shadow 0.3s;
    z-index: 2;
}
.card-wrapper.category-wrapper:hover .card.category-card .card-title {
    text-shadow: 0 0 10px rgba(255,255,255,0.6);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    opacity: 1; transition: opacity 0.3s;
}
.modal.hidden { opacity: 0; pointer-events: none; }

.modal-content {
    width: 98%; max-width: 1600px;
    background: #060504;
    padding: 0;
    border-radius: 12px;
    position: relative;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 40px 120px rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center 20%;
    background-attachment: local;
    transition: background-image 0.4s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(255,255,255,0.06);
}
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-thumb { background-color: var(--accent-color); border-radius: 3px; }

/* Backdrop como hero image no topo */
.modal-backdrop-hero {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center 20%;
    z-index: 0;
    transition: background-image 0.4s ease;
}
.modal-backdrop-hero::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(to right, rgba(6,5,4,0.97) 32%, rgba(6,5,4,0.6) 65%, rgba(6,5,4,0.35) 100%),
        linear-gradient(to top, rgba(6,5,4,1) 0%, transparent 40%);
}

/* Conteúdo do modal acima do backdrop */
.modal-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(255,255,255,0.06);
}
.modal-inner::-webkit-scrollbar { width: 6px; }
.modal-inner::-webkit-scrollbar-thumb { background-color: var(--accent-color); border-radius: 3px; }

.details-view {
    display: flex;
    gap: 42px;
    align-items: flex-start;
    padding: 56px 64px 56px 56px;
    min-height: 520px;
    position: relative;
    z-index: 2;
}

.details-poster-wrapper {
    flex-shrink: 0;
    width: 260px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.08);
    aspect-ratio: 2/3;
    background-color: var(--card-bg);
    position: relative;
}
.details-poster-wrapper img { width: 100%; height: auto; display: block; }

.details-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 8px;
}

#modal-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
    letter-spacing: -0.5px;
}
#modal-original-title {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.42);
    font-style: italic;
    margin-top: -8px;
}

.modal-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.genre-tag {
    background: rgba(255,255,255,0.08);
    padding: 4px 13px;
    border-radius: 3px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.12);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.modal-meta-tags {
    display: flex;
    gap: 22px;
    font-size: 0.95rem;
    color: var(--text-primary);
    align-items: center;
    flex-wrap: wrap;
}
.meta-item { display: flex; align-items: center; gap: 7px; }
.meta-icon { width: 15px; height: 15px; stroke: var(--accent-color); flex-shrink: 0; }
.letterboxd-link {
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    transition: color 0.2s;
    display: flex; align-items: center; gap: 6px;
}
.letterboxd-link:hover { color: #40bcf4; }

.modal-synopsis {
    font-size: 1.05rem;
    color: rgba(210,205,200,0.85);
    line-height: 1.65;
    max-width: 620px;
}

/* Botão de play no modal de detalhes */
.play-action-btn {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--accent-color);
    border: none;
    color: #000;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    margin-top: auto;
    align-self: flex-start;
    transition: transform 0.25s cubic-bezier(0.175,0.885,0.32,1.275), box-shadow 0.25s ease;
    box-shadow: 0 6px 28px rgba(232,124,3,0.45);
}
.play-action-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 36px rgba(232,124,3,0.65);
}
.play-action-btn svg { width: 32px; height: 32px; margin-left: 4px; }

/* ── Player view ── */
.player-view.hidden { display: none; }

.player-view {
    padding: 40px 50px 52px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 57%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0,0,0,0.85);
}
.video-wrapper iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.iframe-blocker { position: absolute; top: 0; right: 0; width: 100px; height: 60px; z-index: 10; }

.close-btn {
    position: absolute; top: 16px; right: 16px;
    width: 38px; height: 38px;
    background-color: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%; color: rgba(255,255,255,0.8); font-size: 1.3rem;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 50;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.close-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: rotate(90deg);
    border-color: var(--accent-color);
}

/* Loading */
.loading { position: relative; background-color: var(--card-bg); }
.loading::before {
    content: ""; position: absolute; top: 50%; left: 50%;
    width: 30px; height: 30px;
    border: 2px solid rgba(232,124,3,0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%; animation: spinner 0.8s linear infinite;
    transform: translate(-50%, -50%); z-index: 1;
}
@keyframes spinner { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Login */
.login-body { display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; }
.login-container { background-color: transparent; padding: 40px; width: 100%; max-width: 400px; border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; backdrop-filter: blur(10px); position: relative; z-index: 10; }
.form-group { margin-bottom: 20px; }
.form-group input { width: 100%; padding: 16px 20px; background: rgba(255,255,255,0.05); border: 1px solid transparent; border-radius: 6px; color: var(--text-primary); font-size: 1rem; font-family: 'Outfit', sans-serif; transition: border-color 0.3s, background-color 0.3s; }
.form-group input:focus { background: rgba(255,255,255,0.1); border-color: var(--accent-color); outline: none; }
.login-btn { width: 100%; padding: 16px; background-color: #000; color: var(--text-primary); border: 1px solid var(--accent-color); border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 20px; transition: all 0.3s ease; }
.login-btn:hover { background-color: var(--accent-color); color: #000; box-shadow: 0 0 20px rgba(232,124,3,0.3); }
.alert { background-color: rgba(232,124,3,0.1); border: 1px solid var(--accent-color); color: var(--text-primary); padding: 10px; border-radius: 4px; margin-bottom: 20px; font-size: 0.9rem; }

/* Footer */
.app-footer { text-align: center; padding: 20px; font-size: 0.8rem; color: var(--text-secondary); width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.app-footer a { color: var(--text-secondary); text-decoration: none; border-bottom: 1px dotted var(--text-secondary); }
.app-footer a:hover { color: var(--accent-color); border-color: var(--accent-color); }
.login-footer { position: absolute; bottom: 0; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 768px) {
    .navbar { flex-direction: column; align-items: stretch; gap: 15px; padding: 15px; background: rgba(12,11,11,0.95); }
    .logo { text-align: center; margin-bottom: 5px; }
    .breadcrumbs { text-align: center; margin-bottom: 5px; font-size: 0.85rem; }
    .nav-actions { justify-content: space-between; width: 100%; }
    .search-container { flex: 1; margin-right: 15px; }
    .search-container input, .search-container input:focus { width: 100%; }
    .content-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 10px; }
    .card-wrapper.is-expanded .card { width: 100% !important; left: 0 !important; transform: none !important; }
    .card-wrapper.is-expanded .poster-layer { width: 100% !important; height: 100% !important; top: 0 !important; transform: none !important; aspect-ratio: unset !important; border-radius: 0 !important; }
    .card-details-panel { display: none !important; }
    .modal-content { padding: 20px; width: 100%; height: 100%; max-height: 100vh; border-radius: 0; overflow-y: auto; }
    .modal-content::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75); z-index: 0; }
    .details-view { flex-direction: column; padding-top: 40px; position: relative; z-index: 2; }
    .details-poster-wrapper { width: 180px; margin: 0 auto 20px auto; }
    .details-info { align-items: center; text-align: center; }
    #modal-title { font-size: 1.8rem; }
    .modal-meta-tags { justify-content: center; flex-wrap: wrap; }
    .modal-genres { justify-content: center; }
    .play-action-btn { align-self: center; margin-top: 30px; width: 70px; height: 70px; }
    .play-action-btn svg { width: 30px; height: 30px; }
    .close-btn { position: fixed; top: 15px; right: 15px; background-color: rgba(0,0,0,0.8); width: 35px; height: 35px; font-size: 1.2rem; z-index: 2000; }
    .video-wrapper { margin-top: 40px; }
}

@media (max-width: 480px) {
    .content-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card-title { font-size: 0.9rem; }
    .card-type { font-size: 0.65rem; }
    .details-poster-wrapper { width: 140px; }
    #modal-title { font-size: 1.5rem; }
    .modal-synopsis { font-size: 0.95rem; text-align: left; }
    .login-container { padding: 25px 20px; }
}
