/* ============================================
   RLATINO PREMIUM - Smart TV CSS
   Optimized for 10-foot UI (1920x1080)
   Samsung Tizen + LG webOS
   ============================================ */

:root {
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --bg: #0a0a2e;
    --bg-secondary: #12123a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-secondary: #a0a0c0;
    --border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
    --success: #22c55e;
    --sidebar-width: 220px;
    --radius: 12px;
    --focus-ring: 0 0 0 3px var(--accent), 0 0 20px rgba(139, 92, 246, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    width: 1920px;
    height: 1080px;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
}

/* ---- Focus System ---- */
.focusable {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.focusable:focus,
.focusable.focused {
    box-shadow: var(--focus-ring);
    transform: scale(1.02);
    z-index: 10;
    position: relative;
}

/* ---- Background Effects ---- */
.login-bg, .app-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg);
    z-index: -1;
    overflow: hidden;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    animation: glowFloat 8s ease-in-out infinite alternate;
}

.glow-1 {
    width: 600px; height: 600px;
    background: var(--accent);
    top: -200px; right: -100px;
}

.glow-2 {
    width: 500px; height: 500px;
    background: #3b82f6;
    bottom: -200px; left: -100px;
    animation-delay: 4s;
}

@keyframes glowFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 30px); }
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.login-card {
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 50px 60px;
    width: 550px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.input-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.tv-input {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    color: var(--text);
    font-size: 18px;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.2s;
}

.tv-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
}

.tv-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0c0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.tv-select option {
    background: #1a1a4a;
    color: var(--text);
}

.checkbox-group {
    flex-direction: row;
}

.tv-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
}

.tv-checkbox input { display: none; }

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tv-checkbox input:checked ~ .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.tv-checkbox input:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover, .btn-login:focus {
    background: var(--accent-hover);
}

.login-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fca5a5;
    text-align: center;
    font-size: 15px;
}

.login-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner.large {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

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

.login-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.login-footer kbd {
    background: var(--bg-glass);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    font-size: 13px;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard-body {
    display: flex;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-menu {
    list-style: none;
    flex: 1;
    padding: 10px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover, .nav-item:focus {
    background: var(--bg-card);
    color: var(--text);
}

.nav-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
}

.nav-item i {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    height: 100vh;
    overflow: hidden;
}

.section {
    display: none;
    height: 100%;
}

.section.active {
    display: flex;
    flex-direction: column;
}

/* ---- Section Layout (Live, Movies, Series) ---- */
.section-layout {
    display: flex;
    height: 100%;
}

.category-panel {
    width: 260px;
    height: 100%;
    background: var(--bg-glass);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.panel-title {
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

.category-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.category-item {
    padding: 14px 20px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-secondary);
    transition: all 0.15s;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-item:hover, .category-item:focus {
    background: var(--bg-card);
    color: var(--text);
}

.category-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cat-lock {
    font-size: 12px;
    color: var(--accent);
    opacity: 0.6;
    margin-left: 8px;
    flex-shrink: 0;
}

.content-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-panel.full-panel {
    overflow-y: auto;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.content-header h2 {
    font-size: 20px;
    font-weight: 600;
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    font-size: 14px;
}

.search-box .tv-input {
    padding-left: 40px;
    width: 250px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 15px;
}

/* ---- Channel List (Live TV) ---- */
.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.channel-item:hover, .channel-item:focus {
    background: var(--bg-card);
}

.channel-logo-sm {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
}

.channel-item .channel-name {
    flex: 1;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-num {
    color: var(--text-secondary);
    font-size: 13px;
    min-width: 30px;
    text-align: right;
}

/* Grid view */
.channel-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px;
}

.channel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--bg-card);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
}

.channel-card .channel-logo {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: contain;
}

.channel-card .channel-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* ---- Preview Panel (Live TV) ---- */
.preview-panel {
    width: 400px;
    height: 100%;
    background: var(--bg-glass);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.tv-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: none;
}

.tv-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-channel-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.preview-channel-name {
    font-size: 14px;
    font-weight: 600;
}

.preview-controls {
    position: absolute;
    top: 8px; right: 8px;
    display: flex;
    gap: 6px;
}

.preview-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
    color: var(--text-secondary);
    gap: 12px;
}

.preview-placeholder i {
    font-size: 48px;
    opacity: 0.3;
}

/* ---- Movies/Series Grid ---- */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px 24px;
}

.movie-card {
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    transition: transform 0.15s, box-shadow 0.15s;
}

.movie-card:focus, .movie-card.focused {
    transform: scale(1.05);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #111;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fbbf24;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.movie-title {
    padding: 10px 12px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loading-more {
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* ---- HOME Section ---- */
.home-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 30px;
    gap: 40px;
}

.welcome-card {
    text-align: center;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    margin-bottom: 16px;
}

.welcome-card h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 4px;
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

.home-clock {
    margin-top: 12px;
    font-size: 20px;
    color: var(--text-secondary);
}

.home-cards {
    display: flex;
    gap: 24px;
}

.home-card {
    width: 220px;
    padding: 40px 30px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.home-card:focus, .home-card.focused {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent);
}

.home-card i {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 16px;
    display: block;
}

.home-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.home-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ---- Continue Watching ---- */
.home-continue {
    padding: 0 40px 30px;
}

.home-continue h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.section-continue {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.section-continue h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.continue-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.continue-item {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 12px;
    min-width: 280px;
    cursor: pointer;
    flex-shrink: 0;
}

.continue-poster {
    width: 60px;
    height: 85px;
    border-radius: 8px;
    object-fit: cover;
}

.continue-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.continue-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

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

.continue-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.continue-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}

/* ============================================
   FULLSCREEN PLAYER
   ============================================ */
.player-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-overlay video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.player-controls {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    cursor: pointer;
}

.player-controls.visible {
    opacity: 1;
    pointer-events: all;
}

.player-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 30px;
    background: linear-gradient(rgba(0,0,0,0.8), transparent);
}

.player-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.player-title span {
    font-size: 22px;
    font-weight: 600;
}

.player-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-bottom {
    padding: 20px 30px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    width: 0;
    transition: width 0.3s;
}

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

.player-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    width: 52px;
    height: 52px;
    color: white;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.player-btn:hover, .player-btn:focus {
    background: var(--accent);
}

.player-btn[data-action="back"] {
    background: rgba(255, 255, 255, 0.25);
    width: 56px;
    height: 56px;
    font-size: 22px;
}

.player-spacer {
    flex: 1;
}

.player-time {
    font-size: 16px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.player-error {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10;
}

.player-error i {
    font-size: 48px;
    color: var(--danger);
}

.player-error p {
    font-size: 20px;
    color: var(--text-secondary);
}

/* ============================================
   DETAIL MODAL
   ============================================ */
.detail-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.3);
}

.detail-content {
    position: relative;
    display: flex;
    gap: 40px;
    max-width: 1400px;
    width: 90%;
    padding: 50px;
    background: rgba(10, 10, 46, 0.85);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid var(--border);
    max-height: 85vh;
    overflow-y: auto;
}

.detail-poster {
    flex-shrink: 0;
    position: relative;
}

.detail-poster img {
    width: 260px;
    border-radius: 16px;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.rating-circle {
    position: absolute;
    bottom: -16px;
    right: -16px;
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    border: 3px solid var(--bg);
}

.detail-info {
    flex: 1;
    min-width: 0;
}

.detail-info h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.detail-badge {
    background: var(--bg-card);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-plot {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
    max-height: 120px;
    overflow-y: auto;
}

.detail-cast {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.detail-cast p {
    margin-bottom: 4px;
}

.detail-cast strong {
    color: var(--text);
}

.detail-actions {
    display: flex;
    gap: 14px;
    margin-top: 20px;
}

.btn-play {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    padding: 14px 30px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.btn-play:focus {
    background: var(--accent-hover);
}

.btn-setting {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 24px;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
}

.btn-setting:focus {
    border-color: var(--accent);
}

.btn-danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.btn-danger:focus {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.15);
}

/* ---- Seasons & Episodes ---- */
.detail-seasons {
    margin-top: 16px;
}

.season-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.season-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 18px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}

.season-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 250px;
    overflow-y: auto;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.episode-item:hover, .episode-item:focus {
    background: var(--bg-card);
}

.ep-number {
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    min-width: 50px;
    text-align: center;
}

.ep-info {
    flex: 1;
}

.ep-title {
    font-size: 15px;
    display: block;
}

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

.ep-play {
    color: var(--accent);
    font-size: 16px;
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-container {
    padding: 30px 40px;
    max-width: 900px;
    height: 100%;
    overflow-y: auto;
}

.settings-title {
    font-size: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.settings-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.settings-tab.active {
    background: var(--accent);
    color: white;
}

.settings-tab:focus {
    box-shadow: var(--focus-ring);
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--text-secondary);
}

.setting-item .tv-input,
.setting-item .tv-select {
    max-width: 400px;
}

.settings-desc {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 16px;
}

.account-info {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.account-row:last-child {
    border-bottom: none;
}

.account-row span:first-child {
    color: var(--text-secondary);
}

/* ---- Hidden Categories ---- */
.hidden-categories-list {
    max-height: 500px;
    overflow-y: auto;
}

.channel-toggle {
    display: flex;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.channel-toggle input {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    padding: 8px 16px;
    width: 100%;
    border-radius: 8px;
    transition: background 0.15s;
}

.toggle-label:hover {
    background: var(--bg-card);
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}

.channel-toggle input:checked + .toggle-label .toggle-switch {
    background: var(--accent);
}

.channel-toggle input:checked + .toggle-label .toggle-switch::after {
    transform: translateX(20px);
}

.toggle-name {
    font-size: 15px;
    color: var(--text);
}

.channel-toggle input:not(:checked) + .toggle-label .toggle-name {
    color: var(--text-secondary);
    text-decoration: line-through;
    opacity: 0.5;
}

/* ============================================
   PARENTAL CONTROL
   ============================================ */
.pin-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.pin-digit {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
}

.pin-digit:focus,
.pin-digit-dialog:focus {
    border-color: var(--accent);
}

.pin-digit-dialog {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
}

.parental-status {
    margin-top: 20px;
}

.parental-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.parental-badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.parental-badge.inactive {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.parental-gate-card {
    text-align: center;
    padding: 40px 20px;
}

.parental-gate-card > i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 16px;
    display: block;
}

.parental-gate-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.pin-row {
    margin-bottom: 20px;
}

.pin-label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.parental-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.pin-digit-settings {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    -webkit-text-security: disc;
}

.pin-digit-settings:focus {
    border-color: var(--accent);
    outline: none;
}

/* ---- PIN Dialog ---- */
.pin-dialog {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8000;
}

.pin-dialog-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
}

.pin-dialog-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pin-error {
    color: var(--danger);
    font-size: 15px;
    margin-top: 12px;
}

.pin-dialog-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.pin-dialog-buttons .btn-play,
.pin-dialog-buttons .btn-setting {
    min-width: 140px;
    justify-content: center;
}

.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    color: white;
    backdrop-filter: blur(20px);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast-info {
    background: rgba(59, 130, 246, 0.85);
}

.toast-success {
    background: rgba(34, 197, 94, 0.85);
}

.toast-error {
    background: rgba(239, 68, 68, 0.85);
}

/* ============================================
   UTILITIES
   ============================================ */
.loading-text, .error-text, .empty-text {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.error-text {
    color: #fca5a5;
}

/* ---- Scrollbars ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}
