/* ── SMT-VOD Viewer Portal ──────────────────────────────── */
:root {
    --bg: #141414;
    --bg-card: #1a1a2e;
    --bg-surface: #16213e;
    --bg-hover: #0f3460;
    --text: #e4e6eb;
    --text-muted: #8b8fa3;
    --accent: #e50914;
    --accent-hover: #f40612;
    --accent-blue: #2196f3;
    --gold: #ffc107;
    --success: #4caf50;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --transition: 0.2s ease;
    --navbar-h: 64px;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', -apple-system, sans-serif; min-height:100vh; overflow-x:hidden; }
a { color: var(--text); text-decoration: none; }

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--navbar-h); display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    transition: background var(--transition);
}
.navbar.scrolled { background: rgba(20,20,20,0.98); backdrop-filter: blur(20px); }
.nav-left { display: flex; align-items: center; gap: 30px; }
.nav-logo { font-size: 1.5rem; font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.nav-logo i { font-size: 1.8rem; }
.nav-links { display: flex; gap: 20px; }
.nav-link { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color var(--transition); padding: 4px 0; }
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 16px; }

/* Search */
.search-box { position: relative; display: flex; align-items: center; }
.search-icon { cursor: pointer; font-size: 1.2rem; padding: 8px; color: var(--text); }
.search-input { width: 0; opacity: 0; border: 1px solid var(--text-muted); background: rgba(0,0,0,0.7); color:#fff; border-radius: var(--radius); padding: 8px 12px; font-size: 0.9rem; transition: all 0.3s ease; }
.search-input.active { width: 250px; opacity: 1; margin-left: 8px; }
.search-input:focus { outline: none; border-color: var(--accent); }

/* User Menu */
.user-avatar { cursor: pointer; font-size: 2rem; color: var(--text-muted); transition: color var(--transition); position: relative; }
.user-avatar:hover { color: #fff; }
.user-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--bg-card); border: 1px solid #333; border-radius: var(--radius);
    min-width: 220px; box-shadow: var(--shadow); z-index: 100; overflow: hidden;
}
.user-dropdown.show { display: block; }
.dropdown-header { padding: 16px; border-bottom: 1px solid #333; display: flex; flex-direction: column; }
.dropdown-header strong { font-size: 1rem; }
.user-dropdown a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; transition: background var(--transition); }
.user-dropdown a:hover { background: var(--bg-hover); }
.user-dropdown hr { border: none; border-top: 1px solid #333; }

/* Buttons */
.btn { border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; border-radius: var(--radius); padding: 10px 20px; transition: all var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.03); }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Hero Section ────────────────────────────────────── */
.hero {
    position: relative; width: 100%; height: 80vh; min-height: 500px;
    background-size: cover; background-position: center; background-color: var(--bg-surface);
    display: flex; align-items: flex-end;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.5) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 60px 40px 80px; max-width: 600px; }
.hero-content h1 { font-size: 3rem; font-weight: 800; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,0.7); }
.hero-content p { font-size: 1.1rem; color: #ccc; line-height: 1.6; margin-bottom: 24px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; }

/* ── Content Rows (Netflix-style) ────────────────────── */
.content-row { padding: 20px 40px; position: relative; }
.row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.row-header h2 { font-size: 1.3rem; font-weight: 700; }
.see-all { color: var(--accent-blue); font-size: 0.85rem; display: flex; align-items: center; gap: 4px; }
.see-all:hover { text-decoration: underline; }

.row-slider {
    display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth;
    scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 10px;
}
.row-slider::-webkit-scrollbar { display: none; }

/* ── Video Card ──────────────────────────────────────── */
.video-card {
    flex: 0 0 220px; border-radius: var(--radius); overflow: hidden;
    background: var(--bg-card); cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}
.video-card:hover { transform: scale(1.08); z-index: 10; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.video-card-img {
    width: 100%; height: 130px; background-size: cover; background-position: center;
    background-color: #222; position: relative;
}
.video-card-img .play-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.4); opacity: 0; transition: opacity var(--transition);
}
.video-card:hover .play-overlay { opacity: 1; }
.play-overlay i { font-size: 2.5rem; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }

.video-card-body { padding: 10px 12px; }
.video-card-title { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.video-card-meta { display: flex; gap: 8px; align-items: center; font-size: 0.72rem; color: var(--text-muted); }
.video-card-meta .badge { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 3px; font-size: 0.65rem; }
.video-card-rating { color: var(--gold); }
.video-card-progress { width: 100%; height: 3px; background: #333; position: absolute; bottom: 0; }
.video-card-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* ── Video Grid ──────────────────────────────────────── */
.video-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px; padding: 0 40px 40px;
}

/* ── Browse Header ───────────────────────────────────── */
.browse-header {
    padding: calc(var(--navbar-h) + 20px) 40px 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.browse-header h1 { font-size: 2rem; }
.browse-filters { display: flex; gap: 10px; }
.filter-select {
    background: var(--bg-card); color: var(--text); border: 1px solid #444;
    border-radius: var(--radius); padding: 8px 16px; font-size: 0.85rem; cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

/* ── Category Grid ───────────────────────────────────── */
.category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px; padding: 0 40px 40px;
}
.category-card {
    background: linear-gradient(135deg, var(--bg-surface), var(--bg-hover));
    border-radius: var(--radius-lg); padding: 30px; cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    min-height: 120px; justify-content: center;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.category-card i { font-size: 2rem; color: var(--accent); }
.category-card h3 { font-size: 1.1rem; }
.category-card span { font-size: 0.8rem; color: var(--text-muted); }

/* ── Video Detail ────────────────────────────────────── */
.video-detail { padding-top: var(--navbar-h); }
.video-backdrop {
    height: 60vh; min-height: 400px; width: 100%;
    background-size: cover; background-position: center; background-color: var(--bg-surface);
    position: relative;
}
.video-backdrop::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%);
}
.video-detail-content {
    display: flex; gap: 40px; padding: 0 40px;
    margin-top: -200px; position: relative; z-index: 1;
}
.video-detail-left { flex: 0 0 240px; }
.video-poster {
    width: 240px; height: 340px; border-radius: var(--radius-lg);
    background-size: cover; background-position: center; background-color: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow); overflow: hidden;
}
.video-poster > i { font-size: 4rem; color: var(--text-muted); }
.video-detail-right { flex: 1; min-width: 0; padding-top: 20px; }
.video-detail-right h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; }
.video-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.video-meta .badge { background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; }
.video-rating { color: var(--gold); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.video-duration { color: var(--text-muted); font-size: 0.85rem; }
.video-desc { color: #bbb; line-height: 1.7; margin-bottom: 16px; max-width: 700px; }
.video-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.video-tags .tag { background: var(--bg-hover); padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; color: var(--text-muted); }
.video-info-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; font-size: 0.9rem; }
.video-info-row span { color: var(--text-muted); }
.video-info-row strong { color: var(--text); margin-right: 4px; }
.video-actions { display: flex; gap: 12px; margin-bottom: 30px; }

/* ── Pagination ──────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 20px; }
.pagination button {
    background: var(--bg-card); color: var(--text); border: 1px solid #444;
    border-radius: var(--radius); padding: 8px 14px; cursor: pointer; transition: all var(--transition);
}
.pagination button:hover { border-color: var(--accent); }
.pagination button.active { background: var(--accent); border-color: var(--accent); }
.pagination button:disabled { opacity: 0.3; cursor: default; }

/* ── Auth Modal ──────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.auth-modal {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 40px;
    width: 100%; max-width: 400px; position: relative; box-shadow: var(--shadow);
}
.auth-modal h2 { margin-bottom: 24px; text-align: center; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.form-group { margin-bottom: 16px; }
.form-group input {
    width: 100%; background: rgba(255,255,255,0.06); border: 1px solid #444;
    color: var(--text); padding: 12px 16px; border-radius: var(--radius); font-size: 0.95rem;
}
.form-group input:focus { outline: none; border-color: var(--accent); }
.form-error { background: rgba(229,9,20,0.15); border: 1px solid var(--accent); color: #ff6b6b; padding: 10px; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 12px; }
.form-switch { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); }
.form-switch a { color: var(--accent); font-weight: 600; }

/* ── Video Player ────────────────────────────────────── */
.player-overlay {
    position: fixed; inset: 0; background: #000; z-index: 3000;
    display: flex; flex-direction: column;
}
.player-header {
    display: flex; align-items: center; gap: 16px; padding: 12px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    position: absolute; top: 0; left: 0; right: 0; z-index: 1;
}
.player-header h3 { font-size: 1rem; font-weight: 500; }
.player-container { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; cursor: none; }
.player-container:hover { cursor: default; }
.player-container video { width: 100%; height: 100%; background: #000; object-fit: contain; }

/* ── Custom Player Controls ──────────────────────────── */
.custom-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85) 40%);
    padding: 20px 16px 12px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    pointer-events: none;
}
.player-container:hover .custom-controls,
.custom-controls.show { opacity: 1; pointer-events: auto; }

.controls-progress {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    cursor: pointer;
}
.progress-bar {
    position: relative;
    width: 100%; height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    transition: height 0.15s;
}
.controls-progress:hover .progress-bar { height: 6px; }
.progress-buffered {
    position: absolute; top: 0; left: 0;
    height: 100%; background: rgba(255,255,255,0.3);
    border-radius: 2px;
}
.progress-played {
    position: absolute; top: 0; left: 0;
    height: 100%; background: var(--accent);
    border-radius: 2px;
}
.progress-seek {
    position: absolute; top: 50%; left: 0;
    width: 100%; height: 20px;
    transform: translateY(-50%);
    -webkit-appearance: none; appearance: none;
    background: transparent;
    cursor: pointer;
    margin: 0;
}
.progress-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    opacity: 0;
    transition: opacity 0.15s;
}
.controls-progress:hover .progress-seek::-webkit-slider-thumb { opacity: 1; }

.controls-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.controls-left, .controls-right {
    display: flex; align-items: center; gap: 8px;
}
.ctrl-btn {
    background: none; border: none; color: #fff;
    font-size: 1.1rem; cursor: pointer;
    padding: 6px 10px; border-radius: 4px;
    transition: background 0.15s, transform 0.1s;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.15); transform: scale(1.1); }
.volume-slider {
    width: 80px; height: 4px;
    -webkit-appearance: none; appearance: none;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
}
.time-display {
    font-size: 0.8rem; color: rgba(255,255,255,0.85);
    font-variant-numeric: tabular-nums;
    margin-left: 8px;
    white-space: nowrap;
}
.live-indicator {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.live-indicator i { font-size: 0.5rem; animation: pulse 1.5s infinite; }
.live-indicator.behind { background: rgba(255,255,255,0.2); }

/* ── Quality Selector ────────────────────────────────── */
.quality-wrapper { position: relative; }
.quality-menu {
    display: none;
    position: absolute;
    bottom: 40px; right: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    min-width: 160px;
    padding: 6px 0;
    backdrop-filter: blur(10px);
    z-index: 20;
}
.quality-menu.show { display: block; }
.quality-menu-header {
    padding: 8px 16px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.quality-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: background 0.15s;
}
.quality-option:hover { background: rgba(255,255,255,0.1); }
.quality-option.active { color: var(--accent); font-weight: 600; }
.quality-option.active::after { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; font-size: 0.7rem; }
.quality-badge {
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 8px;
    font-weight: 700;
}
.quality-badge.hd { background: rgba(229,9,20,0.3); color: #ff6b6b; }
.quality-badge.uhd { background: rgba(255,165,0,0.3); color: #ffa500; }

/* ── Empty State ─────────────────────────────────────── */
.empty-state {
    padding: 60px; text-align: center; color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 1.2rem; }

/* ── Toast ───────────────────────────────────────────── */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: var(--radius); font-size: 0.85rem; box-shadow: var(--shadow); animation: slideIn 0.3s; }
.toast-success { background: #1b5e20; color: #a5d6a7; }
.toast-error { background: #b71c1c; color: #ef9a9a; }
.toast-info { background: #0d47a1; color: #90caf9; }

/* ── Footer ──────────────────────────────────────────── */
.footer { padding: 40px; text-align: center; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid #222; }

/* ── Pages ───────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }
#page-home { padding-top: 0; }
#page-browse, #page-categories-list, #page-watchlist, #page-history, #page-search { padding-top: 0; }

/* ── Utility ─────────────────────────────────────────── */
.text-muted { color: var(--text-muted); font-size: 0.82rem; }

/* ── Animations ──────────────────────────────────────── */
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .nav-links { display: none; }
    .hero-content { padding: 40px 20px 60px; }
    .hero-content h1 { font-size: 1.8rem; }
    .content-row { padding: 16px; }
    .video-card { flex: 0 0 150px; }
    .video-card-img { height: 100px; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 0 16px 16px; }
    .browse-header { padding: calc(var(--navbar-h) + 10px) 16px 10px; }
    .video-detail-content { flex-direction: column; align-items: center; padding: 0 16px; gap: 20px; }
    .video-detail-left { flex: none; }
    .video-poster { width: 180px; height: 260px; }
    .search-input.active { width: 160px; }
    .browse-filters { flex-wrap: wrap; }
}

/* ── Series Detail ───────────────────────────────────── */
.series-hero {
    width: 100%; min-height: 400px; background-size: cover; background-position: center;
    position: relative; margin-top: var(--navbar-h);
}
.series-hero-overlay {
    background: linear-gradient(to top, var(--bg-dark) 20%, rgba(0,0,0,0.6));
    width: 100%; min-height: 400px; display: flex; align-items: flex-end; padding: 40px;
}
.series-meta-container { display: flex; gap: 30px; align-items: flex-end; max-width: 1200px; }
.series-poster { width: 200px; height: 300px; border-radius: 8px; object-fit: cover; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.series-info h1 { font-size: 2.4rem; margin-bottom: 10px; }
.series-info .video-meta { margin-bottom: 12px; }
.series-info .video-description { color: var(--text-muted); max-width: 600px; }

.season-tabs { display: flex; gap: 8px; flex-wrap: wrap; }

.episode-item {
    display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background 0.2s; border-radius: 4px;
}
.episode-item:hover { background: rgba(255,255,255,0.05); }
.episode-thumb {
    flex: 0 0 200px; height: 112px; border-radius: 4px; background: var(--bg-card);
    background-size: cover; background-position: center; position: relative; overflow: hidden;
}
.episode-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.4); opacity: 0; transition: opacity 0.2s;
}
.episode-item:hover .episode-play { opacity: 1; }
.episode-num {
    position: absolute; bottom: 4px; left: 8px; font-size: 0.8rem;
    background: rgba(0,0,0,0.7); padding: 2px 6px; border-radius: 3px;
}
.episode-info { flex: 1; }
.episode-info h4 { margin: 0 0 6px; font-size: 1rem; }
.episode-info p { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 6px; line-height: 1.4; }

/* ── Profile ─────────────────────────────────────────── */
.profile-container { padding: 20px 40px; max-width: 700px; margin: 0 auto; }
.profile-card {
    background: var(--bg-card); border-radius: 8px; padding: 24px;
    margin-bottom: 20px; border: 1px solid var(--border);
}
.profile-card h3 { margin: 0 0 16px; font-size: 1.1rem; }
.profile-avatar-section { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 20px; }
.profile-avatar { font-size: 4rem; color: var(--text-muted); }
.profile-info .form-group { margin-bottom: 14px; }
.profile-info label, .profile-card label { display: block; margin-bottom: 4px; font-size: 0.85rem; color: var(--text-muted); }
.form-input {
    width: 100%; padding: 10px 12px; background: var(--bg-dark); border: 1px solid var(--border);
    border-radius: 4px; color: var(--text-primary); font-size: 0.95rem;
}
.form-input:focus { border-color: var(--accent); outline: none; }
.form-input:disabled { opacity: 0.5; }

/* ── Subtitle Selector ───────────────────────────────── */
.player-controls-right { margin-left: auto; position: relative; }
.subtitle-selector { position: relative; }
.subtitle-menu {
    position: absolute; bottom: 40px; right: 0; background: rgba(20,20,20,0.95);
    border-radius: 4px; min-width: 160px; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 100; overflow: hidden;
}
.subtitle-option {
    padding: 10px 16px; cursor: pointer; font-size: 0.9rem; transition: background 0.15s;
}
.subtitle-option:hover { background: rgba(255,255,255,0.1); }
.subtitle-option.active { color: var(--accent); font-weight: 600; }

.player-header {
    display: flex; align-items: center; padding: 10px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent); z-index: 10;
}

/* ── Live TV Grid ────────────────────────────────────── */
.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 40px 40px;
}

.live-channel-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.live-channel-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.2);
}

.live-channel-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.live-channel-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.live-channel-logo i {
    font-size: 1.8rem;
    color: var(--text-muted);
}

.live-channel-info {
    flex: 1;
    min-width: 0;
}

.live-channel-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-channel-group {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.live-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.live-badge i {
    font-size: 0.5rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.loading-spinner {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

@media (max-width: 768px) {
    .live-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 20px;
    }
}

