/* ==========================================================================
   Layout público (tema escuro padrão + claro). Medidas seguem o design de referência.
   ========================================================================== */
:root {
    --lead: #ff0000;
    --bg: #030910;
    --fade: #03090F;
    --surface: #121C24;
    --surface-border: #1e2429;
    --text: #ede7dd;
    --text-strong: #ffffff;
    --card-title: #f3f4f6;
    --muted: rgba(237, 231, 221, .58);
    --secondary: rgba(237, 231, 221, .88);
    --hairline: rgba(255, 255, 255, .08);
    --placeholder: #1f2937;
    --header-bg: rgba(3, 9, 16, .94);
    --header-border: rgba(255, 255, 255, .06);
    --pill-bg: rgba(255, 255, 255, .04);
    --pill-border: rgba(255, 255, 255, .08);
    --hover-bg: rgba(255, 255, 255, .05);
    --btn-border: rgba(255, 255, 255, .12);
    --arrow-bg: rgba(0, 0, 0, .6);
    --arrow-border: rgba(255, 255, 255, .08);
    --arrow-color: #fff;
    --tabbar-bg: rgba(3, 9, 16, .95);
    --tabbar-border: rgba(255, 255, 255, .05);
    --tabbar-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
    --menu-hover: #111922;
    --pager-bg: rgba(16, 24, 32, .85);
    --tag-border: rgba(255, 255, 255, .08);
    --disabled-text: #475569;
    --switch-track: #374151;
    --chip-color: rgba(237, 231, 221, .88);
    --section-link: rgba(255, 255, 255, .5);
    --section-link-hover: #fff;
    --footer-border: rgba(255, 255, 255, .05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, .25);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --ease-out: cubic-bezier(0, 0, .2, 1);
    --font: 'Montserrat', sans-serif;
    color-scheme: dark;
}

html.light {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-border: #e2e8f0;
    --text: #0f172a;
    --text-strong: #1e293b;
    --card-title: #334155;
    --muted: #94a3b8;
    --secondary: #475569;
    --hairline: rgba(0, 0, 0, .05);
    --placeholder: #e2e8f0;
    --header-bg: rgba(255, 255, 255, .95);
    --header-border: rgba(0, 0, 0, .06);
    --pill-bg: rgba(0, 0, 0, .05);
    --pill-border: rgba(0, 0, 0, .1);
    --hover-bg: rgba(0, 0, 0, .05);
    --btn-border: rgba(0, 0, 0, .15);
    --arrow-bg: rgba(255, 255, 255, .9);
    --arrow-border: rgba(0, 0, 0, .05);
    --arrow-color: #1e293b;
    --tabbar-bg: rgba(255, 255, 255, .95);
    --tabbar-border: rgba(0, 0, 0, .05);
    --tabbar-shadow: 0 -10px 30px rgba(15, 23, 42, .08);
    --menu-hover: #f1f5f9;
    --pager-bg: rgba(255, 255, 255, .8);
    --tag-border: #cbd5e1;
    --switch-track: #d1d5db;
    --chip-color: #475569;
    --section-link: #94a3b8;
    --section-link-hover: var(--lead);
    --footer-border: rgba(0, 0, 0, .05);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.sf {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}
/* Reset sem especificidade (:where) para não sobrepor os componentes. */
:where(body.sf) a { color: inherit; text-decoration: none; }
:where(body.sf) img { display: block; max-width: 100%; }
:where(body.sf) button { font-family: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:where(body.sf) input { font-family: inherit; }
.sf-hidden { display: none !important; }

.sf-container { width: 100%; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .sf-container { max-width: 640px; } }
@media (min-width: 768px) { .sf-container { max-width: 768px; } }
@media (min-width: 1024px) { .sf-container { max-width: 1024px; } }
@media (min-width: 1280px) { .sf-container { max-width: 1280px; } }

/* ---------- Logo ---------- */
.sf-logo { display: block; flex-shrink: 0; position: relative; z-index: 20; transition: opacity .15s var(--ease); }
.sf-logo:hover { opacity: .9; }
.sf-logo span {
    font-weight: 900; font-size: 24px; line-height: 1; letter-spacing: -0.05em;
    text-transform: uppercase; white-space: nowrap; user-select: none;
}
.sf-logo .sf-logo-accent { color: var(--lead); }
@media (min-width: 1024px) { .sf-logo span { font-size: 30px; } }

/* ---------- Header ---------- */
.sf-header { width: 100%; z-index: 120; transition: all .3s var(--ease); }
.sf-header .sf-header-inner { display: flex; align-items: center; justify-content: space-between; position: relative; padding-top: 16px; padding-bottom: 16px; }
@media (min-width: 1024px) { .sf-header .sf-header-inner { padding-top: 24px; padding-bottom: 24px; } }
.sf-header.is-home { position: absolute; top: 0; left: 0; background: transparent; color: #fff; }
.sf-header.is-standard {
    position: sticky; top: 0; background: var(--header-bg); color: var(--text);
    border-bottom: 1px solid var(--header-border);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}

.sf-nav {
    display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 10;
    align-items: center; gap: 4px; padding: 4px 8px; border-radius: 9999px;
    background: var(--pill-bg); border: 1px solid var(--pill-border);
    transition: opacity .3s var(--ease);
}
.sf-header.is-home .sf-nav { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (min-width: 1024px) { .sf-nav { display: flex; } }
.sf-header.search-open .sf-nav { opacity: 0; pointer-events: none; }
.sf-nav a {
    display: flex; align-items: center; padding: 8px 12px; border-radius: 9999px;
    font-weight: 600; font-size: 16px; line-height: 24px; transition: all .3s var(--ease);
}
.sf-nav a i { font-size: 18px; line-height: 28px; width: 20px; text-align: center; }
.sf-nav a span {
    font-weight: 700; overflow: hidden; white-space: nowrap; max-width: 0; opacity: 0;
    transition: all .5s var(--ease-out);
}
.sf-nav a:hover { background: var(--hover-bg); }
.sf-nav a.active span, .sf-nav a:hover span { max-width: 100px; opacity: 1; margin-left: 8px; }

.sf-actions { display: flex; align-items: center; gap: 12px; position: relative; z-index: 20; }
.sf-round-btn {
    width: 40px; height: 40px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--btn-border); transition: opacity .15s var(--ease), background .15s var(--ease);
}
.sf-header.is-home .sf-round-btn, .sf-header.is-home .sf-search { border-color: rgba(255, 255, 255, .3); }
.sf-round-btn:hover { opacity: .7; }
.sf-round-btn i { font-size: 16px; }
.sf-round-btn svg { width: 20px; height: 20px; }
.sf-user-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 9999px; }
.sf-user-btn:hover { opacity: .9; }
.sf-theme-btn .sf-icon-moon { display: none; }
html.light .sf-theme-btn .sf-icon-sun { display: none; }
html.light .sf-theme-btn .sf-icon-moon { display: block; }

/* Busca (desktop: pílula que expande) */
.sf-search {
    display: none; align-items: center; border-radius: 9999px; border: 1px solid var(--btn-border);
    height: 42px; width: 145px; overflow: hidden; transition: all .3s var(--ease-out);
}
@media (min-width: 1024px) { .sf-search { display: flex; } }
.sf-search:hover { background: var(--hover-bg); }
.sf-header.is-home .sf-search:hover { background: rgba(255, 255, 255, .1); }
.sf-search-toggle {
    display: flex; align-items: center; gap: 8px; padding: 8px 16px; height: 40px; min-width: 120px; white-space: nowrap;
    font-weight: 600; font-size: 14px; line-height: 20px; text-transform: uppercase; letter-spacing: .025em;
}
.sf-search-field { display: none; flex: 1; align-items: center; padding: 0 16px; gap: 8px; }
.sf-search-field input {
    flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: inherit;
    font-weight: 500; font-size: 16px;
}
.sf-search-field input::placeholder { color: currentColor; opacity: .8; }
.sf-search-field button { margin-left: 8px; transition: opacity .15s; }
.sf-search-field button:hover { opacity: .7; }
.sf-header.search-open .sf-search {
    width: 320px; background: rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
}
html.light .sf-header.is-standard.search-open .sf-search { background: rgba(0, 0, 0, .04); }
.sf-header.search-open .sf-search-toggle { display: none; }
.sf-header.search-open .sf-search-field { display: flex; }
.sf-search-mobile { display: inline-flex; }
@media (min-width: 1024px) { .sf-search-mobile { display: none; } }

/* Busca (mobile: tela cheia) */
.sf-search-overlay {
    position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, .85);
    -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px); padding: 16px;
    opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
@media (min-width: 640px) { .sf-search-overlay { padding: 24px; } }
.sf-search-overlay.open { opacity: 1; pointer-events: auto; }
.sf-search-panel {
    border-radius: 24px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(9, 9, 11, .95);
    padding: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .4); max-width: 640px; margin: 0 auto;
}
html.light .sf-search-panel { background: rgba(255, 255, 255, .95); }
.sf-search-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sf-search-panel-head strong { font-weight: 900; font-size: 14px; letter-spacing: .1em; color: #a1a1aa; }
.sf-search-close { width: 40px; height: 40px; border-radius: 9999px; background: #27272a !important; color: #fff !important; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; transition: color .15s; }
.sf-search-close:hover { color: var(--lead) !important; }
.sf-search-input-wrap { position: relative; }
.sf-search-input-wrap input {
    width: 100%; height: 64px; border-radius: 16px; background: #18181b; border: 2px solid transparent;
    padding: 16px 56px 16px 20px; font-weight: 500; font-size: 18px; color: #fff; outline: 0; box-shadow: var(--shadow-lg);
}
.sf-search-input-wrap input:focus { border-color: var(--lead); box-shadow: 0 0 0 2px rgba(59, 130, 246, .5); }
.sf-search-input-wrap button {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
    border-radius: 12px; background: var(--lead) !important; color: #fff !important; display: inline-flex; align-items: center; justify-content: center;
}
.sf-search-label { font-weight: 700; font-size: 12px; letter-spacing: .1em; color: #71717a; margin: 20px 0 12px; text-transform: uppercase; }
.sf-search-types { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-search-types label { cursor: pointer; }
.sf-search-types input { display: none; }
.sf-search-types span {
    display: inline-block; padding: 8px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
    background: #18181b; color: #d4d4d8; transition: all .15s;
}
.sf-search-types input:checked + span { background: var(--lead); color: #fff; box-shadow: 0 0 0 2px rgba(59, 130, 246, .5); }

/* ---------- Hero ---------- */
.sf-hero { position: relative; width: 100%; height: 600px; overflow: hidden; background: #000; }
@media (min-width: 1024px) { .sf-hero { height: 850px; } }
.sf-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); pointer-events: none; }
.sf-slide.active { opacity: 1; pointer-events: auto; z-index: 1; }
.sf-slide-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center top;
    filter: blur(4px); opacity: .6; transform: scale(1); transition: transform 10s linear;
}
.sf-slide.active .sf-slide-bg { transform: scale(1.1); }
.sf-slide-shade-left { position: absolute; inset: 0; background: linear-gradient(to right, #000, rgba(0, 0, 0, .5), transparent); }
.sf-slide-shade-bottom { position: absolute; inset: 0; background: linear-gradient(to top, var(--fade), rgba(3, 9, 15, .4), transparent); }
.sf-slide-content { position: absolute; inset: 0; display: flex; align-items: center; }
.sf-slide-content .sf-container { margin-top: 96px; }
@media (min-width: 1024px) { .sf-slide-content .sf-container { padding: 0 32px; } }
.sf-slide-text { max-width: 768px; padding-left: 8px; }
@media (min-width: 1024px) { .sf-slide-text { padding-left: 0; } }
.sf-slide-text > * + * { margin-top: 24px; }
.sf-slide-text > * { opacity: 0; transform: translateY(32px); transition: all .7s var(--ease-out) .2s; }
.sf-slide.active .sf-slide-text > * { opacity: 1; transform: none; }
.sf-hero-title {
    margin: 0; color: #fff; font-weight: 900; text-transform: uppercase; letter-spacing: -0.05em;
    font-size: 30px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, .15));
}
@media (min-width: 768px) { .sf-hero-title { font-size: 48px; line-height: 1; } }
@media (min-width: 1024px) { .sf-hero-title { font-size: 60px; line-height: 1; } }
.sf-hero-title + .sf-hero-tag { margin-top: 0 !important; }
.sf-hero-tag {
    display: inline-block; padding: 4px 12px; font-weight: 700; font-size: 10px; line-height: 15px; letter-spacing: .1em;
    text-transform: uppercase; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.sf-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-weight: 700; font-size: 14px; line-height: 20px; color: #d1d5db; min-height: 40px; }
.sf-hero-meta .sf-dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--lead); }
.sf-hero-meta .sf-year { color: #fff; }
.sf-hero-meta .sf-type { border: 1px solid rgba(255, 255, 255, .2); padding: 2px 8px; border-radius: 4px; font-size: 10px; text-transform: uppercase; }
.sf-hero-meta .sf-runtime { display: inline-flex; align-items: center; gap: 6px; }
.sf-hero-meta .sf-runtime i { color: var(--lead); }
.sf-hero-desc {
    color: #d1d5db; font-size: 14px; line-height: 1.625; margin-bottom: 0; max-width: 576px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 768px) { .sf-hero-desc { font-size: 18px; line-height: 28px; } }
.sf-hero-buttons { display: flex; align-items: center; gap: 16px; padding-top: 16px; }
.sf-btn-open {
    display: inline-flex; align-items: center; gap: 12px; padding: 14px 32px; border-radius: 9999px;
    background: #fff; color: #000 !important; font-weight: 700; font-size: 18px; line-height: 28px;
    box-shadow: 0 0 20px rgba(255, 255, 255, .2); transition: all .2s var(--ease);
}
.sf-btn-open:hover { background: var(--lead); color: #fff !important; transform: scale(1.05); }
.sf-btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 9999px; min-height: 48px;
    background: rgba(255, 255, 255, .1) !important; border: 1px solid rgba(255, 255, 255, .1) !important; color: #fff !important;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 18px; transition: background .2s var(--ease);
}
.sf-btn-ghost:hover { background: rgba(255, 255, 255, .2) !important; }
.sf-btn-ghost.in-list i { color: var(--lead); }

.sf-hero-thumbs { display: none; position: absolute; bottom: 48px; right: 32px; z-index: 20; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (min-width: 1024px) { .sf-hero-thumbs { display: flex; } }
.sf-hero-thumbs-label { font-weight: 700; font-size: 10px; line-height: 15px; letter-spacing: .1em; color: rgba(255, 255, 255, .4); margin-bottom: 4px; text-transform: uppercase; }
.sf-hero-thumbs-row { display: flex; gap: 12px; }
.sf-thumb {
    position: relative; width: 56px; height: 80px; border-radius: 4px; overflow: hidden; border: 2px solid transparent !important;
    background: #000 !important; box-shadow: var(--shadow-2xl); opacity: .5; transition: all .3s var(--ease);
}
.sf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sf-thumb:hover { opacity: 1; transform: scale(1.05); border-color: rgba(255, 255, 255, .3) !important; }
.sf-thumb.active { opacity: 1; transform: scale(1.1); border-color: #fff !important; box-shadow: var(--shadow-2xl), 0 0 0 2px rgba(255, 255, 255, .2); }
.sf-thumb-progress { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--lead); }
.sf-hero-arrows { position: absolute; bottom: 32px; right: 24px; z-index: 20; display: flex; gap: 12px; }
@media (min-width: 1024px) { .sf-hero-arrows { display: none; } }
.sf-hero-arrows button {
    width: 48px; height: 48px; border-radius: 9999px; background: rgba(0, 0, 0, .4) !important; border: 1px solid rgba(255, 255, 255, .1) !important;
    color: #fff !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.sf-hero-arrows button:active { transform: scale(.95); }
.sf-hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: 5; pointer-events: none; background: linear-gradient(to top, var(--fade), rgba(3, 9, 15, .8), transparent); }
html.light .sf-hero-fade { background: linear-gradient(to top, var(--bg), rgba(248, 250, 252, .6), transparent); }
.sf-home .sf-hero { margin-top: 0; }

/* ---------- Seções da home ---------- */
.sf-rows { margin-top: 32px; padding-bottom: 96px; }
.sf-rows > .sf-section + .sf-section { margin-top: 48px; }
.sf-section { padding: 32px 0; }
.sf-section-inner { padding: 0 16px; }
.sf-section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; padding: 0 4px; }
.sf-section-head h2 {
    display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 700; font-size: 20px; line-height: 28px; color: var(--text-strong);
}
@media (min-width: 768px) { .sf-section-head h2 { font-size: 30px; line-height: 36px; } }
.sf-section-head h2::before { content: ''; width: 6px; height: 24px; border-radius: 9999px; background: var(--lead); box-shadow: 0 0 15px var(--lead); flex-shrink: 0; }
.sf-see-all {
    display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 11px; line-height: 16.5px;
    text-transform: uppercase; letter-spacing: .1em; color: var(--section-link) !important; transition: color .15s; white-space: nowrap;
}
.sf-see-all i { font-size: 10px; }
.sf-see-all:hover { color: var(--section-link-hover) !important; }

/* ---------- Carrossel ---------- */
.sf-carousel { position: relative; }
.sf-carousel .swiper { overflow: hidden; border-radius: 12px; }
.sf-carousel .swiper-slide { width: 160px; padding: 0 8px 16px; height: auto; }
@media (min-width: 640px) { .sf-carousel .swiper-slide { width: 200px; } }
@media (min-width: 768px) { .sf-carousel .swiper-slide { width: 240px; } }
.sf-carousel.is-channels .swiper-slide { width: 240px; }
@media (min-width: 640px) { .sf-carousel.is-channels .swiper-slide { width: 270px; } }
@media (min-width: 768px) { .sf-carousel.is-channels .swiper-slide { width: 300px; } }
@media (min-width: 1024px) { .sf-carousel.is-channels .swiper-slide { width: 320px; } }
.sf-arrow {
    position: absolute; top: 50%; z-index: 30; width: 48px; height: 48px; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    background: var(--arrow-bg) !important; border: 1px solid var(--arrow-border) !important; color: var(--arrow-color) !important;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); box-shadow: var(--shadow-lg);
    opacity: 0; transition: all .3s var(--ease);
}
.sf-arrow-prev { left: -16px; transform: translate(16px, -50%); }
.sf-arrow-next { right: -16px; transform: translate(-16px, -50%); }
@media (min-width: 1024px) { .sf-arrow-prev { left: -48px; } .sf-arrow-next { right: -48px; } }
.sf-carousel:hover .sf-arrow { opacity: 1; transform: translate(0, -50%); }
.sf-arrow:hover { background: var(--lead) !important; color: #fff !important; }
.sf-arrow.swiper-button-disabled, .sf-arrow.swiper-button-lock { display: none; }
@media (hover: none) { .sf-arrow { display: none; } }

/* ---------- Card de pôster ---------- */
.sf-card { position: relative; display: block; }
.sf-poster {
    position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden;
    background: var(--placeholder); box-shadow: var(--shadow-lg); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.sf-poster img { width: 100%; height: 100%; object-fit: cover; }
.sf-poster .sf-poster-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; font-weight: 700; font-size: 14px; color: var(--muted); }
.sf-ring {
    position: absolute; top: 8px; right: 8px; z-index: 10; width: 40px; height: 40px; border-radius: 9999px;
    background: rgba(0, 0, 0, .8); border: 1px solid rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-lg);
}
.sf-grid .sf-ring { width: 36px; height: 36px; }
.sf-ring svg { width: 100%; height: 100%; padding: 2px; transform: rotate(-90deg); display: block; }
.sf-ring .sf-ring-track { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 3; }
.sf-ring .sf-ring-value { fill: none; stroke-width: 3; stroke-linecap: round; }
.sf-hero-meta .sf-ring { position: relative; top: auto; right: auto; background: rgba(0, 0, 0, .5); }
.sf-badges { position: absolute; bottom: 8px; left: 8px; z-index: 20; display: flex; gap: 4px; transition: all .3s var(--ease); }
.sf-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px;
    font-weight: 700; font-size: 9px; line-height: 13.5px; letter-spacing: .025em; text-transform: uppercase;
    background: rgba(0, 0, 0, .65); color: #fff; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.sf-badge i { font-size: 9px; }
.sf-card-overlay {
    position: absolute; inset: 0; z-index: 20; background: rgba(0, 0, 0, .9);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px;
    opacity: 0; pointer-events: none; transition: all .3s var(--ease);
}
.sf-card.open .sf-card-overlay { opacity: 1; pointer-events: auto; }
.sf-card-play {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 0; border-radius: 9999px;
    background: var(--lead); color: #fff !important; font-weight: 700; font-size: 14px; line-height: 20px; box-shadow: var(--shadow-lg);
    transition: all .2s var(--ease);
}
.sf-card-play:hover { background: #dc2626; transform: scale(1.05); }
.sf-card-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sf-card-actions > * {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 8px;
    font-size: 10px; color: #fff !important; background: rgba(255, 255, 255, .1) !important; transition: background .15s;
}
.sf-card-actions > *:hover { background: rgba(255, 255, 255, .2) !important; }
.sf-card-actions i { font-size: 14px; }
.sf-card-actions .is-trailer { background: rgba(234, 179, 8, .2) !important; color: #fde047 !important; }
.sf-card-actions .is-trailer:hover { background: rgba(234, 179, 8, .3) !important; }
.sf-card-actions .in-list i { color: #22c55e; }
.sf-card-info { margin-top: 12px; }
.sf-card-title {
    display: block; font-weight: 700; font-size: 14px; line-height: 20px; color: var(--card-title);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s;
}
@media (min-width: 768px) { .sf-card-title { font-size: 16px; line-height: 24px; } }
.sf-card-meta { margin-top: 4px; display: flex; justify-content: space-between; align-items: center; font-weight: 500; font-size: 12px; line-height: 16px; color: var(--muted); }
.sf-card-type { border: 1px solid var(--tag-border); padding: 2px 6px; border-radius: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
@media (min-width: 1024px) and (hover: hover) {
    .sf-card:hover .sf-poster { transform: scale(1.02); z-index: 20; box-shadow: 0 0 0 2px rgba(59, 130, 246, .5), var(--shadow-2xl); }
    .sf-card:hover .sf-card-title { color: var(--lead); }
    .sf-card:hover .sf-card-overlay { opacity: 1; pointer-events: auto; }
    .sf-card:hover .sf-badges { bottom: auto; top: 8px; }
}
.sf-card-rank {
    position: absolute; left: 8px; top: 8px; z-index: 11; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center; background: var(--lead); color: #fff; font-weight: 900; font-size: 14px; box-shadow: var(--shadow-lg);
}

/* Card de progresso (continuar assistindo) */
.sf-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); z-index: 21; }
.sf-progress span { display: block; height: 100%; background: var(--lead); }

/* Card de canal */
.sf-channel { display: block; }
.sf-channel-cover {
    position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000;
    border: 1px solid var(--surface-border); box-shadow: var(--shadow-lg); transition: transform .3s var(--ease);
}
.sf-channel-cover::before { content: ''; position: absolute; inset: 0; background: var(--channel-bg, #111) center/cover; filter: blur(14px) brightness(.5); transform: scale(1.2); }
.sf-channel-cover::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sf-channel-cover img { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 72%; max-height: 52%; object-fit: contain; filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .55)); }
.sf-channel-live { position: absolute; z-index: 2; top: 12px; right: 12px; background: #ef4444; color: #fff; padding: 4px 8px; border-radius: 6px; font-weight: 900; font-size: 10px; line-height: 15px; text-transform: uppercase; }
.sf-channel:hover .sf-channel-cover { transform: translateY(-2px); }
.sf-channel:hover .sf-card-title { color: var(--lead); }

/* ---------- Página de catálogo ---------- */
.sf-page { padding-top: 16px; padding-bottom: 48px; }
.sf-page-main { padding: 24px 16px 96px; }
@media (min-width: 1024px) { .sf-page-main { padding-bottom: 24px; } .sf-page-wrap { width: calc(100% - 40px); margin: 0 auto; } }
.sf-page-head { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 24px; }
@media (min-width: 768px) { .sf-page-head { flex-direction: row; justify-content: space-between; } }
.sf-page-head h1 { margin: 0; font-weight: 700; font-size: 24px; line-height: 32px; color: var(--text-strong); }
@media (min-width: 1024px) { .sf-page-head h1 { font-size: 30px; line-height: 36px; } }
.sf-page-head .sf-page-count { font-weight: 500; font-size: 14px; color: var(--muted); }
.sf-sort {
    display: none; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 9999px;
    background: var(--surface); border: 1px solid var(--surface-border); font-weight: 500; font-size: 14px; color: var(--muted);
}
@media (min-width: 768px) { .sf-sort { display: flex; } }
.sf-sort a.active { color: var(--lead); font-weight: 700; }
.sf-switch { position: relative; width: 50px; height: 26px; border-radius: 999px; background: var(--switch-track); transition: background .3s; display: inline-block; }
.sf-switch::after { content: ''; position: absolute; left: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 9999px; background: #fff; transition: transform .3s; }
.sf-switch.on { background: var(--lead); }
.sf-switch.on::after { transform: translateX(24px); }
.sf-sort-mobile { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
@media (min-width: 768px) { .sf-sort-mobile { display: none; } }
.sf-sort-mobile a {
    height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-weight: 700; font-size: 12px;
    text-transform: uppercase; letter-spacing: .025em; background: var(--surface); border: 1px solid var(--surface-border); color: #64748b;
}
.sf-sort-mobile a.active { background: var(--lead); border-color: var(--lead); color: #fff; }
.sf-genres-label { font-weight: 800; font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: .24em; color: var(--muted); padding: 0 4px; margin-bottom: 12px; }
.sf-chips { position: relative; margin-bottom: 32px; }
.sf-chips .swiper { overflow: hidden; }
.sf-chips .swiper-slide { width: auto; }
.sf-chip {
    display: block; padding: 8px 20px; border-radius: 9999px; font-weight: 700; font-size: 14px; line-height: 20px; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--surface-border); color: var(--chip-color); transition: all .15s;
}
html.light .sf-chip:hover { border-color: var(--lead); color: var(--lead); }
.sf-chip.active { background: var(--lead); border-color: var(--lead); color: #fff !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1); }
.sf-chips-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 28px; height: 28px; border-radius: 9999px;
    background: rgba(0, 0, 0, .6) !important; color: var(--lead) !important; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.sf-chips-arrow.prev { left: 0; }
.sf-chips-arrow.next { right: 0; }
.sf-chips-arrow.swiper-button-disabled { opacity: 0; pointer-events: none; }

.sf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .sf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1280px) { .sf-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sf-grid.is-channels { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 480px) { .sf-grid.is-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sf-grid.is-channels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .sf-grid.is-channels { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sf-empty { text-align: center; padding: 64px 16px; color: var(--muted); font-weight: 600; }
.sf-empty i { display: block; font-size: 40px; margin-bottom: 16px; color: var(--lead); }
.sf-empty a { display: inline-block; margin-top: 20px; padding: 10px 24px; border-radius: 9999px; background: var(--lead); color: #fff !important; font-weight: 700; font-size: 14px; }

/* ---------- Paginação ---------- */
.sf-pagination { margin-top: 48px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.sf-pagination-bar {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px; border-radius: 24px;
    border: 1px solid var(--surface-border); background: var(--pager-bg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
}
.sf-page-item {
    height: 44px; min-width: 44px; padding: 0 16px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 900; font-size: 14px; border: 1px solid var(--surface-border); background: var(--surface); color: var(--secondary) !important;
}
html.light .sf-page-item:not(.current):not(.disabled):hover { background: var(--lead); border-color: var(--lead); color: #fff !important; }
.sf-page-item.current { background: var(--lead); color: #fff !important; border-color: transparent; box-shadow: var(--shadow-lg); }
.sf-page-item.nav { font-size: 12px; text-transform: uppercase; letter-spacing: .025em; }
.sf-page-item.nav i { font-size: 10px; }
.sf-page-item.disabled { color: var(--disabled-text) !important; pointer-events: none; }
.sf-page-ellipsis { display: inline-flex; align-items: center; color: var(--disabled-text); padding: 0 4px; }
.sf-pagination-caption { font-weight: 700; font-size: 12px; color: var(--muted); }

/* ---------- Banners (configurados no admin) ---------- */
.sf-banners { display: grid; gap: 16px; }
@media (min-width: 768px) { .sf-banners.cols-2 { grid-template-columns: 1fr 1fr; } }
.sf-banner { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--surface-border); box-shadow: var(--shadow-lg); }
.sf-banner img { width: 100%; height: auto; }

/* ---------- Rodapé ---------- */
.sf-footer { display: none; position: relative; overflow: hidden; border-top: 1px solid var(--footer-border); background: var(--bg); }
@media (min-width: 1024px) { .sf-footer { display: block; } }
.sf-footer-inner { position: relative; z-index: 1; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.sf-footer .sf-logo span { font-size: 24px; }
.sf-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; font-weight: 500; font-size: 14px; }
.sf-footer-links a:hover { color: var(--lead); text-decoration: underline; }
.sf-footer-copy { font-size: 12px; margin: 0; }
.sf-footer-glow { position: absolute; bottom: -50%; width: 384px; height: 384px; border-radius: 9999px; filter: blur(8rem); opacity: .1; pointer-events: none; }
.sf-footer-glow.blue { left: 33%; background: #2563eb; }
.sf-footer-glow.red { right: 33%; background: var(--lead); }

/* ---------- Barra inferior (mobile) ---------- */
.sf-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(65px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--tabbar-bg); border-top: 1px solid var(--tabbar-border); box-shadow: var(--tabbar-shadow);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
@media (min-width: 1024px) { .sf-tabbar { display: none; } }
@media (max-width: 1023.98px) { body.sf { padding-bottom: 5rem; } }
.sf-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text); position: relative; }
.sf-tab i { font-size: 18px; line-height: 28px; transition: transform .2s var(--ease), color .2s; }
.sf-tab span { font-weight: 500; font-size: 10px; line-height: 15px; }
.sf-tab.active { color: var(--lead); }
.sf-tab.active i { transform: scale(1.1); }
.sf-tab-extras.open i { transform: rotate(45deg); color: var(--lead); }
.sf-extras {
    position: absolute; bottom: 100%; right: 16px; margin-bottom: 16px; min-width: 190px; padding: 8px; border-radius: 12px;
    background: var(--tabbar-bg); border: 1px solid rgba(255, 255, 255, .1); box-shadow: var(--shadow-2xl);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); display: none;
}
html.light .sf-extras { border-color: rgba(0, 0, 0, .08); }
.sf-extras.open { display: block; }
.sf-extras::after {
    content: ''; position: absolute; right: 28px; bottom: -7px; width: 12px; height: 12px; transform: rotate(45deg);
    background: inherit; border-right: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.sf-extras a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; font-weight: 500; font-size: 14px; color: var(--text); }
.sf-extras a:hover { background: var(--menu-hover); }
.sf-extras a i { width: 20px; text-align: center; }

/* ---------- Toast ---------- */
.sf-toast {
    position: fixed; right: 20px; bottom: 20px; z-index: 10000; background: #16a34a; color: #fff; padding: 8px 16px; border-radius: 8px;
    font-weight: 700; font-size: 14px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
    opacity: 0; transform: translateY(40px); transition: all .3s var(--ease); pointer-events: none;
}
.sf-toast.error { background: #dc2626; }
.sf-toast.show { opacity: 1; transform: none; }
@media (max-width: 1023.98px) { .sf-toast { bottom: 84px; left: 16px; right: 16px; text-align: center; } }

/* ---------- Menu do usuário ---------- */
.sf-user-menu {
    position: absolute; top: calc(100% + 12px); right: 0; min-width: 220px; padding: 8px; border-radius: 12px; z-index: 130;
    background: var(--tabbar-bg); border: 1px solid var(--pill-border); box-shadow: var(--shadow-2xl);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); display: none; color: var(--text);
}
.sf-user-menu.open { display: block; }
.sf-user-menu .sf-user-name { padding: 8px 12px 12px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px; }
.sf-user-menu .sf-user-name small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.sf-user-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.sf-user-menu a:hover { background: var(--menu-hover); }
.sf-user-menu a i { width: 18px; text-align: center; }
.sf-user-wrap { position: relative; }

/* Modo TV: foco visível */
body.sf.tv-mode .tv-focused, body.sf.tv-mode :focus-visible { outline: 3px solid var(--lead); outline-offset: 3px; }

/* ---------- Modal de trailer ---------- */
.sf-modal { position: fixed; inset: 0; z-index: 10001; background: rgba(11, 17, 32, .8); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sf-modal-box { position: relative; width: 100%; max-width: 960px; border-radius: 22px; overflow: hidden; background: #08111A; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 35px 120px rgba(15, 23, 42, .28); }
.sf-modal-video { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; }
.sf-modal-video iframe { width: 100%; height: 100%; border: 0; }
.sf-modal-empty { font-size: 15px; font-weight: 600; color: rgba(237, 231, 221, .7); padding: 24px; text-align: center; }
.sf-modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 9999px; background: rgba(0, 0, 0, .6) !important; color: #fff !important; font-size: 20px; display: flex; align-items: center; justify-content: center; }

/* ---------- Detalhes ---------- */
.sf-detail-hero { height: auto; min-height: 640px; }
@media (min-width: 1024px) { .sf-detail-hero { min-height: 760px; } }
.sf-detail-hero .sf-slide { position: absolute; }
.sf-detail-hero .sf-slide-content { position: relative; min-height: inherit; padding: 120px 0 64px; }
.sf-detail-hero .sf-slide-content .sf-container { margin-top: 0; }
.sf-detail-layout { display: flex; align-items: center; gap: 48px; }
.sf-detail-poster { display: none; flex-shrink: 0; width: 280px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .1); }
.sf-detail-poster img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .sf-detail-poster { display: block; } }
.sf-detail-desc { -webkit-line-clamp: 6; max-width: 680px; }
.sf-badges-inline { position: static; display: inline-flex; }
.sf-btn-ghost .sf-btn-label { font-size: 15px; font-weight: 700; }
@media (max-width: 639px) {
    .sf-hero-buttons { flex-wrap: wrap; }
    .sf-btn-ghost .sf-btn-label { display: none; }
}

.sf-episodes { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .sf-episodes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sf-episodes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1280px) { .sf-episodes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sf-episode { display: block; }
.sf-episode-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--placeholder); box-shadow: var(--shadow-lg); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.sf-episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sf-episode-thumb img.is-fallback { filter: brightness(.6); }
.sf-episode-thumb .sf-badges { bottom: 8px; left: auto; right: 8px; }
.sf-episode-number { position: absolute; top: 8px; left: 8px; background: #000; color: #fff; padding: 4px 8px; border-radius: 6px; font-weight: 900; font-size: 10px; line-height: 15px; }
.sf-episode-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .3s var(--ease); }
.sf-episode-play i { width: 52px; height: 52px; border-radius: 9999px; background: var(--lead); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; padding-left: 3px; box-shadow: var(--shadow-lg); }
.sf-episode:hover .sf-episode-thumb { transform: scale(1.02); box-shadow: 0 0 0 2px rgba(59, 130, 246, .5), var(--shadow-2xl); }
.sf-episode:hover .sf-episode-play { opacity: 1; }
.sf-episode:hover .sf-card-title { color: var(--lead); }
.sf-episode-overview { margin: 8px 0 0; font-size: 12px; line-height: 18px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.sf-carousel.is-cast .swiper-slide { width: 128px; }
@media (min-width: 768px) { .sf-carousel.is-cast .swiper-slide { width: 150px; } }
.sf-person { text-align: center; }
.sf-person-photo { width: 100%; aspect-ratio: 1; border-radius: 9999px; overflow: hidden; background: var(--placeholder); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 32px; border: 2px solid var(--surface-border); }
.sf-person-photo img { width: 100%; height: 100%; object-fit: cover; }
.sf-person strong { display: block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--card-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-person span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-detail-hero { min-height: 0; }
@media (min-width: 1024px) { .sf-detail-hero { min-height: 640px; } }
.sf-detail-hero .sf-slide-content { padding: 104px 0 88px; }
.sf-detail-hero .sf-hero-fade { height: 80px; }
.sf-detail-hero + .sf-rows { margin-top: 0; }

/* ---------- Página de busca ---------- */
.sf-search-page { max-width: 720px; margin: 0 auto 32px; }
.sf-search-page .sf-search-input-wrap input { background: var(--surface); border-color: var(--surface-border); color: var(--text); }
