@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-main: #080A0D;
    --bg-surface: #12151C;
    --bg-surface-elevated: #181C26;
    --bg-card: #151821;
    --bg-card-hover: #1E2330;
    --primary: #E50914;
    --primary-hover: #FF1F2D;
    --primary-glow: rgba(229, 9, 20, 0.4);
    --accent: #00D1B2;
    --text-main: #FFFFFF;
    --text-secondary: #9E9E9E;
    --text-muted: #666666;
    --border-color: #232938;
    --border-subtle: rgba(255, 255, 255, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 18px;
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #252D3C;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3B475D;
}

/* ============================================================ */
/* 0. CUSTOM TITLE BAR (DESKTOP DRAGGABLE)                      */
/* ============================================================ */
.titlebar {
    height: 48px;
    background: #0B0E14;
    border-bottom: 1px solid #1C2330;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    -webkit-app-region: drag;
    z-index: 1000;
}

.titlebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-app-region: no-drag;
}

.titlebar-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
}

.titlebar-name {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--primary);
}

.titlebar-nav {
    display: flex;
    gap: 8px;
    -webkit-app-region: no-drag;
}

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: var(--text-main);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 -2px 0 var(--primary);
}

.nav-icon {
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-link:hover .nav-icon {
    transform: scale(1.1);
}

.nav-link.active .nav-icon {
    color: var(--primary);
}

.titlebar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    -webkit-app-region: no-drag;
}

.titlebar input,
.titlebar button,
.titlebar select,
.titlebar a,
.titlebar-brand,
.titlebar-nav,
.titlebar-actions,
.titlebar-controls {
    -webkit-app-region: no-drag;
}

.search-box {
    display: flex;
    align-items: center;
    background: #141822;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 12px;
    gap: 8px;
    -webkit-app-region: no-drag;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 13px;
    width: 140px;
    transition: width 0.2s ease;
    -webkit-app-region: no-drag;
}

.search-box input:focus {
    width: 180px;
}

.account-badge {
    background: rgba(0, 209, 178, 0.12);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-app-region: no-drag;
}

.btn-logout:hover {
    background: rgba(229, 9, 20, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.titlebar-controls {
    display: flex;
    align-items: center;
    -webkit-app-region: no-drag;
}

.control-btn {
    width: 44px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
    -webkit-app-region: no-drag;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.control-btn.close:hover {
    background: var(--primary);
    color: white;
}

/* ============================================================ */
/* 1. APP VIEW CONTAINER                                        */
/* ============================================================ */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.view-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    display: none;
    -webkit-overflow-scrolling: touch;
}

.view-section.active {
    display: block;
}

/* ============================================================ */
/* 2. LOGIN VIEW (ESTILO CINEMATOGRÁFICO ANDROID/NETFLIX)       */
/* ============================================================ */
.login-view {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('assets/bg_login_netflix.jpg');
    background-size: cover;
    background-position: center;
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 7, 9, 0.85);
    backdrop-filter: blur(2px);
}

.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    background: rgba(18, 21, 28, 0.94);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.login-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.login-error {
    width: 100%;
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.4);
    color: #FF5E69;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
    margin-bottom: 18px;
    display: none;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #A0AAB8;
}

.input-field {
    background: #0C0F14;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    color: white;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================ */
/* 3. HOME VIEW (HERO BANNER + CARROSSEIS NETFLIX)              */
/* ============================================================ */
.home-container {
    padding: 24px 36px 64px 36px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Hero Section */
.hero-banner {
    position: relative;
    height: 400px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 36px;
    background: #11151D;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.hero-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 10, 13, 0.95) 0%, rgba(8, 10, 13, 0.7) 45%, rgba(8, 10, 13, 0.1) 100%),
                linear-gradient(0deg, rgba(8, 10, 13, 1) 0%, transparent 50%);
}

.hero-content {
    position: absolute;
    bottom: 40px;
    left: 44px;
    max-width: 650px;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-plot {
    font-size: 14px;
    color: #D1D5DB;
    line-height: 1.5;
    max-height: 64px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 22px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-hero-watch {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-watch:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.16);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Sections & Carousels */
.section-block {
    margin-bottom: 38px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.section-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.section-link:hover {
    color: var(--text-main);
}

.carousel-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-behavior: smooth;
}

/* Poster Cards */
.card-poster {
    flex: 0 0 165px;
    height: 248px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 165px 248px;
    will-change: transform;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease;
}

.card-poster:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-poster-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(8, 10, 13, 0.95) 0%, rgba(8, 10, 13, 0.7) 60%, transparent 100%);
    padding: 24px 10px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-poster-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-poster-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.card-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #FFB800;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* Live TV Channel Cards */
.card-live {
    flex: 0 0 200px;
    height: 115px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 190px 115px;
    will-change: transform;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease;
}

.card-live:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.card-live-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
}

.card-live-logo {
    max-height: 48px;
    max-width: 90px;
    object-fit: contain;
    margin-bottom: 8px;
}

.card-live-title {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Continue Watching Cards */
.card-continue {
    flex: 0 0 240px;
    height: 175px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.card-continue:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-continue-thumb {
    position: relative;
    height: 125px;
    width: 100%;
    background: #000;
}

.card-continue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-continue-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    font-size: 28px;
}

.card-continue-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.card-continue-progress {
    height: 100%;
    background: var(--primary);
}

.card-continue-info {
    padding: 8px 12px;
}

.card-continue-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================ */
/* 4. LIVE TV VIEW (SIDEBAR CATEGORIAS + GRID CANAIS)           */
/* ============================================================ */
.live-layout {
    display: flex;
    height: 100%;
}

.live-sidebar {
    width: 300px;
    background: #0C0F15;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    height: 100%;
    min-height: 0;
}

.live-sidebar-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.category-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    min-height: 0;
    padding-right: 4px;
}

.category-item {
    flex-shrink: 0;
    min-height: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.02);
}

.category-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.category-item.active {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.live-main {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* ============================================================ */
/* 5. CATALOG VIEW (GRID DE FILMES / SÉRIES / FAVORITOS)        */
/* ============================================================ */
.catalog-container {
    padding: 28px 36px 64px 36px;
    max-width: 1600px;
    margin: 0 auto;
}

.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.catalog-title-group {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.catalog-title {
    font-size: 28px;
    font-weight: 800;
}

.catalog-count {
    color: var(--text-secondary);
    font-size: 13px;
}

.catalog-filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-select {
    background: #141822;
    border: 1px solid var(--border-color);
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 20px;
}

/* ============================================================ */
/* 6. DETAILS MODAL / SCREEN (FILME / SÉRIE COM EPISÓDIOS)      */
/* ============================================================ */
.details-view {
    position: absolute;
    inset: 0;
    background: var(--bg-main);
    z-index: 50;
    overflow-y: auto;
    display: none;
}

.details-view.active {
    display: block;
}

.details-hero {
    position: relative;
    height: 440px;
    width: 100%;
}

.details-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.details-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg-main) 0%, rgba(8, 10, 13, 0.6) 60%, transparent 100%);
}

.btn-back-floating {
    position: absolute;
    top: 24px;
    left: 28px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-back-floating:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.details-body {
    position: relative;
    margin-top: -160px;
    padding: 0 48px 64px 48px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.details-columns {
    display: flex;
    gap: 36px;
}

.details-poster-wrap {
    flex: 0 0 240px;
}

.details-poster {
    width: 240px;
    height: 360px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
    object-fit: cover;
}

.details-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 12px;
}

.details-title {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.15;
}

.details-metadata {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--text-secondary);
}

.details-rating {
    background: var(--primary);
    color: white;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.details-plot {
    font-size: 15px;
    line-height: 1.6;
    color: #D1D5DB;
    margin-bottom: 28px;
    max-width: 850px;
}

.details-actions {
    display: flex;
    gap: 14px;
}

/* Series Episodes Section */
.series-episodes-section {
    margin-top: 48px;
    border-top: 1px solid var(--border-color);
    padding-top: 36px;
}

.series-episodes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.episode-card {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    gap: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.episode-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

.episode-thumb-wrap {
    position: relative;
    width: 160px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
}

.episode-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    font-size: 26px;
}

.episode-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.episode-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.episode-title {
    font-size: 16px;
    font-weight: 700;
}

.episode-duration {
    font-size: 12px;
    color: var(--text-secondary);
}

.episode-plot {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    max-height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============================================================ */
/* 7. FULLSCREEN VIDEO PLAYER (MPEGTS + HLS + MP4 ENGINE)       */
/* ============================================================ */
.player-view {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 200;
    display: none;
    overflow: hidden;
}

.player-view.active {
    display: block;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-controls {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 20%, transparent 75%, rgba(0, 0, 0, 0.9) 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.player-controls.hidden {
    opacity: 0;
    pointer-events: none;
    cursor: none;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
}

.player-title {
    font-size: 20px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.player-footer {
    padding: 24px 36px 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.player-seekbar-container {
    width: 100%;
}

.player-seekbar {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: height 0.15s;
}

.player-seekbar:hover {
    height: 8px;
}

.player-seekbar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary-glow);
}

.player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-left-controls,
.player-right-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-player-action {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: background 0.15s, transform 0.1s;
}

.btn-player-action:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-player-play {
    background: var(--primary);
    width: 50px;
    height: 50px;
}

.btn-player-play:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.player-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.player-volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-volume-slider {
    width: 90px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

.btn-zapping {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-zapping:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Spinner Overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 13, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    gap: 18px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(229, 9, 20, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================================ */
/* 7. PERFIL & CONTROLE PARENTAL                                 */
/* ============================================================ */
.profile-container {
    max-width: 900px;
    margin: 36px auto;
    padding: 0 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, #B81D24 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
}

.profile-username {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-status-badge {
    display: inline-block;
    background: rgba(0, 209, 178, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.profile-status-badge.expired {
    background: rgba(229, 9, 20, 0.15);
    border-color: var(--primary);
    color: #FF5E69;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.profile-card-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 16px;
    color: white;
}

.profile-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.profile-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-value {
    color: white;
    font-weight: 700;
}

.profile-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-secondary-action {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-action:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-primary-action {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-action:hover {
    background: #ff1f2d;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
    transform: translateY(-1px);
}

.btn-primary-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.card-title-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    color: var(--primary);
}

.badge-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00D1B2;
    box-shadow: 0 0 10px #00D1B2;
    margin-right: 6px;
}

.status-dot.expired {
    background: #FF5E69;
    box-shadow: 0 0 10px #FF5E69;
}

.profile-actions-bar {
    display: flex;
    justify-content: flex-end;
}

.btn-danger-logout {
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid var(--primary);
    color: #FF5E69;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger-logout:hover {
    background: var(--primary);
    color: white;
}

/* Switch UI */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #2A3142;
    transition: .25s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--primary);
}
input:checked + .slider:before {
    transform: translateX(20px);
}

/* ============================================================ */
/* 8. DRAWER DE EPISÓDIOS DENTRO DO PLAYER                       */
/* ============================================================ */
.player-episodes-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    background: rgba(11, 14, 20, 0.96);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-header h3 {
    font-size: 18px;
    font-weight: 800;
}

.btn-close-drawer {
    background: transparent;
    border: none;
    color: #9E9E9E;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.btn-close-drawer:hover { color: white; background: rgba(255, 255, 255, 0.1); }
.btn-close-drawer:focus,
.btn-close-drawer.tv-focused {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 2px solid #E50914 !important;
    box-shadow: 0 0 16px rgba(229, 9, 20, 0.9) !important;
    transform: scale(1.15) !important;
    outline: none !important;
}

.drawer-season-picker {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.drawer-episodes-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.drawer-ep-item {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.18s;
}

.drawer-ep-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    transform: translateX(-2px);
}

.drawer-ep-item.active {
    border-color: var(--primary);
    background: rgba(229, 9, 20, 0.15);
}

.drawer-ep-item:focus,
.drawer-ep-item.tv-focused {
    background: rgba(229, 9, 20, 0.25) !important;
    border: 2px solid #E50914 !important;
    box-shadow: 0 0 18px rgba(229, 9, 20, 0.9) !important;
    transform: scale(1.02) !important;
    outline: none !important;
}

.drawer-ep-thumb {
    width: 80px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    background: #000;
}

.drawer-ep-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.drawer-ep-title {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.drawer-ep-duration {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============================================================ */
/* 9. PROMPT FLUTUANTE DE PRÓXIMO EPISÓDIO                       */
/* ============================================================ */
.player-next-ep-prompt {
    position: absolute;
    bottom: 80px;
    right: 36px;
    background: rgba(14, 18, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    z-index: 120;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    max-width: 320px;
    animation: popUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.next-ep-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 4px;
}

.next-ep-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.next-ep-actions {
    display: flex;
    gap: 8px;
}

/* ============================================================ */
/* 10. MODAL DE PIN PARENTAL                                    */
/* ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: #131720;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

/* Badge de Episódio no Continuar Assistindo */
.card-continue-ep-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
}

/* Menu de Contexto Customizado (Botão Direito em Continuar Assistindo) */
.custom-context-menu {
    position: fixed;
    background: rgba(18, 22, 31, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 6px;
    min-width: 240px;
    z-index: 3000;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fadeIn 0.12s ease;
}

.context-menu-item {
    background: transparent;
    border: none;
    color: #E2E8F0;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.context-menu-item svg {
    flex-shrink: 0;
}

.context-menu-item.danger {
    color: #FF5E69;
}

.context-menu-item.danger:hover {
    background: rgba(229, 9, 20, 0.22);
    color: #FF7B84;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ============================================================ */
/* 8. ADAPTAÃ‡ÃƒO EXCLUSIVA PARA SMART TV (SAMSUNG & LG)          */
/* ============================================================ */

/* Remove barras de rolagem nativas para visual limpo de TV */
::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    display: none !important;
}

body {
    user-select: none !important;
    -webkit-user-select: none !important;
    overflow-x: hidden;
}

/* Player em tela 100% cheia cobrindo o header e toda a janela */
.player-view {
    display: none !important;
}

.player-view.active {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: #000 !important;
}

/* Motor de Foco D-Pad / Controle Remoto (Glow Vermelho Netflix) */
.card-poster.tv-focused,
.card-poster:focus,
.card-live.tv-focused,
.card-live:focus,
.card-continue.tv-focused,
.card-continue:focus,
.episode-card.tv-focused,
.episode-card:focus,
.btn-hero-watch.tv-focused,
.btn-hero-watch:focus,
.btn-hero-secondary.tv-focused,
.btn-hero-secondary:focus,
.nav-link.tv-focused,
.nav-link:focus,
.category-item.tv-focused,
.category-item:focus,
.custom-dropdown-btn.tv-focused,
.custom-dropdown-btn:focus,
.custom-dropdown-item.tv-focused,
.custom-dropdown-item:focus,
.btn-player-action.tv-focused,
.btn-player-action:focus,
.account-badge.tv-focused,
.account-badge:focus,
.btn-logout.tv-focused,
.btn-logout:focus,
.btn-primary.tv-focused,
.btn-primary:focus,
.btn-close-drawer.tv-focused,
.btn-close-drawer:focus,
.drawer-ep-item.tv-focused,
.drawer-ep-item:focus {
    outline: 3px solid #E50914 !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.95), 0 0 10px #E50914 !important;
    transform: scale(1.05) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, outline 0.15s ease !important;
    z-index: 100 !important;
}

.nav-link:focus, .nav-link.tv-focused {
    transform: scale(1.08) !important;
    background: rgba(229, 9, 20, 0.3) !important;
    color: #fff !important;
}

.card-poster:focus, .card-poster.tv-focused {
    border-color: #E50914 !important;
    transform: scale(1.06) !important;
}

.card-live:focus, .card-live.tv-focused {
    border-color: #E50914 !important;
    transform: scale(1.05) !important;
}

.episode-card:focus, .episode-card.tv-focused {
    border-color: #E50914 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    transform: scale(1.02) !important;
}

.btn-hero-watch:focus, .btn-hero-watch.tv-focused {
    box-shadow: 0 0 30px rgba(229, 9, 20, 1) !important;
    transform: scale(1.06) !important;
}

.btn-hero-secondary:focus, .btn-hero-secondary.tv-focused {
    border-color: #E50914 !important;
    background: rgba(229, 9, 20, 0.25) !important;
    transform: scale(1.06) !important;
}

.category-item:focus, .category-item.tv-focused {
    border-color: #E50914 !important;
    background: rgba(229, 9, 20, 0.35) !important;
    transform: scale(1.04) !important;
}

.btn-player-action:focus, .btn-player-action.tv-focused,
.btn-zapping:focus, .btn-zapping.tv-focused {
    border-color: #E50914 !important;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.9) !important;
    transform: scale(1.1) !important;
}

.catalog-select:focus, .catalog-select.tv-focused {
    border-color: #E50914 !important;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.8) !important;
}

/* Campos de entrada de texto: sem outline grosso e sem distorção */
.input-field,
#usernameInput,
#passwordInput,
#globalSearchInput {
    outline: none !important;
    transform: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus,
.input-field.tv-focused,
#usernameInput:focus,
#usernameInput.tv-focused,
#passwordInput:focus,
#passwordInput.tv-focused,
#globalSearchInput:focus,
#globalSearchInput.tv-focused {
    outline: none !important;
    transform: none !important;
    border-color: #E50914 !important;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.4) !important;
}

/* ============================================================ */
/* CORREÇÃO DO SELECT DARK NATIVO (ELIMINA BORDA BRANCA EM TV E NAVEGADOR) */
/* ============================================================ */
:root {
    color-scheme: dark !important;
}

select, option, optgroup {
    color-scheme: dark !important;
    background-color: #141822 !important;
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

select option {
    background-color: #141822 !important;
    color: #FFFFFF !important;
    padding: 10px 14px !important;
}

select option:hover,
select option:focus,
select option:checked {
    background-color: #E50914 !important;
    color: #FFFFFF !important;
}

/* Gaveta de episódios no player com z-index alto e opacidade sólida */
.player-episodes-drawer {
    z-index: 1000 !important;
    background: #0B0E14 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.95) !important;
}


/* ============================================================ */
/* CUSTOM DROPDOWN COMPONENT (100% DARK - ZERO BORDAS BRANCAS)  */
/* ============================================================ */
/* Garante que NENHUM select nativo do sistema seja renderizado */
select.catalog-select,
#catalogCategorySelect,
#seasonsSelect,
#playerDrawerSeasonSelect,
select {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.custom-dropdown-wrap {
    position: relative;
    display: inline-block;
    min-width: 190px;
    z-index: 60;
}

.custom-dropdown-btn {
    background: #141822;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #FFFFFF;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
}

.custom-dropdown-btn:hover {
    background: #1C2330;
    border-color: rgba(255, 255, 255, 0.4);
}

.custom-dropdown-btn:focus,
.custom-dropdown-btn.tv-focused {
    outline: none !important;
    border-color: #E50914 !important;
    box-shadow: 0 0 16px rgba(229, 9, 20, 0.9) !important;
    transform: scale(1.02);
}

.custom-dropdown-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.custom-dropdown-wrap.open .custom-dropdown-arrow {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    max-width: 340px;
    max-height: 290px;
    overflow-y: auto;
    background: #0E121A;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.95);
    z-index: 99999;
    padding: 6px 0;
    display: none;
}

.custom-dropdown-wrap.open .custom-dropdown-menu {
    display: block;
    animation: dropFadeIn 0.15s ease-out;
}

@keyframes dropFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-dropdown-item {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #E2E8F0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.custom-dropdown-item:hover,
.custom-dropdown-item:focus,
.custom-dropdown-item.tv-focused {
    background: #E50914 !important;
    color: #FFFFFF !important;
    outline: none !important;
}

.custom-dropdown-item.active {
    background: rgba(229, 9, 20, 0.2);
    color: #FF5A5F;
    font-weight: 700;
}

.custom-dropdown-item.active:hover,
.custom-dropdown-item.active:focus,
.custom-dropdown-item.active.tv-focused {
    background: #E50914 !important;
    color: #FFFFFF !important;
}

.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.custom-dropdown-menu::-webkit-scrollbar-track {
    background: #0A0D13;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: #E50914;
    border-radius: 3px;
}

/* ============================================================ */
/* CORREÇÃO DO PLAYER SEEKBAR (REMOVE BORDA GIGANTE VERMELHA)    */
/* ============================================================ */
input[type="range"],
input[type="range"]:focus,
input[type="range"].tv-focused,
.player-seekbar,
.player-seekbar:focus,
.player-seekbar.tv-focused,
.player-volume-slider,
.player-volume-slider:focus,
.player-volume-slider.tv-focused {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    transform: none !important;
}

.player-seekbar {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    cursor: pointer;
    transition: height 0.15s;
}

.player-seekbar:hover,
.player-seekbar:focus,
.player-seekbar.tv-focused {
    height: 8px;
}

.player-seekbar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #E50914;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.9);
    transition: transform 0.15s;
}

.player-seekbar:focus::-webkit-slider-thumb,
.player-seekbar.tv-focused::-webkit-slider-thumb {
    transform: scale(1.3);
    box-shadow: 0 0 16px rgba(229, 9, 20, 1);
}

/* OSD DE SEEK (+10s / -10s) NO MEIO DA TELA DO PLAYER */
.player-seek-osd {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 28px;
    border-radius: 30px;
    color: #FFF;
    font-size: 18px;
    font-weight: 800;
    z-index: 500;
    pointer-events: none;
    display: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    animation: osdPop 0.2s ease-out;
}

@keyframes osdPop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}


/* Foco e destaque para Continuar Assistindo */
.card-continue:focus,
.card-continue.tv-focused {
    outline: none !important;
    border-color: #E50914 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.9) !important;
}

/* Foco e destaque para itens de categoria na sidebar de TV ao Vivo */
.category-item:focus,
.category-item.tv-focused {
    outline: none !important;
    background: rgba(229, 9, 20, 0.4) !important;
    border-left: 4px solid #E50914 !important;
    color: #FFFFFF !important;
}

/* Foco aprimorado na seekbar do player */
.player-seekbar:focus,
.player-seekbar.tv-focused {
    height: 10px !important;
    outline: none !important;
    box-shadow: none !important;
}

.player-seekbar:focus::-webkit-slider-thumb,
.player-seekbar.tv-focused::-webkit-slider-thumb {
    transform: scale(1.6) !important;
    background: #E50914 !important;
    box-shadow: 0 0 22px rgba(229, 9, 20, 1) !important;
}

.custom-dropdown-wrap.open {
    z-index: 100000 !important;
}

.custom-dropdown-wrap.open .custom-dropdown-menu {
    display: block;
    z-index: 100000 !important;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.98) !important;
}

.card-poster.tv-focused,
.card-live.tv-focused {
    z-index: 10 !important;
}
