@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Cormorant+Garamond:wght@500;600;700&display=swap');

/* =====================================================================
   ASTRA4K — Premium Template
   Paleta: Roxo Profundo + Violeta Neon + Magenta. Vidro leve, linhas finas.
   ===================================================================== */
:root {
    /* Superfícies */
    --bg: #090610;
    --bg-dark: #0c0816;
    --bg-raised: #120b20;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-strong: rgba(18, 11, 32, 0.62);
    --glass-border: rgba(255, 255, 255, 0.075);
    --glass-highlight: rgba(255, 255, 255, 0.16);

    /* Acento: Roxo / Magenta Neon */
    --brand-color: #d15cff;
    --brand-deep: #8a2be2;
    --brand-soft: rgba(209, 92, 255, 0.10);
    --brand-line: rgba(209, 92, 255, 0.38);
    --brand-blue: #00d4ff;
    --brand-glow: 0 8px 30px rgba(209, 92, 255, 0.25);

    /* Texto */
    --primary: #fbf8f2;
    --text: rgba(251, 248, 242, 0.92);
    --text-muted: rgba(251, 248, 242, 0.56);
    --text-faint: rgba(251, 248, 242, 0.34);

    /* Forma & movimento */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.5);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --transition: all 0.35s var(--ease);
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
}

/* Tema Cinza Fosco */
body.theme-cinza {
    --brand-color: #8bb0c9;
    --brand-deep: #4c687e;
    --brand-soft: rgba(139, 176, 201, 0.10);
    --brand-line: rgba(139, 176, 201, 0.38);
    --brand-blue: #a3c2d6;
    --brand-glow: 0 8px 30px rgba(139, 176, 201, 0.15);
    --bg: #14161a;
    --bg-dark: #171a1f;
    --bg-raised: #1e2229;
}

/* Tema Ametista Escuro */
body.theme-ametista {
    --brand-color: #ff3366;
    --brand-deep: #cc0044;
    --brand-soft: rgba(255, 51, 102, 0.10);
    --brand-line: rgba(255, 51, 102, 0.38);
    --brand-blue: #ff6699;
    --brand-glow: 0 8px 30px rgba(255, 51, 102, 0.25);
}

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

::selection { background: rgba(209, 92, 255, 0.28); color: #fff; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.005em;
}

/* Aurora ambiente — muito suave, sem imagens pesadas */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='800'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.025)' stroke-width='0.5'%3E%3Cpath d='M120,150 L180,280 L320,240 L380,120 M500,600 L580,480 L700,540 M650,180 L780,290 L710,420 M200,600 L150,750 L350,700 L300,500'/%3E%3C/g%3E%3Cg fill='rgba(255,255,255,0.08)'%3E%3Ccircle cx='120' cy='150' r='1.5'/%3E%3Ccircle cx='180' cy='280' r='2'/%3E%3Ccircle cx='320' cy='240' r='1'/%3E%3Ccircle cx='380' cy='120' r='1.5'/%3E%3Ccircle cx='500' cy='600' r='2'/%3E%3Ccircle cx='580' cy='480' r='1.5'/%3E%3Ccircle cx='700' cy='540' r='1.2'/%3E%3Ccircle cx='650' cy='180' r='1.5'/%3E%3Ccircle cx='780' cy='290' r='2'/%3E%3Ccircle cx='710' cy='420' r='1'/%3E%3Ccircle cx='200' cy='600' r='1.2'/%3E%3Ccircle cx='150' cy='750' r='1.5'/%3E%3Ccircle cx='350' cy='700' r='1'/%3E%3Ccircle cx='300' cy='500' r='1.5'/%3E%3Ccircle cx='50' cy='350' r='0.8'/%3E%3Ccircle cx='400' cy='300' r='1.2'/%3E%3Ccircle cx='600' cy='700' r='1'/%3E%3Ccircle cx='50' cy='50' r='1.5'/%3E%3Ccircle cx='450' cy='50' r='0.8'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(900px 600px at 8% -10%, rgba(132, 112, 190, 0.16), transparent 60%),
        radial-gradient(800px 600px at 100% 0%, rgba(209, 92, 255, 0.07), transparent 60%),
        radial-gradient(900px 700px at 70% 115%, rgba(86, 120, 190, 0.10), transparent 60%),
        linear-gradient(180deg, #0f1016 0%, #0b0c11 100%);
}

#app { display: flex; height: 100vh; width: 100vw; }

/* Scrollbars discretas */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.10); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(209, 92, 255, 0.35); }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================
   Liquid glass (base)
====================================== */
.liquid-glass {
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
}

/* =====================================
   Sidebar & Navigation
====================================== */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border-right: 1px solid var(--glass-border);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.02), 18px 0 50px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    padding: 2.75rem 0 2rem;
    z-index: 20;
    position: relative;
}
/* fio de luz no topo do vidro */
.sidebar::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
}

.logo {
    text-align: center;
    margin-bottom: 3.25rem;
    padding: 0 1.5rem;
}
.logo img { max-width: 160px; }
.logo-sub {
    font-size: 0.7rem; color: var(--text-muted);
    letter-spacing: 3px; text-transform: uppercase; margin-top: 8px; font-weight: 500;
}
.logo i.fa-earth-americas {
    font-size: 2.2rem !important;
    color: var(--brand-color) !important;
    filter: drop-shadow(0 4px 18px rgba(209, 92, 255, 0.35)) !important;
    margin-bottom: 14px !important;
}
.logo h1 {
    font-family: var(--font-serif);
    font-size: 2.3rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--primary);
}
.logo h1 span { color: var(--brand-color) !important; }
.logo div > span:last-child {
    letter-spacing: 7px !important;
    font-weight: 500 !important;
    font-size: 0.62rem !important;
    color: var(--text-muted) !important;
    margin-top: 8px;
    padding-left: 7px;
}

.nav-links { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; padding: 0 1.1rem; }
.nav-links li a {
    color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 450;
    padding: 0.95rem 1.35rem; display: flex; align-items: center; border-radius: var(--radius);
    border: 1px solid transparent; transition: var(--transition);
    position: relative;
}
.nav-links li a i { width: 22px; margin-right: 14px; font-size: 1.05rem; opacity: 0.65; transition: var(--transition); }
.nav-links li:hover a { color: var(--primary); background: var(--surface); }
.nav-links li:hover a i { opacity: 1; }

/* Estado ativo: vidro com fio champagne */
.nav-links li.active a {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(209,92,255,0.14), rgba(209,92,255,0.04));
    border: 1px solid rgba(209, 92, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 24px rgba(0,0,0,0.25);
    font-weight: 550;
}
.nav-links li.active a::before {
    content: ''; position: absolute; left: -1.1rem; top: 22%; bottom: 22%; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--brand-color);
    box-shadow: 0 0 14px rgba(209,92,255,0.55);
}
.nav-links li.active a i { opacity: 1; color: var(--brand-color); }

.user-profile {
    padding: 1.4rem 0.5rem 0; margin: 0 1.5rem;
    border-top: 1px solid var(--glass-border); display: flex; align-items: center; gap: 14px;
}
.avatar {
    width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
    border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center;
    color: var(--brand-color); font-size: 0.95rem;
}
.user-profile .info { display: flex; flex-direction: column; gap: 2px; }
.user-info .name, .user-profile .name { font-weight: 600; font-size: 0.9rem; color: var(--primary); }
.user-info .status, .user-profile .status { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.02em; }
#btn-logout { color: var(--text-muted) !important; transition: var(--transition) !important; }
#btn-logout:hover { color: var(--brand-color) !important; transform: translateX(2px); }

/* =====================================
   Buttons, Inputs & Top Bar
====================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-deep) 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 0.95rem 2rem; border-radius: 999px; font-size: 0.92rem; font-weight: 600;
    letter-spacing: 0.02em; cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; gap: 10px; font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 28px rgba(209, 92, 255, 0.20), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(209, 92, 255, 0.32), inset 0 1px 0 rgba(255,255,255,0.6);
    filter: brightness(1.04);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    padding: 0.95rem 1.8rem; border-radius: 999px; font-size: 0.92rem; font-weight: 500;
    cursor: pointer; transition: var(--transition); font-family: 'Inter', sans-serif;
    display: inline-flex; align-items: center; gap: 10px;
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--brand-line); transform: translateY(-2px); }

.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

.top-bar { position: absolute; top: 1.75rem; left: 2.5rem; right: 3.5%; z-index: 30; display: flex; justify-content: space-between; align-items: center; }

/* Botão do topo em vidro (mais leve que o CTA do hero) */
.top-bar .btn-primary {
    background: var(--glass-strong);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    color: var(--primary);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 0.75rem 1.5rem;
}
.top-bar .btn-primary:hover { border-color: var(--brand-line); box-shadow: var(--brand-glow), inset 0 1px 0 rgba(255,255,255,0.1); }
.top-bar .btn-primary.btn-glow { border-color: rgba(209,92,255,0.4); }
.top-bar .btn-primary.btn-glow i { color: var(--brand-color); }

.search-bar, .search-container { position: relative; display: flex; align-items: center; }
.search-bar input, .search-container input {
    background: rgba(18, 11, 32, 0.95);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 999px; padding: 0.85rem 1.5rem 0.85rem 2.8rem; color: var(--primary); width: 450px; max-width: 100%;
    font-size: 0.92rem; box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: var(--transition); font-family: 'Inter', sans-serif;
}
.search-bar input::placeholder, .search-container input::placeholder { color: var(--text-faint); }
.search-bar input:focus, .search-container input:focus {
    width: 600px; outline: none; border-color: var(--brand-line);
    box-shadow: 0 0 0 4px rgba(209, 92, 255, 0.08), var(--shadow-soft);
}
.search-bar i, .search-container i { position: absolute; left: 18px; color: var(--text-muted); font-size: 0.85rem; z-index: 1; pointer-events: none; }

/* =====================================
   Modais
====================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(24,22,36,0.82), rgba(5,5,9,0.92));
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
    background: linear-gradient(160deg, rgba(30,31,42,0.82), rgba(16,17,24,0.9));
    border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 3rem 2.75rem;
    width: 90%; max-width: 460px; text-align: center; position: relative;
    transform: translateY(24px) scale(0.98); transition: transform 0.5s var(--ease);
    box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255,255,255,0.08);
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
.modal-content > h2 {
    font-family: var(--font-serif); font-weight: 600; font-size: 2.1rem; color: var(--primary); letter-spacing: 0.01em;
}

.close-btn, .close-modal {
    position: absolute; top: 1.25rem; right: 1.25rem;
    background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border); border-radius: 50%;
    color: var(--text-muted); font-size: 1rem; width: 40px; height: 40px; cursor: pointer;
    transition: var(--transition); z-index: 20; display: flex; align-items: center; justify-content: center;
}
.close-btn:hover, .close-modal:hover {
    color: var(--primary); background: var(--brand-soft); border-color: var(--brand-line); transform: rotate(90deg);
}

/* Formulário de login */
.auth-form { text-align: left; }
.input-group { margin-bottom: 1.25rem; }
.input-group label {
    display: block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 0.55rem;
}
.input-group input {
    width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); padding: 0.95rem 1.1rem; color: var(--primary);
    font-family: 'Inter', sans-serif; font-size: 0.95rem; transition: var(--transition);
}
.input-group input::placeholder { color: var(--text-faint); }
.input-group input:focus {
    outline: none; border-color: var(--brand-line); background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 4px rgba(209,92,255,0.08);
}
#xtream-form .btn-primary { margin-top: 1.5rem !important; }

#player-modal .modal-content {
    max-width: 1200px; width: 95%; padding: 0; background: #000; overflow: hidden;
    border-radius: var(--radius-lg); border: 1px solid var(--glass-border);
}
#player-modal .close-btn { top: 1.1rem; right: 1.1rem; }
#video-player { width: 100%; height: 75vh; background: #000; outline: none; }

/* Painel Lateral de Detalhes (Substitui Modal) */
.details-pane {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 540px; /* sidebar + category-sidebar */
    z-index: 900;
    background: var(--bg);
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateX(40px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}
.details-pane.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}
.details-pane-content {
    width: 100%;
    min-height: 100%;
    position: relative;
    background: var(--bg);
}
.details-pane-content::-webkit-scrollbar { width: 8px; }
.details-pane-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.details-pane-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.details-pane-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* Temporadas & Episodios Horizontais */
.horizontal-scroll {
    display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px; scroll-behavior: smooth;
}
.horizontal-scroll::-webkit-scrollbar { height: 8px; }
.horizontal-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.horizontal-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.horizontal-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.episode-card-vertical {
    width: 240px; flex-shrink: 0; cursor: pointer; transition: var(--transition);
}
.episode-card-vertical:hover { transform: translateY(-5px); }
.ep-img-wrapper {
    position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden;
    margin-bottom: 12px; border: 1px solid var(--glass-border); background: #111;
}
.ep-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.episode-card-vertical:hover .ep-img { transform: scale(1.05); }
.ep-play-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition); color: var(--bg); font-size: 1.5rem;
}
.ep-play-overlay i { background: var(--brand-color); width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.episode-card-vertical:hover .ep-play-overlay { opacity: 1; }
.ep-info h5 { font-size: 1rem; color: var(--primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }

/* =====================================
   Views
====================================== */
.main-content { flex: 1; position: relative; min-width: 0; }
.view { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease); overflow-y: auto; }
.view.active { opacity: 1; pointer-events: auto; }

/* Hero (Home) */
.hero-banner {
    height: 72vh; min-height: 420px;
    background-size: cover; background-position: center;
    position: relative; display: flex; align-items: flex-end; padding: 5rem 5rem 4.5rem;
}
.hero-banner::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(to right, rgba(13,14,19,0.92) 0%, rgba(13,14,19,0.45) 48%, rgba(13,14,19,0.05) 100%),
        linear-gradient(to top, var(--bg) 0%, rgba(13,14,19,0.55) 22%, transparent 55%);
}
.hero-content { position: relative; z-index: 2; max-width: 620px; animation: rise 0.9s var(--ease) both; }
.hero-title {
    font-family: var(--font-serif); font-size: 4.2rem; font-weight: 600; margin-bottom: 1.1rem;
    line-height: 1.02; letter-spacing: 0.005em; color: var(--primary);
    text-shadow: 0 6px 30px rgba(0,0,0,0.5);
}
.hero-meta { display: flex; gap: 12px; margin-bottom: 1.5rem; font-size: 0.82rem; font-weight: 500; align-items: center; color: var(--text-muted); }
.hero-match { color: var(--brand-color); font-weight: 600; letter-spacing: 0.04em; }
.hero-rating {
    padding: 3px 10px; border: 1px solid var(--glass-border); border-radius: 999px;
    background: rgba(255,255,255,0.05); color: var(--text); font-size: 0.74rem; letter-spacing: 0.06em;
}
.hero-desc { font-size: 1.02rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 2.25rem; font-weight: 300; max-width: 560px; }
.hero-dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.3);
    cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.7); }
.hero-dot.active {
    background: var(--brand-color); width: 28px; border-radius: 4px;
    box-shadow: 0 0 12px rgba(209,92,255,0.6);
}
/* Linhas estilo streaming */
.row-wrapper { margin-bottom: 3.5rem; padding-left: 5rem; }
.row-wrapper h3 {
    font-family: var(--font-serif); font-size: 1.85rem; font-weight: 600; letter-spacing: 0.01em;
    margin-bottom: 1.1rem; color: var(--primary);
    display: flex; align-items: center; gap: 14px;
}
.row-wrapper h3::after { content: ''; flex: 0 0 56px; height: 1px; background: linear-gradient(90deg, var(--brand-line), transparent); }
.row-slider {
    display: flex; gap: 20px; overflow-x: auto;
    padding: 14px 5rem 1.5rem 4px; margin-top: -14px; scroll-behavior: smooth;
}
.row-slider::-webkit-scrollbar { height: 5px; }

/* Grid */
.view-container { padding: 5rem 4%; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px; }

/* Cards VOD */
.card {
    min-width: 220px; width: 220px; aspect-ratio: 2/3; background: var(--bg-raised); border-radius: var(--radius);
    position: relative; cursor: pointer; overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
    animation: rise 0.6s var(--ease) both;
}
.cards-grid .card { width: 100%; min-width: 0; }
.card:hover {
    transform: translateY(-8px) scale(1.025); box-shadow: var(--shadow-lift), 0 0 0 1px var(--brand-line);
    z-index: 10; border-color: var(--brand-line);
}
.card-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 2rem; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.card:hover .card-image img { transform: scale(1.06); }
.imdb-badge {
    position: absolute; top: 12px; left: 12px; background: rgba(13,14,19,0.55);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: var(--primary); padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; z-index: 2;
    border: 1px solid var(--glass-border); letter-spacing: 0.03em;
}
.imdb-badge span { color: var(--brand-color); }
.imdb-badge i { color: var(--brand-color); font-size: 0.65rem; }
.card-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(8,8,12,0.96) 0%, rgba(8,8,12,0.6) 55%, transparent 100%);
    padding: 2.5rem 1.2rem 1.2rem; opacity: 0; transform: translateY(8px); transition: var(--transition);
}
.card:hover .card-info { opacity: 1; transform: translateY(0); }
.card-info h4 { font-size: 0.98rem; margin-bottom: 4px; font-weight: 600; color: var(--primary); line-height: 1.3; }
.card-info p { font-size: 0.78rem; color: var(--brand-color); letter-spacing: 0.04em; }

/* =====================================
   Split views (Filmes / Séries / TV)
====================================== */
.split-view { display: flex; height: 100vh; }

.category-sidebar {
    width: 280px; background: rgba(255,255,255,0.02); border-right: 1px solid var(--glass-border);
    overflow-y: auto; padding: 5.5rem 1.1rem 100px; flex-shrink: 0;
}

.category-item {
    padding: 0.65rem 1rem; margin-bottom: 4px; cursor: pointer; border-radius: var(--radius-sm); color: var(--text-muted);
    font-weight: 450; font-size: 0.85rem; display: flex; justify-content: space-between; align-items: center; gap: 8px;
    border: 1px solid transparent; transition: var(--transition);
}
.category-item:hover { background: var(--surface); color: var(--primary); transform: translateX(3px); }
.category-item.active {
    background: linear-gradient(135deg, rgba(209,92,255,0.13), rgba(209,92,255,0.03));
    color: var(--primary); border: 1px solid rgba(209,92,255,0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.category-count {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    padding: 3px 10px; border-radius: 999px; font-size: 0.7rem; color: var(--text-muted); font-weight: 500; flex-shrink: 0;
}
.category-item.active .category-count { color: var(--brand-color); border-color: var(--brand-line); }

/* Lista de canais */
.channel-list-sidebar {
    width: 340px; background: rgba(255,255,255,0.015); border-right: 1px solid var(--glass-border);
    display: flex; flex-direction: column; flex-shrink: 0; padding-top: 3.5rem;
}
.channel-list-sidebar h2, .content-area > h2 {
    font-family: var(--font-serif); font-size: 2rem; font-weight: 600; letter-spacing: 0.01em; color: var(--primary);
}
.channel-list-sidebar h2 i, .content-area > h2 i { color: var(--brand-color); font-size: 1.1rem; margin-right: 10px; }

.live-list-card {
    display: flex; align-items: center; background: var(--surface); border: 1px solid transparent;
    border-radius: var(--radius); padding: 12px; margin-bottom: 8px; cursor: pointer; transition: var(--transition);
    animation: rise 0.5s var(--ease) both;
}
.live-list-card:hover { background: var(--surface-hover); border-color: var(--glass-border); transform: translateX(4px); }
.live-list-card.active { background: var(--brand-soft); border-color: var(--brand-line); }
.list-card-image {
    width: 64px; height: 46px; margin-right: 14px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 10px; overflow: hidden; padding: 6px;
    color: var(--text-faint); flex-shrink: 0;
}
.list-card-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.list-card-info { flex: 1; overflow: hidden; }
.list-card-info h4 { font-size: 0.9rem; font-weight: 500; color: var(--primary); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card-info p { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Player ao vivo */
.live-player-area { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; background: transparent; padding: 5.5rem 2.5rem 2.5rem; }
.live-player-container-wrapper { width: 100%; margin-bottom: 1.5rem; }
#live-player-container {
    background: #000; width: 100%; aspect-ratio: 21/9; position: relative; overflow: hidden;
    border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift), 0 0 0 1px rgba(255,255,255,0.02);
}
#inline-video-player { width: 100%; height: 100%; object-fit: cover; background: #000; }
#inline-player-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2;
    background: radial-gradient(circle at 50% 50%, rgba(20,20,30,0.75), rgba(5,5,9,0.92));
    color: var(--text-muted); font-size: 0.95rem; letter-spacing: 0.04em;
}

/* Título do canal em reprodução */
.live-now-header { margin-bottom: 1.4rem; padding: 0 0.25rem; }
.live-now-header h3 {
    font-family: var(--font-serif); font-size: 1.9rem; font-weight: 600; color: var(--primary); line-height: 1.1;
}
.live-now-header span { font-size: 0.78rem; color: var(--brand-color); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }

/* Selos do player */
.player-badges-top-right { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; z-index: 5; }
.player-badges-bottom-left { position: absolute; bottom: 16px; left: 16px; display: flex; gap: 8px; z-index: 5; }
.player-badges-bottom-right { position: absolute; bottom: 16px; right: 16px; display: flex; gap: 8px; z-index: 5; }
.player-badge {
    background: rgba(13,14,19,0.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    padding: 4px 11px; border-radius: 999px; font-size: 0.68rem; font-weight: 500; color: var(--text); letter-spacing: 0.05em;
}
.player-badge-live {
    background: rgba(13,14,19,0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--brand-line);
    padding: 4px 13px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; color: var(--primary);
    display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.14em;
}
.live-dot { width: 7px; height: 7px; background: var(--brand-color); border-radius: 50%; box-shadow: 0 0 10px var(--brand-color); animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

/* EPG */
.epg-wrapper { max-width: 1200px; width: 100%; }
#epg-container > p { color: var(--text-faint) !important; font-size: 0.9rem !important; letter-spacing: 0.02em; }

.epg-now-playing {
    display: flex; gap: 24px; background: linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
    border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px;
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.06);
    animation: rise 0.6s var(--ease) both;
}
.epg-now-image {
    width: 200px; height: 120px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0;
    border: 1px solid var(--glass-border); background: var(--bg-raised);
}
.epg-now-image img { width: 100%; height: 100%; object-fit: cover; }
.epg-now-info { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.epg-now-header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.epg-now-header h4 { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; color: var(--primary); line-height: 1.1; }
.epg-now-rating { color: var(--brand-color); font-size: 0.8rem; letter-spacing: 2px; }
.epg-now-genre { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.16em; }
.epg-now-age { background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border); color: var(--primary); font-weight: 600; font-size: 0.68rem; padding: 2px 8px; border-radius: 6px; }
.epg-now-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; font-weight: 300; }
.epg-progress-bar { width: 100%; height: 3px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.epg-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand-deep), var(--brand-color)); border-radius: 3px; box-shadow: var(--brand-glow); }

.epg-upcoming-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.epg-upcoming-card {
    background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 18px 20px; transition: var(--transition); animation: rise 0.6s var(--ease) both;
}
.epg-upcoming-card:hover { border-color: var(--brand-line); background: var(--surface-hover); transform: translateY(-3px); }
.up-time { font-size: 0.78rem; color: var(--text-muted); display: flex; justify-content: space-between; margin-bottom: 10px; letter-spacing: 0.03em; }
.up-time .badge { font-size: 0.62rem; font-weight: 600; color: var(--brand-color); text-transform: uppercase; letter-spacing: 0.14em; }
.up-title { font-size: 0.98rem; font-weight: 500; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =====================================
   Configurações & afins
====================================== */
.settings-container {
    max-width: 780px; margin: 3rem auto; padding: 3.25rem;
    background: linear-gradient(160deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
    border-radius: var(--radius-lg); border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.06);
}
.setting-group, .settings-section { margin-bottom: 2.25rem; padding-bottom: 2.25rem; border-bottom: 1px solid var(--glass-border); }
.settings-section:last-child, .setting-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.setting-group h3, .settings-section h3 {
    margin-bottom: 1.6rem; color: var(--primary); font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600;
    display: flex; align-items: center; gap: 12px;
}
.settings-section h3 i, .setting-group h3 i { color: var(--brand-color); font-size: 1rem; }
.setting-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.3rem; color: var(--text-muted); font-size: 0.92rem; gap: 20px; }
.setting-item select, .setting-item button {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: var(--primary);
    padding: 0.65rem 1.2rem; border-radius: var(--radius-sm); font-family: 'Inter', sans-serif; font-size: 0.88rem; transition: var(--transition);
}
.setting-item select:focus { outline: none; border-color: var(--brand-line); }
.setting-item select option { background: var(--bg-raised); color: var(--primary); }
.setting-item button:hover { background: var(--brand-soft); border-color: var(--brand-line); cursor: pointer; }

/* Toggle estilo Apple */
.setting-item input[type="checkbox"] {
    -webkit-appearance: none; appearance: none; width: 46px !important; height: 26px !important; flex-shrink: 0;
    background: rgba(255,255,255,0.10); border: 1px solid var(--glass-border);
    border-radius: 999px; position: relative; cursor: pointer; outline: none; transition: var(--transition);
}
.setting-item input[type="checkbox"]::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%;
    transition: var(--transition); box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.setting-item input[type="checkbox"]:checked { background: linear-gradient(135deg, var(--brand-color), var(--brand-deep)); border-color: rgba(255,255,255,0.3); }
.setting-item input[type="checkbox"]:checked::after { left: 22px; }

.content-area { flex: 1; min-width: 0; overflow-y: auto; padding: 5.5rem 3.5rem 100px 3.5rem; background: transparent; }
.content-area > h2 { margin-bottom: 2rem !important; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 4rem; color: var(--text-muted); font-size: 1rem; }

/* Responsivo Completo (Mobile & Tablet) */
@media (max-width: 1100px) {
    .sidebar { width: 220px; }
    .category-sidebar { width: 230px; }
    .channel-list-sidebar { width: 290px; }
    .hero-title { font-size: 3.2rem; }
    .hero-banner { padding: 4rem 3rem; }
    .row-wrapper { padding-left: 3rem; }
}

@media (max-width: 900px) {
    /* Menu lateral vira menu inferior mobile */
    .sidebar {
        position: fixed !important;
        width: 100% !important;
        height: 75px !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-around;
        padding: 0 5px;
        z-index: 9999;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        background: rgba(12, 8, 22, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    .sidebar .logo, .sidebar .sys-status, .sidebar .user-profile { display: none !important; }
    
    .nav-links { display: flex; flex-direction: row; gap: 0; width: 100%; justify-content: space-between; margin: 0; padding: 0; height: 100%; align-items: center; }
    .nav-links li { margin: 0 !important; flex: 1; display: flex; justify-content: center; height: 100%; align-items: center; }
    .nav-links a { 
        padding: 0 !important; 
        flex-direction: column !important; 
        font-size: 0.65rem !important; 
        gap: 5px !important; 
        border-radius: 12px !important; 
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        white-space: nowrap !important;
        width: 100%;
        height: 80%;
        margin: auto;
    }
    .nav-links a i { font-size: 1.3rem !important; margin: 0 !important; width: auto !important; }
    .nav-links a span { display: block !important; white-space: nowrap !important; }
    
    .nav-links li.active a {
        background: linear-gradient(135deg, rgba(209,92,255,0.2), rgba(209,92,255,0.05)) !important;
        border: 1px solid rgba(209, 92, 255, 0.3) !important;
    }
    .nav-links li.active a::before { display: none !important; }
    
    .main-content {
        margin-left: 0;
        padding-bottom: 75px; /* space for bottom nav */
        width: 100%;
        overflow-y: auto;
    }

    /* Top Header */
    header.top-bar {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 1rem !important;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 10px;
    }
    .search-box { width: 100%; }
    .actions { width: 100%; justify-content: center !important; }

    /* Hero Banner */
    .hero-banner {
        padding: 3rem 1.5rem;
        min-height: 55vh;
        align-items: flex-end;
        background-position: top center;
    }
    .hero-title { font-size: 2.2rem; margin-bottom: 8px; }
    .hero-desc { width: 100%; font-size: 0.9rem; line-height: 1.5; margin-bottom: 15px; }
    
    /* Rows Netflix */
    .row-wrapper { padding-left: 1.5rem; }
    .row-slider { gap: 15px; padding-right: 1.5rem; }
    .row-slider .card { width: 130px; }
    
    /* Split Views (Movies/Series) */
    .split-view { flex-direction: column; height: auto; }
    .category-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
        gap: 10px;
        white-space: nowrap;
        background: rgba(12, 8, 22, 0.7);
    }
    .category-item {
        padding: 8px 18px;
        border-radius: 20px;
        margin-bottom: 0;
        display: inline-flex;
        background: rgba(255,255,255,0.05);
    }
    .content-area {
        padding: 1.5rem 1.5rem 100px 1.5rem;
        overflow: visible;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }

    /* Live Player Split View */
    #view-live .split-view, #view-radios .split-view {
        flex-direction: column; 
    }
    .live-player-area {
        height: 35vh;
        min-height: 220px;
        width: 100%;
        border-bottom: 1px solid var(--glass-border);
    }
    .channel-list-sidebar {
        width: 100%;
        height: calc(65vh - 75px);
        border-left: none;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    #search-results-popup {
        width: 95% !important;
        padding: 1.5rem !important;
        max-height: 60vh !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    .search-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    /* Settings */
    .settings-container { margin: 1rem auto; padding: 1.5rem; }
    .setting-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .setting-item div, .setting-item select, .setting-item button { width: 100%; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .hero-meta { flex-wrap: wrap; gap: 8px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons button { width: 100%; justify-content: center; }
    .grid-container { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .row-slider .card { width: 110px; }
    
    .ep-info h5 { font-size: 0.85rem; }
    #adult-pin-input { flex: 1; width: 100% !important; }
}

/* =====================================
   Zodiac & Stars Background Effects
====================================== */
.zodiac-particle {
    position: absolute;
    pointer-events: none;
    user-select: none;
    animation: fadeInOutZodiac linear infinite;
    z-index: -1;
    font-family: "Segoe UI Symbol", "Apple Symbols", serif;
}

@keyframes fadeInOutZodiac {
    0% { opacity: 0; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.1) rotate(15deg); }
    100% { opacity: 0; transform: scale(0.8) rotate(0deg); }
}
