/* ==============================================================================
   Praereung.live - SabayFlix Inspired Dark Cinema Theme
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #090b10;
    --bg-surface: #10131d;
    --bg-surface-hover: #171b29;
    --bg-card: #131722;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 36, 66, 0.3);
    
    --primary: #e50914;
    --primary-hover: #ff2a3b;
    --primary-glow: rgba(229, 9, 20, 0.35);
    
    --vip-gold: #fbbf24;
    --vip-gold-glow: rgba(251, 191, 36, 0.3);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    --font-khmer: 'Kantumruy Pro', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.18s ease;
    --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-khmer);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button {
    font-family: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    background: none;
}

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

/* Containers */
.container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #090b10;
}
::-webkit-scrollbar-thumb {
    background: #252b3d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Navbar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 950;
    background: rgba(9, 11, 16, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
    background: rgba(9, 11, 16, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body {
    padding-top: 68px;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo-brand .brand-badge {
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    box-shadow: 0 0 15px var(--primary-glow);
}

.brand-logo-img {
    height: 50px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.logo-brand:hover .brand-logo-img {
    transform: scale(1.05);
}

.footer-brand-logo-img {
    height: 50px;
    width: auto;
    max-width: 100px;
    border-radius: 8px;
}

.admin-brand-logo-img {
    height: 30px;
    width: auto;
    max-width: 44px;
    object-fit: contain;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.logo-brand .brand-live {
    color: var(--primary);
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-item a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-item a:hover,
.nav-item.active a {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    color: var(--primary);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Search Input Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px 8px 36px;
    border-radius: var(--radius-xl);
    font-size: 0.88rem;
    font-family: inherit;
    width: 220px;
    transition: all var(--transition-fast);
}

.search-input:focus {
    width: 280px;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: var(--bg-surface-hover);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-dim);
    pointer-events: none;
}

/* VIP Badge Button */
.btn-vip-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-weight: 700;
    font-size: 0.88rem;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-xl);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 14px var(--vip-gold-glow);
    transition: all var(--transition-fast);
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-vip-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    color: #000;
}

.btn-login {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-xl);
    font-size: 0.88rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile-only elements default hidden on desktop */
.mobile-search-btn {
    display: none;
}
.mobile-search-dropdown-bar {
    display: none;
}
.header-wallet-pill {
    display: none;
}
.vip-text-mobile,
.login-text-mobile,
.btn-text-short {
    display: none;
}
.mobile-bottom-nav {
    display: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px var(--primary-glow);
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Theme Toggle Button (Light/Dark Mode) */
.btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fbbf24;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-left: 8px;
    padding: 0;
    outline: none;
    user-select: none;
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(251, 191, 36, 0.4);
    transform: scale(1.06);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}

.theme-icon-light {
    display: inline-block;
    color: #fbbf24;
    transition: transform 0.25s ease;
}

.theme-icon-dark {
    display: none;
    color: #0284c7;
    transition: transform 0.25s ease;
}

.btn-theme-toggle:hover .theme-icon-light {
    transform: rotate(20deg);
}

.btn-theme-toggle:hover .theme-icon-dark {
    transform: rotate(-15deg);
}

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

/* Hero Section */
.hero-slider-section {
    position: relative;
    width: calc(100% - 2.5rem);
    max-width: 1400px;
    margin: 1.5rem auto 2rem;
    min-height: 500px;
    height: 66vh;
    max-height: 620px;
    border-radius: 24px;
    overflow: hidden;
    background: #090b10;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transform: translate3d(0, 0, 0);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    cursor: grab;
}

.hero-slider-track.is-dragging {
    cursor: grabbing;
    transition: none !important;
}

.hero-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    height: 100%;
    position: relative;
    background-image: var(--slide-bg-desktop);
    background-size: cover;
    background-position: right center;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.hero-slide-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: 100%;
    padding: 0 4.5rem;
    box-sizing: border-box;
}

/* Subtle ambient depth tint only - NO harsh black fog or bottom fog */
.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7, 10, 18, 0.45) 0%, rgba(7, 10, 18, 0.12) 50%, transparent 100%);
    pointer-events: none;
}

/* Slider Navigation Arrows */
.hero-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(14, 18, 27, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s ease;
    opacity: 0.8;
}

.hero-slider-nav:hover {
    opacity: 1;
    background: rgba(229, 9, 20, 0.9);
    border-color: #ef4444;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.45);
}

.hero-slider-prev {
    left: 20px;
}

.hero-slider-next {
    right: 20px;
}

/* Slider Pagination Dots with 30s Progress Bar */
.hero-slider-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(9, 11, 16, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-slider-dot {
    position: relative;
    width: 10px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.35s ease;
    overflow: hidden;
}

.hero-slider-dot.active {
    width: 32px;
    background: rgba(255, 255, 255, 0.25);
}

.hero-slider-dot .hero-dot-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.hero-slider-dot.active .hero-dot-fill {
    background: #e50914;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 580px;
    background: rgba(13, 17, 28, 0.72);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 2.2rem 2.4rem;
    margin: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.badge-tag {
    background: rgba(229, 9, 20, 0.2);
    color: #ff4d64;
    border: 1px solid rgba(229, 9, 20, 0.4);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-rating {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-title {
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.35rem;
    color: #fff;
    letter-spacing: -0.01em;
}

.hero-original-title {
    font-size: 1rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    margin-bottom: 0.85rem;
    font-weight: 500;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-desc {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

/* Quality & Trust Feature Bar */
.quality-feature-bar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: center;
}

.quality-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #ffffff;
}

/* Sections & Grids */
.section-wrapper {
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary);
}

.btn-view-all {
    color: var(--text-muted);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.btn-view-all:hover {
    color: var(--primary);
}

/* Movie Card Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
}

.movie-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(229, 9, 20, 0.2);
}

.card-poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #1c2130;
}

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

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

/* Card Badges */
.card-badge-left {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.card-badge-right {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #38bdf8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.card-badge-vip,
.card-badge-member {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.card-badge-free {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.card-badge-paid {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.card-badge-lang {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.card-badge-lang.lang-khmer {
    background: rgba(251, 191, 36, 0.92);
    color: #1a1605;
}

.card-badge-lang.lang-original {
    background: rgba(56, 189, 248, 0.92);
    color: #04253a;
}

.badge-access {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.badge-free {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-member {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-paid {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Play Overlay on Hover */
.card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.movie-card:hover .card-play-overlay {
    opacity: 1;
}

.play-circle-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(0.8);
    transition: transform var(--transition-fast);
}

.movie-card:hover .play-circle-icon {
    transform: scale(1);
}

/* Card Content Info */
.card-info {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    transition: color var(--transition-fast);
}

.movie-card:hover .card-title {
    color: #ff334b;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: auto;
}

.card-rating {
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

/* VIP Banner in Homepage */
.vip-promo-card {
    background: linear-gradient(135deg, #181b29, #25121b);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.vip-promo-card::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

/* Catalog Header & Search/Filter Toolbar (Matching Image 1) */
.catalog-header-wrap {
    margin-bottom: 2rem;
    text-align: center;
}

.catalog-header-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.catalog-action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.catalog-search-form {
    flex: 1;
    margin: 0;
}

.catalog-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.catalog-search-field {
    width: 100%;
    height: 44px;
    background: #11141d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0 42px 0 16px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.catalog-search-field::placeholder {
    color: #64748b;
}

.catalog-search-field:focus {
    border-color: #ef4444;
    background: #151924;
    outline: none;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.catalog-search-submit {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.catalog-search-submit:hover {
    transform: scale(1.1);
}

/* Red Filter Toggle Button ("⬍ លម្អិត") */
.btn-filter-detail-toggle {
    height: 44px;
    background: #8b0000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 18px;
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

.btn-filter-detail-toggle:hover {
    background: #991b1b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.5);
}

.btn-filter-detail-toggle:active {
    transform: scale(0.96);
}

.btn-filter-detail-toggle.active {
    background: #b91c1c;
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.catalog-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 0 4px;
}

.catalog-results-count {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.catalog-results-count strong {
    color: #fff;
}

.catalog-reset-link {
    color: #ef4444;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.catalog-reset-link:hover {
    opacity: 0.8;
}

@media (max-width: 640px) {
    .catalog-header-title {
        font-size: 1.55rem;
        margin-bottom: 1rem;
    }
    .catalog-action-bar {
        gap: 8px;
    }
    .catalog-search-field {
        height: 40px;
        font-size: 0.88rem;
        padding: 0 36px 0 12px;
    }
    .btn-filter-detail-toggle {
        height: 40px;
        padding: 0 14px;
        font-size: 0.85rem;
        gap: 6px;
    }
}

/* Filter Controls in Catalog Page */
.filter-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 80px;
}

.filter-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Watch Page Player */
.player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

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

/* Locked Player State & Mobile Responsive Enhancements */
.player-container.is-locked {
    aspect-ratio: auto;
    min-height: 330px;
    height: auto;
    background-color: #0a0d14;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

@media (min-width: 768px) {
    .player-container.is-locked {
        aspect-ratio: 16 / 9;
        min-height: 400px;
    }
}

.watch-lock-overlay {
    position: relative;
    width: 100%;
    min-height: 330px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.25rem;
    background: radial-gradient(circle at 50% 30%, rgba(168, 85, 247, 0.28) 0%, rgba(10, 12, 18, 0.95) 75%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 20;
    box-sizing: border-box;
}

.watch-lock-overlay.paid-lock {
    background: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, 0.28) 0%, rgba(10, 12, 18, 0.95) 75%);
}

.watch-lock-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.watch-lock-icon-badge.member {
    background: rgba(168, 85, 247, 0.2);
    border: 1.5px solid rgba(168, 85, 247, 0.5);
    color: #c084fc;
}

.watch-lock-icon-badge.paid {
    background: rgba(239, 68, 68, 0.2);
    border: 1.5px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.watch-lock-icon-badge i,
.watch-lock-icon-badge svg {
    width: 26px;
    height: 26px;
}

.watch-lock-title {
    font-size: 1.28rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.45rem 0;
    line-height: 1.35;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.watch-lock-desc {
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.55;
    max-width: 440px;
    margin: 0 0 1.25rem 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.watch-lock-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 440px;
}

.watch-lock-btn-primary {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: #ffffff !important;
    border-radius: 12px;
    font-weight: 700;
    padding: 11px 22px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.45);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex: 1 1 200px;
    min-height: 44px;
}

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

.watch-lock-btn-paid {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.watch-lock-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0 !important;
    border-radius: 12px;
    font-weight: 600;
    padding: 10px 18px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
    flex: 1 1 160px;
    min-height: 44px;
}

.watch-lock-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 480px) {
    .player-container.is-locked {
        min-height: 310px;
    }
    .watch-lock-overlay {
        min-height: 310px;
        padding: 1.5rem 1rem;
    }
    .watch-lock-icon-badge {
        width: 46px;
        height: 46px;
        margin-bottom: 0.7rem;
    }
    .watch-lock-icon-badge i,
    .watch-lock-icon-badge svg {
        width: 22px;
        height: 22px;
    }
    .watch-lock-title {
        font-size: 1.12rem;
        margin-bottom: 0.4rem;
    }
    .watch-lock-desc {
        font-size: 0.82rem;
        max-width: 320px;
        margin-bottom: 1.1rem;
    }
    .watch-lock-actions {
        flex-direction: column;
        width: 100%;
        max-width: 310px;
        gap: 8px;
    }
    .watch-lock-btn-primary,
    .watch-lock-btn-secondary {
        width: 100%;
        flex: 1 1 auto;
        min-height: 42px;
        padding: 9px 14px;
        font-size: 0.86rem;
    }
}

.server-selector-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.server-btn {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.server-btn:hover,
.server-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
}

.server-btn.vip-server {
    border-color: var(--vip-gold);
    color: #fbbf24;
}

.server-btn.vip-server.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    box-shadow: 0 0 14px var(--vip-gold-glow);
}

/* Episodes Grid */
.episodes-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.episode-btn {
    padding: 9px 4px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.episode-btn:hover {
    background: var(--bg-surface-hover);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.episode-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* VIP Pricing Cards */
.vip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.vip-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--transition-normal);
}

.vip-card:hover {
    transform: translateY(-8px);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.vip-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.08) 0%, var(--bg-surface) 100%);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.15);
}

.vip-card-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.vip-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin: 1rem 0 0.25rem 0;
}

.vip-price-khr {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.vip-features-list {
    list-style: none;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex-grow: 1;
}

.vip-features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: #d1d5db;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    transform: translateY(20px) scale(0.96);
    transition: all 0.25s ease;
}

.modal-backdrop.open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: #9ca3af;
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
}

.auth-tab-btn:hover {
    color: #e5e7eb;
}

.auth-tab-btn.active {
    color: #fff !important;
    border-bottom: 2px solid var(--primary) !important;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: var(--bg-surface-hover);
}

/* KHQR Payment Modal */
.khqr-card {
    text-align: center;
}

.khqr-logo-box {
    background: #e11d48;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 800;
    display: inline-block;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.khqr-frame {
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius-md);
    display: inline-block;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    margin: 1rem 0;
}

.khqr-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 700;
}

/* Site Footer */
.site-footer {
    background: #07080c;
    border-top: 1px solid var(--border-color);
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-about {
    max-width: 620px;
    flex: 1 1 360px;
}

.footer-about p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 0.85rem;
}

.footer-col-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.25rem;
    position: relative;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .vip-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .vip-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    .nav-links {
        display: none;
    }
    .btn-mobile-menu {
        display: inline-flex !important;
    }
    .btn-vip-desktop {
        display: none !important;
    }
}

/* Universal layout boundary to prevent horizontal scrolling */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    /* Top Header Permanently Fixed */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 950 !important;
    }

    /* Fixed Top Header + Bottom Navigation safe padding */
    body {
        padding-top: 50px !important;
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 12px)) !important;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Hide hero slider arrows on mobile/tablets */
    .hero-slider-nav {
        display: none !important;
    }

    .nav-inner {
        height: 50px !important;
    }

    .logo-brand {
        font-size: 1.05rem !important;
        gap: 4px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .logo-brand .brand-badge {
        font-size: 0.65rem !important;
        padding: 1px 5px !important;
        border-radius: 3px !important;
    }

    .brand-logo-img {
        height: 32px !important;
        width: auto !important;
        max-width: 60px !important;
        border-radius: 5px !important;
    }

    .footer-brand-logo-img {
        height: 38px !important;
        max-width: 70px !important;
    }

    .logo-brand .brand-live {
        font-size: 1.05rem !important;
    }

    .nav-actions {
        gap: 0.32rem !important;
        align-items: center !important;
    }

    /* Hide desktop inline search box on mobile */
    .site-header .search-box {
        display: none !important;
    }

    /* Compact Mobile Search Toggle Button (32px) */
    .mobile-search-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        color: #cbd5e1 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .mobile-search-btn svg,
    .mobile-search-btn i {
        width: 15px !important;
        height: 15px !important;
    }

    .mobile-search-btn:active {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: scale(0.94);
    }

    /* Mobile Slide-Down Search Overlay */
    .mobile-search-dropdown-bar {
        position: fixed !important;
        top: 50px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 949 !important;
        background: rgba(14, 18, 27, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8) !important;
        padding: 8px 0 !important;
    }

    .mobile-search-box {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .mobile-search-box .search-input {
        width: 100% !important;
        height: 38px !important;
        padding: 0 36px 0 34px !important;
        font-size: 0.85rem !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 20px !important;
        color: #fff !important;
        box-sizing: border-box !important;
    }

    .mobile-search-box .search-icon {
        position: absolute;
        left: 10px;
        color: #94a3b8;
        pointer-events: none;
    }

    .mobile-search-box .close-search-btn {
        position: absolute;
        right: 8px;
        background: transparent;
        border: none;
        color: #94a3b8;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        cursor: pointer;
        padding: 0;
    }

    .mobile-search-results {
        margin-top: 6px;
        background: #131722;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        max-height: 320px;
        overflow-y: auto;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    }

    /* Compact Mobile Wallet Balance Pill (32px) */
    .header-wallet-pill {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 8px !important;
        border-radius: 16px !important;
        gap: 4px !important;
        background: rgba(239, 68, 68, 0.18) !important;
        border: 1px solid rgba(239, 68, 68, 0.4) !important;
        color: #fbbf24 !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        white-space: nowrap !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
        box-sizing: border-box !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .header-wallet-pill svg,
    .header-wallet-pill i {
        width: 13px !important;
        height: 13px !important;
    }

    .header-wallet-pill:active {
        transform: scale(0.95);
    }

    /* Compact VIP Button on Mobile (32px) */
    .btn-vip-desktop {
        display: inline-flex !important;
    }

    .vip-text-desktop {
        display: inline !important;
    }

    .vip-text-mobile {
        display: inline !important;
    }

    .btn-vip-gold {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 10px !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        gap: 5px !important;
        border-radius: 16px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .btn-vip-gold span {
        font-size: 0.75rem !important;
        font-weight: 700 !important;
    }

    .btn-vip-gold svg,
    .btn-vip-gold i {
        width: 14px !important;
        height: 14px !important;
    }

    /* Compact Login Button on Mobile (32px) */
    .login-text-desktop {
        display: none !important;
    }

    .login-text-mobile {
        display: inline !important;
        font-weight: 600;
        font-size: 0.72rem !important;
    }

    .btn-login {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 8px !important;
        font-size: 0.72rem !important;
        gap: 4px !important;
        border-radius: 16px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .btn-login svg,
    .btn-login i {
        width: 13px !important;
        height: 13px !important;
    }

    /* User Avatar & Dropdown Wrap (32px) */
    .user-dropdown-wrap {
        height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .user-avatar-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .user-avatar-btn img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
        display: block !important;
    }

    .user-avatar-btn svg,
    .user-avatar-btn i {
        width: 15px !important;
        height: 15px !important;
    }

    /* Mobile Theme Toggle Button (32px) - Placed where the 3-bar hamburger used to be */
    .btn-theme-toggle {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        margin-left: 4px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        color: #fbbf24 !important;
        box-sizing: border-box !important;
    }

    .btn-theme-toggle svg,
    .btn-theme-toggle i {
        width: 15px !important;
        height: 15px !important;
    }

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

    /* Mobile Bottom Navigation Bar (SabayFlix Style) */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 990;
        height: 56px;
        background: rgba(11, 15, 23, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.7);
        align-items: center;
        justify-content: space-around;
        padding: 3px 6px calc(3px + env(safe-area-inset-bottom, 6px)) 6px;
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: #94a3b8;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 4px 0;
        transition: color 0.15s ease, transform 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item .bottom-nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        transition: transform 0.15s ease;
    }

    .bottom-nav-item .bottom-nav-icon i,
    .bottom-nav-item .bottom-nav-icon svg {
        width: 20px;
        height: 20px;
        stroke-width: 2.2;
    }

    .bottom-nav-item .bottom-nav-label {
        font-size: 0.68rem;
        font-weight: 500;
        line-height: 1;
        letter-spacing: -0.2px;
        transition: color 0.15s ease;
        white-space: nowrap;
    }

    /* Active Item - SabayFlix Red Glow */
    .bottom-nav-item.active {
        color: #e50914;
    }

    .bottom-nav-item.active .bottom-nav-icon {
        transform: translateY(-2px);
    }

    .bottom-nav-item.active .bottom-nav-icon i,
    .bottom-nav-item.active .bottom-nav-icon svg {
        stroke: #e50914;
        filter: drop-shadow(0 2px 8px rgba(229, 9, 20, 0.6));
    }

    .bottom-nav-item.active .bottom-nav-label {
        color: #e50914;
        font-weight: 700;
    }

    .bottom-nav-item:active {
        transform: scale(0.92);
    }

    /* ==============================================================================
       Hero Banner Mobile Styling - Matching Mockup (media_1793042491376_3a1b05e3.jpg)
       ============================================================================== */
    .hero-slider-section {
        width: calc(100% - 1rem) !important;
        margin: 0.5rem auto 1rem !important;
        border-radius: 22px !important;
        min-height: 520px !important;
        height: 72vh !important;
        max-height: 640px !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5) !important;
        overflow: hidden !important;
    }

    .hero-slide {
        background-image: var(--slide-bg-mobile, var(--slide-bg-desktop)) !important;
        background-size: cover !important;
        background-position: center top !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: center !important;
        position: relative !important;
    }

    /* Ambient gradient overlay: clear at the top for characters, gentle dark at bottom for card */
    .hero-slide::before {
        content: '' !important;
        position: absolute !important;
        inset: 0 !important;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(8, 10, 16, 0.78) 100%) !important;
        pointer-events: none !important;
    }

    .hero-slide-container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 10px 14px 10px !important;
        box-sizing: border-box !important;
    }

    /* Floating content card at the bottom center of the slide */
    .hero-content {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 1.1rem 1.15rem 1rem 1.15rem !important;
        border-radius: 18px !important;
        background: rgba(18, 14, 15, 0.78) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
        text-align: left !important;
        box-sizing: border-box !important;
        z-index: 10 !important;
    }

    /* Badges */
    .hero-badges {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 5px !important;
        margin-bottom: 0.5rem !important;
    }

    .badge-tag,
    .badge-rating {
        font-size: 0.68rem !important;
        font-weight: 600 !important;
        padding: 2.5px 7px !important;
        border-radius: 5px !important;
        line-height: 1.2 !important;
    }

    .badge-rating i,
    .badge-rating svg,
    .badge-tag i,
    .badge-tag svg {
        width: 12px !important;
        height: 12px !important;
    }

    /* Titles */
    .hero-title {
        font-size: 1.4rem !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        color: #ffffff !important;
        margin-bottom: 0.2rem !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    }

    .hero-original-title {
        font-size: 0.82rem !important;
        color: #94a3b8 !important;
        margin-bottom: 0.45rem !important;
    }

    /* Meta Info */
    .hero-meta {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        font-size: 0.74rem !important;
        color: #cbd5e1 !important;
        margin-bottom: 0.55rem !important;
    }

    .hero-meta span {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .hero-meta span i,
    .hero-meta span svg {
        width: 13px !important;
        height: 13px !important;
        color: #94a3b8 !important;
    }

    /* Description */
    .hero-desc {
        font-size: 0.74rem !important;
        line-height: 1.45 !important;
        color: #cbd5e1 !important;
        margin-bottom: 0.85rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* Action Buttons */
    .hero-actions {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        padding: 7px 10px !important;
        font-size: 0.74rem !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        gap: 5px !important;
        white-space: nowrap !important;
        flex: 1 1 auto !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .hero-actions .btn-primary {
        background: #e50914 !important;
        border: none !important;
        color: #ffffff !important;
        box-shadow: 0 4px 14px rgba(229, 9, 20, 0.45) !important;
    }

    .hero-actions .btn-secondary {
        background: rgba(15, 23, 42, 0.75) !important;
        border: 1px solid rgba(56, 189, 248, 0.45) !important;
        color: #38bdf8 !important;
    }

    .hero-actions .hero-btn-list {
        flex: 0 0 auto !important;
    }

    .hero-actions i,
    .hero-actions svg {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0 !important;
    }

    /* Navigation Arrows Hidden on Mobile */
    .hero-slider-nav {
        display: none !important;
    }

    /* Pagination Dots */
    .hero-slider-dots {
        position: absolute !important;
        bottom: 4px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        gap: 5px !important;
        padding: 3px 8px !important;
        z-index: 25 !important;
    }
    .hero-slider-dot {
        width: 7px !important;
        height: 5px !important;
    }
    .hero-slider-dot.active {
        width: 20px !important;
    }

    /* Quality Notice Bar - 2 rows on Mobile */
    .quality-feature-bar {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0.75rem 0.85rem !important;
        margin-top: 1rem !important;
        gap: 8px 10px !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }

    .quality-feature-bar .quality-feature-item {
        font-size: 0.75rem !important;
        gap: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: left !important;
        padding: 4px 0 !important;
    }

    .quality-feature-bar .quality-feature-item:last-child {
        grid-column: 1 / -1 !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .quality-feature-bar .quality-feature-item i,
    .quality-feature-bar .quality-feature-item svg {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px !important;
        min-height: 17px !important;
        flex-shrink: 0 !important;
    }

    .quality-feature-bar .quality-feature-item span {
        font-size: 0.75rem !important;
        white-space: normal !important;
        line-height: 1.25 !important;
    }
}

@media (max-width: 640px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .section-title {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
    }

    .movie-card .movie-title {
        font-size: 0.82rem;
        line-height: 1.25;
        margin-top: 6px;
    }

    .movie-card .movie-meta {
        font-size: 0.7rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .vip-promo-card {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-brand {
        font-size: 1.05rem;
    }

    .logo-brand .brand-badge {
        font-size: 0.68rem;
        padding: 1px 5px;
    }

    .hero-slider-section {
        min-height: 490px !important;
        height: 70vh !important;
    }

    .hero-title {
        font-size: 1.25rem !important;
    }

    .hero-content {
        padding: 0.95rem 1rem 0.9rem 1rem !important;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        padding: 6px 8px !important;
        font-size: 0.7rem !important;
    }

    .quality-feature-bar {
        padding: 0.65rem 0.75rem !important;
        gap: 6px 8px !important;
    }

    .quality-feature-bar .quality-feature-item {
        font-size: 0.7rem !important;
        gap: 5px !important;
    }

    .quality-feature-bar .quality-feature-item span {
        font-size: 0.7rem !important;
    }
}

/* ==============================================================================
   User Avatar & Dropdown Menu (Matching User Upload Image 3)
   ============================================================================== */
.user-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
}

.user-avatar-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    background: #374151;
    color: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-fast);
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
}

.user-avatar-btn:hover {
    background: #4b5563;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.user-dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    width: 175px;
    background: #121622;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    padding: 6px;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.user-dropdown-wrap:hover .user-dropdown-menu,
.user-dropdown-wrap.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: #e5e7eb;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.user-dropdown-item.text-danger:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 5px 0;
}

/* ==============================================================================
   Profile Header & History Table (Matching User Upload Images 1 & 2)
   ============================================================================== */
.profile-header-card {
    background: #111420;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1.6fr 1.2fr 0.9fr 0.9fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.profile-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #252b3d;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.profile-user-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.profile-user-id {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.profile-stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-main-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.stat-sub-text {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 3px;
}

.stat-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-circle.bg-red-icon {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
}

a.profile-stat-box:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.btn-fav-toggle.active {
    border-color: rgba(239, 68, 68, 0.5) !important;
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
}
.btn-fav-toggle.active i {
    fill: #ef4444 !important;
    color: #ef4444 !important;
}

.btn-watchlist-toggle.active {
    border-color: rgba(56, 189, 248, 0.5) !important;
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
}
.btn-watchlist-toggle.active i {
    fill: #38bdf8 !important;
    color: #38bdf8 !important;
}

.playlist-card-box:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.4) !important;
    background: rgba(56, 189, 248, 0.06) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Sub-nav Tabs */
.profile-nav-tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    padding-bottom: 2px;
}

.profile-nav-tab {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 10px 4px;
    position: relative;
    transition: color var(--transition-fast);
}

.profile-nav-tab:hover {
    color: #fff;
}

.profile-nav-tab.active {
    color: #fff;
}

.profile-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Panel & Table */
.profile-content-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.panel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.profile-table th {
    padding: 12px 14px;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-table td {
    padding: 14px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    color: #d1d5db;
}

.profile-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.txn-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e50914;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.txn-type-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.txn-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.txn-action-btn:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.table-pagination-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 1.5rem;
}

.page-arrow-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: default;
}

.page-num-active {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(229, 9, 20, 0.2);
    color: var(--primary);
    border: 1px solid rgba(229, 9, 20, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .profile-header-card {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .profile-header-card {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
}

/* ==============================================================================
   Custom App Alert & Confirm Dialog System (Modern Dark Cinema Theme)
   ============================================================================== */
.app-alert-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 15, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s;
}

.app-alert-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.app-alert-card {
    position: relative;
    background: linear-gradient(180deg, #182030 0%, #0d121c 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 2.2rem 1.85rem 1.75rem;
    text-align: center;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 35px rgba(229, 9, 20, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(0.92) translateY(14px);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-khmer, 'Kantumruy Pro', sans-serif);
    overflow: hidden;
}

.app-alert-backdrop.show .app-alert-card {
    transform: scale(1) translateY(0);
}

.app-alert-icon-box {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

.app-alert-backdrop.show .app-alert-icon-box {
    transform: scale(1);
    animation: appAlertIconBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes appAlertIconBounce {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); }
}

.app-alert-icon-box svg {
    width: 36px;
    height: 36px;
    stroke-width: 2.3;
}

/* Color variations */
.app-alert-card.type-success .app-alert-icon-box {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.26) 0%, rgba(16, 185, 129, 0.08) 75%);
    border: 2px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.38);
}

.app-alert-card.type-confirm .app-alert-icon-box,
.app-alert-card.type-danger .app-alert-icon-box {
    background: radial-gradient(circle, rgba(229, 9, 20, 0.26) 0%, rgba(229, 9, 20, 0.08) 75%);
    border: 2px solid rgba(229, 9, 20, 0.45);
    color: #f43f5e;
    box-shadow: 0 0 28px rgba(229, 9, 20, 0.38);
}

.app-alert-card.type-wallet .app-alert-icon-box {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.26) 0%, rgba(239, 68, 68, 0.08) 75%);
    border: 2px solid rgba(239, 68, 68, 0.45);
    color: #f87171;
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.38);
}

.app-alert-card.type-warning .app-alert-icon-box {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.26) 0%, rgba(245, 158, 11, 0.08) 75%);
    border: 2px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.38);
}

.app-alert-card.type-info .app-alert-icon-box {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.26) 0%, rgba(56, 189, 248, 0.08) 75%);
    border: 2px solid rgba(56, 189, 248, 0.45);
    color: #38bdf8;
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.38);
}

.app-alert-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.app-alert-message {
    font-size: 0.96rem;
    color: #cbd5e1;
    line-height: 1.65;
    margin-bottom: 1.85rem;
    word-break: break-word;
}

.app-alert-message strong {
    color: #ffffff;
    font-weight: 700;
}

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

.app-alert-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
    border: none;
    text-decoration: none;
    user-select: none;
}

.app-alert-btn:active {
    transform: scale(0.97);
}

.app-alert-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
}

.app-alert-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
}

.app-alert-btn-confirm {
    background: linear-gradient(135deg, #e50914 0%, #b80710 100%);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(229, 9, 20, 0.42);
}

.app-alert-btn-confirm:hover {
    background: linear-gradient(135deg, #ff1e2d 0%, #d10813 100%);
    box-shadow: 0 6px 24px rgba(229, 9, 20, 0.58);
    transform: translateY(-1px);
}

.app-alert-btn-confirm.btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.42);
}

.app-alert-btn-confirm.btn-green:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.58);
    transform: translateY(-1px);
}

.app-alert-btn-confirm.btn-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.42);
}

.app-alert-btn-confirm.btn-amber:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.58);
    transform: translateY(-1px);
}

/* Floating Toast Notification Pill */
.app-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90vw;
}

.app-toast-item {
    pointer-events: auto;
    background: rgba(18, 24, 38, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    padding: 10px 22px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 0, 0, 0.3);
    animation: appToastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-family: var(--font-khmer, 'Kantumruy Pro', sans-serif);
}

.app-toast-item.toast-success {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(16, 185, 129, 0.2);
}

.app-toast-item.toast-error {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(239, 68, 68, 0.2);
}

.app-toast-item.toast-fadeout {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    transition: all 0.25s ease;
}

@keyframes appToastSlideDown {
    0% { transform: translateY(-20px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ==============================================================================
   Light Theme System (Activated via data-theme="light")
   ============================================================================== */

html[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --bg-card: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-highlight: rgba(229, 9, 20, 0.35);
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;

    color-scheme: light;
}

html[data-theme="light"] body {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Light Theme Header */
html[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .nav-links a {
    color: #334155;
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active {
    color: var(--primary);
}

/* Light Theme Search */
html[data-theme="light"] .search-input {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

html[data-theme="light"] .search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
}

html[data-theme="light"] .search-input::placeholder {
    color: #94a3b8;
}

html[data-theme="light"] .search-icon {
    color: #64748b;
}

html[data-theme="light"] #searchResultsDropdown {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="light"] .search-result-item:hover {
    background: #f1f5f9;
}

html[data-theme="light"] .mobile-search-btn {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

html[data-theme="light"] .mobile-search-dropdown-bar {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Light Theme Toggle Button Icon Swap & Colors */
html[data-theme="light"] .btn-theme-toggle {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0284c7 !important;
}

html[data-theme="light"] .btn-theme-toggle:hover {
    background: #e2e8f0 !important;
    border-color: rgba(2, 132, 199, 0.4) !important;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.25) !important;
}

html[data-theme="light"] .theme-icon-light {
    display: none !important;
}

html[data-theme="light"] .theme-icon-dark {
    display: inline-block !important;
}

/* Light Theme Header Buttons & Elements */
html[data-theme="light"] .btn-login {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

html[data-theme="light"] .btn-login:hover {
    background: #e2e8f0;
}

html[data-theme="light"] .btn-secondary {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

html[data-theme="light"] .btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

html[data-theme="light"] .header-wallet-pill {
    background: rgba(220, 38, 38, 0.08) !important;
    border-color: rgba(220, 38, 38, 0.25) !important;
    color: #dc2626 !important;
}

html[data-theme="light"] .header-wallet-pill .user-wallet-balance-val {
    color: #b45309 !important;
}

/* Light Theme User Menu & Dropdown */
html[data-theme="light"] .user-avatar-btn {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

html[data-theme="light"] .user-dropdown-menu {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .user-dropdown-item {
    color: #334155 !important;
}

html[data-theme="light"] .user-dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .user-dropdown-divider {
    border-top-color: #e2e8f0 !important;
}

/* Light Theme Hero Slider Modern Styling */
html[data-theme="light"] .hero-slider-section {
    background: #e2e8f0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .hero-slide::before {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
}

html[data-theme="light"] .hero-content {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04);
    color: #0f172a;
}

html[data-theme="light"] .hero-title {
    color: #0f172a;
    text-shadow: none;
}

html[data-theme="light"] .hero-original-title {
    color: #64748b;
}

html[data-theme="light"] .hero-meta {
    color: #475569;
}

html[data-theme="light"] .hero-desc {
    color: #334155;
}

html[data-theme="light"] .hero-btn-trailer {
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: #0284c7 !important;
}

html[data-theme="light"] .hero-btn-trailer:hover {
    background: rgba(2, 132, 199, 0.16) !important;
}

html[data-theme="light"] .hero-btn-list {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

html[data-theme="light"] .hero-btn-list:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .hero-btn-list.active {
    background: rgba(2, 132, 199, 0.12) !important;
    border-color: rgba(2, 132, 199, 0.45) !important;
    color: #0284c7 !important;
}

html[data-theme="light"] .hero-slider-nav {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .hero-slider-nav:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

html[data-theme="light"] .hero-slider-dots {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .hero-slider-dot {
    background: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .hero-slider-dot.active {
    background: rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    html[data-theme="light"] .hero-slide::before {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.25) 45%, rgba(241, 245, 249, 0.82) 100%) !important;
    }
}

/* Light Theme Quality Feature Bar */
html[data-theme="light"] .quality-feature-bar {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .quality-feature-item {
    color: #1e293b !important;
}

/* Light Theme Movie Cards */
html[data-theme="light"] .movie-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] .movie-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(220, 38, 38, 0.3);
}

html[data-theme="light"] .card-title {
    color: #0f172a !important;
}

html[data-theme="light"] .card-meta {
    color: #64748b !important;
}

html[data-theme="light"] .section-title {
    color: #0f172a;
}

/* Light Theme Catalog & Search Toolbar */
html[data-theme="light"] .catalog-header-title {
    color: #0f172a !important;
}

html[data-theme="light"] .catalog-search-field {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .catalog-search-field::placeholder {
    color: #94a3b8 !important;
}

html[data-theme="light"] .catalog-search-field:focus {
    background: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

html[data-theme="light"] .btn-filter-detail-toggle {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.25) !important;
}

html[data-theme="light"] .btn-filter-detail-toggle:hover {
    background: #b91c1c !important;
}

/* Light Theme Movie Filter Bar */
html[data-theme="light"] .filter-bar,
html[data-theme="light"] .catalog-filter-bar {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .filter-label {
    color: #0f172a !important;
    font-weight: 700 !important;
}

html[data-theme="light"] .filter-label span {
    color: #0f172a !important;
}

html[data-theme="light"] .filter-pill {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 500 !important;
}

html[data-theme="light"] .filter-pill:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .filter-pill.active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
}

html[data-theme="light"] .catalog-results-count {
    color: #475569 !important;
}

html[data-theme="light"] .catalog-results-count strong {
    color: #0f172a !important;
}

html[data-theme="light"] .catalog-reset-link {
    color: #dc2626 !important;
}

html[data-theme="light"] .catalog-empty-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

/* Light Theme Watch Page Controls & Boxes */
html[data-theme="light"] .simulation-bar {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .episodes-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .episode-btn {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

html[data-theme="light"] .episode-btn:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .episode-btn.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .audio-tool-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

html[data-theme="light"] .audio-tool-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

html[data-theme="light"] .audio-tool-btn.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.25) !important;
}

/* Light Theme Membership VIP Cards */
html[data-theme="light"] .vip-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .vip-card.featured {
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.04) 0%, #ffffff 100%) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.12) !important;
}

html[data-theme="light"] .vip-card h3 {
    color: #0f172a !important;
}

html[data-theme="light"] .vip-price {
    color: #0f172a !important;
}

html[data-theme="light"] .vip-features-list li {
    color: #334155 !important;
}

/* Light Theme Bottom Nav */
html[data-theme="light"] .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.96) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .bottom-nav-item {
    color: #64748b !important;
}

html[data-theme="light"] .bottom-nav-item.active {
    color: var(--primary) !important;
}

/* Light Theme Modals */
html[data-theme="light"] .modal-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .modal-header {
    border-bottom-color: #e2e8f0 !important;
}

html[data-theme="light"] .modal-header h3 {
    color: #0f172a !important;
}

html[data-theme="light"] .modal-body {
    color: #334155 !important;
}

html[data-theme="light"] .form-input {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .form-label {
    color: #334155 !important;
}

/* Light Theme Profile Page */
html[data-theme="light"] .profile-header-card,
html[data-theme="light"] .profile-content-panel,
html[data-theme="light"] .profile-stat-box,
html[data-theme="light"] .playlist-card-box {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="light"] .profile-user-name,
html[data-theme="light"] .panel-title,
html[data-theme="light"] .stat-main-text {
    color: #0f172a !important;
}

html[data-theme="light"] .stat-sub-text,
html[data-theme="light"] .profile-user-id {
    color: #64748b !important;
}

html[data-theme="light"] .profile-nav-tab {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

html[data-theme="light"] .profile-nav-tab:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .profile-nav-tab.active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .profile-table th {
    background: #f8fafc !important;
    border-bottom-color: #e2e8f0 !important;
    color: #475569 !important;
}

html[data-theme="light"] .profile-table td {
    border-bottom-color: #f1f5f9 !important;
    color: #1e293b !important;
}

html[data-theme="light"] .profile-table tr:hover {
    background: #f8fafc !important;
}

/* Light Theme Footer */
html[data-theme="light"] .site-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

html[data-theme="light"] .footer-col-title {
    color: #0f172a !important;
}

html[data-theme="light"] .footer-links a {
    color: #64748b !important;
}

html[data-theme="light"] .footer-links a:hover {
    color: var(--primary) !important;
}

html[data-theme="light"] .footer-about p {
    color: #64748b !important;
}

html[data-theme="light"] .footer-bottom {
    border-top: 1px solid #f1f5f9 !important;
    color: #94a3b8 !important;
}

/* Light Theme Playlist Modal Rows */
html[data-theme="light"] .playlist-row-item {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html[data-theme="light"] .playlist-row-item:hover {
    background: rgba(56, 189, 248, 0.08) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}

html[data-theme="light"] .playlist-row-item.is-checked {
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
}

html[data-theme="light"] .playlist-row-item strong {
    color: #0f172a !important;
}

/* ==========================================================================
   Anti-IDM (Internet Download Manager) and Anti-Rip Video Player Hardening
   ========================================================================== */
video::-internal-media-controls-download-button {
    display: none !important;
}
video::-webkit-media-controls-enclosure {
    overflow: hidden !important;
}
video {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
div[id*="idm"], div[class*="idm"], div[id*="IDM"], div[class*="IDM"],
div[id*="download-panel"], div[class*="download-panel"],
div[id*="idm_editor"], div[class*="idm_editor"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ==========================================================================
   Ad Network Responsive Containers (Adsterra, Google AdSense, etc.)
   ========================================================================== */
.pr-ad-container {
    width: 100%;
    margin: 1rem auto;
    text-align: center;
    clear: both;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.pr-ad-container.pr-ad-home_inter_1,
.pr-ad-container.pr-ad-home_inter_2 {
    margin: 0.5rem auto 1.5rem auto;
}

.pr-ad-inner {
    display: inline-block;
    text-align: center;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 5px 6px 6px 6px;
    box-sizing: border-box;
    line-height: normal;
}

.pr-ad-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.65rem;
    color: var(--text-muted, #94a3b8);
    opacity: 0.75;
    letter-spacing: 0.02em;
    margin-bottom: 5px;
    user-select: none;
    font-weight: 500;
    line-height: 1.2;
}

.pr-ad-badge-link {
    color: #c084fc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pr-ad-badge-link:hover {
    color: #e879f9;
    text-decoration: underline;
}

.pr-ad-content {
    display: block;
    text-align: center;
    overflow: hidden;
    max-width: 100%;
    line-height: 0;
}

.pr-ad-content iframe {
    max-width: 100% !important;
    border: none !important;
    display: block !important;
    margin: 0 auto !important;
}

.pr-ad-content img {
    max-width: 100% !important;
    height: auto;
    display: block;
    margin: 0 auto;
}

.pr-ad-desktop {
    display: block;
    line-height: 0;
}

.pr-ad-mobile {
    display: none !important;
    line-height: 0;
}

@media (max-width: 768px) {
    .pr-ad-container {
        margin: 0.75rem auto;
    }
    .pr-ad-inner {
        padding: 4px 4px 5px 4px;
    }
    .pr-ad-desktop {
        display: none !important;
    }
    .pr-ad-mobile {
        display: block !important;
    }
}

/* Telegram Mini App Adaptations (No Viewport Shaking / No Resize Loops) */
html.in-telegram-webapp {
    height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
}

body.in-telegram-webapp {
    height: auto !important;
    min-height: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    -webkit-tap-highlight-color: transparent !important;
    box-sizing: border-box !important;
}

/* Prevent any horizontal overflow inside Telegram Mini App */
body.in-telegram-webapp .container,
body.in-telegram-webapp .player-container,
body.in-telegram-webapp .video-wrapper,
body.in-telegram-webapp video {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.in-telegram-webapp .site-header {
    top: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.in-telegram-webapp .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 8px);
}



