@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #ff2fa6;
    --purple: #9b4dff;
    --orange: #ff8b2c;
    --dark: #09090b;
    --card: #13131a;
    --border: rgba(255, 255, 255, .08);
    --text: #ffffff;
    --secondary: #b6b6b6;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    --header-h: 70px;
    --bottom-h: 70px;
    /* Backward compatibility aliases */
    --primary-color: #ff2fa6;
    --secondary-color: #13131a;
    --background-color: #09090b;
    --surface-color: #13131a;
    --card-color: #13131a;
    --text-primary: #ffffff;
    --text-secondary: #b6b6b6;
    --text-muted: #888;
    --border-color: rgba(255, 255, 255, .08);
    --primary-gradient: linear-gradient(90deg, #ff2fa6 0%, #ff8b2c 100%);
    --accent-color: #9b4dff;
    --button-color: #ff2fa6;
    --card-bg: #13131a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background:
        radial-gradient(circle at 80% -10%, rgba(155, 77, 255, .22), transparent 35%),
        radial-gradient(circle at 20% 30%, rgba(255, 47, 166, .12), transparent 30%),
        radial-gradient(circle at 70% 60%, rgba(255, 139, 44, .10), transparent 35%),
        var(--dark);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-h) + 20px);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    background: rgba(9, 9, 11, .88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: .5px;
    color: var(--text);
}

.logo-icon {
    max-height: 55px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo-mobile {
    display: none !important;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    position: relative;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    padding: 4px 0;
    transition: color .2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--orange));
    transition: width .25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    transition: background .2s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, .08);
}

.icon-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--text);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .15);
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

.avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
}

.avatar-dropdown {
    position: relative;
}

.avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--card, #13131a);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    z-index: 1200;
}

.avatar-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.avatar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm, 8px);
    color: var(--text);
    text-decoration: none;
    font-size: .88rem;
    transition: background .2s ease;
}

.avatar-menu a:hover {
    background: rgba(255, 255, 255, .06);
}

.avatar-menu a i {
    font-size: 1.1rem;
}

.avatar-menu .divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    transition: background .2s ease, color .2s ease;
    cursor: pointer;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--text);
}

.mobile-menu-btn svg {
    width: 20px;
    height: 20px;
}

.notif-dot {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--dark);
}

/* Main layout */
main {
    padding-top: calc(var(--header-h) + 18px);
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

section {
    padding: 0 4%;
    margin-bottom: 28px;
}

/* Hero */
.hero {
    width: 100%;
    padding: 0 0 28px;
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    height: auto;
    display: block;
}

.hero-left {
    z-index: 2;
    padding-left: 4%;
}

.hero-left h1 {
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.unlimited {
    display: inline;
    background: linear-gradient(90deg, var(--primary) 0%, var(--orange) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-left p {
    margin-top: 14px;
    font-size: .95rem;
    color: var(--secondary);
    line-height: 1.5;
    max-width: 320px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 22px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    border-radius: var(--radius-pill);
    font-size: .9rem;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary) 0%, var(--orange) 100%);
    color: var(--text);
    box-shadow: 0 10px 24px rgba(255, 47, 166, .28);
}

.btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 30px rgba(255, 47, 166, .4);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-secondary {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .18);
    color: var(--text);
}

.btn-secondary:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, .1);
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .3);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* Hero posters collage */
.hero-right {
    position: relative;
    height: 400px;
    z-index: 1;
}

.poster-collage {
    position: relative;
    width: 100%;
    height: 100%;
}

.poster-card {
    position: absolute;
    width: 52%;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow:
        0 22px 44px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(255, 255, 255, .06);
    transition: transform .35s ease, box-shadow .35s ease;
    background: var(--card);
}

.poster-card:hover {
    transform: scale(1.03) !important;
    z-index: 10 !important;
    box-shadow: 0 26px 55px rgba(0, 0, 0, .6);
}

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

.poster-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .8) 100%);
    pointer-events: none;
}

.poster-label {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: .55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .75);
    text-transform: uppercase;
    letter-spacing: .5px;
    z-index: 2;
}

.poster-title {
    position: absolute;
    bottom: 14px;
    left: 12px;
    right: 12px;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}

.poster-1 {
    top: 10%;
    left: 0;
    transform: rotate(-7deg);
    z-index: 3;
}

.poster-2 {
    top: 2%;
    right: 0;
    transform: rotate(8deg);
    z-index: 2;
}

.poster-3 {
    bottom: 12%;
    left: 10%;
    transform: rotate(-5deg);
    z-index: 1;
}

.poster-4 {
    bottom: 4%;
    right: 5%;
    transform: rotate(6deg);
    z-index: 4;
}

/* Category shortcut panel */
.category-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding: 18px 4%;
    margin: 0 4% 28px;
    max-width: 1440px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-panel::-webkit-scrollbar {
    display: none;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform .2s ease;
    flex: 0 0 auto;
}

.cat-item:hover {
    transform: scale(1.05);
}

.cat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
}

.cat-icon svg {
    width: 26px;
    height: 26px;
    stroke: url(#gradIcon);
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cat-label {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text);
}

/* Section headers and scroll rows */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    padding: 0 4%;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--purple);
    text-decoration: none;
    cursor: pointer;
}

.view-all svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 4% 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

/* Trending cards */
.trend-card {
    flex: 0 0 auto;
    width: 140px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform .25s ease;
}

.trend-card:hover {
    transform: scale(1.03);
}

.trend-thumb {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: var(--card);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}

.trend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.trend-card:hover .trend-thumb img {
    transform: scale(1.05);
}

.top-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    font-size: .55rem;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
}

.top-badge span {
    line-height: 1;
}

.trend-info {
    margin-top: 10px;
}

.trend-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trend-genre {
    font-size: .74rem;
    color: var(--secondary);
    margin-top: 2px;
}

/* Continue watching */
.cw-card {
    flex: 0 0 auto;
    width: 260px;
    scroll-snap-align: start;
    cursor: pointer;
}

.cw-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: var(--card);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}

.cw-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cw-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .2);
    transition: transform .2s ease, background .2s ease;
}

.cw-card:hover .cw-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(0, 0, 0, .7);
}

.cw-play svg {
    width: 18px;
    height: 18px;
    fill: var(--text);
    margin-left: 3px;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, .15);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--purple));
}

.cw-info {
    margin-top: 8px;
}

.cw-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
}

.cw-remaining {
    font-size: .75rem;
    color: var(--secondary);
    margin-top: 2px;
}

/* Live TV */
.live-card {
    flex: 0 0 auto;
    width: 140px;
    height: 84px;
    scroll-snap-align: start;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease;
}

.live-card:hover {
    transform: scale(1.03);
    border-color: rgba(255, 47, 166, .35);
    box-shadow: 0 0 20px rgba(255, 47, 166, .15);
}

.live-badge {
    position: absolute;
    top: 7px;
    left: 7px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #ff2a2a;
    font-size: .55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.live-logo {
    max-width: 70%;
    max-height: 48%;
    object-fit: contain;
    border-radius: 4px;
}

/* Premium banner */
.premium-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 5%;
    margin: 0 4% 100px;
    border-radius: var(--radius-lg);
    background: linear-gradient(100deg, rgba(255, 47, 166, .9) 0%, rgba(155, 77, 255, .85) 45%, rgba(255, 139, 44, .9) 100%);
    box-shadow: 0 16px 40px rgba(255, 47, 166, .22);
    position: relative;
    overflow: hidden;
}

.premium-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.premium-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.premium-text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .3px;
}

.premium-text p {
    font-size: .75rem;
    color: rgba(255, 255, 255, .85);
    margin-top: 2px;
}

.premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    background: var(--orange);
    color: var(--text);
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease;
}

.premium-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 24px rgba(255, 139, 44, .35);
}

.premium-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-h);
    z-index: 1000;
    background: rgba(9, 9, 11, .95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 2%;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 64px;
    color: var(--secondary);
    text-decoration: none;
    font-size: .65rem;
    font-weight: 500;
    transition: color .2s ease, transform .2s ease;
}

.nav-tab svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .2s ease;
}

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

.nav-tab.active svg {
    stroke: var(--primary);
}

.nav-tab:hover {
    color: var(--text);
    transform: scale(1.05);
}

.nav-tab.nav-tab-shorts {
    position: relative;
    z-index: 2;
    transform: translateY(-12px);
    gap: 6px;
    color: #fff;
    font-weight: 600;
}

.nav-tab.nav-tab-shorts svg {
    width: 44px;
    height: 44px;
}

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

/* Utility for gradients */
.grad-fill {
    fill: url(#gradIcon);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-center {
        gap: 20px;
    }

    .nav-link {
        font-size: .82rem;
    }

    .hero {
        grid-template-columns: 40% 60%;
        min-height: 380px;
    }

    .poster-card {
        width: 54%;
    }
}

.mobile-side-drawer,
.drawer-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .site-header {
        padding: 0 3%;
    }

    .logo-desktop {
        display: none;
    }

    .nav-center {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        width: 100%;
        background: rgba(9, 9, 11, .98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        flex-direction: column;
        gap: 0;
        padding: 12px 4%;
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }

    .nav-center.show {
        display: flex;
    }

    .nav-center .nav-link {
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
        width: 100%;
        font-size: .9rem;
    }

    .nav-center .nav-link:last-child {
        border-bottom: none;
    }

    .nav-center .nav-link.active::after {
        display: none;
    }

    .nav-center .nav-link.active {
        color: var(--primary);
    }

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

    .mobile-side-drawer {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 78%;
        max-width: 300px;
        height: 100vh;
        height: 100dvh;
        background: rgba(9, 9, 11, .98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-right: 1px solid var(--border);
        z-index: 1100;
        flex-direction: column;
        padding: 18px 5% 0;
        overflow: hidden;
        transform: translateX(-100%);
        transition: transform .28s ease, display .28s ease;
    }

    .drawer-body {
        flex: 1;
        overflow-y: auto;
        padding-right: 2px;
        padding-bottom: 50vh;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, .18) transparent;
    }

    .drawer-body::-webkit-scrollbar {
        width: 4px;
    }

    .drawer-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .drawer-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, .18);
        border-radius: 4px;
    }

    .mobile-side-drawer.open {
        display: flex;
        transform: translateX(0);
    }

    .drawer-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .55);
        z-index: 1050;
        opacity: 0;
        transition: opacity .28s ease;
    }

    .drawer-backdrop.open {
        display: block;
        opacity: 1;
    }

    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 22px;
    }

    .drawer-header .logo {
        font-size: 1.5rem;
    }

    .drawer-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, .08);
        color: var(--text);
        border: none;
        cursor: pointer;
    }

    .drawer-close svg {
        width: 20px;
        height: 20px;
    }

    .drawer-user {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
        margin-bottom: 14px;
    }

    .drawer-user .avatar {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .drawer-user-name {
        color: var(--text);
        font-weight: 600;
        font-size: .95rem;
    }

    .drawer-login {
        color: var(--primary);
        font-weight: 600;
        font-size: .95rem;
        text-decoration: none;
    }

    .drawer-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .drawer-link {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 13px 0;
        color: var(--text);
        font-size: .95rem;
        font-weight: 500;
        text-decoration: none;
        border-bottom: 1px solid var(--border);
        transition: color .2s ease;
    }

    .drawer-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        stroke: currentColor;
    }

    .drawer-link:last-child {
        border-bottom: none;
    }

    .drawer-link.active,
    .drawer-link:hover {
        color: var(--primary);
    }

    .drawer-options {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .drawer-option {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 13px 0;
        color: var(--text);
        text-decoration: none;
        font-size: .95rem;
        font-weight: 500;
        border-bottom: 1px solid var(--border);
        transition: color .2s ease;
    }

    .drawer-option:first-child {
        border-top: 1px solid var(--border);
    }

    .drawer-option:last-child {
        border-bottom: none;
    }

    .drawer-option:hover {
        color: var(--primary);
    }

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

    .hero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 20px 0 30px;
        min-height: auto;
    }

    .hero-left {
        padding: 0 4%;
        text-align: center;
    }

    .hero-left p {
        margin: 12px auto 0;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-dots {
        justify-content: center;
    }

    .hero-right {
        height: 360px;
    }

    .category-panel {
        padding: 16px 3%;
        margin: 0 3% 24px;
    }

    .premium-banner {
        flex-direction: column;
        align-items: flex-start;
        margin: 0 3% 100px;
    }

    .premium-btn {
        align-self: flex-end;
    }
}

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

    .logo-icon {
        max-height: 42px;
        width: auto;
        max-width: 160px;
    }

    .nav-center {
        display: none;
    }

    .nav-right .icon-btn {
        width: 36px;
        height: 36px;
    }

    .nav-right .icon-btn svg {
        width: 20px;
        height: 20px;
    }

    .hero-left h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .btn-primary,
    .btn-secondary {
        height: 42px;
        padding: 0 18px;
        font-size: .85rem;
    }

    .trend-card {
        width: 120px;
    }

    .cw-card {
        width: 220px;
    }

    .live-card {
        width: 120px;
        height: 72px;
    }

    .premium-text h3 {
        font-size: .95rem;
    }

    .premium-text p {
        font-size: .68rem;
    }

    .premium-btn {
        height: 38px;
        padding: 0 14px;
        font-size: .78rem;
    }
}

/* ====== COMPONENT CSS FOR SUBPAGES (top-bar, cards, etc.) ====== */

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h, 70px);
    background: rgba(9,9,11,.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    z-index: 1000;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Avatar Dropdown */
.avatar-dropdown {
    position: relative;
}

.avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.15);
}

.avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--card, #13131a);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    z-index: 1200;
}

.avatar-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.avatar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm, 8px);
    color: var(--text);
    text-decoration: none;
    font-size: .88rem;
    transition: background .2s ease;
}

.avatar-menu a:hover {
    background: rgba(255,255,255,.06);
}

.avatar-menu a i {
    font-size: 1.1rem;
}

.avatar-menu .divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* Main Content */
.main-content {
    margin-left: 0;
    padding: calc(var(--header-h, 70px) + 24px) 24px 40px;
    min-height: 100vh;
}

.main-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

/* IQ Card (content cards for subpages) */
.iq-card {
    background: var(--card, #13131a);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .25s ease, box-shadow .25s ease;
    cursor: pointer;
}

.iq-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.4);
}

.iq-card .block-images {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.iq-card .block-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.iq-card:hover .block-images img {
    transform: scale(1.05);
}

.iq-card h6 {
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
}

.iq-card small {
    color: var(--secondary);
}

/* Content badges */
.content-type {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: .5px;
}

.product-premium {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .8rem;
}

.ratting-value {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    color: #ffcc00;
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Filter buttons */
.filter-btn {
    background: var(--card, #13131a);
    border: 1px solid var(--border);
    color: var(--secondary);
    padding: 6px 16px;
    border-radius: var(--radius-pill, 999px);
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text);
}

.filter-btn.active {
    background: linear-gradient(90deg, var(--primary), var(--orange));
    border-color: transparent;
    color: #fff;
}

/* Info section (about, plan pages) */
.info-section {
    background: var(--card, #13131a);
    border-radius: var(--radius-lg, 20px);
    padding: 24px;
    border: 1px solid var(--border);
}

/* Footer */
.footer {
    margin-left: 0;
    padding: 36px 0 20px;
    padding-bottom: calc(var(--bottom-h, 64px) + 24px);
    border-top: 1px solid var(--border);
    background: rgba(9,9,11,.6);
}

.footer p {
    color: var(--secondary);
    font-size: .85rem;
}

.footer-brand {
    color: var(--primary, #ff2fa6);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.5px;
}

.footer-tagline {
    margin-top: 8px;
    max-width: 280px;
    line-height: 1.5;
}

.footer-heading {
    color: var(--text, #f0f0f0);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--secondary);
    font-size: .85rem;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-links a:hover {
    color: var(--primary, #ff2fa6);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: .8rem;
    color: var(--secondary);
    opacity: .8;
}

/* CMS page content */
.cms-content {
    color: var(--secondary);
    font-size: .95rem;
    line-height: 1.7;
}

.cms-content h4 {
    color: var(--text, #f0f0f0);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 14px;
}

.cms-content h5 {
    color: var(--text, #f0f0f0);
    font-size: 1.02rem;
    font-weight: 600;
    margin: 22px 0 10px;
}

.cms-content p { margin-bottom: 12px; }

.cms-content ul {
    margin: 0 0 14px;
    padding-left: 20px;
}

.cms-content li { margin-bottom: 6px; }

.cms-content a {
    color: var(--primary, #ff2fa6);
    text-decoration: none;
}

.cms-content a:hover { text-decoration: underline; }

/* Responsive for subpages */
@media (max-width: 991px) {
    .main-content {
        margin-left: 0;
        padding: calc(var(--header-h, 70px) + 20px) 16px 80px;
    }

    .footer {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 0 10px;
    }

    .main-content {
        padding: calc(var(--header-h, 70px) + 16px) 12px 80px;
    }
}

/* Channel Card (Live TV page) */
.channel-card {
    background: var(--card, #13131a);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 16px;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.channel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.4);
}

.channel-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 12px;
    border: 2px solid var(--border);
}

.channel-card h6 {
    color: var(--text);
    font-size: .9rem;
    font-weight: 600;
}

.channel-card small {
    color: var(--secondary);
}

/* Live Badge */
.live-badge {
    background: linear-gradient(90deg, var(--primary, #ff2fa6), var(--orange, #ff8b2c));
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill, 999px);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

/* Participation Badge (reality shows) */
.participation-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--primary, #ff2fa6), var(--purple, #9b4dff));
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    z-index: 2;
}

/* ==================== SEARCH OVERLAY ==================== */
.search-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}
.search-overlay.open { display: flex; }

.search-overlay-inner {
    width: 100%;
    max-width: 700px;
    padding: 0 16px;
}
.search-input-wrap {
    position: relative;
    margin-bottom: 12px;
}
.search-input-wrap .search-icon {
    position: absolute;
    left: 18px; top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    pointer-events: none;
}
.search-input-wrap .search-close {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.search-input-wrap .search-close:hover { color: var(--text); }
#searchOverlayInput {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 14px 48px 14px 52px;
    color: var(--text);
    font-size: 1.05rem;
    outline: none;
    transition: border-color .2s;
}
#searchOverlayInput::placeholder { color: var(--text-muted); }
#searchOverlayInput:focus { border-color: var(--primary); }

.search-results {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    border-radius: var(--radius-md);
    background: var(--card);
    border: 1px solid var(--border);
}
.search-results:empty { display: none; }

.search-section-title {
    padding: 12px 18px 6px;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--text);
    transition: background .15s;
    cursor: pointer;
}
.search-item:hover { background: rgba(255,47,166,0.08); }
.search-item img {
    width: 48px; height: 64px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #222;
}
.search-item-info { flex: 1; min-width: 0; }
.search-item-title {
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-item-meta {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.search-item-badge {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,47,166,0.15);
    color: var(--primary);
    font-weight: 600;
    flex-shrink: 0;
}

.search-loading {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
}
.search-empty {
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
}
.search-trending {
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.search-trending-chip {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.06);
    color: var(--secondary);
    font-size: .8rem;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all .15s;
}
.search-trending-chip:hover {
    background: rgba(255,47,166,0.12);
    color: var(--text);
    border-color: var(--primary);
}

@media (max-width: 576px) {
    .search-overlay-inner { max-width: 100%; }
    #searchOverlayInput { font-size: 1rem; }
    .search-item img { width: 40px; height: 54px; }
}

/* ==================== AD ZONES ==================== */
.ad-zone {
    margin: 16px 4%;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-zone-inner {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.ad-zone-inner img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    display: block;
}
.ad-zone-video {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
    background: #000;
}
.ad-zone-label {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.6);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 2;
    pointer-events: none;
}
