/* ==========================================================================
   MN រឿង - CINEMATIC MODERN BLUE & CYAN DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

:root {
    /* Color Palette - Modern Royal Blue & Cyan Neon */
    --bg-dark: #070b14;
    --bg-darker: #03060c;
    --bg-card: #0d1527;
    --bg-card-hover: #14203a;
    --bg-glass: rgba(13, 21, 39, 0.78);
    --bg-glass-strong: rgba(7, 11, 20, 0.95);
    
    /* Primary / Accent Colors */
    --primary: #0066ff; /* Royal Electric Blue */
    --primary-hover: #1e80ff;
    --primary-glow: rgba(0, 102, 255, 0.4);
    --primary-light: #38bdf8; /* Cyan Glow */
    --accent-cyan: #00d2ff;
    --accent-gold: #ffaa00;
    --accent-blue: #0284c7;
    --accent-emerald: #10b981;
    --accent-purple: #8b5cf6;
    --accent-danger: #ef4444;

    /* Text & UI */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-active: rgba(0, 102, 255, 0.6);
    --border-cyan: rgba(0, 210, 255, 0.3);

    /* Fonts & Radii */
    --font-khmer: 'Kantumruy Pro', 'Plus Jakarta Sans', sans-serif;
    --font-en: 'Plus Jakarta Sans', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(0, 102, 255, 0.35);
    --shadow-cyan-glow: 0 0 20px rgba(0, 210, 255, 0.3);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-khmer);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 102, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(0, 210, 255, 0.04) 0%, transparent 40%);
}

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

button, input, select, textarea {
    font-family: inherit;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
    user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(7, 11, 20, 0.96) 0%, rgba(7, 11, 20, 0.8) 80%, transparent 100%);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
.logo-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 15px var(--primary-glow);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    letter-spacing: 0.5px;
}
.logo-sub {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-light);
}

/* Nav Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
}
.nav-link i {
    font-size: 0.9rem;
}
.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.nav-link.active {
    color: #fff;
    font-weight: 600;
    background: rgba(0, 102, 255, 0.16);
    border-bottom: 2px solid var(--primary-light);
}
.badge-count {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 20px;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 0.45rem 1rem;
    transition: var(--transition-smooth);
    width: 240px;
}
.search-box:focus-within {
    width: 310px;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light);
    box-shadow: 0 0 16px var(--primary-glow);
}
.search-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}
.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    width: 100%;
}
.search-box input::placeholder {
    color: var(--text-dim);
}
.clear-search-btn {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0 0.3rem;
}
.clear-search-btn:hover {
    color: #fff;
}

.mobile-toggle-btn {
    display: none;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    padding: 0.4rem;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-subtle);
    padding: 1rem 1.5rem;
    gap: 0.5rem;
}
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 1rem;
}
.mobile-nav-link.active, .mobile-nav-link:hover {
    background: rgba(0, 102, 255, 0.15);
    color: #fff;
    border-left: 3px solid var(--primary);
}

/* ==========================================================================
   MAIN CONTENT & VIEWS
   ========================================================================== */
.main-content {
    margin-top: 72px;
    min-height: calc(100vh - 72px - 200px);
}

.view-section {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.content-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ==========================================================================
   HERO FEATURED SLIDER
   ========================================================================== */
.hero-slider-section {
    position: relative;
    width: 100%;
    min-height: 520px;
    max-height: 640px;
    overflow: hidden;
    background: #03060c;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    display: flex;
    align-items: center;
}
.hero-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}
.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    transform: scale(1.03);
    transition: transform 6s ease;
}
.hero-slide.active .hero-backdrop {
    transform: scale(1);
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(7, 11, 20, 0.96) 0%, rgba(7, 11, 20, 0.8) 42%, rgba(7, 11, 20, 0.25) 75%, transparent 100%),
                linear-gradient(0deg, var(--bg-dark) 0%, transparent 40%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 3rem 1.5rem;
    margin-left: max(1.5rem, calc((100vw - 1440px) / 2 + 1.5rem));
}
.hero-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 102, 255, 0.2);
    border: 1px solid var(--primary-light);
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.3);
}
.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 18px rgba(0,0,0,0.9);
}
.hero-orig-title {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}
.hero-meta-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.badge-quality {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.badge-audio {
    background: rgba(0, 102, 255, 0.18);
    border: 1px solid rgba(0, 102, 255, 0.35);
    color: #93c5fd;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}
.badge-rating {
    background: rgba(255, 170, 0, 0.2);
    color: var(--accent-gold);
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.hero-synopsis {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.65;
    margin-bottom: 1.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.btn-hero-play {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--primary) 0%, #004ecc 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-xl);
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-hero-play:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    transform: scale(1.04);
    box-shadow: 0 6px 25px rgba(0, 102, 255, 0.7);
}
.btn-hero-bookmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border-subtle);
    color: #fff;
    font-size: 1.1rem;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}
.btn-hero-bookmark:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--accent-gold);
}
.btn-hero-bookmark.active {
    background: rgba(255, 170, 0, 0.25);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Slider Controls & Dots */
.hero-slider-arrows {
    position: absolute;
    bottom: 25px;
    left: max(1.5rem, calc((100vw - 1440px) / 2 + 1.5rem));
    z-index: 5;
    display: flex;
    gap: 0.5rem;
}
.hero-arrow-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(13, 21, 39, 0.75);
    border: 1px solid var(--border-subtle);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition-fast);
    backdrop-filter: blur(8px);
}
.hero-arrow-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: scale(1.06);
}

.slider-dots {
    position: absolute;
    bottom: 25px;
    right: max(1.5rem, calc((100vw - 1440px) / 2 + 1.5rem));
    z-index: 5;
    display: flex;
    gap: 0.5rem;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: var(--transition-fast);
}
.dot.active {
    width: 28px;
    border-radius: 10px;
    background: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   CATEGORY PILLS BAR
   ========================================================================== */
.category-pills-bar {
    max-width: 1440px;
    margin: 1.5rem auto 0;
    padding: 0 1.5rem;
}
.pills-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}
.pills-container::-webkit-scrollbar {
    height: 4px;
}
.pill-btn {
    white-space: nowrap;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-xl);
    transition: var(--transition-fast);
}
.pill-btn:hover, .pill-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, #0052cc 100%);
    color: #fff;
    border-color: var(--primary-light);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ==========================================================================
   MOVIE SECTIONS & GRIDS
   ========================================================================== */
.movie-section {
    max-width: 1440px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.section-title {
    font-size: 1.45rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.section-tag {
    background: rgba(0, 102, 255, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(0, 102, 255, 0.35);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}
.view-all-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.view-all-link:hover {
    color: var(--primary-light);
}
.badge-total {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
}
.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.custom-select {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: #fff;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
}
.custom-select:focus {
    border-color: var(--primary-light);
}
.custom-select option {
    background: var(--bg-card);
    color: #fff;
}

/* Movie Card Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}
.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Movie Card Component */
.movie-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 102, 255, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 102, 255, 0.25);
}

.card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}
.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.movie-card:hover .card-poster img {
    transform: scale(1.08);
}

/* Card Overlay Tags */
.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}
.badge-type {
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.badge-type.series {
    background: rgba(139, 92, 246, 0.85);
}
.badge-star {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* Play Hover Icon */
.card-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 11, 20, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
    z-index: 2;
}
.play-btn-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(0.7);
    transition: var(--transition-smooth);
}
.movie-card:hover .card-play-overlay {
    opacity: 1;
}
.movie-card:hover .play-btn-circle {
    transform: scale(1);
}

/* Card Details */
.card-info {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-orig-title {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.card-meta-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-subtle);
}
.empty-state i {
    font-size: 3.5rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}
.empty-state h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.5rem;
}
.empty-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Generic Button Primary */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0052cc 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
}
.btn-primary.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.btn-text:hover {
    color: var(--accent-danger);
}

/* Utility Text Colors */
.text-primary { color: var(--primary-light) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-warning { color: var(--accent-gold) !important; }
.text-danger { color: #f87171 !important; }

/* ==========================================================================
   WATCH / PLAYER VIEW
   ========================================================================== */
.watch-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem;
}

.watch-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}
.btn-back:hover {
    background: var(--primary);
    border-color: var(--primary);
}
.watch-breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.watch-breadcrumb .current {
    color: #fff;
    font-weight: 600;
}
.watch-actions-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.btn-action-icon:hover {
    background: var(--primary);
    color: #fff;
}
.btn-action-icon.active {
    background: var(--accent-gold);
    color: #000;
}

/* Video Stage */
.player-stage {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.5rem;
}
.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 720px;
    background: #000;
}
.video-container iframe, 
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.player-info-banner {
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 1rem;
}
.player-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}
.player-sub-title {
    font-size: 0.88rem;
    color: var(--text-muted);
}
.player-badges {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Episodes Grid (For Series) */
.episodes-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.episodes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.episodes-header h3 {
    font-size: 1.15rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.episodes-count {
    background: rgba(0, 102, 255, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(0, 102, 255, 0.3);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}
.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}
.episode-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.7rem 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: var(--transition-fast);
}
.episode-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 102, 255, 0.4);
}
.episode-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, #0052cc 100%);
    color: #fff;
    border-color: var(--primary-light);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Watch Meta & Sidebar */
.watch-meta-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}
.synopsis-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.synopsis-box h3 {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.synopsis-box p {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
}

.meta-genres {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.meta-genres h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.genre-tag-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.genre-tag-item {
    background: rgba(0, 102, 255, 0.12);
    border: 1px solid rgba(0, 102, 255, 0.25);
    color: #93c5fd;
    font-size: 0.82rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
}

/* Comments Section */
.comments-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.comments-header h3 {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.comment-input-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}
.input-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--primary-glow);
}
.input-fields {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.input-fields input, 
.input-fields textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.9rem;
    color: #fff;
    font-size: 0.9rem;
}
.input-fields textarea {
    resize: vertical;
}
.input-fields input:focus, 
.input-fields textarea:focus {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.08);
}
.comment-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.rating-stars-input {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.star-rate {
    color: #4b5563;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.star-rate.active, .star-rate:hover {
    color: var(--accent-gold);
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.comment-item {
    display: flex;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.85rem;
    border-radius: var(--radius-md);
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    border: 1px solid rgba(0, 102, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}
.comment-body {
    flex-grow: 1;
}
.comment-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}
.comment-user {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}
.comment-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}
.comment-rating-stars {
    color: var(--accent-gold);
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}
.comment-text {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Sidebar Related */
.meta-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    height: fit-content;
}
.sidebar-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.related-movies-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.related-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    cursor: pointer;
}
.related-item:hover {
    background: rgba(0, 102, 255, 0.1);
}
.related-poster {
    width: 65px;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.related-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.related-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   CATEGORIES GRID VIEW
   ========================================================================== */
.view-header {
    margin-bottom: 2rem;
}
.view-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.view-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.categories-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.cat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 25px rgba(0, 102, 255, 0.25);
}
.cat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(0, 102, 255, 0.15);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.cat-info h3 {
    font-size: 1.05rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.cat-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   MODALS & TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.toast-notification {
    background: #0d1527;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlideIn 0.3s ease forwards;
}
.toast-notification.success { border-left-color: var(--accent-emerald); }
.toast-notification.warning { border-left-color: var(--accent-gold); }
.toast-notification.info { border-left-color: var(--primary-light); }

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 6, 12, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}
.modal-backdrop.open {
    display: flex;
}
.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}
.modal-sm { max-width: 440px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 {
    font-size: 1.15rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-close-modal {
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}
.btn-close-modal:hover { color: #fff; }
.modal-body {
    padding: 1.5rem;
}
.share-movie-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}
.share-input-group {
    display: flex;
    gap: 0.5rem;
}
.share-input-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.9rem;
    color: #fff;
    font-size: 0.9rem;
    flex-grow: 1;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background: #03060c;
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 1.5rem 2rem;
    margin-top: 4rem;
}
.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 2.5rem;
}
.footer-brand {
    display: flex;
    gap: 1rem;
}
.footer-info h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}
.footer-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.footer-links h4, .footer-social h4 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 1rem;
}
.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: var(--primary-light);
}
.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.social-icons a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}
.social-icons a:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}
.copyright {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .watch-meta-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu { display: none; }
    .mobile-toggle-btn { display: block; }
    .search-box { width: 180px; }
    .search-box:focus-within { width: 220px; }
    .hero-title { font-size: 2rem; }
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .hero-slider-section { min-height: 460px; }
}
