/* ==========================================================================
   XXXTUBES - Ultra Modern Dark Streaming UI System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
    --bg-main: #0a0d15;
    --bg-surface: #0f1420;
    --bg-sidebar: #0e121c;
    --bg-card: #131826;
    --bg-card-hover: #192033;
    --bg-input: #151a29;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    
    --accent: #ff1a2b;
    --accent-hover: #ff3342;
    --accent-gradient: linear-gradient(135deg, #ff1a2b 0%, #c40915 100%);
    --accent-glow: rgba(255, 26, 43, 0.4);
    --accent-subtle: rgba(255, 26, 43, 0.12);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --gold: #fbbf24;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 4px 20px var(--accent-glow);
    
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.15s ease;
}

/* ==========================================================================
   RESET & GLOBAL SCROLLBARS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Ultra-thin Dark Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

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

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

button, input {
    font-family: inherit;
}

/* ==========================================================================
   APP CONTAINER (3 Columns)
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-main);
}

/* ==========================================================================
   1. LEFT SIDEBAR
   ========================================================================== */
.sidebar-left {
    width: 270px;
    min-width: 270px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 22px 18px 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.8px;
    margin-bottom: 24px;
    color: #fff;
    padding: 0 4px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px var(--accent-glow);
    transition: var(--transition);
}

.brand-logo:hover .brand-icon {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 6px 22px var(--accent-glow);
}

.nav-section {
    margin-bottom: 20px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.nav-link.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 18px var(--accent-glow);
    font-weight: 600;
}

.badge-new {
    background: var(--accent-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    margin-left: auto;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

/* Sidebar Section Headers */
.sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 10px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cat-total-badge {
    background: var(--accent-subtle);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    border: 1px solid rgba(255, 26, 43, 0.2);
}

/* Category Scroll List in Left Sidebar */
.category-scroll-list {
    list-style: none;
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.category-scroll-list::-webkit-scrollbar {
    width: 4px;
}
.category-scroll-list::-webkit-scrollbar-track {
    background: transparent;
}
.category-scroll-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
.category-scroll-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.cat-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.cat-sidebar-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.cat-sidebar-link.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 3px 14px var(--accent-glow);
    font-weight: 600;
}

.cat-sidebar-link .cat-icon {
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.cat-sidebar-link .cat-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-sidebar-link .cat-cnt {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    font-weight: 600;
    flex-shrink: 0;
}

.cat-sidebar-link.active .cat-cnt {
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
}

/* Telegram Promo Card */
.promo-card {
    margin-top: auto;
    background: linear-gradient(135deg, rgba(255, 26, 43, 0.12) 0%, rgba(19, 24, 38, 0.95) 100%);
    border: 1px solid rgba(255, 26, 43, 0.25);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.promo-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.promo-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.promo-btn {
    width: 100%;
    background: var(--accent-gradient);
    color: #fff;
    padding: 9px 14px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 3px 12px var(--accent-glow);
}

.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--accent-glow);
}

/* ==========================================================================
   2. MAIN CONTENT AREA
   ========================================================================== */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 22px 30px 48px;
}

/* Top Header Bar */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.search-box {
    flex: 1;
    max-width: 540px;
    position: relative;
}

.search-input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 20px 12px 46px;
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 13.5px;
    font-family: inherit;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    background-color: var(--bg-input);
    box-shadow: 0 0 0 4px rgba(255, 26, 43, 0.2);
}

.search-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 17px;
    pointer-events: none;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
}

.lang-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.lang-btn.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* ==========================================================================
   CATEGORY HERO / HEADER BANNER
   ========================================================================== */
.category-hero-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 26, 43, 0.12) 0%, rgba(19, 24, 38, 0.85) 60%, rgba(10, 13, 21, 0.95) 100%);
    border: 1px solid rgba(255, 26, 43, 0.22);
    border-radius: var(--radius-lg);
    padding: 26px 30px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.category-hero-banner::after {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 26, 43, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.category-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.category-breadcrumbs a:hover {
    color: var(--accent);
}

.category-breadcrumbs i {
    font-size: 10px;
}

.category-hero-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.category-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-hero-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 18px var(--accent-glow);
    flex-shrink: 0;
}

.category-hero-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.category-meta-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.cat-pill-count {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-pill-hd {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.cat-pill-free {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ==========================================================================
   HERO BANNER (Homepage)
   ========================================================================== */
.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 380px;
    margin-bottom: 28px;
    display: flex;
    align-items: flex-end;
    padding: 36px 40px;
    background-size: cover;
    background-position: center top;
    box-shadow: var(--shadow-lg);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 13, 21, 0.96) 0%, rgba(10, 13, 21, 0.72) 45%, rgba(10, 13, 21, 0.25) 100%),
                linear-gradient(0deg, rgba(10, 13, 21, 0.96) 0%, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.hero-tag {
    display: inline-block;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.hero-title {
    font-size: 38px;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.badge-hd {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-xs);
}

.rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--gold);
    font-weight: 700;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

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

/* ==========================================================================
   GENRE QUICK CHIPS
   ========================================================================== */
.genre-chips {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 32px;
}

.genre-chips::-webkit-scrollbar {
    height: 4px;
}
.genre-chips::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.genre-chip {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 9px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.genre-chip:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 26, 43, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.genre-icon {
    color: var(--accent);
    font-size: 18px;
}

.genre-info {
    display: flex;
    flex-direction: column;
}

.genre-name {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}

.genre-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   MOVIE GRID & CARDS
   ========================================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.2px;
}

.section-indicator {
    width: 4px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.see-all-link {
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}

.see-all-link:hover {
    color: var(--accent);
    transform: translateX(2px);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

/* Premium Movie Card */
.movie-card {
    display: flex;
    flex-direction: column;
    background: rgba(19, 24, 38, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 10px;
    transition: var(--transition);
    position: relative;
}

.movie-card:hover {
    transform: translateY(-6px);
    background: rgba(22, 28, 44, 0.95);
    border-color: rgba(255, 26, 43, 0.38);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 26, 43, 0.18);
}

.card-poster-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.42;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-card);
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Hover Play Button Overlay */
.card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 13, 21, 0.4);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.28s ease;
    z-index: 3;
}

.card-play-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    padding-left: 3px;
    box-shadow: 0 0 24px var(--accent-glow), 0 0 0 4px rgba(255, 255, 255, 0.2);
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.card-badge-hd {
    position: absolute;
    top: 9px;
    left: 9px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.card-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 10px 8px;
    background: linear-gradient(0deg, rgba(10, 13, 21, 0.95) 0%, rgba(10, 13, 21, 0.6) 65%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.card-rating {
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.55);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    backdrop-filter: blur(4px);
}

.card-duration {
    color: rgba(255, 255, 255, 0.9);
    font-size: 10.5px;
    background: rgba(0, 0, 0, 0.55);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--accent);
}

.card-sub {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   PAGINATION
   ========================================================================= */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 36px 0 20px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 13.5px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
}

.page-btn:hover {
    color: #fff;
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ==========================================================================
   3. RIGHT SIDEBAR (Top 10 & Most Searched)
   ========================================================================== */
.sidebar-right {
    width: 320px;
    min-width: 320px;
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-right::-webkit-scrollbar {
    width: 4px;
}
.sidebar-right::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.right-section-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.top-indicator {
    color: var(--accent);
}

.top10-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.top10-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.top10-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 26, 43, 0.3);
    transform: translateX(4px);
}

.top10-rank {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.top10-item:nth-child(1) .top10-rank {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}
.top10-item:nth-child(2) .top10-rank {
    background: linear-gradient(135deg, #ff5252, #e53935);
    color: #fff;
}
.top10-item:nth-child(3) .top10-rank {
    background: linear-gradient(135deg, #ff7675, #d63031);
    color: #fff;
}

.top10-thumb {
    width: 44px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.top10-info {
    flex: 1;
    min-width: 0;
}

.top10-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
    transition: color 0.2s ease;
}

.top10-item:hover .top10-title {
    color: var(--accent);
}

.top10-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.top10-rating {
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Most Searched Chips */
.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag-chip:hover {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px var(--accent-glow);
    transform: translateY(-2px);
}

/* ==========================================================================
   VIDEO PLAYER & WATCH PAGE
   ========================================================================== */
.player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.player-container iframe,
.player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.watch-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.watch-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.25;
}

.watch-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.watch-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-action {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 3px 14px var(--accent-glow);
    transform: translateY(-2px);
}

.watch-details-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
}

.watch-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.info-val {
    font-size: 13.5px;
    color: #fff;
    font-weight: 500;
}

.watch-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-bar {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */
@media (max-width: 1280px) {
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 900px) {
    .sidebar-left {
        width: 240px;
        min-width: 240px;
    }
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar-left {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
    }
    .category-scroll-list {
        max-height: 200px;
    }
    .main-content {
        padding: 16px;
    }
    .hero-banner {
        height: 300px;
        padding: 20px;
    }
    .hero-title {
        font-size: 24px;
    }
    .category-hero-banner {
        padding: 20px 16px;
    }
    .category-hero-title {
        font-size: 20px;
    }
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .watch-header {
        flex-direction: column;
    }
    .top-header {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        max-width: 100%;
    }
}

/* ==========================================================================
   AD BANNERS & PLACEHOLDERS (728x90, 300x250, Popunders)
   ========================================================================== */
.ad-slot-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px auto;
    width: 100%;
    overflow: hidden;
    text-align: center;
}

.ad-slot-placeholder {
    width: 100%;
    margin: 14px auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ad-slot-placeholder:hover {
    border-color: rgba(255, 26, 43, 0.4);
    background: linear-gradient(135deg, rgba(255, 26, 43, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.ad-slot-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    text-align: center;
}

.ad-slot-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.ad-slot-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* 3x 300x250 Banner Grid */
.ad-row-300x250 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0;
    width: 100%;
}

@media (max-width: 1100px) {
    .ad-row-300x250 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ad-row-300x250 {
        grid-template-columns: 1fr;
    }
    .ad-slot-placeholder {
        max-width: 100% !important;
        height: auto !important;
        min-height: 120px;
    }
}
