/* ============================================
   BIGBOX OTT — USER PANEL
   Premium Dark Glassmorphism Design
   ============================================ */

/* ─── Image Fallback ─── */
.img-fallback { object-fit: contain !important; opacity: 0.5; }

/* ─── CSS Variables (overridden by theme.js) ─── */
:root {
    --user-primary: #FF7A00;
    --user-secondary: #7B2FF7;
    --user-accent: #E91E63;
    --user-bg: #050B18;
    --user-surface: #08111F;
    --user-card: #0B1424;
    --user-text: #ffffff;
    --user-muted: #A0A7B5;
    --user-border: rgba(255,255,255,0.08);
    --user-sidebar: #070D18;
    --user-header: #070D18;
    --user-footer: #050B18;
    --user-button: #FF7A00;
    --user-hover: #FF3D00;
    --user-link: #FF7A00;
    --user-success: #22c55e;
    --user-warning: #f59e0b;
    --user-danger: #ef4444;
    --user-info: #3b82f6;
    --user-input-bg: #0B1424;
    --user-input-border: rgba(255,255,255,0.08);
    --user-input-text: #ffffff;
    --user-modal-bg: #0B1424;
    --user-dropdown-bg: #0B1424;
    --user-font: 'Inter', sans-serif;
    --user-radius: 12px;
    --user-shadow: medium;
    --user-anim-speed: 0.3s;
    --header-h: 64px;
    --brand-gradient: linear-gradient(90deg, #FF7A00, #FF3D00, #E91E63, #7B2FF7, #3F51FF);
    --brand-gradient-short: linear-gradient(135deg, #FF7A00 0%, #E91E63 50%, #7B2FF7 100%);
    --brand-gradient-hover: linear-gradient(90deg, #FF8A1A, #FF4D1A, #F02E73, #8B3FFF, #4F61FF);
}

/* ─── Reset & Base ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--user-font);
    background: var(--user-bg);
    color: var(--user-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--user-link); text-decoration: none; transition: color var(--user-anim-speed); }
a:hover { color: var(--user-hover); }

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

/* ─── Header Auth Buttons ─── */
.header-auth-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--user-bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ─── Bootstrap Overrides ─── */
.btn-primary {
    background: var(--brand-gradient-short);
    background-size: 150% 100%;
    border: none;
    border-radius: var(--user-radius);
    font-weight: 600;
    transition: all var(--user-anim-speed);
    box-shadow: 0 4px 15px rgba(255,122,0,0.25);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--brand-gradient-hover);
    background-size: 150% 100%;
    border: none;
    box-shadow: 0 6px 20px rgba(255,122,0,0.35);
    transform: translateY(-1px);
}
.btn-outline-light {
    border-radius: var(--user-radius);
    font-weight: 500;
    border-color: rgba(255,255,255,0.15);
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
}
.btn { border-radius: var(--user-radius); }

.form-control, .form-select {
    background: var(--user-input-bg);
    border: 1px solid var(--user-input-border);
    color: var(--user-input-text);
    border-radius: var(--user-radius);
    padding: 0.65rem 1rem;
    transition: all var(--user-anim-speed);
}
.form-control:focus, .form-select:focus {
    background: var(--user-input-bg);
    border-color: var(--user-primary);
    color: var(--user-input-text);
    box-shadow: 0 0 0 0.2rem rgba(255,122,0,0.15);
}
.form-control::placeholder { color: var(--user-muted); }

.modal-content {
    background: var(--user-modal-bg);
    border: 1px solid var(--user-border);
    border-radius: calc(var(--user-radius) * 1.5);
}
.modal-header { border-bottom: 1px solid var(--user-border); }
.modal-footer { border-top: 1px solid var(--user-border); }

.dropdown-menu {
    background: var(--user-dropdown-bg);
    border: 1px solid var(--user-border);
    border-radius: var(--user-radius);
}
.dropdown-item { color: var(--user-text); transition: all 0.2s; }
.dropdown-item:hover, .dropdown-item:focus {
    background: rgba(255,255,255,0.08);
    color: var(--user-text);
}

/* ─── Header / Navbar ─── */
.user-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    z-index: 1000;
    background: linear-gradient(180deg, rgba(7,13,24,0.95) 0%, rgba(7,13,24,0.7) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--user-border);
    transition: all var(--user-anim-speed);
}
.user-header.scrolled {
    background: rgba(7,13,24,0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.header-logo img { max-height: 36px; border-radius: 6px; }
.header-logo i { font-size: 1.8rem; color: var(--user-primary); }
.header-logo h1 { font-size: 1.1rem; font-weight: 800; margin: 0; color: var(--user-text); white-space: nowrap; }

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}
.header-nav a {
    color: var(--user-text);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.header-nav a:hover { background: rgba(255,255,255,0.08); color: var(--user-text); }
.header-nav a.active { color: var(--user-primary); }

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-search {
    position: relative;
    transition: all var(--user-anim-speed);
}
.header-search input {
    background: rgba(255,255,255,0.08);
    border: 1px solid transparent;
    color: var(--user-text);
    border-radius: 24px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 200px;
    font-size: 0.85rem;
    transition: all var(--user-anim-speed);
}
.header-search input:focus {
    width: 300px;
    background: rgba(255,255,255,0.12);
    border-color: var(--user-primary);
    outline: none;
}
.header-search i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--user-muted);
    font-size: 0.85rem;
}

.header-icon-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--user-text);
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.header-icon-btn:hover { background: rgba(255,255,255,0.15); }
.header-icon-btn .badge {
    position: absolute;
    top: -2px; right: -2px;
    font-size: 9px;
    min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
}

.header-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--user-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid var(--user-border);
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

.mobile-menu-btn { display: none; }

/* ─── Mobile Sidebar Nav ─── */
.mobile-nav {
    position: fixed;
    top: 0; left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--user-sidebar);
    z-index: 1100;
    transition: left var(--user-anim-speed);
    overflow-y: auto;
    padding: 1rem;
}
.mobile-nav.open { left: 0; }
.mobile-nav-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1050;
    display: none;
}
.mobile-nav-overlay.show { display: block; }
.mobile-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--user-text);
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 2px;
}
.mobile-nav a:hover, .mobile-nav a.active { background: rgba(255,255,255,0.08); }

/* ─── Main Content ─── */
.user-main {
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

/* ─── Hero Banner ─── */
.hero-banner {
    position: relative;
    height: 56vh;
    min-height: 360px;
    max-height: 620px;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 20%;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(5,11,24,0.92) 0%, rgba(5,11,24,0.5) 40%, transparent 70%),
                linear-gradient(0deg, var(--user-bg) 0%, rgba(5,11,24,0.2) 30%, transparent 60%);
}
.hero-content {
    position: absolute;
    bottom: 18%;
    left: 0; right: 0;
    padding: 0 4rem;
    max-width: 1600px;
    margin: 0 auto;
}
.hero-title {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-desc {
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255,122,0,0.2);
    border: 1px solid var(--user-primary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--user-primary);
    margin-bottom: 0.75rem;
}
.hero-dots {
    position: absolute;
    bottom: 2rem;
    right: 4rem;
    display: flex;
    gap: 0.5rem;
}
.hero-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}
.hero-dot.active { background: var(--user-primary); width: 24px; border-radius: 4px; }

/* ─── Content Sections ─── */
.content-section {
    padding: 1.5rem 0;
    margin-bottom: 0.5rem;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title i { color: var(--user-primary); }
.section-view-all {
    font-size: 0.85rem;
    color: var(--user-muted);
    transition: color 0.2s;
}
.section-view-all:hover { color: var(--user-primary); }

/* ─── Content Row (horizontal scroll) ─── */
.content-row-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 2rem 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.content-row-scroll::-webkit-scrollbar { display: none; }
.content-row-scroll .content-card { min-width: 180px; max-width: 180px; }
@media (max-width: 768px) { .content-row-scroll .content-card { min-width: 140px; max-width: 140px; } }

/* ─── Content Grid ─── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    padding: 0 2rem;
}

/* ─── Content Card ─── */
.content-card {
    display: block;
    flex-shrink: 0;
    width: 200px;
    transition: transform 0.3s ease;
    cursor: pointer;
}
.content-grid .content-card { width: 100%; }
.content-card:hover { transform: translateY(-4px) scale(1.02); }

.card-poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: var(--user-radius);
    overflow: hidden;
    background: var(--user-card);
    border: 1px solid var(--user-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
.content-card:hover .card-poster {
    border-color: rgba(255,122,0,0.4);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 15px rgba(255,122,0,0.15);
}
.card-poster img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.content-card:hover .card-poster img { transform: scale(1.08); }

.card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 1rem;
}
.content-card:hover .card-overlay { opacity: 1; }

.card-play {
    font-size: 3rem;
    color: var(--user-primary);
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 10px rgba(255,122,0,0.5));
    transition: transform 0.3s;
}
.content-card:hover .card-play { transform: scale(1.1); }

.card-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.card-rating {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--user-warning);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.badge-premium {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border-radius: 4px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.badge-status {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    background: rgba(34,197,94,0.2);
    color: var(--user-success);
    border-radius: 4px;
    font-weight: 600;
}

.card-info { padding: 0.5rem 0.25rem 0; }
.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--user-text);
}
.card-sub {
    font-size: 0.75rem;
    color: var(--user-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Skeleton Loaders ─── */
.skeleton-card { width: 200px; flex-shrink: 0; }
.content-grid .skeleton-card { width: 100%; }
.skeleton-poster {
    aspect-ratio: 2/3;
    border-radius: var(--user-radius);
    background: linear-gradient(90deg, var(--user-card) 25%, rgba(255,255,255,0.05) 50%, var(--user-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.skeleton-line {
    height: 12px;
    border-radius: 6px;
    margin-top: 0.5rem;
    background: linear-gradient(90deg, var(--user-card) 25%, rgba(255,255,255,0.05) 50%, var(--user-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.w-70 { width: 70%; }
.w-50 { width: 50%; }
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Page Container ─── */
.page-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}
.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

/* ─── Filters Bar ─── */
.filters-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--user-border);
    border-radius: var(--user-radius);
    backdrop-filter: blur(10px);
}
.filters-bar .form-select {
    width: auto;
    min-width: 140px;
    font-size: 0.85rem;
}
.filters-bar .search-input {
    flex: 1;
    min-width: 200px;
}
.filter-label {
    font-size: 0.8rem;
    color: var(--user-muted);
    margin-right: -0.5rem;
}

/* ─── Movie/Series Details Page ─── */
.details-hero {
    position: relative;
    height: 50vh;
    min-height: 300px;
    overflow: hidden;
}
.details-hero img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(2px);
}
.details-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, var(--user-bg) 0%, rgba(5,11,24,0.5) 50%, rgba(5,11,24,0.3) 100%);
}
.details-content {
    max-width: 1200px;
    margin: -150px auto 0;
    padding: 0 2rem 2rem;
    position: relative;
    z-index: 2;
}
.details-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}
.details-poster {
    width: 240px;
    flex-shrink: 0;
    border-radius: var(--user-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.details-poster img { width: 100%; height: auto; }
.details-info { flex: 1; padding-top: 2rem; }
.details-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.details-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    color: var(--user-muted);
    font-size: 0.9rem;
}
.details-meta span { display: flex; align-items: center; gap: 0.3rem; }
.details-meta .rating { color: var(--user-warning); font-weight: 600; }
.details-desc {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}
.details-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.details-genres { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.genre-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--user-text);
}

/* ─── Season Selector ─── */
.season-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.season-tab {
    padding: 0.5rem 1.25rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--user-border);
    border-radius: 24px;
    color: var(--user-text);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.season-tab:hover { background: rgba(255,255,255,0.1); }
.season-tab.active {
    background: var(--user-primary);
    border-color: var(--user-primary);
}

/* ─── Episode List ─── */
.episode-list { display: flex; flex-direction: column; gap: 0.75rem; }
.episode-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--user-border);
    border-radius: var(--user-radius);
    transition: all 0.2s;
    cursor: pointer;
}
.episode-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--user-primary);
}
.episode-thumb {
    width: 160px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--user-card);
}
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode-info { flex: 1; }
.episode-num { font-size: 0.8rem; color: var(--user-muted); }
.episode-title { font-size: 1rem; font-weight: 600; margin: 0.25rem 0; }
.episode-desc { font-size: 0.85rem; color: var(--user-muted); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode-duration { font-size: 0.75rem; color: var(--user-muted); margin-top: 0.25rem; }
.episode-progress {
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}
.episode-progress-bar { height: 100%; background: var(--user-primary); border-radius: 2px; }

/* ─── Video Player ─── */
.player-page { padding: 0; }
.player-container {
    position: relative;
    width: 100%;
    background: #000;
    aspect-ratio: 16/9;
    max-height: 100vh;
}
.player-container video { width: 100%; height: 100%; object-fit: contain; }
.player-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}
.player-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: auto;
}
.player-bottom-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: auto;
}
.player-progress {
    height: 5px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
.player-progress-bar {
    height: 100%;
    background: var(--user-primary);
    border-radius: 3px;
    position: relative;
}
.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
}
.player-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}
.player-btn:hover { color: var(--user-primary); }
.player-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.player-time { font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.player-settings { position: relative; }
.player-settings-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(11,20,36,0.95);
    border: 1px solid var(--user-border);
    border-radius: var(--user-radius);
    padding: 0.5rem;
    min-width: 180px;
    backdrop-filter: blur(10px);
    display: none;
}
.player-settings-menu.show { display: block; }
.player-settings-menu button {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: var(--user-text);
    text-align: left;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}
.player-settings-menu button:hover { background: rgba(255,255,255,0.1); }
.player-settings-menu button.active { color: var(--user-primary); }

/* ─── Auth Pages ─── */
.auth-page {
    min-height: calc(100vh - var(--header-h, 64px));
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--user-bg) 0%, var(--user-surface) 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}
.auth-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,122,0,0.12) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(123,47,247,0.1) 0%, transparent 50%);
}
.auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: rgba(11,20,36,0.85);
    border: 1px solid var(--user-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-logo img { max-height: 48px; margin: 0 auto; }
.auth-logo h1 { font-size: 1.4rem; font-weight: 800; margin-top: 0.5rem; }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.auth-subtitle { color: var(--user-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.auth-form .form-group { margin-bottom: 1.25rem; }
.auth-form label { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--user-text); }
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--user-radius);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.auth-alert.success { background: rgba(34,197,94,0.15); color: var(--user-success); border: 1px solid rgba(34,197,94,0.3); }
.auth-alert.error { background: rgba(239,68,68,0.15); color: var(--user-danger); border: 1px solid rgba(239,68,68,0.3); }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--user-muted); }
.auth-footer a { font-weight: 600; }

/* ─── Subscription Plans ─── */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 0;
}
.plan-card {
    background: var(--user-card);
    border: 2px solid var(--user-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.plan-card:hover { transform: translateY(-4px); border-color: rgba(255,122,0,0.4); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.plan-card.popular {
    border: 2px solid transparent;
    background-image: linear-gradient(var(--user-card), var(--user-card)), var(--brand-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 8px 30px rgba(255,122,0,0.15);
}
.plan-card.current { border-color: var(--user-success); opacity: 0.8; }
.plan-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: 1rem; right: -2rem;
    background: var(--brand-gradient-short);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 2.5rem;
    transform: rotate(45deg);
}
.plan-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.plan-icon-wrapper {
    width: 64px; height: 64px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
}
.plan-icon {
    width: 100%; height: 100%;
    object-fit: cover;
}
.plan-price { font-size: 2.5rem; font-weight: 800; margin: 1rem 0; }
.plan-price small { font-size: 0.9rem; font-weight: 400; color: var(--user-muted); }
.plan-features { list-style: none; padding: 0; margin: 1.5rem 0; text-align: left; }
.plan-features li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.plan-features li i { color: var(--user-success); }
.plan-features li.disabled { color: var(--user-muted); }
.plan-features li.disabled i { color: var(--user-muted); }

/* ─── Profile Page ─── */
.profile-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--user-card);
    border: 1px solid var(--user-border);
    border-radius: 16px;
}
.profile-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: var(--brand-gradient-short);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-tabs { margin-bottom: 2rem; }
.profile-tab {
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--user-muted);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.profile-tab.active { color: var(--user-primary); border-bottom-color: var(--user-primary); }
.profile-tab:hover:not(.active) { border-color: var(--user-primary); color: #fff; }

/* ─── Notifications ─── */
.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--user-radius);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--user-border);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}
.notification-item:hover { background: rgba(255,255,255,0.06); }
.notification-item.unread { border-left: 3px solid var(--user-primary); }
.notification-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* ─── Toast ─── */
.user-toast-container {
    position: fixed;
    top: 80px; right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.user-toast {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--user-radius);
    background: var(--user-modal-bg);
    border: 1px solid var(--user-border);
    color: var(--user-text);
    font-size: 0.9rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}
.user-toast.show { transform: translateX(0); }
.user-toast-success { border-left: 3px solid var(--user-success); }
.user-toast-success i { color: var(--user-success); }
.user-toast-error { border-left: 3px solid var(--user-danger); }
.user-toast-error i { color: var(--user-danger); }
.user-toast-warning { border-left: 3px solid var(--user-warning); }
.user-toast-warning i { color: var(--user-warning); }
.user-toast-info { border-left: 3px solid var(--user-info); }
.user-toast-info i { color: var(--user-info); }

/* ─── Error/Empty States ─── */
.error-box, .empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--user-muted);
}
.error-box i, .empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.error-box p, .empty-state p { margin-bottom: 1rem; }

/* ─── Footer ─── */
.user-footer {
    background: var(--user-footer);
    border-top: 1px solid var(--user-border);
    padding: 3rem 2rem 1.5rem;
    margin-top: 3rem;
}
.footer-inner { max-width: 1600px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--user-muted); font-size: 0.85rem; padding: 0.25rem 0; }
.footer-col a:hover { color: var(--user-text); }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--user-text);
    transition: all 0.2s;
}
.footer-social a:hover { background: var(--brand-gradient-short); color: #fff; }
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--user-border);
    color: var(--user-muted);
    font-size: 0.8rem;
}

/* ─── Search Results (base — overridden by premium.css) ─── */
.search-trending { padding: 0.75rem 1rem; }
.search-trending h6 { font-size: 0.75rem; color: var(--user-muted); margin-bottom: 0.5rem; text-transform: uppercase; }
.trending-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0.25rem 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}
.trending-tag:hover { background: var(--user-primary); color: #fff; }

/* ─── Pagination ─── */
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.pagination-bar button {
    min-width: 38px; height: 38px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--user-border);
    color: var(--user-text);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.pagination-bar button:hover { background: rgba(255,255,255,0.1); }
.pagination-bar button.active { background: var(--user-primary); border-color: var(--user-primary); }
.pagination-bar button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Responsive ─── */
@media (max-width: 991px) {
    .header-nav { display: none; }
    .mobile-menu-btn { display: flex; }
    .header-search input { width: 140px; }
    .header-search input:focus { width: 200px; }
    .hero-content { padding: 0 1.5rem; }
    .section-header { padding: 0 1rem; }
    .content-row-scroll { padding: 0 1rem 0.5rem; }
    .content-grid { padding: 0 1rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
    .content-card { width: 150px; }
    .page-container { padding: 1rem; }
    .details-header { flex-direction: column; }
    .details-poster { width: 180px; margin: 0 auto; }
    .details-content { margin-top: -100px; padding: 0 1rem 2rem; }
    .plans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .header-search { display: none; }
    .hero-banner { height: 45vh; min-height: 260px; }
    .hero-title { font-size: 1.5rem; }
    .hero-desc { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .hero-content { bottom: 10%; }
    .content-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .content-card { width: 100%; }
    .card-title { font-size: 0.8rem; }
    .auth-card { padding: 1.5rem; margin: 1rem; }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .filters-bar .form-select, .filters-bar .search-input { width: 100%; }
    .episode-item { flex-direction: column; }
    .episode-thumb { width: 100%; }
    .profile-header { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
    .content-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ─── Animations ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

.fade-in { animation: fadeIn 0.5s ease; }
.slide-up { animation: slideUp 0.5s ease; }
.slide-in-left { animation: slideInLeft 0.5s ease; }

/* ─── Utility ─── */
.text-primary-user { color: var(--user-primary) !important; }
.text-muted-user { color: var(--user-muted) !important; }
.bg-surface { background: var(--user-surface) !important; }
.bg-card { background: var(--user-card) !important; }
.glass {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--user-border);
}
.hidden { display: none !important; }
.loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--user-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   BOTTOM NAVIGATION BAR (Phone App Layout)
   ============================================ */
.bottom-nav-bar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--user-surface);
    border-top: 1px solid var(--user-border);
    z-index: 1000;
    padding: 0;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--user-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    transition: color 0.2s ease;
    padding: 8px 2px;
}
.bottom-nav-item i { font-size: 20px; }
.bottom-nav-item.active { color: var(--user-primary); }
.bottom-nav-item:hover { color: var(--user-text); }

/* ─── LAYOUT MODE: phone_app ─── */
body[data-layout="phone_app"] .user-sidebar { display: none !important; }
body[data-layout="phone_app"] .user-content-wrapper { margin-left: 0 !important; }
body[data-layout="phone_app"] .mobile-menu-toggle { display: none !important; }
body[data-layout="phone_app"] .bottom-nav-bar { display: flex; }
body[data-layout="phone_app"] .user-main-content { padding-bottom: 80px; }

/* ─── LAYOUT MODE: website ─── */
body[data-layout="website"] .bottom-nav-bar { display: none; }

/* ─── LAYOUT MODE: auto (default) ─── */
body[data-layout="auto"] .bottom-nav-bar { display: none; }

@media (max-width: 768px) {
    body[data-layout="auto"] .bottom-nav-bar { display: flex; }
    body[data-layout="auto"] .user-main-content { padding-bottom: 80px; }
    /* In auto mode on mobile, hide sidebar completely (use bottom nav instead) */
    body[data-layout="auto"] .user-sidebar { transform: translateX(-100%); }
    body[data-layout="auto"] .user-sidebar.mobile-open { transform: translateX(0); }
    body[data-layout="auto"] .user-content-wrapper { margin-left: 0 !important; }
}

/* ─── ADDITIONAL MOBILE RESPONSIVE FIXES ─── */
@media (max-width: 768px) {
    /* Bottom nav bar */
    .bottom-nav-bar {
        padding: 0.25rem 0;
        gap: 0;
    }
    .bottom-nav-item {
        flex: 1;
        padding: 0.4rem 0.2rem;
        font-size: 0.65rem;
    }
    .bottom-nav-item i {
        font-size: 1.1rem;
        margin-bottom: 0.15rem;
    }

    /* Mobile drawer */
    .mobile-drawer {
        width: 85vw;
        max-width: 320px;
    }
    .drawer-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Content sections */
    .content-section {
        margin-bottom: 1.5rem;
    }

    /* Skeleton cards */
    .skeleton-card {
        min-width: 110px;
    }
    .skeleton-poster {
        aspect-ratio: 2/3;
    }

    /* Glass effect */
    .glass {
        padding: 1rem;
        border-radius: 12px;
    }

    /* Forms */
    .form-control, .form-select {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    .form-label {
        font-size: 0.8rem;
    }

    /* Toast */
    .toast-container {
        left: 0.5rem !important;
        right: 0.5rem !important;
        bottom: 70px !important;
    }

    /* Error box & empty state */
    .error-box {
        padding: 1rem;
        font-size: 0.85rem;
    }

    /* Continue watching */
    .continue-progress {
        height: 4px !important;
    }

    /* Subscription cards */
    .plan-card.featured {
        transform: none;
    }
    .plan-card.featured:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    /* Bottom nav — hide labels on very small screens */
    .bottom-nav-item {
        font-size: 0.6rem;
    }
    .bottom-nav-item i {
        font-size: 1rem;
    }

    /* Mobile drawer */
    .mobile-drawer {
        width: 90vw;
    }

    /* Content sections */
    .content-section {
        margin-bottom: 1rem;
    }

    /* Skeleton */
    .skeleton-card {
        min-width: 100px;
    }

    /* Advertisement Slots */
    .ad-slot-container { width: 100%; }
    .ad-banner-wrapper { animation: fadeIn 0.3s ease; }
    .ad-close-btn:hover { background: rgba(0,0,0,0.8) !important; }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
}

/* ─── SAFE AREA SUPPORT (notch devices) ─── */
@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav-bar {
        padding-bottom: env(safe-area-inset-bottom);
    }
    .user-top-navbar {
        padding-top: env(safe-area-inset-top);
    }
}

/* ─── Card Trailer Button ─── */
.card-trailer-btn {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,193,7,0.9);
    border: none;
    color: #1a1a1a;
    font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
}
.content-card-ref:hover .card-trailer-btn,
.content-card:hover .card-trailer-btn { opacity: 1; }
.card-trailer-btn:hover { transform: scale(1.15); background: rgba(255,193,7,1); }

/* ─── Trailer Modal ─── */
.trailer-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.trailer-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
}
.trailer-modal-box {
    position: relative; z-index: 2;
    width: 90%; max-width: 800px;
    background: var(--user-card, #0B1424);
    border: 1px solid var(--user-border, rgba(255,255,255,0.08));
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.trailer-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--user-border, rgba(255,255,255,0.08));
}
.trailer-modal-header h5 {
    margin: 0; font-size: 1rem; font-weight: 600; color: var(--user-text, #fff);
}
.trailer-modal-close {
    background: none; border: none; color: var(--user-muted, #A0A7B5);
    font-size: 1.1rem; cursor: pointer; padding: 0.25rem 0.5rem;
    border-radius: 8px; transition: all 0.2s;
}
.trailer-modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.trailer-modal-body {
    width: 100%; aspect-ratio: 16/9;
    background: #000;
}
@media (max-width: 576px) {
    .trailer-modal-box { width: 95%; }
    .card-trailer-btn { opacity: 1; }
}
