/* ============================================================
   NOVELASFLIX — DESIGN SYSTEM & STYLES (v3.0)
   Otimizado para Doramas e Novelas Asiáticas Verticais
   ============================================================ */

:root {
    /* Palette */
    --bg-primary: #07070b;
    --bg-secondary: #0f0f17;
    --bg-card: rgba(18, 18, 28, 0.75);
    --bg-glass: rgba(22, 22, 34, 0.65);
    
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.45);
    --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(168, 85, 247, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   RESET & BASE GLOBALS
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Background Ambient Glows */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}
.glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7c3aed, transparent);
    top: -150px;
    left: -150px;
}
.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #ec4899, transparent);
    bottom: 5%;
    right: -200px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(7, 7, 11, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 28px;
    transition: var(--transition);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.logo-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.6));
}
.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-tags {
    display: flex;
    gap: 8px;
}
.tag-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.tag-pill:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}
.tag-pill.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 12px;
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}
.search-box input {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    padding: 8px 30px 8px 34px;
    font-size: 0.85rem;
    width: 200px;
    transition: var(--transition);
}
.search-box input:focus {
    outline: none;
    width: 260px;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}
.clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
}

/* Sync Button */
.btn-sync {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-sync:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}
.sync-icon {
    width: 15px;
    height: 15px;
}
.btn-sync.syncing .sync-icon {
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* User Badge & Auth Nav Buttons */
.auth-nav-container {
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}
.user-avatar {
    font-size: 0.9rem;
}
.user-email {
    color: #e2e8f0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.user-plan-badge {
    background: rgba(124, 58, 237, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
}

.btn-nav-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--accent-glow);
    transition: var(--transition);
    white-space: nowrap;
}
.btn-nav-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.btn-nav-admin {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(124, 58, 237, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: var(--radius-full);
    color: #a855f7;
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-nav-admin:hover {
    background: rgba(124, 58, 237, 0.35);
    color: #fff;
}

.btn-nav-logout {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-nav-logout:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================================
   MAIN CONTENT & HERO BILLBOARD (VERTICAL CONTENT FOCUS)
   ============================================================ */
.main-content {
    position: relative;
    z-index: 1;
    padding: 0 32px 60px 32px;
    max-width: 1540px;
    margin: 0 auto;
    width: 100%;
}

.hero-banner {
    position: relative;
    margin-top: 20px;
    min-height: 440px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 44px;
    border: 1px solid var(--border-glass);
    background-color: var(--bg-card);
    width: 100%;
}
.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    opacity: 0.6;
    filter: brightness(0.9) contrast(1.1);
    transition: background-image 0.6s ease;
}
.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #07070b 20%, rgba(7, 7, 11, 0.8) 60%, transparent 100%),
                linear-gradient(to right, #07070b 25%, transparent 85%);
}
.hero-body {
    position: relative;
    z-index: 2;
    max-width: 720px;
    width: 100%;
}
.hero-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: #fff;
    word-break: break-word;
}
.hero-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.meta-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-dub { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-quality { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }

.hero-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Generic Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
}
.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ============================================================
   CATALOG GRID (VERTICAL SHORT DRAMA POSTERS)
   ============================================================ */
.catalog-section {
    margin-top: 40px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.dramas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Drama Card */
.drama-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}
.drama-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glass-hover);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

/* Proporção 9:14 ideal para conteúdo vertical de dorama */
.card-poster-wrap {
    position: relative;
    width: 100%;
    padding-top: 145%;
    background: #12121d;
    overflow: hidden;
}
.card-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.drama-card:hover .card-poster {
    transform: scale(1.06);
}

.card-badge-top-left {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(7, 7, 11, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
}
.card-badge-top-right {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(7, 7, 11, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border-glass);
    color: #cbd5e1;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 600;
}

.card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 11, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.drama-card:hover .card-play-overlay {
    opacity: 1;
}
.card-play-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px var(--accent-glow);
    transform: scale(0.85);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.drama-card:hover .card-play-icon {
    transform: scale(1);
}

.card-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.card-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    opacity: 0.5;
}
.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
}
.empty-state p {
    color: var(--text-muted);
}

/* ============================================================
   PAGINAÇÃO & CARREGAR ANTERIORES
   ============================================================ */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 2.5rem 0 1.5rem;
}
.pagination-wrap .pg-btn {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #12121d;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    padding: 0 8px;
}
.pagination-wrap .pg-btn:hover {
    border-color: var(--accent);
    color: #c084fc;
    background: rgba(124, 58, 237, 0.12);
}
.pagination-wrap .pg-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.pagination-wrap .pg-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.btn-load-older {
    display: block;
    margin: 1.5rem auto;
    padding: 0.75rem 1.6rem;
    background: transparent;
    border: 1px dashed rgba(168, 85, 247, 0.35);
    border-radius: 12px;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.btn-load-older:hover {
    border-color: var(--accent);
    color: #c084fc;
    background: rgba(124, 58, 237, 0.08);
}

/* ============================================================
   MODAL DE EPISÓDIOS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 8, 0.85);
    backdrop-filter: blur(12px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay.active {
    display: flex;
}
.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 840px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    gap: 20px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
}
.modal-poster-wrap {
    width: 115px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.modal-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 9/14;
    display: block;
}
.modal-info {
    flex: 1;
    min-width: 0;
}
.modal-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.25;
}
.modal-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 8px;
    max-height: 64px;
    overflow-y: auto;
}
.modal-stats {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
/* .modal-actions, .btn-play-now e .btn-channel removidos — 
   o acesso ao player é feito diretamente via clique nos episódios da lista */

.modal-episodes-section {
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}
.episodes-heading {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.episode-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    gap: 10px;
}
.episode-item:hover {
    background: var(--bg-glass);
    border-color: var(--border-glass-hover);
    transform: translateX(3px);
}
.episode-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.ep-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.episode-item:hover .ep-number {
    background: var(--accent);
    color: white;
}
.ep-title {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.ep-download-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 6px;
    color: #c084fc;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}
.ep-download-btn:hover {
    background: rgba(124, 58, 237, 0.35);
    border-color: #a855f7;
    color: #fff;
}

/* ============================================================
   PLAYER DE VÍDEO (VERTICAL SCREEN FOCUS)
   ============================================================ */
.player-overlay {
    position: fixed;
    inset: 0;
    background: #020205;
    z-index: 5000;
    display: none;
    flex-direction: column;
}
.player-overlay.active {
    display: flex;
}
.player-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.player-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(7, 7, 11, 0.95);
    border-bottom: 1px solid var(--border-glass);
    flex-shrink: 0;
}
.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.player-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.btn-player-download {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 8px;
    color: #c084fc;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-player-download:hover {
    background: rgba(124, 58, 237, 0.5);
    color: #fff;
}
.btn-close-player {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
}
.btn-close-player:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.player-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    overflow: hidden;
}
/* Otimização para formato vertical de dorama */
.player-wrapper video {
    max-width: 100%;
    max-height: calc(100vh - 60px);
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Custom Plyr Colors */
:root {
    --plyr-color-main: #8b5cf6;
    --plyr-video-background: #000;
}

/* ============================================================
   MODAL NATIVO DE AUTENTICAÇÃO (#authModal)
   ============================================================ */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 8, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.auth-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.auth-modal-card {
    position: relative;
    background: linear-gradient(160deg, #130a24 0%, #1a0f33 50%, #0d081a 100%);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: var(--radius-lg);
    padding: 30px 26px 26px;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 30px rgba(139, 92, 246, 0.2);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}
.auth-modal-overlay.active .auth-modal-card {
    transform: scale(1);
}
.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 20px;
}
.auth-modal-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
}
.auth-modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}
.auth-modal-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-modal-subtitle {
    color: var(--text-muted);
    font-size: 0.84rem;
    margin-top: 4px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 18px;
    gap: 4px;
}
.auth-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.auth-tab:hover {
    color: var(--text-primary);
}
.auth-tab.active {
    color: #c084fc;
    border-bottom-color: #a855f7;
}

.auth-feedback {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 16px;
    line-height: 1.4;
}
.auth-feedback.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.auth-feedback.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.auth-form-panel {
    display: none;
    flex-direction: column;
    gap: 14px;
}
.auth-form-panel.active {
    display: flex;
}
.auth-panel-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}
.auth-input-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.auth-input-group input {
    width: 100%;
    background: rgba(7, 7, 11, 0.7);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    color: #fff;
    padding: 11px 14px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}
.auth-input-group input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

.btn-auth-submit {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: none;
    border-radius: 10px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px var(--accent-glow);
    transition: var(--transition);
}
.btn-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.6);
}
.btn-auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-extra-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.auth-link {
    color: #c084fc;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.auth-link:hover {
    color: #fff;
}
.auth-dot {
    opacity: 0.4;
}

/* ============================================================
   PAYWALL MODAL
   ============================================================ */
.paywall-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 8, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.paywall-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.paywall-box {
    position: relative;
    background: linear-gradient(160deg, #130924 0%, #1c0e38 50%, #0d071a 100%);
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: var(--radius-lg);
    padding: 32px 24px 24px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 35px rgba(139, 92, 246, 0.25);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.paywall-overlay.active .paywall-box {
    transform: scale(1);
}
.paywall-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.paywall-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.paywall-header {
    text-align: center;
    margin-bottom: 24px;
}
.paywall-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
}
.paywall-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.paywall-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.paywall-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.paywall-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}
.plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: var(--transition);
}
.plan-card:hover {
    border-color: rgba(168, 85, 247, 0.5);
}
.plan-card--featured {
    background: linear-gradient(160deg, rgba(124, 58, 237, 0.2), rgba(168, 85, 247, 0.08));
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
}
.plan-badge-top {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #230c4f;
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #c084fc;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.plan-badge--best {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
}
.plan-period {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    margin-top: 4px;
}
.plan-price {
    display: flex;
    align-items: baseline;
    gap: 1px;
    margin-bottom: 2px;
}
.plan-currency {
    color: #a855f7;
    font-size: 0.95rem;
    font-weight: 700;
}
.plan-value {
    color: #fff;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
}
.plan-cents {
    color: #a855f7;
    font-size: 1.1rem;
    font-weight: 700;
}
.plan-per {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 14px;
}
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    text-align: left;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}
.btn-plan {
    width: 100%;
    padding: 9px;
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.4);
    background: rgba(124, 58, 237, 0.15);
    color: #c084fc;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.btn-plan:hover {
    background: rgba(124, 58, 237, 0.35);
    color: #fff;
}
.btn-plan--featured {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-plan--featured:hover {
    opacity: 0.9;
}

.paywall-login-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.82rem;
}
.btn-paywall-login {
    padding: 5px 14px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: var(--radius-full);
    color: #c084fc;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.btn-paywall-login:hover {
    background: rgba(124, 58, 237, 0.35);
    color: #fff;
}

/* ============================================================
   PAYWALL CAROUSEL (mobile)
   ============================================================ */
.paywall-carousel-wrap {
    display: none; /* hidden on desktop */
    position: relative;
    margin-bottom: 20px;
}
.paywall-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 4px 4px 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.paywall-carousel::-webkit-scrollbar { display: none; }
.paywall-carousel .plan-card {
    flex: 0 0 82vw;
    max-width: 300px;
    scroll-snap-align: center;
    min-width: 0;
}
/* Carousel dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}
.carousel-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.3);
    transition: background 0.25s, transform 0.25s;
    cursor: pointer;
    border: none;
    padding: 0;
}
.carousel-dot.active {
    background: #a855f7;
    transform: scale(1.35);
}

/* ============================================================
   TRIAL / EXIT-INTENT MODAL
   ============================================================ */
.trial-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 8, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.trial-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.trial-modal-box {
    position: relative;
    background: linear-gradient(160deg, #130924 0%, #1c0e38 60%, #0d071a 100%);
    border: 1px solid rgba(168, 85, 247, 0.6);
    border-radius: 20px;
    padding: 36px 28px 28px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 30px 90px rgba(0,0,0,0.9), 0 0 50px rgba(139,92,246,0.35);
    text-align: center;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.trial-modal-overlay.active .trial-modal-box {
    transform: scale(1) translateY(0);
}
.trial-modal-close {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass);
    color: #94a3b8;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.trial-modal-close:hover { background: rgba(255,255,255,0.15); color:#fff; }
.trial-modal-emoji { font-size: 2.8rem; margin-bottom: 8px; display: block; animation: bounce-soft 1.5s ease-in-out infinite; }
@keyframes bounce-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.trial-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}
.trial-modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}
.trial-modal-price-box {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
}
.trial-modal-price-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.trial-modal-old-price { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; margin-bottom: 2px; }
.trial-modal-price-val {
    font-size: 2.4rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.trial-modal-price-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.trial-modal-features {
    list-style: none; padding: 0; margin: 0 0 20px;
    text-align: left; font-size: 0.82rem; color: var(--text-secondary);
    display: flex; flex-direction: column; gap: 6px;
}
.trial-modal-features li::before { content: "✓ "; color: #a855f7; font-weight: 700; }
.btn-trial-cta {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
    letter-spacing: 0.02em;
}
.btn-trial-cta:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-trial-skip {
    margin-top: 12px;
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.btn-trial-skip:hover { color: #c084fc; }

/* ============================================================
   PWA INSTALL BANNER (RESPONSIVO E SEM OVERFLOW)
   ============================================================ */
#pwa-install-banner {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1b0a33, #2a114e);
    border: 1px solid rgba(168, 85, 247, 0.6);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: calc(100vw - 32px);
    width: auto;
    font-size: 0.84rem;
    color: #e2e8f0;
}
#pwa-install-banner.show {
    bottom: 1.25rem;
}
.btn-install-pwa {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.btn-install-dismiss {
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

/* ============================================================
   RESPONSIVIDADE COMPLETA PARA CELULARES E CONTEÚDO VERTICAL
   ============================================================ */
@media (max-width: 900px) {
    .navbar {
        padding: 10px 16px;
    }
    .nav-tags {
        display: none;
    }
    .main-content {
        padding: 0 16px 40px 16px;
    }
}

@media (max-width: 640px) {
    /* Navbar compacta em celular com suporte total a telas estreitas */
    .navbar {
        padding: 8px 10px;
        gap: 6px;
    }
    .nav-left {
        gap: 6px;
        flex-shrink: 0;
    }
    .brand-logo {
        font-size: 1.05rem;
        gap: 5px;
    }
    .brand-logo .logo-icon {
        font-size: 1.15rem;
    }
    .nav-right {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-shrink: 1;
        min-width: 0;
        justify-content: flex-end;
    }
    .search-box {
        flex-shrink: 1;
        min-width: 0;
    }
    .search-box input {
        width: 80px;
        max-width: 100%;
        padding: 5px 8px 5px 24px;
        font-size: 0.74rem;
        border-radius: var(--radius-full);
    }
    .search-box input:focus {
        width: 125px;
    }
    .search-icon {
        left: 7px;
        width: 12px;
        height: 12px;
    }
    .btn-sync {
        padding: 6px;
        flex-shrink: 0;
    }
    .btn-sync .sync-label {
        display: none;
    }
    .auth-nav-container {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }
    /* No celular o user-badge exibe apenas o avatar para economizar espaço e priorizar o botão Painel */
    .user-badge {
        padding: 4px 6px;
        font-size: 0.8rem;
        flex-shrink: 0;
        gap: 0;
    }
    .user-badge .user-email,
    .user-badge .user-plan-badge {
        display: none !important;
    }
    /* Botão Painel com destaque visual e SEMPRE visível */
    .btn-nav-admin {
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        padding: 5px 9px !important;
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(236, 72, 153, 0.4)) !important;
        border: 1px solid rgba(168, 85, 247, 0.7) !important;
        color: #fff !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        border-radius: var(--radius-full) !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3) !important;
    }
    .btn-nav-logout {
        padding: 5px 8px;
        font-size: 0.72rem;
        flex-shrink: 0;
    }
    .btn-nav-login {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 6px 11px !important;
        font-size: 0.76rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 400px) {
    .navbar {
        padding: 6px 6px;
        gap: 4px;
    }
    .brand-logo .logo-text {
        font-size: 0.95rem;
    }
    .search-box input {
        width: 70px;
    }
    .search-box input:focus {
        width: 105px;
    }
    .btn-nav-admin {
        padding: 4px 7px !important;
        font-size: 0.7rem !important;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 0 10px 30px 10px;
    }

    /* BANNER VERTICAL OTIMIZADO PARA CELULAR (SEM ULTRAPASSAR LATERAIS) */
    .hero-banner {
        padding: 20px 14px;
        min-height: 460px;
        margin-top: 10px;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    .hero-backdrop {
        background-position: center top;
        background-size: cover;
    }
    .hero-body {
        width: 100%;
        max-width: 100%;
    }
    .hero-title {
        font-size: 1.45rem;
        line-height: 1.25;
        margin-bottom: 8px;
        word-break: break-word;
    }
    .hero-desc {
        font-size: 0.82rem;
        -webkit-line-clamp: 2;
        margin-bottom: 14px;
    }
    .hero-meta {
        gap: 6px;
        margin-bottom: 10px;
    }
    .meta-tag {
        font-size: 0.7rem;
        padding: 2px 7px;
    }
    .hero-actions {
        display: flex;
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }
    .hero-actions .btn {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
        font-size: 0.82rem;
        justify-content: center;
        border-radius: 10px;
    }

    /* GRID EM 2 COLUNAS PARA FORMATO VERTICAL DE DORAMA */
    .dramas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        width: 100%;
    }
    .card-info {
        padding: 8px;
    }
    .card-title {
        font-size: 0.82rem;
        margin-bottom: 4px;
    }
    .card-meta-row {
        font-size: 0.7rem;
    }

    /* Modais em celular */
    .modal-card {
        padding: 0;
    }
    .modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }
    .modal-poster-wrap {
        width: 100px;
    }
    .modal-title {
        font-size: 1.2rem;
    }
    .modal-episodes-section {
        padding: 14px;
    }

    .paywall-plans {
        display: none; /* replaced by carousel on mobile */
    }
    .paywall-carousel-wrap {
        display: block;
    }
    .paywall-carousel .plan-card {
        flex: 0 0 78vw;
    }
    .paywall-box {
        padding: 24px 16px 16px;
    }
    /* Modal de Autenticação responsivo no celular */
    .auth-modal-overlay {
        padding: 10px 8px;
        align-items: center;
    }
    .auth-modal-card {
        padding: 20px 16px 18px;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 18px;
        width: 100%;
        max-width: 380px;
        box-sizing: border-box;
    }
    .auth-modal-header {
        margin-bottom: 12px;
    }
    .auth-modal-icon {
        font-size: 1.6rem;
        margin-bottom: 2px;
    }
    .auth-modal-title {
        font-size: 1.3rem;
    }
    .auth-modal-subtitle {
        font-size: 0.78rem;
    }
    .auth-tabs {
        gap: 2px;
        margin-bottom: 14px;
        width: 100%;
    }
    .auth-tab {
        padding: 6px 2px;
        font-size: 0.74rem;
        letter-spacing: -0.2px;
        white-space: nowrap;
    }
    .auth-panel-hint {
        font-size: 0.75rem;
        padding: 8px 10px;
        margin-bottom: 10px;
    }
    .auth-input-group {
        gap: 3px;
        margin-bottom: 2px;
    }
    .auth-input-group label {
        font-size: 0.72rem;
    }
    .auth-input-group input {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .btn-auth-submit {
        padding: 11px 16px;
        font-size: 0.88rem;
        margin-top: 4px;
    }
    .auth-extra-links {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
        margin-top: 10px;
    }
    .auth-extra-links .auth-dot {
        display: none;
    }
    .auth-link {
        font-size: 0.74rem;
    }

    /* Phase 2 mobile */
    .sort-bar {
        gap: 6px;
        padding: 0 12px;
    }
    .sort-btn {
        font-size: 0.72rem;
        padding: 5px 10px;
    }
    .category-bar {
        padding: 0 12px;
    }
    .cat-pill {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    .recs-section {
        margin-top: 18px;
        padding-top: 14px;
    }
    .recs-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    .promo-banner {
        margin: 8px 12px;
        padding: 16px;
    }
    .promo-banner-content {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ============================================================
   FASE 2 — CATEGORIAS, ORDENAÇÃO, RECOMENDAÇÕES, BANNERS
   ============================================================ */

/* ── Category Bar ── */
.category-bar-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* scrollbar-width: none; */
    padding: 12px 0 4px;
}
/* .category-bar-wrap::-webkit-scrollbar { display: none; } */

/* ── Category Cards ── */
.category-cards-wrap {
    display: flex;
    gap: 12px;
    padding: 0 24px 16px;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
}

.cat-card {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 140px;
    height: 80px;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    text-align: left;
    padding: 10px;
}

@media (max-width: 768px) {
    .cat-card {
        width: 110px;
        height: 70px;
    }
}

.cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.cat-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4);
}

.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
    pointer-events: none;
}

.cat-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.cat-card-icon {
    font-size: 1rem;
}

.cat-card-title {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-count-badge {
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    padding: 2px 6px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ── Sort Bar ── */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* scrollbar-width: none; */
}
.sort-bar::-webkit-scrollbar { display: none; }

.sort-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-glass);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.sort-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.sort-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(139,92,246,0.3);
}

/* ── Recomendações ── */
.recs-section {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-glass);
    background: transparent;
}

.recs-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 10px;
    padding: 2px 0 8px;
}

.rec-card {
    min-width: 0;
    width: 100%;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.rec-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.rec-poster {
    width: 100%;
    aspect-ratio: 9/14;
    object-fit: cover;
    object-position: top center;
    display: block;
    background: #141422;
}

.rec-info {
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.rec-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
    margin-bottom: 4px;
}

.rec-eps {
    font-size: 0.65rem;
    font-weight: 600;
    color: #c084fc;
    padding: 0;
}

/* ── Banners Promocionais ── */
#promotionalBanners {
    padding: 0 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-banner {
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    position: relative;
    overflow: hidden;
    cursor: default;
    animation: bannerPulse 4s ease-in-out infinite;
}

@keyframes bannerPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(139,92,246,0.25); }
    50%       { box-shadow: 0 8px 30px rgba(168,85,247,0.45); }
}

.promo-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.promo-banner-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.promo-banner-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.promo-banner-cta {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-full);
    padding: 8px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.promo-banner-cta:hover {
    background: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-1px);
}


.category-bar-wrap::-webkit-scrollbar {
    height: 8px;
}
.category-bar-wrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.category-bar-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.category-bar-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}
@media (min-width: 769px) {
    .category-cards-wrap {
        flex-wrap: wrap;
        white-space: normal;
        width: 100%;
        justify-content: flex-start;
    }
    .category-bar-wrap {
        overflow: visible; /* Prevents scrollbar if it wraps */
    }
}
/* ============================================================ */
/* FOOTER INSTITUCIONAL                                          */
/* ============================================================ */
.site-footer {
    background: linear-gradient(180deg, transparent 0%, rgba(10,10,20,0.95) 100%);
    border-top: 1px solid rgba(124,58,237,0.2);
    padding: 2.5rem 1.5rem 1.5rem;
    margin-top: 4rem;
}
.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.footer-logo-icon { font-size: 1.5rem; }
.footer-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent, #7c3aed);
    letter-spacing: .04em;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.5rem;
}
.footer-links a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: .85rem;
    transition: color .2s;
}
.footer-links a:hover { color: var(--accent, #7c3aed); }
.footer-copy {
    color: rgba(255,255,255,.3);
    font-size: .75rem;
    margin: 0;
}

/* ============================================================ */
/* MODAL CMS DE PÁGINAS INSTITUCIONAIS                          */
/* ============================================================ */
.page-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(6px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    padding: 1rem;
}
.page-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.page-modal-box {
    background: linear-gradient(145deg, #1a1025, #0f0a1e);
    border: 1px solid rgba(124,58,237,.3);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.6);
    position: relative;
}
.page-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,.08);
    border: none;
    color: rgba(255,255,255,.7);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background .2s;
}
.page-modal-close:hover { background: rgba(255,255,255,.15); }
.page-modal-title {
    padding: 1.5rem 3rem 1rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin: 0;
}
.page-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    color: rgba(255,255,255,.8);
    line-height: 1.8;
    font-size: .95rem;
}
.page-content-rendered { white-space: pre-wrap; }

/* ============================================================ */
/* BANNER CAROUSEL — 16:9 / 3:1 (Proporção para celular)        */
/* ============================================================ */
.banner-carousel-section {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;          /* 3:1 em desktop               */
    max-height: 280px;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 0;
}
@media (max-width: 600px) {
    .banner-carousel-section {
        aspect-ratio: 16 / 9;     /* 16:9 em celular — mais alto  */
        max-height: none;
    }
}
.banner-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .5s ease;
    display: flex;
    align-items: flex-end;
}
.banner-slide.active { opacity: 1; z-index: 1; }
.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}
@media (max-width: 600px) {
    .banner-overlay {
        background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
    }
}
.banner-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem 2rem;
    max-width: 520px;
}
@media (max-width: 600px) {
    .banner-content { padding: 1rem 1.2rem; max-width: 100%; }
}
.banner-tag {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent, #7c3aed);
    margin: 0 0 .3rem;
    min-height: .9rem;
}
.banner-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 .8rem;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
@media (max-width: 600px) {
    .banner-title { font-size: 1.05rem; }
}
.banner-cta {
    display: inline-block;
    background: var(--accent, #7c3aed);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    padding: .45rem 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    transition: background .2s, transform .15s;
}
.banner-cta:hover { background: var(--accent-hover, #6d28d9); transform: translateY(-2px); }
/* Pontos de navegação */
.banner-dots {
    position: absolute;
    bottom: .75rem;
    right: 1rem;
    display: flex;
    gap: .4rem;
    z-index: 3;
}
.banner-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}
.banner-dot.active {
    background: #fff;
    transform: scale(1.35);
}

/* ============================================================ */
/* NAVBAR — Ícone quadrado + nome (padrão de mercado)           */
/* ============================================================ */
.brand-logo {
    display: flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    flex-shrink: 0;
}
/* Ícone quadrado carregado do white-label */
.brand-logo-icon {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 7px;       /* levemente arredondado, como iOS/Android */
    flex-shrink: 0;
    display: block;
}
/* Nome ao lado do ícone */
.brand-logo-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.01em;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 400px) {
    .brand-logo-name { max-width: 100px; font-size: .95rem; }
}
/* Mantém estilo do emoji de fallback */
.brand-logo .logo-icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* ============================================================
   MODO OFFLINE
   ============================================================ */
.offline-mode-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
    text-align: center;
}
.offline-header h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
}
.offline-header p {
    color: var(--text-muted);
    margin-bottom: 30px;
}
.offline-mode-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}
.offline-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    transition: var(--transition);
}
.offline-card:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}
.offline-card-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
}
.offline-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}
.btn-offline-play {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    transition: var(--transition);
}
.btn-offline-play:hover {
    opacity: 0.9;
}
.btn-offline-del {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-offline-del:hover {
    background: rgba(239, 68, 68, 0.25);
}


