/* ===================================================
   DESIGN TOKENS
   =================================================== */
:root {
    --primary: #FF2442;
    --primary-dark: #e0203b;
    --bg-dark: #0F0F13;
    --bg-card: #1C1C22;
    --bg-card-hover: #25252d;
    --text-primary: #ffffff;
    --text-secondary: #8c8c9e;
    --text-muted: #555;
    --gold: #f5c518;
    --orange: #ff6b00;
    --gradient-vip: linear-gradient(135deg, #fbe8c0 0%, #e6b980 100%);
    --gradient-primary: linear-gradient(to right, #FF2442, #ec4899);
    --gradient-promo: linear-gradient(to right, #581c87, #3730a3);
    --nav-bg: rgba(28, 28, 34, 0.95);
    --nav-active: #FF2442;
    --nav-inactive: #555;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-primary: 0 4px 20px rgba(255, 36, 66, 0.3);
    --transition: all 0.3s ease;
}

/* Light Mode */
[data-theme="light"] {
    --bg-dark: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f2;
    --text-primary: #1a1a2e;
    --text-secondary: #6b6b80;
    --text-muted: #999;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-inactive: #999;
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] body {
    background-color: #f0f0f2;
    color: var(--text-primary);
}

/* Header */
[data-theme="light"] .sd-header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .sd-header a,
[data-theme="light"] .sd-header button,
[data-theme="light"] .sd-header svg {
    color: #333;
    stroke: #333;
}
[data-theme="light"] .sd-header .header-actions button {
    color: #333;
}
[data-theme="light"] .sd-header .header-actions button:hover {
    background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .sd-header.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Desktop menu */
[data-theme="light"] .desktop-nav-list a {
    color: rgba(0, 0, 0, 0.7) !important;
}
[data-theme="light"] .desktop-nav-list a:hover,
[data-theme="light"] .desktop-nav-list .current-menu-item a {
    color: var(--primary) !important;
}

/* Desktop search */
[data-theme="light"] .desktop-search-box {
    background: rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .desktop-search-box input {
    color: #333;
}
[data-theme="light"] .desktop-search-results {
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

/* Bottom nav */
[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .bottom-nav .nav-tab {
    color: #999;
}
[data-theme="light"] .bottom-nav .nav-tab.active {
    color: var(--primary);
}
[data-theme="light"] .bottom-nav svg {
    stroke: currentColor;
}

/* Nav pills (homepage category tabs) */
[data-theme="light"] .nav-pills {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .nav-pills .pill {
    color: #666;
}
[data-theme="light"] .nav-pills .pill.active {
    color: var(--primary);
}
[data-theme="light"] .nav-pills .pill:hover {
    color: var(--primary);
}

/* Section heads */
[data-theme="light"] .section-head h2,
[data-theme="light"] .section-head a {
    color: var(--text-primary);
}

/* Movie cards */
[data-theme="light"] .movie-card-g .card-title {
    color: var(--text-primary);
}
[data-theme="light"] .movie-card-g .poster {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* App container */
[data-theme="light"] .app-container {
    background: #f0f0f2;
}

/* Single series detail page */
[data-theme="light"] .series-detail-wrap,
[data-theme="light"] .series-detail-page {
    background: #f0f0f2;
    color: var(--text-primary);
}
[data-theme="light"] .series-info-box,
[data-theme="light"] .series-meta-box {
    background: #fff !important;
    color: var(--text-primary) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .series-info-box *,
[data-theme="light"] .series-meta-box * {
    color: var(--text-primary);
}
[data-theme="light"] .series-info-box .text-secondary,
[data-theme="light"] .series-meta-box .text-secondary {
    color: var(--text-secondary) !important;
}

/* Episode list */
[data-theme="light"] .episode-grid a,
[data-theme="light"] .ep-btn,
[data-theme="light"] [class*="episode"] a {
    background: #fff !important;
    color: var(--text-primary) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}
[data-theme="light"] .episode-grid a:hover,
[data-theme="light"] .ep-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
}
[data-theme="light"] .ep-range-btn,
[data-theme="light"] [class*="range"] button {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-primary) !important;
}
[data-theme="light"] .ep-range-btn.active,
[data-theme="light"] [class*="range"] button.active {
    background: var(--primary) !important;
    color: #fff !important;
}

/* Content sections with dark inline styles */
[data-theme="light"] [style*="background: #1"], 
[data-theme="light"] [style*="background:#1"],
[data-theme="light"] [style*="background: rgba(0"],
[data-theme="light"] [style*="background:rgba(0"],
[data-theme="light"] [style*="background: rgba(255,255,255,0.05"],
[data-theme="light"] [style*="background:rgba(255,255,255,0.05"] {
    background: #fff !important;
    color: var(--text-primary) !important;
}

/* General text color overrides */
[data-theme="light"] h1, [data-theme="light"] h2,
[data-theme="light"] h3, [data-theme="light"] h4 {
    color: var(--text-primary);
}
[data-theme="light"] p {
    color: var(--text-primary);
}

/* Sections with forced dark backgrounds */
[data-theme="light"] [style*="background-color: #0"],
[data-theme="light"] [style*="background-color:#0"],
[data-theme="light"] [style*="background: #0"],
[data-theme="light"] [style*="background:#0"] {
    background-color: #f0f0f2 !important;
    background: #f0f0f2 !important;
}

/* Footer */
[data-theme="light"] .sd-footer,
[data-theme="light"] footer {
    background: #e8e8ec !important;
    color: var(--text-primary) !important;
}
[data-theme="light"] .sd-footer a,
[data-theme="light"] footer a {
    color: var(--text-secondary) !important;
}
[data-theme="light"] .sd-footer h3,
[data-theme="light"] footer h3,
[data-theme="light"] .sd-footer .footer-logo,
[data-theme="light"] footer .footer-logo {
    color: var(--text-primary) !important;
}

/* Search overlay */
[data-theme="light"] .search-overlay {
    background: rgba(245, 245, 247, 0.98) !important;
}
[data-theme="light"] .search-overlay input {
    color: #333 !important;
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"] .search-overlay .search-result-item {
    color: var(--text-primary);
}

/* Notification panel */
[data-theme="light"] #notif-panel {
    background: #fff !important;
}
[data-theme="light"] #notif-panel * {
    color: var(--text-primary);
}

/* Genre pills on archive */
[data-theme="light"] .form-select {
    background: #fff !important;
    color: #333 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Nav pills sticky bar - override dark background */
[data-theme="light"] .nav-pills {
    background: rgba(245, 245, 247, 0.98) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

/* Hero desc container (single series info box) */
[data-theme="light"] .hero-desc-container {
    background: #fff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Wallet section (single series page wrapper) */
[data-theme="light"] .wallet-section {
    background: #f0f0f2 !important;
}

/* Action circle buttons */
[data-theme="light"] .action-circle-btn {
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #666 !important;
}
[data-theme="light"] .action-circle-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

/* Badges */
[data-theme="light"] .view-badge {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

/* Links */
[data-theme="light"] a {
    color: var(--text-primary);
}

/* Hero banner - always keep dark for readability over background images */
[data-theme="light"] .hero-banner {
    --bg-dark: #0F0F13;
}
[data-theme="light"] .hero-banner .hero-title,
[data-theme="light"] .hero-banner .hero-desc,
[data-theme="light"] .hero-banner .hero-meta,
[data-theme="light"] .hero-banner .hero-badge,
[data-theme="light"] .hero-banner h1,
[data-theme="light"] .hero-banner a {
    color: #fff !important;
}
[data-theme="light"] .hero-banner .btn-secondary {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="light"] .hero-banner .btn-primary {
    color: #fff !important;
}

body, .sd-header, .bottom-nav {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

#btn-theme-toggle:hover {
    opacity: 0.7;
}

/* ===================================================
   RESET & BASE
   =================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #000;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ===================================================
   APP CONTAINER (Mobile-first centered)
   =================================================== */
.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-dark);
    position: relative;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* ===================================================
   UTILITY CLASSES
   =================================================== */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===================================================
   HEADER
   =================================================== */
.sd-header {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 480px;
    z-index: 50;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

.sd-header.scrolled {
    background: rgba(15, 15, 19, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sd-header .logo {
    font-size: 20px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 2px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sd-header .header-actions {
    display: flex;
    gap: 12px;
}

.sd-header .header-actions button,
.sd-header .header-actions a {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-header .header-actions button:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* ===================================================
   SEARCH OVERLAY
   =================================================== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: rgba(15, 15, 19, 0.98);
    backdrop-filter: blur(20px);
    z-index: 200;
    padding: 16px;
    display: none;
    flex-direction: column;
}

.search-overlay.active {
    display: flex;
}

.search-overlay .search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.search-overlay .search-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    padding: 12px 16px 12px 40px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-overlay .search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 36, 66, 0.15);
}

.search-overlay .search-results {
    flex: 1;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.search-result-item:hover {
    background: var(--bg-card);
}

.search-result-item img {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-result-item .result-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.search-result-item .result-info p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===================================================
   HERO BANNER
   =================================================== */
.hero-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-banner .hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-dark) 0%, rgba(15, 15, 19, 0.4) 40%, transparent 100%);
}

.hero-banner .hero-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 0 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary);
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.hero-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 0;
    justify-content: flex-start;
}

.btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    color: #fff;
}

.btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

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

/* ===================================================
   NAVIGATION PILLS (Category Tabs)
   =================================================== */
.nav-pills {
    position: sticky;
    top: 56px; /* Adjust for mobile header */
    z-index: 40;
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 0;
}

.nav-pills .pills-wrap {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 0 16px;
    align-items: center;
}

.nav-pills .pill {
    white-space: nowrap;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}

.nav-pills .pill.active {
    color: #fff;
    font-weight: 700;
}

.nav-pills .pill:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ===================================================
   SECTION HEADERS
   =================================================== */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 16px;
    margin-bottom: 12px;
}

.section-head h2 {
    font-size: 17px;
    font-weight: 700;
}

.section-head .see-more {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ===================================================
   MOVIE CARDS - Horizontal Scroll
   =================================================== */
.movie-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px;
    scroll-snap-type: x mandatory;
}

.movie-card-v {
    width: 120px;
    flex-shrink: 0;
    scroll-snap-align: start;
    cursor: pointer;
    display: block;
}

.movie-card-v .poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 8px;
}

.movie-card-v .poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
}

.movie-card-v:hover .poster img,
.movie-card-v:active .poster img {
    transform: scale(1.05);
}

.movie-card-v .poster .view-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.movie-card-v .poster .new-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}

.movie-card-v .card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.movie-card-v .card-eps {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===================================================
   MOVIE CARDS - Grid
   =================================================== */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 16px;
}

.movie-card-g {
    display: block;
    cursor: pointer;
}

.movie-card-g .poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 4px;
}

.movie-card-g .poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.4s ease;
}

.movie-card-g:hover .poster img {
    transform: scale(1.05);
}

.movie-card-g .card-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

/* ===================================================
   PROMO BANNER
   =================================================== */
.promo-banner {
    margin: 24px 16px 12px;
    padding: 16px;
    border-radius: var(--radius-xl);
    background: var(--gradient-promo);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.promo-banner .promo-deco {
    position: absolute;
    right: -16px;
    top: -16px;
    opacity: 0.15;
    font-size: 80px;
}

.promo-banner .promo-text h4 {
    font-weight: 700;
    color: #facc15;
    margin-bottom: 4px;
    font-size: 15px;
}

.promo-banner .promo-text p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.promo-banner .promo-btn {
    background: #facc15;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    z-index: 2;
    white-space: nowrap;
    transition: var(--transition);
}

.promo-banner .promo-btn:hover {
    filter: brightness(1.1);
}

/* ===================================================
   BOTTOM NAVIGATION
   =================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: 64px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav .nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--nav-inactive);
    width: 64px;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    position: relative;
    text-decoration: none;
}

.bottom-nav .nav-tab span {
    font-size: 10px;
    font-weight: 500;
}

.bottom-nav .nav-tab.active {
    color: var(--nav-active);
}

.bottom-nav .nav-tab.active span {
    font-weight: 700;
}

.bottom-nav .nav-tab .notif-dot {
    position: absolute;
    top: -2px;
    right: 14px;
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
}

/* ===================================================
   STAR RATING
   =================================================== */
.star-rating {
    display: inline-flex;
    gap: 2px;
    cursor: pointer;
}

.star-rating .star {
    color: #333;
    font-size: 18px;
    transition: color 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.star-rating .star.filled {
    color: #facc15;
}

/* ===================================================
   ANIMATIONS
   =================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out;
}

/* Interactions */
.movie-card-v:active,
.movie-card-g:active,
.btn-primary:active,
.btn-secondary:active,
.promo-btn:active,
.nav-tab:active {
    transform: scale(0.97);
    opacity: 0.85;
}

/* ===================================================
   SINGLE SERIES PAGE
   =================================================== */
.single-desktop-split {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

.single-hero-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: visible;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-dark) 0%, rgba(15, 15, 19, 0.4) 40%, transparent 100%);
}

.single-hero-info {
    position: relative;
    margin-top: -120px; /* Overlap the poster on mobile */
    z-index: 2;
    padding: 0 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-update-badge {
    background: #f43f5e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    white-space: nowrap;
    text-transform: uppercase;
}

.hero-title-txt {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px 0;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.hero-meta-txt {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.dot-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.hero-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.action-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    backdrop-filter: blur(8px);
}

.action-circle-btn.active-fav {
    background: rgba(244,63,94,0.2);
    border-color: rgba(244,63,94,0.4);
    color: #f43f5e;
}

/* ===================================================
   RESPONSIVE - Hide desktop-only elements on mobile
   =================================================== */
.desktop-menu, .desktop-search-box, .hidden-mobile {
    display: none;
}

/* ===================================================
   RESPONSIVE - Desktop Expansion (Ophim Match)
   =================================================== */
@media (min-width: 768px) {
    html, body {
        overflow-x: clip !important;
    }
    
    /* Base Container Expansion */
    .app-container, .mobile-container {
        max-width: 1600px;
        margin: 0 auto;
        box-shadow: none;
        padding-top: 76px; /* Offset for desktop static header */
        overflow-x: visible !important;
    }

    /* Header Expansion */
    .sd-header {
        max-width: 100%;
        left: 0;
        transform: none;
        width: 100%;
        height: 76px;
        padding: 0 40px;
        background: rgba(15, 15, 19, 0.95) !important;
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    .sd-header .header-left {
        display: flex;
        align-items: center;
        gap: 40px;
    }
    
    .sd-header .header-right {
        display: flex;
        align-items: center;
        gap: 30px;
    }

    /* Desktop Navigation */
    .desktop-nav-list {
        display: flex;
        gap: 30px;
        list-style: none;
        margin: 0;
        padding: 0;
        align-items: center;
    }
    .desktop-nav-list li {
        position: relative;
    }
    .desktop-nav-list a {
        color: rgba(255,255,255,0.9);
        font-size: 16px;
        font-weight: 500;
        transition: var(--transition);
        line-height: 76px;
        text-decoration: none;
        display: block;
    }
    .desktop-nav-list a:hover {
        color: var(--primary);
    }
    .desktop-nav-list li.current-menu-item > a {
        color: var(--primary);
    }

    /* Mega Menu Dropdown */
    .dropdown-mega {
        position: relative;
    }
    .dropdown-mega-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: var(--bg-card, #1a1a1a);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 12px;
        padding: 20px;
        width: 600px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        z-index: 100;
        pointer-events: none;
    }
    .dropdown-mega:hover .dropdown-mega-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
    .dropdown-mega-menu a.mega-item {
        line-height: 1.5 !important;
        font-size: 14px !important;
        padding: 8px 12px;
        border-radius: 6px;
        color: var(--text-secondary, #999) !important;
        display: block;
    }
    .dropdown-mega-menu a.mega-item:hover {
        background: rgba(255,255,255,0.05);
        color: #fff !important;
    }

    /* Desktop Search Box */
    .desktop-search-box {
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-full);
        padding: 0 16px;
        height: 38px;
        min-width: 260px;
        position: relative;
        transition: var(--transition);
    }
    .desktop-search-box:focus-within {
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 0 2px rgba(255, 36, 66, 0.2);
    }
    .desktop-search-box input {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 14px;
        width: 100%;
        padding-left: 10px;
        outline: none;
    }
    
    .desktop-search-results {
        position: absolute;
        top: 45px;
        right: 0;
        width: 350px;
        background: var(--bg-card);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-card);
        display: none;
        flex-direction: column;
        max-height: 400px;
        overflow-y: auto;
    }

    /* Hide Mobile Elements */
    .mobile-only, .bottom-nav {
        display: none !important;
    }
    
    /* Reveal Desktop Elements */
    .hidden-mobile {
        display: flex !important;
    }
    .desktop-menu {
        display: flex !important;
        align-items: center;
    }

    /* Hero Banner Full Bleed */
    .hero-banner {
        aspect-ratio: 16 / 5.5;
        border-radius: 0;
        margin: 0;
        width: 100vw;
        max-width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    .hero-banner .hero-content {
        align-items: flex-start;
        text-align: left;
        padding: 0 0 40px;
        max-width: 100%;
        margin: 0;
    }
    .hero-app-container {
        max-width: 1600px;
        margin: 0 auto;
        padding: 0 40px !important;
    }
    .hero-text-inner {
        max-width: 50%;
    }
    .hero-banner .hero-buttons {
        padding: 0;
        justify-content: flex-start;
        max-width: 400px;
    }

    /* Global Layout Padding & Constraints for Content Blocks */
    .nav-pills, .section-head, .movie-scroll, .movie-grid {
        padding: 10px 40px;
    }
    .nav-pills {
        top: 76px; /* Offset for desktop static header */
    }

    /* Grid layout adjustments typical for TV/PC */
    .movie-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
    
    /* Convert Movie Scroll to Grid on PC to avoid nasty horizontal scrolling */
    .movie-scroll {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        gap: 20px;
        overflow-x: visible;
        scroll-snap-type: none;
    }
    .movie-card-v {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .promo-banner {
        margin: 40px;
        padding: 24px 40px;
    }
    
    /* Add hover scaling distinct for desktop */
    .movie-card-v:hover, .movie-card-g:hover {
        transform: translateY(-5px);
    }
    
    /* Single Series Split Layout - Desktop Match Ophim */
    .single-desktop-split {
        flex-direction: row;
        gap: 40px;
        padding: 40px;
        align-items: flex-start;
        margin-bottom: 40px;
    }
    
    .single-hero-poster {
        flex: 0 0 320px;
        border-radius: var(--radius-xl);
        overflow: hidden;
        aspect-ratio: 2/3;
        box-shadow: var(--shadow-xl);
    }
    
    .single-hero-info {
        flex: 1;
        margin-top: 0;
        padding: 0;
        align-items: flex-start;
        text-align: left;
    }
    
    .single-hero-info .hero-update-badge {
        margin-bottom: 20px;
    }
    
    .single-hero-info .hero-title-txt {
        font-size: 42px;
        margin-bottom: 20px;
    }
    
    .single-hero-info .hero-meta-txt {
        justify-content: flex-start;
        margin-bottom: 30px;
        font-size: 14px;
    }
    
    .single-hero-info .hero-actions {
        justify-content: flex-start;
    }
}

/* ==========================================================================
   Hero Swiper & Descriptions
   ========================================================================== */


.hero-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}
.hero-swiper .swiper-pagination-bullet-active {
    background: var(--primary-color);
}
.hero-swiper .hero-content {
    padding-bottom: 40px; /* Space for pagination bullets */
}


/* Pagination Styles */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-numbers:hover {
    background: rgba(255, 255, 255, 0.15);
}

.page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 36, 66, 0.3);
}

.page-numbers.dots {
    background: transparent;
    border: none;
    pointer-events: none;
}
