/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --bg-card: rgba(30, 30, 30, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    --accent-yellow: #f5c518;
    --accent-red: #e50914;
    --accent-blue: #0071eb;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.2);

    --sidebar-width: 70px;
    --header-height: 70px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

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

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

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Animations ===== */
@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(1.1);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 98%;
    max-width: 1800px;
    height: 55px;
    /* Reduced height */
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    /* Slightly reduced padding */
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5),
        0 0 1px rgba(255, 255, 255, 0.1);
    animation: slideDown 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.logo-icon:hover {
    background: rgba(251, 191, 36, 0.15);
}

.logo-dots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.logo-dots .dot {
    width: 6px;
    height: 6px;
    background: #fbbf24;
    border-radius: 2px;
}

.logo-text {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-x {
    display: none;
}

/* Main Navigation */
.main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 40px;
    /* Increased gap for better separation */
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search Container - Pill Style */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    /* Transparent dark */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    /* Fully rounded */
    padding: 2px 5px;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.search-container:focus-within {
    border-color: var(--border-light);
    background: var(--bg-secondary);
}

.search-icon {
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 10px 0;
    width: 200px;
    transition: width var(--transition-normal);
}

.search-input:focus {
    width: 280px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: none;
    border-left: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
}

.icon-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.admin-header-btn {
    color: var(--accent-yellow) !important;
}

.admin-header-btn:hover {
    background: var(--bg-glass);
    color: var(--accent-yellow) !important;
}

#authBtn {
    margin-left: 8px;
    margin-right: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

#authBtn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 100px 0 24px;
    z-index: 999;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.nav-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--text-primary);
    border-radius: 0 2px 2px 0;
    transition: all var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

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

.nav-item.active::before {
    height: 24px;
}

.nav-item[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-btn {
    color: var(--accent-yellow) !important;
}

/* ===== Main Content ===== */
/* ===== Main Content ===== */
.main-content {
    padding-top: 0;
    min-height: 100vh;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 154px;
    background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    transition: background-image var(--transition-slow);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(10, 10, 10, 1) 0%,
            rgba(10, 10, 10, 0.9) 30%,
            rgba(10, 10, 10, 0.4) 60%,
            rgba(10, 10, 10, 0.2) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 140px 60px 120px;
    z-index: 1;
}

/* Animate hero text elements */
.hero-left.animating>* {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-left>* {
    opacity: 1;
    /* Default visible if no animation */
}

/* Hide initially if animating class will be added */
.hero-left.animating>* {
    opacity: 0;
}

.hero-left.animating .platform-badge {
    animation-delay: 0.1s;
}

.hero-left.animating .hero-title {
    animation-delay: 0.2s;
}

.hero-left.animating .hero-meta {
    animation-delay: 0.3s;
}

.hero-left.animating .hero-description {
    animation-delay: 0.4s;
}

.hero-left.animating .hero-genres {
    animation-delay: 0.5s;
}

.hero-left.animating .hero-actions {
    animation-delay: 0.6s;
}

.hero-poster.animating {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.platform-badge {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.imdb-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.imdb-logo {
    background: var(--accent-yellow);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
}

.imdb-rating {
    font-weight: 600;
}

.meta-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.age-rating {
    padding: 2px 8px;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    font-size: 0.8rem;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 420px;
}

.hero-genres {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.genre-tag {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 6px 14px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.genre-tag:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-glass);
    border-color: var(--text-primary);
}

.hero-right {
    display: flex;
    align-items: center;
}

.hero-poster {
    width: 180px;
    height: 270px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-secondary);
    transition: all var(--transition-normal);
}

.hero-poster:hover {
    transform: scale(1.05);
}

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

.hero-controls {
    position: absolute;
    bottom: 60px;
    right: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
}

.hero-progress {
    width: 100px;
    height: 4px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--text-primary);
    width: 30%;
    transition: width 0.1s linear;
}

.volume-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.volume-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.hero-nav {
    position: absolute;
    left: 60px;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 2;
}

.hero-nav-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    pointer-events: all;
    transition: all var(--transition-fast);
    opacity: 0;
}

.hero:hover .hero-nav-btn {
    opacity: 1;
}

.hero-nav-btn:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.1);
}

/* ===== Platforms Section ===== */
.platforms-section {
    padding: 24px 60px;
    background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
    margin-top: -100px;
    position: relative;
    z-index: 5;
}

.platforms-row {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.platform-card {
    flex: 1;
    max-width: 160px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.platform-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.platform-card img {
    max-height: 28px;
    max-width: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.platform-text {
    font-size: 1.2rem;
    font-weight: 700;
    font-style: italic;
}

.platform-text.vidio {
    color: #e50914;
    font-style: normal;
}

.platform-text.viu {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== Episodes Section ===== */
.episodes-section {
    padding: 30px 60px;
}

.episodes-header {
    margin-bottom: 20px;
}

.season-selector {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.season-selector:hover {
    background: var(--bg-glass-hover);
}

.episodes-carousel {
    position: relative;
}

.episodes-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
}

.episodes-list::-webkit-scrollbar {
    display: none;
}

.episode-card {
    flex: 0 0 280px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.episode-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.episode-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    position: relative;
}

.episode-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
}

.episode-info {
    padding: 14px;
}

.episode-number {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.episode-title {
    font-size: 0.95rem;
    font-weight: 500;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    z-index: 10;
    transition: all var(--transition-fast);
}

.carousel-btn.prev {
    left: -22px;
}

.carousel-btn.next {
    right: -22px;
}

.carousel-btn:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-50%) scale(1.1);
}

/* ===== Content Section ===== */
.content-section {
    padding: 30px 60px;
}

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

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

.see-more {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.see-more:hover {
    color: var(--text-primary);
}

.content-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 10px 0;
}

/* Remove scrollbar hiding since we're not scrolling anymore */
.content-row::-webkit-scrollbar {
    display: none;
}

/* ===== Content Card ===== */
.content-card {
    /* Remove static width */
    width: 100%;
    aspect-ratio: 2/3;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}


.content-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.content-card:hover .card-overlay {
    opacity: 1;
}

.card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: var(--bg-secondary);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: all var(--transition-fast);
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-rating i {
    color: var(--accent-yellow);
    font-size: 0.7rem;
}

.rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.rating-badge i {
    color: var(--accent-yellow);
    font-size: 0.65rem;
}

/* ===== Search Modal ===== */
.search-modal {
    position: fixed;
    top: var(--header-height);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    max-height: 60vh;
    overflow-y: auto;
}

.search-modal.active {
    display: block;
}

.search-results {
    padding: 12px;
}

.search-result-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-result-item:hover {
    background: var(--bg-glass);
}

.search-result-poster {
    width: 50px;
    height: 75px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.search-result-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Generic Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.modal.active .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.close-modal {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ===== Player Modal ===== */
.player-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.player-modal.active {
    display: flex;
}

.player-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.close-player {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    z-index: 10;
    transition: all var(--transition-fast);
}

.close-player:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.1);
}

.player-content {
    width: 100%;
    height: 100%;
}

.player-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.no-video-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 16px;
}

.no-video-message i {
    font-size: 4rem;
    color: var(--text-muted);
}

/* ===== Loading State ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-glass-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== Responsive ===== */
/* ===== Mobile Optimization ===== */

@media (max-width: 1024px) {
    .header {
        width: 100%;
        top: 0;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0 20px;
    }

    .main-nav {
        display: none;
        /* Hide top nav links on smaller screens */
    }

    .sidebar {
        display: none;
        /* Hide sidebar on tablet/mobile */
    }

    .main-content {
        margin-left: 0;
        padding-bottom: 80px;
        /* Space for bottom nav if we decide to add one */
    }

    /* SHOW hero poster on mobile - moved to top with flexbox reorder */
    .hero-right {
        display: flex !important;
        order: 1;
    }

    .hero-left {
        order: 2;
    }

    .hero-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 100px 20px 60px;
        gap: 20px;
    }

    .hero-poster {
        width: 150px;
        height: 225px;
        margin: 0 auto;
    }

    .hero-left {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

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

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

    .hero-description {
        text-align: center;
        font-size: 0.9rem;
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 768px) {

    /* Adjust Fonts */
    html {
        font-size: 14px;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .hero-poster {
        width: 130px;
        height: 195px;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    /* Grid Cards - 3 columns on tablet/mobile */
    .content-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .content-card {
        width: 100%;
        aspect-ratio: 2/3;
    }

    .content-section {
        padding: 20px 16px;
    }

    .section-header {
        margin-bottom: 16px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    /* Search Bar - keep visible on mobile */
    .search-container {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 50px;
        padding: 2px 5px;
    }

    .search-input {
        width: 100px;
        font-size: 0.85rem;
    }

    .search-input:focus {
        width: 140px;
    }

    .search-icon {
        padding: 0 8px;
        font-size: 0.8rem;
    }

    .search-btn {
        width: 32px;
        height: 32px;
    }

    /* Player Controls */
    .hero-controls {
        bottom: 20px;
        right: 20px;
    }

    .hero-progress {
        width: 60px;
        /* Smaller progress bar */
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 12px;
        height: 50px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-icon {
        width: 26px;
        height: 26px;
    }

    .logo-dots .dot {
        width: 5px;
        height: 5px;
    }

    /* Hero on small phones */
    .hero-content {
        padding: 80px 16px 40px;
    }

    .hero-poster {
        width: 110px;
        height: 165px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .genre-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    /* 2 columns on small phones */
    .content-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .content-section {
        padding: 16px 12px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .rating-badge {
        top: 6px;
        left: 6px;
        padding: 3px 6px;
        font-size: 0.65rem;
    }

    .rating-badge i {
        font-size: 0.55rem;
    }

    /* Search on small phones */
    .search-input {
        width: 80px;
        font-size: 0.8rem;
    }

    .search-input:focus {
        width: 120px;
    }

    .search-btn {
        width: 28px;
        height: 28px;
    }

    /* Platform Grid */
    .platforms-row {
        gap: 8px;
    }

    .platform-card {
        padding: 10px;
        height: 60px;
    }

    .platform-text {
        font-size: 0.9rem;
    }
}


/* ===== Video Player Section (Details Page) ===== */
.video-section {
    padding: 40px 25px;
    background: var(--bg-primary);
    position: relative;
    z-index: 10;
    animation: fadeIn 0.5s ease-out;
}

.video-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #000;
    position: relative;
    aspect-ratio: 16/9;
    border: 1px solid var(--border-color);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
}

/* Custom Modal Styles for Add URL */
.modal-header-custom {
    text-align: center;
}

.modal-header-custom h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* ===== Simple Footer ===== */
.site-footer-simple {
    background: #050505;
    padding: 20px 30px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer-simple .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-right {
    display: flex;
    gap: 12px;
}

.social-link-sm {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.social-link-sm:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
    }
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

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

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

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Make logo column span full width */
.footer-content>.footer-column:first-child {
    grid-column: 1 / -1;
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.footer-desc {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
}

/* ===== Profile Modal Styles ===== */
.profile-content {
    background: #181818;
    border: 1px solid var(--border-color);
    width: 95%;
    max-width: 400px;
}

.profile-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
    overflow: hidden;
    border: 3px solid var(--accent-yellow);
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus {
    border-color: var(--text-muted);
    background: var(--bg-secondary);
}

.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

#saveProfileBtn {
    width: 100%;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#logoutBtn {
    width: 100%;
    /* Fills the grid column */
    background: rgba(229, 9, 20, 0.1);
    color: #e50914;
    border: 1px solid rgba(229, 9, 20, 0.3);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#logoutBtn:hover {
    background: #e50914;
    color: white;
}

/* ===== Comments Section ===== */
.comments-section {
    padding: 40px 25px;
    background: var(--bg-primary);
}

.comments-container {
    max-width: 900px;
    margin: 0 auto;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.comments-title i {
    color: var(--accent-yellow);
}

.comment-input-area {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-form textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-form textarea:focus {
    border-color: var(--text-muted);
}

.comment-form button {
    align-self: flex-end;
    padding: 10px 24px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.comment-card .comment-avatar img {
    width: 40px;
    height: 40px;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-comments i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .comment-input-area {
        flex-direction: column;
        align-items: center;
    }

    .comment-form button {
        width: 100%;
    }
}

/* ===== Search Modal ===== */
.search-modal {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    max-height: 70vh;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-normal);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 12px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-result-item:hover {
    background: var(--bg-glass-hover);
}

.search-result-poster {
    width: 50px;
    height: 75px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

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

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Tablet - 1024px and below */
@media (max-width: 1024px) {
    .content-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .hero-content {
        padding: 120px 40px 100px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .content-section {
        padding: 24px 40px;
    }

    .episodes-section {
        padding: 24px 40px;
    }
}

/* Mobile Landscape / Small Tablet - 768px and below */
@media (max-width: 768px) {
    .header {
        top: 10px;
        width: 96%;
        height: 50px;
        padding: 0 16px;
        border-radius: 30px;
    }

    .main-nav {
        display: none;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .search-container {
        padding: 2px 4px;
    }

    .search-input {
        width: 120px;
        font-size: 0.85rem;
        padding: 8px 0;
    }

    .search-input:focus {
        width: 150px;
    }

    .search-btn {
        width: 34px;
        height: 34px;
    }

    .icon-btn {
        width: 34px;
        height: 34px;
    }

    /* Hero Section Mobile */
    .hero {
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        flex-direction: column;
        padding: 90px 20px 40px;
        text-align: center;
        gap: 24px;
    }

    .hero-left {
        order: 2;
    }

    .hero-right {
        order: 1;
    }

    /* SHOW HERO POSTER ON MOBILE */
    .hero-poster {
        width: 140px;
        height: 210px;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .hero-description {
        max-width: 100%;
        font-size: 0.9rem;
    }

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

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-controls {
        bottom: 20px;
        right: 20px;
    }

    .hero-nav {
        left: 10px;
        right: 10px;
    }

    .hero-nav-btn {
        width: 40px;
        height: 40px;
        opacity: 1;
    }

    /* Content Grid - 3 columns on tablet */
    .content-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .content-section {
        padding: 20px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .episodes-section {
        padding: 20px;
    }

    /* Search Modal */
    .search-modal {
        top: 70px;
        width: 95%;
        max-height: 60vh;
    }

    .search-result-item {
        padding: 10px;
        gap: 12px;
    }

    .search-result-poster {
        width: 45px;
        height: 67px;
    }

    .search-result-title {
        font-size: 0.9rem;
    }

    /* Footer */
    .site-footer-simple .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 8px;
    }
}

/* Mobile Portrait - 480px and below */
@media (max-width: 480px) {
    .header {
        height: 48px;
        padding: 0 12px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .logo-dots .dot {
        width: 5px;
        height: 5px;
    }

    .search-input {
        width: 100px;
        font-size: 0.8rem;
    }

    .search-input:focus {
        width: 130px;
    }

    .search-icon {
        padding: 0 8px;
        font-size: 0.8rem;
    }

    /* Hero on small mobile */
    .hero-content {
        padding: 80px 16px 30px;
    }

    .hero-poster {
        width: 120px;
        height: 180px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .platform-badge {
        font-size: 0.75rem;
    }

    .hero-meta {
        gap: 10px;
        font-size: 0.8rem;
    }

    .imdb-logo {
        font-size: 0.6rem;
        padding: 2px 4px;
    }

    .hero-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .genre-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    /* Content Grid - 2 columns on small mobile */
    .content-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .content-section {
        padding: 16px 12px;
    }

    .section-header {
        margin-bottom: 14px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .see-more {
        font-size: 0.8rem;
    }

    /* Cards on mobile */
    .content-card {
        border-radius: var(--radius-md);
    }

    .rating-badge {
        top: 6px;
        left: 6px;
        padding: 3px 6px;
        font-size: 0.65rem;
    }

    .rating-badge i {
        font-size: 0.55rem;
    }

    .card-overlay {
        padding: 10px;
    }

    .card-title {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .card-meta {
        font-size: 0.65rem;
        gap: 4px;
    }

    /* Episodes */
    .episode-card {
        flex: 0 0 220px;
    }

    .episode-thumbnail {
        height: 130px;
    }

    .episode-info {
        padding: 10px;
    }

    .episode-number {
        font-size: 0.75rem;
    }

    .episode-title {
        font-size: 0.85rem;
    }

    /* Search Modal on small mobile */
    .search-modal {
        top: 65px;
        width: 94%;
        max-height: 55vh;
    }

    .search-results {
        padding: 8px;
    }

    .search-result-item {
        padding: 8px;
        gap: 10px;
    }

    .search-result-poster {
        width: 40px;
        height: 60px;
    }

    .search-result-title {
        font-size: 0.85rem;
    }

    .search-result-meta {
        font-size: 0.7rem;
    }

    /* Footer on small mobile */
    .site-footer-simple {
        padding: 20px 12px;
    }

    .footer-copyright {
        font-size: 0.75rem;
    }

    .social-link-sm {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}