/* =============================================================
   TrackList — Tema escuro (navy #0A0A14, acento roxo #7C3AED)
   Tokens, reset, shell e páginas.
   Construído a partir dos mockups mockups/ChatGPT (fonte da verdade).

   REGRA DE OURO: nenhuma cor literal fora deste bloco :root.
   Alfas derivados de um token usam rgb(var(--x-rgb) / a), nunca rgba(r,g,b,a).

   Excecoes, e o porque de cada uma:
   - .app-topbar-art mask-image (#000): mascara le luminancia/alfa, nao e cor.
   - .trailer-overlay (#000): fundo de video em tela cheia, preto de verdade.
   - .settings-toggle::after (#fff): knob do switch, branco em qualquer tema.
   - Detail.razor (#FF0000): logo do YouTube, cor de marca de terceiro.
   - rgba(0,0,0,a) dentro dos tokens --shadow-*: sombra e preto, nao tema.
   ============================================================= */

/* ---------- Design Tokens ---------- */
:root,
[data-theme="dark"] {
    /* Background hierarchy.
       --bg-2 e RECUADO (tracks, insets, celulas dim) e --surface-2 e ELEVADO
       (tiles, inputs, hover). No tema claro a relacao era a mesma, invertida. */
    --bg: #0a0a14;
    --bg-2: #0f0f1e;
    --surface: #141428;
    --surface-2: #1a1a32;
    --surface-3: #22223c;
    /* Vidro das barras fixas (topbar, bottom-nav, back flutuante).
       Opacidade alta de proposito: se o backdrop-filter precisar cair por causa
       do bug de compositing do WebView, a legibilidade nao vai junto. */
    --surface-glass: rgba(14, 14, 26, 0.82);
    --bg-glow: radial-gradient(
        120% 70% at 50% -8%,
        rgb(var(--primary-rgb) / 0.22) 0%,
        rgb(var(--primary-rgb) / 0.05) 42%,
        transparent 72%
    );

    /* Primary accent — roxo */
    --primary: #7c3aed;
    --primary-strong: #6d28d9;
    /* Roxo legivel SOBRE fundo escuro. Use este para texto/icone roxo;
       --primary e para preenchimento. */
    --primary-bright: #a78bfa;
    --primary-soft: rgb(var(--primary-rgb) / 0.16);
    --glow-primary: 0 0 0 1px rgb(var(--primary-rgb) / 0.35), 0 8px 24px rgb(var(--primary-rgb) / 0.35);
    --glow-primary-sm: 0 4px 14px rgb(var(--primary-rgb) / 0.3);

    /* Text hierarchy */
    --text: #ffffff;
    --text-2: #a9aec4;
    --text-3: #767c94;
    --text-on-primary: #ffffff;

    /* Borders */
    --border: rgba(255, 255, 255, 0.07);
    --border-2: rgba(255, 255, 255, 0.12);
    --border-strong: rgb(var(--primary-rgb) / 0.45);

    /* Rating brand colors */
    --imdb: #f5c518;
    --tomato: #fa320a;

    /* Semantic */
    --success: #22c55e;
    --warning: #f5a524;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Canais RGB dos tokens acima.
       Servem para derivar transparencias com rgb(var(--x-rgb) / alpha) em vez de
       repetir o literal rgba(r,g,b,a) — assim uma troca de tema propaga sozinha. */
    --primary-rgb: 124 58 237;
    --surface-rgb: 20 20 40;
    --imdb-rgb: 245 197 24;
    --tomato-rgb: 250 50 10;
    --success-rgb: 34 197 94;
    --warning-rgb: 245 165 36;
    --danger-rgb: 239 68 68;
    --info-rgb: 59 130 246;

    /* List tints — no escuro sao lavagens translucidas, nao pasteis opacos.
       O par -fg e a cor de frente (icone/texto) que vai por cima do tint. */
    --tint-lavender: rgb(139 92 246 / 0.16);
    --tint-blue: rgb(var(--info-rgb) / 0.16);
    --tint-red: rgb(var(--danger-rgb) / 0.16);
    --tint-green: rgb(var(--success-rgb) / 0.16);
    --tint-amber: rgb(var(--warning-rgb) / 0.16);
    --tint-lavender-fg: #a78bfa;
    --tint-blue-fg: #60a5fa;
    --tint-red-fg: #f87171;
    --tint-green-fg: #4ade80;
    --tint-amber-fg: #fbbf24;

    /* Elevacao. Substitui 17 box-shadows distintos calibrados para fundo claro.
       Regra: blur <= 4px -> 1; 8-20px -> 2; > 20px -> 3; sheet/bottom -> sheet. */
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.55);
    --shadow-sheet: 0 -8px 32px rgba(0, 0, 0, 0.6);

    /* Typography */
    --font-display: "Poppins", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
    --font-hand: "Caveat", "Segoe Script", cursive;
    --font-title: var(--font-display);

    /* Radii */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* Layout */
    /* Altura da topbar. O .floating-back-btn se posiciona a partir daqui para
       cair exatamente sobre o slot que .page-header reserva — se os dois se
       desencontrarem, o "voltar" da pagina reaparece e ficam DUAS setas. */
    --topbar-height: 60px;
    --nav-height: 72px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --blur: 20px;

    /* Aliases de compatibilidade.
       Login.razor e Register.razor trazem blocos <style> proprios escritos contra
       este vocabulario, que nunca existiu — ate aqui eles caiam nos fallbacks
       (o acento virava #6b21a8, que nem e o --primary). Mapear resolve as duas
       telas sem tocar nelas, e mantem o tema com um unico ponto de verdade. */
    --bg-primary: var(--bg);
    --bg-card: var(--surface);
    --bg-input: var(--surface-2);
    --text-primary: var(--text);
    --text-secondary: var(--text-2);
    --border-color: var(--border);
    --accent-color: var(--primary);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}
html,
body {
    margin: 0;
    padding: 0;
}

body {
    /* O body nao rola — quem rola e .main-content —, entao o glow pode ser um
       gradiente fixo simples, sem background-attachment. */
    background: var(--bg-glow), var(--bg);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100vh;
    position: fixed;
    inset: 0;
}

#app {
    height: 100vh;
    overflow: hidden;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: inherit;
}
p {
    margin: 0;
}
button {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
input,
textarea {
    font: inherit;
    color: inherit;
}
a {
    color: var(--primary);
    text-decoration: none;
}
::selection {
    background: var(--primary-soft);
    color: var(--text);
}

/* ---------- Safe area ---------- */
.status-bar-safe-area {
    height: env(safe-area-inset-top, 0);
    background: var(--bg);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

/* ---------- FaIcon ---------- */
.fa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex: 0 0 auto;
    color: currentColor;
}
.fa-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------- App Shell ---------- */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
    -webkit-overflow-scrolling: touch;
}
.main-content::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* ---------- Top Bar ---------- */
.app-topbar {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 20px 12px;
    /* Transparente para o glow do body atravessar a barra. */
    background: transparent;
    min-height: var(--topbar-height);
    overflow: hidden;
}

/* Arte recortada do mockup, sangrando pela direita.
   A mascara em gradiente dissolve a borda esquerda no fundo, entao nao existe
   emenda visivel entre a foto e o app. Ver tools/extract-mockup-assets.ps1. */
.app-topbar-art {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 46%;
    background: url("../img/header-art.png") right center / cover no-repeat;
    opacity: 0.7;
    pointer-events: none;
    /* Dissolve a borda esquerda no fundo e alivia o miolo, onde ficam os botoes
       de acao — a arte tem lettering justamente ali. */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%, rgba(0, 0, 0, 0.75) 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 55%, rgba(0, 0, 0, 0.75) 100%);
}

.app-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}
.app-brand-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, var(--primary-bright), var(--primary));
    color: var(--text-on-primary);
    box-shadow: var(--glow-primary-sm);
}
.app-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.app-brand-name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text);
}
.app-brand-name span {
    color: var(--primary-bright);
}
.app-brand-tag {
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
    white-space: nowrap;
    /* A arte passa por tras em telas estreitas; a sombra segura a legibilidade. */
    text-shadow: 0 1px 4px var(--bg);
}

.app-topbar-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.topbar-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-2);
    background: var(--surface-glass);
    color: var(--text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.topbar-btn:active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
}
.topbar-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    border: 1.5px solid var(--bg);
}

/* ---------- Botão "voltar" global flutuante ---------- */
/* Renderizado no Main.razor FORA do .main-content (o container que rola),
   na mesma camada do bottom-nav — por isso fica sempre visível, em qualquer
   tela e em qualquer posição de rolagem. Alinhado à linha do cabeçalho das
   páginas (safe-area + topbar 44px + 8px de respiro). */
.floating-back-btn {
    position: fixed;
    /* topbar + o padding-top de .page-header (8px): cai sobre o slot reservado. */
    top: calc(env(safe-area-inset-top, 0px) + var(--topbar-height) + 8px);
    left: 20px;
    z-index: 60;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-2);
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bright);
    box-shadow: var(--shadow-2);
}
.floating-back-btn:active {
    background: var(--primary);
    color: var(--text-on-primary);
}

/* ---------- Bottom Navigation ---------- */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-glass);
    border-top: 1px solid var(--border);
    padding: 10px 20px calc(14px + var(--safe-bottom));
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 50;
    backdrop-filter: blur(var(--blur)) saturate(1.1);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(1.1);
}
.bottom-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-3);
    padding: 4px 0;
    min-width: 52px;
    transition: color 0.2s;
}
.bottom-nav button .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.bottom-nav button .nav-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.bottom-nav button.active {
    color: var(--primary-bright);
    font-weight: 700;
}
.bottom-nav button.active .nav-label {
    font-weight: 700;
}
/* Sublinhado roxo curto sob a aba ativa (mockups). */
.bottom-nav button.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--primary);
    box-shadow: var(--glow-primary-sm);
}

/* ---------- Page Wrappers ---------- */
.home-page,
.search-page,
.lists-page,
.stats-page,
.profile-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.detail-page {
    padding: 0 0 24px;
    min-height: 100%;
}

/* ---------- Loading / Empty / Error ---------- */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 80px 20px;
    /* ancora o overlay do SfSpinner dentro deste container */
    position: relative;
}
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-text {
    font-size: 14px;
    color: var(--text-2);
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Spinner inline (dentro de botoes / carregar-mais) — herda a cor do texto */
.inline-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    opacity: 0.9;
}

/* SfSpinner (loading de pagina) alinhado ao tema claro/roxo */
.tl-spinner.e-spinner-pane,
.tl-spinner .e-spinner-pane {
    background: transparent;
}
.tl-spinner .e-spin-material,
.tl-spinner .e-spin-bootstrap5,
.tl-spinner .e-spin-bootstrap4,
.tl-spinner .e-spin-bootstrap,
.tl-spinner .e-spin-fabric,
.tl-spinner .e-spin-fluent2,
.tl-spinner .e-spin-tailwind {
    stroke: var(--primary);
}
.tl-spinner .e-spin-label {
    color: var(--text-2);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

/* SfToast — feedback roxo discreto na base da tela */
.tl-toast-success.e-toast-container {
    z-index: 9999;
}
.tl-toast-success .e-toast {
    background: var(--primary);
    color: var(--text-on-primary);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    box-shadow: 0 4px 20px rgb(var(--primary-rgb) / 0.30);
    border: none;
}
.tl-toast-success .e-toast .e-toast-message {
    color: var(--text-on-primary);
}
.tl-toast-success .e-toast .e-toast-icon {
    display: none;
}

/* SfSkeleton — placeholder animado tema claro/roxo */
.tl-skeleton.e-skeleton {
    background: var(--bg-2);
    border-radius: 8px;
}
.tl-skeleton.sk-poster {
    border-radius: 12px;
    flex-shrink: 0;
}
.tl-skeleton.sk-chip {
    border-radius: 20px;
}
.tl-skeleton.sk-title {
    border-radius: 6px;
}
.tl-skeleton.sk-year {
    border-radius: 6px;
}

/* layout do skeleton do Detail */
.detail-skeleton {
    display: flex;
    flex-direction: column;
}
.detail-skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}
.detail-skeleton-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
}
.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--text-3);
    margin-bottom: 16px;
}
.empty-state p {
    font-size: 15px;
    color: var(--text-2);
    font-weight: 500;
}

.error-box {
    background: var(--tint-red);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 13px;
    font-weight: 500;
}
.success-box {
    background: var(--tint-green);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 13px;
    font-weight: 500;
}

/* ---------- Section Header ---------- */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 22px 0 12px;
}
.section-head h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.section-head a,
.section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

/* ---------- Page Hero (título grande + ação; Buscar, Listas) ---------- */
.page-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 18px;
}
.page-hero-copy h1 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}
.page-hero-copy p {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 6px;
}
.page-hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--primary-soft);
    color: var(--primary-bright);
    box-shadow: var(--glow-primary-sm);
}
.page-hero-action:active {
    background: var(--primary);
    color: var(--text-on-primary);
}

/* ---------- Seasons hero (backdrop da série + título) ---------- */
.seasons-hero {
    position: relative;
    margin: 0 -20px 18px;
    padding: 90px 20px 18px;
    overflow: hidden;
}
.seasons-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}
/* Scrim: o texto precisa vencer qualquer backdrop, inclusive claro. */
.seasons-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.35) 0%, var(--bg) 92%);
}
.seasons-hero-copy {
    position: relative;
    z-index: 1;
}
.seasons-hero-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-2);
    margin-bottom: 4px;
}
.seasons-hero-copy h1 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}
.seasons-hero-copy p {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 6px;
    max-width: 28ch;
}

/* ---------- Chips / Pills ---------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    background: transparent;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s,
        color 0.2s;
}
/* Ativo e roxo SOLIDO com glow (mockups). Roxo sobre roxo-translucido, que era
   o padrao do tema claro, fica com contraste ~2:1 no escuro — ilegivel. */
.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
    font-weight: 600;
    box-shadow: var(--glow-primary-sm);
}
.chip .fa-icon {
    width: 12px;
    height: 12px;
}

/* ---------- Star Rating ---------- */
.star-rating {
    display: inline-flex;
    gap: 4px;
}
.star {
    width: 20px;
    height: 20px;
    color: var(--text-3);
    background: none;
    border: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s;
}
.star.active {
    color: var(--imdb);
}
.star .fa-icon {
    width: 18px;
    height: 18px;
    color: inherit;
}

/* ---------- Rating Badge ---------- */
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.rating-badge .fa-icon {
    width: 14px;
    height: 14px;
    color: var(--imdb);
}

/* ---------- Media Card (poster) ---------- */
.media-card {
    flex: 0 0 auto;
    width: 110px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.2s ease;
}
.media-card:active {
    transform: scale(0.97);
}

.media-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
}
.media-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.media-card:hover .media-poster {
    border-color: var(--primary);
}

/* ---------- Poster com fallback (PosterImage / PosterPlaceholder) ---------- */
.poster-media {
    position: relative;
    width: 100%;
    height: 100%;
}
.poster-media > svg.poster-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.poster-media > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-info {
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.media-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.media-year {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
}

/* Rating row inside card */
.media-ratings {
    display: flex;
    gap: 8px;
    margin-top: 3px;
}
.media-rating-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
}
.media-rating-item.imdb .fa-icon {
    color: var(--imdb);
}
.media-rating-item.tomato .fa-icon {
    color: var(--tomato);
}
.media-rating-item.user .fa-icon {
    color: var(--primary);
}

/* Progress bar (compact) */
.media-progress {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.media-progress-bar {
    flex: 1;
    height: 3px;
    background: var(--bg-2);
    border-radius: 999px;
    overflow: hidden;
}
.media-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.3s;
}
.media-progress-pct {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-2);
}

/* Horizontal scroll container */
.media-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.media-scroll::-webkit-scrollbar {
    display: none;
}

/* Carrossel "Títulos semelhantes" — nota IMDb sob o poster, em tom pastel */
.similar-nota {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
}
.similar-nota .fa-icon {
    color: var(--imdb);
}

/* ---------- ===================================================
   HOME PAGE (Tela 26)
   ============================================================= */

/* Greeting */
.home-greeting {
    padding: 6px 0 16px;
}
.home-greeting-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 2px;
}
.home-greeting h1 {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.home-greeting-wave {
    font-size: 26px;
    vertical-align: 4px;
}
.home-greeting p {
    font-size: 15px;
    color: var(--text-2);
    margin-top: 6px;
}

/* Stats strip */
.home-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}
.home-stats.two {
    grid-template-columns: 1fr 1fr;
}
.home-stat {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 8px;
    text-align: left;
    cursor: pointer;
}
/* Cada tile ganha o proprio tint e um selo de icone, como nos mockups. */
.home-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    margin-bottom: 8px;
}
.home-stat .stat-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.home-stat .stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
    margin-top: 2px;
}
.home-stat.movies {
    background: var(--tint-lavender);
    border-color: transparent;
}
.home-stat.movies .home-stat-icon {
    background: rgb(var(--primary-rgb) / 0.28);
    color: var(--tint-lavender-fg);
}
.home-stat.movies .stat-value {
    color: var(--tint-lavender-fg);
}
.home-stat.series {
    background: var(--tint-amber);
    border-color: transparent;
}
.home-stat.series .home-stat-icon {
    background: rgb(var(--warning-rgb) / 0.28);
    color: var(--tint-amber-fg);
}
.home-stat.series .stat-value {
    color: var(--tint-amber-fg);
}
.home-stat.active {
    background: var(--tint-blue);
    border-color: transparent;
}
.home-stat.active .home-stat-icon {
    background: rgb(var(--info-rgb) / 0.28);
    color: var(--tint-blue-fg);
}
.home-stat.active .stat-value {
    color: var(--tint-blue-fg);
}
.home-stat.eps {
    background: var(--tint-green);
    border-color: transparent;
}
.home-stat.eps .home-stat-icon {
    background: rgb(var(--success-rgb) / 0.28);
    color: var(--tint-green-fg);
}
.home-stat.eps .stat-value {
    color: var(--tint-green-fg);
}

/* Continue Watching — hero card */
.continue-hero {
    position: relative;
    height: 172px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 4px;
    /* No tema claro este bloco era um retangulo escuro dramatico contra #f5f6fa.
       Contra o navy do tema escuro ele sumiria, entao a diferenciacao passou a
       vir de um roxo elevado + borda + glow, nao mais do contraste de luminancia. */
    background:
        radial-gradient(
            120% 90% at 82% 8%,
            rgb(var(--primary-rgb) / 0.3) 0%,
            rgb(var(--primary-rgb) / 0) 52%
        ),
        linear-gradient(160deg, rgb(var(--primary-rgb) / 0.22) 0%, var(--surface) 55%, var(--bg) 100%);
    border: 1px solid var(--border-2);
    box-shadow: var(--glow-primary-sm);
}
.continue-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            46% 34% at 68% 30%,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0) 100%
        ),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.62) 100%);
    z-index: 1;
}
.continue-hero-content {
    position: absolute;
    left: 16px;
    right: 70px;
    bottom: 14px;
    z-index: 2;
}
.continue-hero-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-on-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.continue-hero-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}
.continue-hero-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 3px;
}
.continue-hero-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.continue-hero-track {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
}
.continue-hero-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-bright));
}
.continue-hero-pct {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-on-primary);
}
.continue-hero-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 8px 18px rgb(var(--primary-rgb) / 0.45);
    color: var(--text-on-primary);
}

/* Up Next — episode rows */
.upnext-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ep-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: var(--shadow-2);
    cursor: pointer;
    transition: border-color 0.2s;
}
.ep-row:active {
    border-color: var(--primary);
}
.ep-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex: none;
    overflow: hidden;
    background: var(--bg-2);
}
.ep-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ep-copy {
    flex: 1;
    min-width: 0;
}
.ep-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ep-meta {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ep-meta .avail {
    color: var(--success);
    font-weight: 600;
}
.ep-meta .dot-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-3);
    display: inline-block;
}
.ep-check {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex: none;
    border: 1.5px solid var(--primary);
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bright);
}

/* Coming Soon */
.soon-grid {
    display: flex;
    gap: 10px;
}
.soon-card {
    flex: 1;
    background: var(--surface-2);
    border-radius: 14px;
    padding: 12px;
}
.soon-date {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    color: var(--primary-bright);
    background: var(--primary-soft);
    border-radius: 8px;
    padding: 4px 8px;
    letter-spacing: 0.4px;
}
.soon-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-top: 8px;
    line-height: 1.25;
}
.soon-meta {
    font-size: 11px;
    color: var(--text-2);
    margin-top: 3px;
}

/* Recommendations — poster grid */
.recs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.recs-section {
    margin-bottom: 36px;
}
.recs-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}
.recs-tab {
    flex: 1;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}
.recs-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
    font-weight: 600;
    box-shadow: var(--glow-primary-sm);
}
.recs-para-voce-vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px;
    color: var(--text-3);
    text-align: center;
}
.recs-para-voce-vazio .fa-icon {
    color: var(--primary);
    opacity: 0.5;
}
.recs-para-voce-vazio p {
    font-size: 13px;
    line-height: 1.5;
    max-width: 240px;
    margin: 0;
}
.recs-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px;
    font-family: 'Poppins', sans-serif;
}
.rec-card {
    flex: 1;
    cursor: pointer;
    transition: transform 0.2s;
}
.rec-card:active {
    transform: scale(0.97);
}
.rec-poster {
    height: 138px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-shadow: var(--shadow-2);
}
.rec-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* PosterImage dentro do rec-poster: o wrapper .poster-media precisa sair do
   fluxo (como o img antigo), senão vira item flex ao lado do label e o cartaz
   colapsa numa lasca vertical. inset dimensiona; width/height auto anulam o
   100% base do .poster-media. */
.rec-poster > .poster-media {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
}
.rec-poster-label {
    position: relative;
    z-index: 1;
    font-weight: 800;
    color: var(--text-on-primary);
    text-align: center;
    letter-spacing: 1.5px;
    line-height: 1.3;
    padding-bottom: 14px;
    font-size: 13px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.rec-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.45) 100%
    );
}
.rec-rate {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.rec-rate .fa-icon {
    width: 14px;
    height: 14px;
    color: var(--imdb);
}
/* Selo discreto de Tomatometer no card (só aparece quando a mídia tem a nota). */
.rec-rate-tomato {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
}
.rec-tipo {
    display: block;
    font-size: 10px;
    color: var(--primary-bright);
    margin: 4px 0 2px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
}

/* ---------- ===================================================
   GENERIC / SHARED (usado por múltiplas telas futuras)
   ============================================================= */

/* Page header com botão voltar */
.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 16px;
}
.page-back-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bright);
    flex: none;
}
.page-back-btn:active {
    background: var(--primary);
    color: var(--text-on-primary);
}
/* O "voltar" agora é o .floating-back-btn global (Main.razor), fora do
   container de rolagem — os botões de cabeçalho por página ficam ocultos
   para não duplicar. Só o "voltar" real (primeiro filho do cabeçalho) some;
   os outros .page-back-btn reaproveitados (filtro na Busca, "+" no detalhe da
   lista, setas de ano na Retrospectiva) continuam no fluxo normal. */
.page-header > .page-back-btn:first-child,
.page-hero > .page-back-btn:first-child,
.home-greeting > .page-back-btn:first-child,
.detail-back-btn {
    display: none;
}
/* O back textual do Sync some, mas mantém o espaço (topbar própria da tela). */
.sync-audit-back {
    visibility: hidden;
}
/* Reserva espaço à esquerda nos cabeçalhos que tinham "voltar" para o título
   não ficar por baixo do botão flutuante quando a página está no topo. */
.page-header:has(> .page-back-btn:first-child),
.page-hero:has(> .page-back-btn:first-child),
.home-greeting:has(> .page-back-btn:first-child) {
    padding-left: 46px;
}
.page-header h1 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* Stats row (reusable) */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 18px 0;
    margin: 8px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.stat-item {
    text-align: center;
    padding: 0 10px;
    border-right: 1px solid var(--border);
}
.stat-item:last-child {
    border-right: 0;
}
.stat-item-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.stat-item-label {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
    font-weight: 500;
}

/* Favorite Genres */
.fg-page {
    padding: 0 16px 32px;
}
.fg-hint {
    font-size: 13px;
    color: var(--text-2);
    margin: 0 0 20px;
    line-height: 1.5;
}
.fg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.fg-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
}
.fg-chip--on {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
    font-weight: 600;
    box-shadow: var(--glow-primary-sm);
}
.fg-chip .fa-icon {
    width: 11px;
    height: 11px;
}
.fg-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.fg-ok {
    font-size: 13px;
    color: var(--success);
    text-align: center;
    padding: 8px 0;
}

/* Button primary */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--text-on-primary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition:
        background 0.2s,
        transform 0.15s;
}
.btn-primary:active {
    background: var(--primary-strong);
    transform: scale(0.98);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button outline */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition:
        background 0.2s,
        color 0.2s,
        transform 0.15s;
}
.btn-outline:active {
    background: var(--primary-soft);
    transform: scale(0.98);
}
.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Input field */
.input-field {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.input-field::placeholder {
    color: var(--text-3);
}
.input-field:focus {
    border-color: var(--primary);
}

/* Badge / tag */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-bright);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.title-with-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.media-status-badge {
    font-size: 10px;
    letter-spacing: 0.02em;
    padding: 3px 9px;
}
.media-status-badge .fa-icon,
.watched-badge .fa-icon {
    margin-right: 4px;
}
.media-status-assistido,
.watched-badge {
    background: rgb(var(--success-rgb) / 0.14);
    color: var(--success);
}
.media-status-assistindo {
    background: rgb(var(--primary-rgb) / 0.14);
    color: var(--primary);
}
.media-status-abandonado {
    background: rgb(var(--danger-rgb) / 0.14);
    color: var(--danger);
}

/* Notification dot */
.notify-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    border: 1.5px solid var(--surface);
}

/* ---------- ===================================================
   CONTINUE WATCHING (Tela 23)
   ============================================================= */
.continue-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.continue-header {
    padding: 8px 0 18px;
}
.continue-header h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
/* Reuse continue-hero + media-scroll from Home */

/* ---------- ===================================================
   DETAIL PAGE (Tela 8)
   ============================================================= */
.detail-page {
    padding: 0 0 80px;
    min-height: 100%;
    position: relative;
}

/* Backdrop hero */
.detail-backdrop {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(160deg, rgb(var(--primary-rgb) / 0.22) 0%, var(--surface) 55%, var(--bg) 100%);
}
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, var(--bg) 100%);
    z-index: 1;
}

/* Back button on backdrop — display:none vem da regra em .page-header (voltar
   real e o .floating-back-btn global do Main.razor); aqui só o posicionamento,
   sem redeclarar display, senão essa regra (mesma especificidade, mais abaixo
   no arquivo) reativa o botão e duplica a seta. */
.detail-back-btn {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0) + 12px);
    left: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    /* Sem backdrop-filter: no WebView do Android ele promove o botao a uma camada
       composta que nao acompanha o scroll (fica "preso" no topo). Fundo solido o
       suficiente para legibilidade, igual ao .detail-add-btn que rola normal. */
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    align-items: center;
    justify-content: center;
    color: var(--text-on-primary);
}

/* Badge on backdrop */
.detail-type-badge {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0) + 14px);
    left: 64px;
    z-index: 10;
    padding: 5px 12px;
    background: var(--primary);
    color: var(--text-on-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 999px;
}

/* Detail body */
.detail-body {
    padding: 16px 20px 0;
    position: relative;
    z-index: 2;
}
.detail-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 4px;
}
.detail-years {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 6px;
}
.detail-years .separator {
    margin: 0 6px;
    color: var(--text-3);
}

/* Rating row */
.detail-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.detail-rating-star {
    color: var(--imdb);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
}
.detail-rating-star .fa-icon {
    width: 18px;
    height: 18px;
    color: var(--imdb);
}

/* Avaliações multi-fonte (IMDb / Rotten / minha) */
.detail-ratings {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0 16px;
}
.rating-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
}
.rating-chip .rc-src {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    opacity: 0.85;
}
.rating-chip.imdb { background: rgb(var(--imdb-rgb) / 0.18); color: var(--imdb); }
.rating-chip.tomato { background: rgb(var(--tomato-rgb) / 0.12); color: var(--tomato); }
.rating-chip.popcorn { background: rgb(var(--warning-rgb) / 0.16); color: var(--warning); }
.rating-chip.mine { background: var(--primary-soft); color: var(--primary-bright); }

.rt-score-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform-origin: 50% 70%;
}
.rt-score-icon::before { display: inline-block; }
.rt-score-icon.rt-tomato::before { content: '🍅'; }
.rt-score-icon.rt-popcorn::before { content: '🍿'; }
.rt-score.rotten .rt-score-icon.rt-tomato { filter: grayscale(.45) hue-rotate(55deg) saturate(.7); transform: rotate(12deg); }
.rt-score.rotten .rt-score-icon.rt-popcorn { filter: grayscale(.35) hue-rotate(45deg) saturate(.75); transform: rotate(16deg); }
.rt-score.certified .rt-score-icon { text-shadow: 0 0 0.35em rgb(var(--success-rgb) / 0.55); }
.rt-score-count {
    display: block;
    font-size: .72em;
    font-weight: 400;
    line-height: 1.1;
    opacity: .82;
    white-space: nowrap;
}
.media-rating-item.rt-score,
.rec-rate-tomato.rt-score { gap: 3px; }

/* Mini 5-estrelas (listas de assistidos) */
.mini-stars {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}
.mini-star {
    color: var(--text-3);
    display: inline-flex;
}
.mini-star .fa-icon {
    width: 13px;
    height: 13px;
}
.mini-star.on {
    color: var(--imdb);
}

/* Hero do topo: poster (esq.) + trailer, alinhados pela base do poster */
.detail-hero {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-top: -74px;   /* poster sobrepõe o backdrop */
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}
.detail-hero-trailer {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    padding-bottom: 4px;
}

/* Pôster sobreposto ao backdrop no Detail */
.detail-poster {
    width: 100px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-3);
    border: 3px solid var(--surface);
    background: var(--surface-2);
    position: relative;
    z-index: 2;
}
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.detail-section-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 8px 0 6px;
}

/* Genres */
.detail-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.detail-genre-tag {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-bright);
    font-size: 11px;
    font-weight: 600;
}

/* Summary */
.detail-summary {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 22px;
}

/* Cast/Crew */
.detail-meta-grid {
    display: grid;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    margin-bottom: 8px;
}
.detail-meta-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
}
.detail-meta-label {
    font-weight: 600;
    color: var(--text);
    min-width: 60px;
    flex: none;
}
.detail-meta-value {
    color: var(--text-2);
}
.detail-meta-person {
    color: var(--primary);
    cursor: pointer;
}
.detail-meta-person:active {
    opacity: 0.7;
}

/* Track/Status card */
.detail-track-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 14px;
}
.detail-track-status {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.status-chip {
    flex: 1;
    padding: 10px 8px;
    text-align: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-2);
    transition: all 0.2s;
}
.status-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
    box-shadow: var(--glow-primary-sm);
}

/* User rating */
.detail-user-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.detail-user-rating label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
}
.detail-user-stars {
    display: flex;
    gap: 4px;
}
.detail-user-star {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: none;
    border: 0;
    padding: 0;
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s;
}
.detail-user-star.filled {
    color: var(--primary);
}
.detail-user-star .fa-icon {
    width: 20px;
    height: 20px;
    color: inherit;
}

/* SfRating — estrelas do tema claro/roxo */
.tl-rating.e-rating .e-rating-item-list {
    gap: 4px;
}
.tl-rating.e-rating .e-rating-item .e-icons {
    font-size: 22px;
    color: var(--border);
}
.tl-rating.e-rating .e-rating-item.e-rating-selected .e-icons,
.tl-rating.e-rating .e-rating-item:hover .e-icons {
    color: var(--primary);
}
.tl-rating.e-rating .e-rating-item.e-rating-intermediate .e-icons {
    color: var(--primary-soft);
}

/* Ver detalhes button */
.detail-ver-btn {
    margin-top: 20px;
}

/* Botão de trailer YouTube (pill ao lado do poster) */
.btn-trailer-yt {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px 9px 12px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-2);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: box-shadow 0.2s, transform 0.15s;
}
.btn-trailer-yt .yt-mark {
    display: block;
    flex-shrink: 0;
}
.btn-trailer-yt:active {
    box-shadow: var(--shadow-2);
    transform: scale(0.97);
}

/* Player de trailer em tela cheia (in-app, paisagem) */
.trailer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trailer-frame,
.trailer-overlay iframe,
#yt-player {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.trailer-close {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0) + 10px);
    right: calc(env(safe-area-inset-right, 0) + 12px);
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- ===================================================
   SEASONS OVERVIEW (Tela 11)
   ============================================================= */
.seasons-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.season-card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.season-card-item:active {
    border-color: var(--primary);
}
.season-card-poster {
    width: 60px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: none;
    background: var(--bg-2);
}
.season-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.season-card-info {
    flex: 1;
    min-width: 0;
}
.season-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.season-card-meta {
    font-size: 12px;
    color: var(--text-2);
}
.season-card-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.season-card-progress-bar {
    width: 80px;
    height: 4px;
    background: var(--bg-2);
    border-radius: 999px;
    overflow: hidden;
}
.season-card-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
}
.season-card-progress-text {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
}
.season-card-arrow {
    color: var(--text-3);
    flex: none;
}

/* ---------- ===================================================
   SEASONS EPISODES (Tela 10)
   ============================================================= */
.episodes-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.episodes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 14px;
}
.episodes-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.episodes-mark-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 14px;
    border: 1px solid var(--primary);
    border-radius: 999px;
    background: transparent;
}
.episode-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.episode-card:last-child {
    border-bottom: 0;
}
.episode-number-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
    flex: none;
}
.episode-card.watched .episode-number-circle {
    background: var(--primary-soft);
    color: var(--primary-bright);
}
.episode-card-info {
    flex: 1;
    min-width: 0;
}
.episode-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.episode-card-meta {
    font-size: 12px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 6px;
}
.episode-card-dates {
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}
.episode-card-check.on {
    color: var(--primary);
}
.episode-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text);
}
.episode-card-rating .fa-icon {
    width: 11px;
    height: 11px;
    color: var(--imdb);
}
.episode-card-check {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    color: transparent;
    transition: all 0.2s;
}
.episode-card.watched .episode-card-check {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
}
.episode-card-check .fa-icon {
    width: 12px;
    height: 12px;
}

/* ---------- ===================================================
   EPISODE DETAIL (Tela 9)
   ============================================================= */
.epdetail-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.epdetail-still {
    width: 100%;
    height: 180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 8px 0 16px;
    background: var(--bg-2);
}
.epdetail-still img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.epdetail-code {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-soft);
    color: var(--primary-bright);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}
.epdetail-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 4px;
}
.epdetail-airdate {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 14px;
}
.epdetail-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.epdetail-rating-row .fa-icon {
    width: 16px;
    height: 16px;
    color: var(--imdb);
}
.epdetail-summary {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 20px;
}
.epdetail-actions {
    display: flex;
    gap: 10px;
}
.epdetail-mark-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.epdetail-mark-btn.watched {
    background: var(--primary);
    color: var(--text-on-primary);
    border: none;
}
.epdetail-mark-btn.unwatched {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.epdetail-three-btns {
    display: flex;
    gap: 8px;
    width: 100%;
}
.epdetail-action-btn {
    flex: 1;
    padding: 10px 8px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: none;
    transition: opacity 0.15s;
}
.epdetail-action-btn:active { opacity: 0.75; }
.epdetail-action-btn.iniciei {
    background: var(--primary-soft);
    color: var(--primary-bright);
}
.epdetail-action-btn.pausei {
    background: rgb(var(--warning-rgb) / 0.12);
    color: var(--warning);
}
.epdetail-action-btn.terminei {
    background: var(--primary);
    color: var(--text-on-primary);
}
.epdetail-action-btn.cancelar {
    background: var(--bg-2);
    color: var(--text-2);
}
.epdetail-pessoas-panel {
    margin-top: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}
.epdetail-pessoas-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}
.epdetail-pessoas-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.epdetail-pessoa-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}
.epdetail-pessoas-vazio {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 12px;
}
.epdetail-pessoas-vazio a { color: var(--primary); text-decoration: none; }
.epdetail-pessoas-actions {
    display: flex;
    gap: 8px;
}

/* ---------- ===================================================
   SEARCH PAGE (Tela 6) + RESULTS (Tela 7)
   ============================================================= */
.search-page {
    padding: 0 20px 24px;
    min-height: 100%;
}

/* Search bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    /* Borda roxa: nos mockups o campo de busca é o foco da tela. */
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 12px 18px;
    margin-bottom: 16px;
    box-shadow: var(--glow-primary-sm);
}
.search-bar:focus-within {
    border-color: var(--primary);
}
.search-bar-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--text-2);
}
.search-bar-clear .fa-icon {
    width: 14px;
    height: 14px;
    color: inherit;
}
.search-bar .fa-icon {
    width: 18px;
    height: 18px;
    color: var(--text-3);
    flex: none;
}
.search-bar input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: var(--text);
    font-family: var(--font-body);
}
.search-bar input::placeholder {
    color: var(--text-3);
}

/* Search sections */
.search-section {
    margin-bottom: 24px;
}
.search-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

/* Search result card */
.search-result-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.search-result-card:active {
    border-color: var(--primary);
}
.search-result-poster {
    width: 52px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: none;
    background: var(--bg-2);
}
.search-result-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-result-info {
    flex: 1;
    min-width: 0;
}
.search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-meta {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.search-result-add {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: var(--primary-soft);
    color: var(--primary-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    transition: all 0.2s;
}
.search-result-add.added {
    background: var(--primary);
    color: var(--text-on-primary);
}

/* ---------- ===================================================
   ADVANCED FILTERS (Tela 18)
   ============================================================= */
.filters-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.filter-group {
    margin-bottom: 20px;
}
.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
    font-weight: 600;
    box-shadow: var(--glow-primary-sm);
}
.filter-row {
    display: flex;
    gap: 12px;
}
.filter-row .input-field {
    flex: 1;
}
.filter-apply-btn {
    margin-top: 20px;
}

/* ---------- ===================================================
   FORMULARIOS (compartilhado: Login, Register, filtros)
   As regras .manual-* que viviam aqui foram removidas junto com a tela
   "Add Manually", que nunca chegou a existir como componente.
   ============================================================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.form-group .input-field,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.form-group select {
    appearance: none;
    /* Seta desenhada com dois gradientes (mesma tecnica de .lists-modal-field).
       Antes havia um data-URI literalmente truncado aqui, que era invalido e
       deixava o select sem indicador nenhum. */
    background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 32px;
}
.form-group textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}
.form-group .input-field:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}
.type-toggle {
    display: flex;
    gap: 8px;
}
.type-toggle-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}
.type-toggle-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
    box-shadow: var(--glow-primary-sm);
}

/* ---------- ===================================================
   LISTS (Tela 13)
   ============================================================= */
.lists-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.lists-header h1 {
    flex: 1;
}
.lists-add-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--text-on-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.lists-add-btn:active {
    background: var(--primary-strong);
    transform: scale(0.96);
}
.lists-create-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.lists-create-bar .input-field {
    flex: 1;
}
.list-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.list-card:active {
    border-color: var(--primary);
}
/* Lista favorita ganha destaque roxo, como no mockup. */
.list-card.is-fav {
    background: rgb(var(--primary-rgb) / 0.18);
    border-color: var(--border-strong);
    box-shadow: var(--glow-primary-sm);
}

/* Chips de tipo no topo da tela de listas. */
.lists-type-filter {
    margin: 0 0 14px;
}

/* Card destacado da "Quero Ver": atalho fixo acima da grade, distinto dos
   .list-card normais (a lista de sistema continua aparecendo na grade também). */
.list-featured-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgb(var(--primary-rgb) / 0.28), rgb(var(--primary-rgb) / 0.1));
    border: 1px solid var(--primary);
    box-shadow: var(--glow-primary-sm);
    cursor: pointer;
}
.list-featured-card:active {
    border-color: var(--primary-strong);
}
.list-featured-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--text-on-primary);
}
.list-featured-info {
    flex: 1;
    min-width: 0;
}
.list-featured-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.list-featured-sub {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

/* Capa: a imagem preenche o quadrado e o ícone da lista fica por cima,
   num selo. Sem capa (ou com <img> quebrada), sobra só o selo sobre o tint. */
.list-card-cover {
    position: relative;
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
}
.list-card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.list-card-cover .list-card-icon {
    position: absolute;
    left: 4px;
    bottom: 4px;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--surface-glass);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.list-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 18px;
}

/* Progresso por lista */
.list-card-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.list-card-progress-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--bg-2);
    overflow: hidden;
}
.list-card-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-bright));
}
.list-card-progress-text {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
    flex: none;
}

/* Coração de favorita */
.list-card-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    color: var(--text-3);
    transition: color 0.2s;
}
.list-card-fav.on {
    color: var(--primary-bright);
}
.list-card-icon.lavender {
    background: var(--tint-lavender);
    color: var(--primary);
}
.list-card-icon.blue {
    background: var(--tint-blue);
    color: var(--info);
}
.list-card-icon.red {
    background: var(--tint-red);
    color: var(--danger);
}
.list-card-icon.green {
    background: var(--tint-green);
    color: var(--success);
}
.list-card-info {
    flex: 1;
    min-width: 0;
}
.list-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.list-card-count {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lists-create-modal {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.lists-modal-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.lists-modal-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
}
.lists-modal-field select.input-field {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.lists-modal-confirm {
    width: 100%;
}

/* Tinted list cards: lavagem translucida + chip de icone escuro com cor de frente.
   No tema claro o chip era branco; no escuro ele e a superficie elevada. */
.list-card.amber    { background: var(--tint-amber);    border-color: transparent; }
.list-card.blue     { background: var(--tint-blue);     border-color: transparent; }
.list-card.green    { background: var(--tint-green);    border-color: transparent; }
.list-card.red      { background: var(--tint-red);      border-color: transparent; }
.list-card.lavender { background: var(--tint-lavender); border-color: transparent; }
.list-card.amber    .list-card-icon { background: var(--surface-2); color: var(--tint-amber-fg); }
.list-card.blue     .list-card-icon { background: var(--surface-2); color: var(--tint-blue-fg); }
.list-card.green    .list-card-icon { background: var(--surface-2); color: var(--tint-green-fg); }
.list-card.red      .list-card-icon { background: var(--surface-2); color: var(--tint-red-fg); }
.list-card.lavender .list-card-icon { background: var(--surface-2); color: var(--tint-lavender-fg); }

/* ---------- LIST DETAIL — hero da lista ---------- */
.listdetail-hero {
    position: relative;
    margin: 0 -20px 16px;
    padding: 10px 20px 18px;
    overflow: hidden;
}
/* A capa sangra desfocada no fundo; a capa nítida aparece no quadrado ao lado
   do título. Assim a lista tem presença visual mesmo sem arte própria. */
.listdetail-hero-bg {
    position: absolute;
    inset: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    object-fit: cover;
    filter: blur(22px) saturate(1.2);
    opacity: 0.5;
}
.listdetail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.4) 0%, var(--bg) 95%);
}
.listdetail-hero-top,
.listdetail-hero-body {
    position: relative;
    z-index: 1;
}
/* Só o "+" mora aqui; o "voltar" é o global. A altura é a do botão, para o
   hero manter o mesmo respiro de antes. */
.listdetail-hero-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 34px;
    margin-bottom: 14px;
}
.listdetail-hero-body {
    display: flex;
    align-items: flex-end;
    gap: 14px;
}
.listdetail-hero-cover {
    width: 76px;
    height: 76px;
    flex: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-2);
    box-shadow: var(--shadow-2);
    background: var(--surface-2);
}
.listdetail-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.listdetail-hero-copy {
    flex: 1;
    min-width: 0;
}
.listdetail-hero-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}
.listdetail-hero-meta {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 2px;
}
.listdetail-hero-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 50%;
    border: 1px solid var(--border-2);
    background: var(--surface-glass);
    color: var(--text-3);
}
.listdetail-hero-fav.on {
    color: var(--primary-bright);
    border-color: var(--border-strong);
    box-shadow: var(--glow-primary-sm);
}

/* ---------- LIST DETAIL (shared for Favorites/Watchlist too) ---------- */
.listdetail-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.page-header-title {
    flex: 1;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.listdetail-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.listdetail-add-panel {
    margin-bottom: 8px;
}
.listdetail-add-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-3);
    font-size: 14px;
    padding: 32px 0;
}
.search-result-add.remove-btn {
    background: transparent;
    border-color: var(--border);
    color: var(--text-3);
}
.search-result-add.remove-btn:active {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--text-on-primary);
}

/* ---------- HISTORY (Tela 14) ---------- */
.history-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.history-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.history-event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.history-event-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: var(--primary-bright);
}
.history-event-info {
    flex: 1;
    min-width: 0;
}
.history-event-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.history-event-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.history-event-type-pill {
    flex: none;
    padding: 2px 8px;
    background: var(--primary-soft);
    color: var(--primary-bright);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 999px;
    line-height: 1.4;
}
.history-event-meta {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}
.history-event-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
}

/* Séries Ativas — coluna à direita (data + botão iniciar) */
.active-series-right {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    align-self: center;
}
.active-series-play {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex: none;
    border: 1.5px solid var(--primary);
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bright);
    cursor: pointer;
    padding-left: 2px; /* centraliza opticamente o glifo de play */
}
.active-series-play:active {
    background: var(--primary);
    color: var(--text-on-primary);
}
.active-series-emdia {
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
}

/* ---------- STATS (Tela 15) ---------- */
.stats-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.stats-hero {
    text-align: center;
    padding: 20px 0;
}
.stats-hero-value {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
}
.stats-hero-label {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 4px;
    font-weight: 500;
}
/* card container para graficos Syncfusion */
.stats-chart-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 12px 8px 8px;
    margin: 0 0 16px;
    border: 1px solid var(--border);
}
/* Sobrescreve fontes/cores padrao do SfChart para o tema claro/roxo */
.stats-chart-card .e-chart-tooltip,
.stats-chart-card .e-accumulation-tooltip {
    font-family: 'Inter', sans-serif;
}

/* mantido para nao quebrar referencias antigas de class */
.stats-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 140px;
    padding: 0 4px;
    margin: 16px 0;
}
.stats-bar {
    flex: 1;
    border-radius: 8px 8px 0 0;
    position: relative;
    min-height: 4px;
    transition: height 0.4s;
}
.stats-bar-label {
    position: absolute;
    bottom: -22px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-2);
}
.stats-bar.lavender {
    background: var(--primary);
}
.stats-bar.blue {
    background: var(--info);
}
.stats-bar.red {
    background: var(--danger);
}
.stats-bar.green {
    background: var(--success);
}
.stats-genre-list {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}
.stats-genre-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.stats-genre-name {
    width: 80px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    flex: none;
}
.stats-genre-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-2);
    border-radius: 999px;
    overflow: hidden;
}
.stats-genre-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
}
.stats-genre-pct {
    width: 40px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
    text-align: right;
    flex: none;
}

/* ---------- RECOMMENDATIONS (Tela 24) ---------- */
.recs-page {
    padding: 0 20px 24px;
    min-height: 100%;
}

/* ---------- NOTIFICATIONS (Tela 17) ---------- */
.notif-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.notif-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
}
.notif-card.unread {
    border-left: 3px solid var(--primary);
    background: var(--primary-soft);
}
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.notif-content {
    flex: 1;
    min-width: 0;
}
.notif-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.notif-body {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
    line-height: 1.4;
}
.notif-time {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-3);
    margin-top: 4px;
}

/* ---------- PROFILE (Tela 12) ---------- */
.profile-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-primary);
    margin: 16px auto 8px;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
}
.profile-name {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.profile-email {
    text-align: center;
    font-size: 13px;
    color: var(--text-2);
    margin-top: 2px;
}
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0 14px;
}
.profile-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: var(--shadow-1);
}
.profile-stat-card--link {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}
.profile-stat-card--link:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-1);
}
.profile-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}
.profile-stat-label {
    font-size: 11px;
    color: var(--text-2);
    margin-top: 3px;
}
.profile-genero {
    text-align: center;
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 8px;
}
.profile-menu {
    display: grid;
    gap: 4px;
    margin-top: 24px;
}
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s;
}
.profile-menu-item:active {
    border-color: var(--primary);
}
.profile-menu-icon {
    width: 22px;
    height: 22px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-menu-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}
.profile-menu-arrow {
    color: var(--text-3);
}
.profile-pessoas-panel {
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin: 0 0 6px;
}
.profile-pessoas-add {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.profile-pessoas-add input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 13px;
    outline: none;
}
.profile-pessoas-add input:focus {
    border-color: var(--primary);
}
.profile-pessoas-add-btn {
    background: var(--primary);
    color: var(--text-on-primary);
    border: none;
    border-radius: var(--radius-sm);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.profile-pessoas-add-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.profile-pessoas-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.profile-pessoa-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 13px;
    color: var(--text);
}
.profile-pessoa-del {
    color: var(--danger);
    padding: 2px 4px;
    opacity: 0.75;
}
.profile-pessoa-del:hover { opacity: 1; }
.profile-pessoa-acoes {
    display: flex;
    align-items: center;
    gap: 2px;
}
.profile-pessoa-edit {
    color: var(--text-2);
    padding: 2px 4px;
    opacity: 0.75;
}
.profile-pessoa-edit:hover { opacity: 1; color: var(--primary); }
.profile-pessoa-save {
    color: var(--success);
    padding: 2px 4px;
}
.profile-pessoa-save:disabled { opacity: 0.4; }
.profile-pessoa-cancel {
    color: var(--text-3);
    padding: 2px 4px;
}
.profile-pessoa-cancel:hover { color: var(--text); }
.profile-pessoa-edit-input {
    flex: 1;
    min-width: 0;
    margin-right: 8px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-size: 13px;
    outline: none;
}
.profile-pessoa-edit-input:focus { border-color: var(--primary); }
.profile-pessoa-nome {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-pessoa-ver {
    color: var(--text-2);
    padding: 2px 4px 2px 8px;
}
.profile-pessoa-ver:active { color: var(--primary); }
.profile-pessoas-vazio {
    font-size: 13px;
    color: var(--text-3);
    text-align: center;
    padding: 8px 0;
}

/* Popup "títulos em comum" da pessoa */
.pessoa-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 8px 8px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pessoa-titulo-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: var(--text);
}
.pessoa-titulo-poster {
    flex: 0 0 auto;
    width: 42px;
    height: 62px;
    border-radius: 6px;
    overflow: hidden;
}
.pessoa-titulo-poster .poster-media,
.pessoa-titulo-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pessoa-titulo-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}
.pessoa-titulo-nome {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}
.pessoa-titulo-meta {
    font-size: 12px;
    color: var(--text-2);
}
.pessoa-titulo-unlink {
    flex: 0 0 auto;
    padding: 10px;
    color: var(--danger);
    opacity: 0.85;
}
.pessoa-titulo-unlink:active { opacity: 1; }
.pessoa-titulo-dica {
    font-size: 13px !important;
    color: var(--text-3) !important;
}

/* "Assistindo com..." no Detalhe */
.detail-companhia {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-2);
}
.detail-companhia-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}
.companhia-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 4px 3px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-weight: 600;
}
.companhia-chip-x,
.companhia-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: inherit;
}
.companhia-edit { color: var(--text-2); }
.companhia-chip-x:active,
.companhia-edit:active { background: var(--border); }
.detail-companhia-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    border: 1px dashed var(--primary);
    border-radius: 999px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    background: transparent;
}
.detail-companhia-add:active { background: var(--primary-soft); }
.pessoa-inicial {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
}
.profile-pessoas-erro {
    font-size: 12px;
    color: var(--danger);
    margin-bottom: 8px;
}

/* ===== SENHA POPUP (esqueci senha) ===== */
.senha-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.senha-popup {
    background: var(--surface);
    border-radius: 20px;
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 24px 64px rgb(var(--primary-rgb) / 0.35), var(--shadow-3);
    animation: slideUp 0.25s cubic-bezier(.22,1,.36,1);
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.senha-popup-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary-bright);
}
.senha-popup-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.senha-popup-sub {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 20px;
    line-height: 1.5;
}
.senha-popup-box {
    background: var(--primary-soft);
    border: 1.5px solid var(--primary);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.senha-popup-valor {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1.5px;
    flex: 1;
    text-align: left;
}
.senha-popup-copy {
    background: var(--primary);
    color: var(--text-on-primary);
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.senha-popup-copy:hover { opacity: 0.85; }
.senha-popup-copy.copied {
    background: var(--success);
}
.senha-popup-hint {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 20px;
}
.senha-popup-btn {
    width: 100%;
    background: var(--primary);
    color: var(--text-on-primary);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.15s;
}
.senha-popup-btn:hover { opacity: 0.9; }

/* ===== ALTERAR SENHA (accordion no Profile) ===== */
.profile-senha-panel {
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 14px 14px 16px;
    margin: 0 0 6px;
}
.profile-senha-field {
    margin-bottom: 10px;
}
.profile-senha-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.profile-senha-field input {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 14px;
    color: var(--text);
    outline: none;
    box-sizing: border-box;
}
.profile-senha-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgb(var(--primary-rgb) / 0.12);
}
.profile-senha-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.profile-senha-save {
    flex: 1;
    background: var(--primary);
    color: var(--text-on-primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.profile-senha-save:disabled { opacity: 0.5; cursor: not-allowed; }
.profile-senha-save:not(:disabled):hover { opacity: 0.88; }
.profile-senha-ok {
    font-size: 12px;
    color: var(--success);
    margin-top: 8px;
    font-weight: 500;
}
.profile-senha-err {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
}

/* ---------- SETTINGS (Tela 25) ---------- */
.settings-page {
    padding: 0 20px 24px;
    min-height: 100%;
}
.settings-section {
    margin-bottom: 24px;
}
.settings-section h2 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.settings-row:last-child {
    border-bottom: 0;
}
.settings-row-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}
.settings-toggle {
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: var(--bg-2);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}
.settings-toggle.on {
    background: var(--primary);
}
.settings-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: var(--shadow-1);
}
.settings-toggle.on::after {
    transform: translateX(20px);
}

/* ---------- ONBOARDING (Telas 1-4) ---------- */
.onboard-page {
    padding: 40px 28px 24px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.onboard-illustration {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-bright);
    margin-bottom: 28px;
}
.onboard-step-indicator {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.onboard-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s;
}
.onboard-dot.active {
    background: var(--primary);
}
.onboard-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.onboard-desc {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 300px;
}
.onboard-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---------- ERROR STATE (Tela 20) ---------- */
.error-page {
    padding: 60px 28px 24px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.error-illustration {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--tint-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    margin-bottom: 24px;
}
.error-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.error-desc {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 280px;
}
.error-retry-btn {
    margin-bottom: 12px;
}

/* ---------- Streaming Providers ---------- */
.streaming-section {
    margin-top: 24px;
}

.streaming-providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.provider-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
}

.provider-card:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgb(var(--primary-rgb) / 0.12);
}

.provider-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: calc(var(--radius-md) - 2px);
}

.provider-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    text-align: center;
    line-height: 1.2;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Responsive: smaller on mobile, larger on desktop */
@media (min-width: 768px) {
    .streaming-providers-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .provider-card {
        min-height: 120px;
    }

    .provider-logo {
        width: 64px;
        height: 64px;
    }

    .provider-name {
        font-size: 12px;
    }
}

/* ---------- Responsive helpers ---------- */
@media (max-width: 400px) {
    .home-greeting h1 {
        font-size: 22px;
    }
    .continue-hero {
        height: 152px;
    }
    .rec-poster {
        height: 120px;
    }
}

@media (max-width: 360px) {
    .home-stats {
        gap: 6px;
    }
    .home-stat {
        padding: 10px 4px 8px;
    }
    .home-stat .stat-value {
        font-size: 18px;
    }
    .bottom-nav {
        padding: 8px 14px calc(12px + var(--safe-bottom));
    }
}

/* ---------- ===================================================
   CATALOG IMPORT PANELS (Perfil → Status / Comparativo)
   ============================================================= */
.catalog-panel {
    padding: 0 16px 8px;
}
.catalog-loading,
.catalog-empty {
    padding: 20px 0;
    font-size: 13px;
    color: var(--text-2);
    text-align: center;
}

/* Hero */
.catalog-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}
.catalog-hero-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.catalog-hero-info {
    flex: 1;
    min-width: 0;
}
.catalog-hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--text-3);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.catalog-hero-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -.01em;
}
.catalog-hero-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 3px;
}

/* Section divider */
.catalog-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 22px 0 6px;
}
.catalog-section-bar {
    display: inline-block;
    width: 18px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Field card */
.catalog-field-card {
    background: var(--surface);
    border: 1px solid;
    border-radius: 14px;
    padding: 13px 13px 10px;
    margin-bottom: 10px;
}
.catalog-field-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.catalog-field-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.catalog-field-names {
    flex: 1;
    min-width: 0;
}
.catalog-field-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.catalog-field-slug {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    margin-top: 1px;
}
.catalog-field-ok {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Progress */
.catalog-progress-track {
    height: 7px;
    border-radius: 4px;
    background: var(--bg-2);
    overflow: hidden;
    margin-bottom: 5px;
}
.catalog-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}
.catalog-pct-line {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 8px;
}

/* Chips */
.catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.catalog-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--bg-2);
    color: var(--text-2);
    white-space: nowrap;
}
.catalog-chip--green {
    background: var(--tint-green);
    color: var(--tint-green-fg);
}
.catalog-chip--rose {
    background: var(--tint-red);
    color: var(--tint-red-fg);
}
.catalog-chip--amber {
    background: var(--tint-amber);
    color: var(--tint-amber-fg);
}

/* Comparativo side-by-side */
.catalog-compare-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 10px;
}
.catalog-compare-cell {
    flex: 1;
    padding: 8px 10px;
    border-radius: 10px;
    text-align: center;
}
.catalog-compare-cell--dim {
    background: var(--bg-2);
}
.catalog-compare-cell--main {
    background: var(--surface-2);
}
.catalog-compare-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--text-3);
    text-transform: uppercase;
    margin-bottom: 3px;
}
.catalog-compare-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.catalog-compare-arrow {
    font-size: 16px;
    color: var(--text-3);
    flex-shrink: 0;
}

/* ---------- ADICIONAR A UMA LISTA (botão + bottom sheet) ---------- */

/* Botão "+" no backdrop (espelha .detail-back-btn, mas à direita e roxo) */
.detail-add-btn {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0) + 12px);
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgb(var(--primary-rgb) / 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-primary);
    transition: background 0.2s, transform 0.15s;
}
.detail-add-btn:active {
    background: var(--primary-strong);
    transform: scale(0.94);
}

/* Botão "Indicar a um amigo": mesmo tamanho e eixo do "+", logo abaixo dele (36px de altura + 10px de respiro).
   Fundo escuro translúcido como o voltar, para o roxo continuar sendo só da ação principal. */
.detail-indicar-btn {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0) + 12px + 36px + 10px);
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-primary);
    transition: background 0.2s, transform 0.15s;
}
.detail-indicar-btn:active {
    background: rgba(0, 0, 0, 0.78);
    transform: scale(0.94);
}

/* Overlay + folha */
.tl-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: flex-end;
    animation: tl-fade-in 0.2s ease;
}
.tl-sheet {
    width: 100%;
    max-height: 75vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    padding: 10px 20px calc(env(safe-area-inset-bottom, 0) + 24px);
    box-shadow: var(--shadow-sheet);
    animation: tl-slide-up 0.25s ease;
}
.tl-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: 4px auto 14px;
}
.tl-sheet-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}
.tl-sheet-loading {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}
.tl-sheet-list {
    margin-bottom: 8px;
}
.tl-sheet-newbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 1px dashed var(--primary);
    border-radius: var(--radius-lg);
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    background: transparent;
    margin-top: 4px;
    transition: background 0.2s;
}
.tl-sheet-newbtn:active {
    background: var(--primary-soft);
}
.tl-sheet-empty {
    text-align: center;
    padding: 12px 0 4px;
}
.tl-sheet-empty p {
    color: var(--text);
    font-size: 15px;
    margin-bottom: 18px;
}
.tl-sheet-empty-actions {
    display: flex;
    gap: 10px;
}
.tl-sheet-empty-actions .btn-outline,
.tl-sheet-empty-actions .btn-primary {
    flex: 1;
}
.tl-sheet-create {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tl-sheet-create .btn-primary {
    width: 100%;
}

/* Indicar a amigos: checklist dentro do sheet. Quem rola é a lista; o botão Enviar fica sempre à vista. */
.tl-sheet--indicar {
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
}
.tl-sheet--indicar .tl-sheet-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.tl-sheet-sub {
    margin: -8px 0 12px;
    font-size: 13px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tl-sheet-send {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 8px;
}
.friend-pick {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-align: left;
}
.friend-pick.is-checked {
    background: var(--primary-soft);
    border-color: var(--primary);
}
.friend-pick-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}
.friend-pick-box {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 2px solid var(--text-3);
    border-radius: 6px;
    color: var(--text-on-primary);
}
.friend-pick.is-checked .friend-pick-box {
    background: var(--primary);
    border-color: var(--primary);
}

/* "Quando você assistiu?": atalhos Hoje/Ontem + seletor de data (sheet de data e painel do episódio) */
.data-campo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.data-campo-atalhos {
    display: flex;
    gap: 8px;
}
.data-campo-atalho {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}
.data-campo-atalho.is-active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
}
.data-campo-input {
    flex: 1 1 150px;
    min-width: 0;
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
}
.data-campo-input:focus {
    outline: none;
    border-color: var(--primary);
}
.data-sheet-actions {
    margin-top: 4px;
}
/* Lápis ao lado de "Assistido em dd/MM/yyyy": reabre a data para corrigir */
.data-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 4px;
    vertical-align: middle;
    border-radius: 50%;
    color: var(--text-2);
}
.data-edit-btn:active {
    background: var(--border);
}

@keyframes tl-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes tl-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ---------- ===================================================
   INSIGHTS (estatísticas avançadas) + RETROSPECTIVA + MEUS SERVIÇOS
   ============================================================= */
.ins-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}
.ins-bar-label {
    width: 52px;
    font-size: 12px;
    color: var(--text-2);
    font-family: var(--font-mono, monospace);
}
.ins-bar-track {
    flex: 1;
    height: 10px;
    background: var(--bg-2);
    border-radius: 6px;
    overflow: hidden;
}
.ins-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}
.ins-bar-value {
    width: 32px;
    text-align: right;
    font-size: 12px;
    color: var(--text-2);
    font-family: var(--font-mono, monospace);
}
.ins-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0;
    font-size: 13px;
    color: var(--text);
}
.retro-year {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 8px 0 16px;
}
.retro-year-value {
    font-family: var(--font-title, 'Poppins', sans-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    min-width: 80px;
    text-align: center;
}
.retro-highlight {
    color: var(--primary);
    font-weight: 600;
    text-align: right;
}
.settings-hint {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.5;
    margin: 4px 0 16px;
}
.settings-row-nav {
    cursor: pointer;
}

/* ==========================================================================
   SOCIAL: foto de perfil, comentários, amigos, chat, moderação, Quero Ver
   ========================================================================== */

/* ---------- AVATAR (UserAvatar.razor) ---------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    overflow: hidden;
    user-select: none;
}
.avatar--iniciais {
    background: linear-gradient(135deg, var(--primary-soft), var(--primary));
    color: var(--text-on-primary);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
}

/* Foto no topo do Perfil: toque abre a folha "Foto de perfil". */
.profile-avatar-btn {
    position: relative;
    display: block;
    margin: 16px auto 8px;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 50%;
}
.profile-avatar-btn:active {
    transform: scale(0.97);
}
.profile-avatar-btn:disabled {
    opacity: 0.7;
}
.profile-avatar-camera {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text-on-primary);
    border: 2px solid var(--bg);
}
.profile-photo-error {
    margin: 4px 0 8px;
    text-align: center;
}

/* ---------- BOTÕES / AVISOS COMPARTILHADOS ---------- */
.icon-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-3);
    flex: 0 0 auto;
}
button.icon-btn-sm:active {
    background: var(--primary-soft);
    color: var(--primary);
}
.small-btn {
    padding: 6px 14px;
    font-size: 12px;
}
.btn-primary.is-danger {
    background: var(--danger);
}
.inline-confirm {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 2px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-2);
    font-size: 12px;
    color: var(--text-2);
}
.inline-confirm > span {
    flex: 1 1 100%;
}
.notice-box {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
}
/* Opções em folha (denunciar comentário, foto de perfil). */
.report-options {
    display: grid;
    gap: 8px;
}
.report-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}
.report-option:active {
    border-color: var(--primary);
}
.report-option:disabled {
    opacity: 0.5;
}
.report-option--danger {
    color: var(--danger);
}

/* ---------- COMENTÁRIOS (ComentariosSecao.razor) ---------- */
.comments-section {
    margin-top: 20px;
    padding-bottom: 8px;
}
.comment-composer {
    margin-bottom: 12px;
}
.comment-input {
    resize: none;
    min-height: 44px;
    line-height: 1.4;
}
.comment-composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}
.comment-counter {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: var(--text-3);
}
.comment-send {
    padding: 8px 16px;
    font-size: 13px;
}
.comments-loading {
    display: flex;
    justify-content: center;
    padding: 24px 0;
}
.comments-empty {
    padding: 18px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}
.comment-list {
    display: grid;
    gap: 14px;
}
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
}
.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.comment-time {
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
}
.comment-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}
.comment-add-friend {
    background: var(--primary-soft);
    color: var(--primary);
}
.comment-pending {
    color: var(--text-3);
}
.comment-text {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-2);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.comment-edit-bar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}
.comment-more {
    width: 100%;
    margin-top: 14px;
}
.comment-report-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-2);
}

/* ---------- AMIGOS (Amigos.razor) ---------- */
.friends-page {
    padding: 0 20px 24px;
}
.friend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.friend-row--chat {
    cursor: pointer;
}
.friend-row--chat:active {
    border-color: var(--primary);
}
.friend-info {
    flex: 1;
    min-width: 0;
}
.friend-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.friend-sub {
    font-size: 12px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.friend-sub--unread {
    color: var(--text);
    font-weight: 600;
}
.friend-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.friend-time {
    font-size: 10px;
    color: var(--text-3);
    white-space: nowrap;
}
.friend-badge {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--text-on-primary);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}
.friend-btn {
    padding: 6px 12px;
    font-size: 12px;
}
.friend-confirm {
    margin-top: -2px;
    margin-bottom: 8px;
}
.friends-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-3);
}

/* ---------- CHAT (Chat.razor) ---------- */
/* O container que rola é o .main-content; o campo de envio fica "grudado" no fim da área visível. */
.chat-page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0 16px;
}
.chat-header {
    align-items: center;
}
.chat-header h1 {
    font-size: 17px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 12px;
}
.chat-empty {
    margin: auto;
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}
.chat-older {
    align-self: center;
    padding: 6px 14px;
    font-size: 12px;
}
.chat-day {
    align-self: center;
    margin: 10px 0 4px;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--bg-2);
    font-size: 11px;
    color: var(--text-3);
}
.chat-row {
    display: flex;
}
.chat-row--mine {
    justify-content: flex-end;
}
.chat-row--theirs {
    justify-content: flex-start;
}
.chat-bubble {
    max-width: 82%;
    padding: 8px 12px 6px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.chat-row--mine .chat-bubble {
    background: var(--primary);
    color: var(--text-on-primary);
    border-bottom-right-radius: 4px;
}
.chat-row--theirs .chat-bubble {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.chat-text {
    white-space: pre-wrap;
}
.chat-time {
    display: block;
    margin-top: 2px;
    text-align: right;
    font-size: 10px;
    opacity: 0.7;
}
/* Cartão de título indicado (Detail > "Indicar a um amigo"). Herda as cores do balão (roxo/branco). */
.chat-bubble--titulo {
    min-width: 230px;
    padding: 8px 10px 6px;
}
.chat-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.chat-titulo:active {
    opacity: 0.8;
}
.chat-titulo-poster {
    position: relative;
    flex: 0 0 auto;
    width: 54px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-2);
}
.chat-titulo-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-titulo-kicker,
.chat-titulo-meta {
    font-size: 11px;
    opacity: 0.75;
}
.chat-titulo-nome {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.chat-titulo-seta {
    flex: 0 0 auto;
    opacity: 0.6;
}
.chat-composer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin: 0 -16px;
    padding: 10px 16px calc(var(--safe-bottom) + 10px);
    background: var(--surface-glass);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.chat-input {
    flex: 1;
    resize: none;
    max-height: 120px;
    border-radius: 20px;
}
.chat-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-on-primary);
    flex: 0 0 auto;
}
.chat-send:active {
    background: var(--primary-strong);
}
.chat-send:disabled {
    opacity: 0.4;
}

/* ---------- MODERAÇÃO (Moderacao.razor) ---------- */
.moderation-page {
    padding: 0 20px 24px;
}
.report-card {
    margin-bottom: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.report-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 11px;
}
.report-count {
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--danger);
    color: var(--text-on-primary);
    font-weight: 700;
}
.report-reasons {
    color: var(--text-3);
}
.report-text {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.report-context {
    font-size: 12px;
    color: var(--text-3);
}
.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* ---------- QUERO VER / LISTAS DE SISTEMA ---------- */
/* Detalhe do título: quatro chips de status não cabem numa linha em tela estreita; viram uma grade 2x2. */
.detail-track-status--quatro {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}
.status-chip:disabled {
    opacity: 0.6;
}
.list-card-lock {
    display: inline-flex;
    margin-left: 4px;
    color: var(--text-3);
    vertical-align: middle;
}
