:root {
    /* Netflix-style Purple & Black Theme - Enhanced */
    --primary: #8B5CF6;        /* Vibrant purple */
    --primary-dark: #7C3AED;   /* Dark purple */
    --primary-light: #A78BFA;  /* Light purple */
    --accent: #EC4899;         /* Pink accent */
    --dark: #000000;           /* Pure black - Netflix background */
    --dark-light: #141414;     /* Netflix card background */
    --dark-medium: #1F1F1F;    /* Medium dark gray */
    --dark-elevated: #181818;  /* Slightly elevated surfaces */
    --light: #ffffff;          /* Pure white */
    --gray: #B3B3B3;           /* Netflix gray text */
    --gray-dark: #808080;      /* Dark gray */
    
    /* Netflix-inspired theme colors */
    --bg-primary: #000000;
    --bg-secondary: #141414;
    --bg-tertiary: #181818;
    --bg-card: #181818;
    --text-primary: #ffffff;
    --text-secondary: #B3B3B3;
    --border-color: rgba(139, 92, 246, 0.3);
    --hover-bg: rgba(139, 92, 246, 0.15);
    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    --gradient-dark: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    --gradient-hero: linear-gradient(77deg, rgba(0,0,0,0.8) 0%, transparent 85%);
    --shadow-primary: 0 4px 20px rgba(139, 92, 246, 0.4);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-card-hover: 0 8px 24px rgba(139, 92, 246, 0.5);
}

/* Light theme variables */
body.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e5e5e5;
    --bg-card: rgba(139, 92, 246, 0.05);
    --text-primary: #141414;
    --text-secondary: #666666;
    --border-color: rgba(139, 92, 246, 0.15);
    --hover-bg: rgba(139, 92, 246, 0.08);
    --shadow-primary: 0 4px 20px rgba(139, 92, 246, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    overflow-x: hidden;
    font-size: clamp(13px, 1.2vw, 16px);
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Netflix-Style Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

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

.loading-logo {
    margin-bottom: 2rem;
}

.loading-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 1rem;
    animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
        filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.4));
    }
    50% {
        transform: translateY(-10px);
        filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.6));
    }
}

.loading-logo-text {
    font-size: clamp(2rem, 2.8vw, 3rem);
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    from {
        filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
    }
    to {
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6));
    }
}

.loading-logo-text span {
    display: inline-block;
}

.loading-logo-text span:first-child {
    margin-right: 0.5rem;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 2rem 0;
}

.spinner-circle {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: spinnerBounce 1.4s infinite ease-in-out both;
}

.spinner-circle:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-circle:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes spinnerBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    font-size: 1rem;
    color: var(--gray);
    letter-spacing: 1px;
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

@keyframes loadingTextPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Install App Banner Styles - Professional & Stylish */
#install-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 340px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(15, 15, 15, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.2);
    animation: slideInBanner 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: none;
    overflow: hidden;
}

#install-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8B5CF6 0%, #A78BFA 50%, #8B5CF6 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes slideInBanner {
    from { 
        transform: translateX(120%) translateY(20px) scale(0.9); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0) translateY(0) scale(1); 
        opacity: 1; 
    }
}

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

.install-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.3);
    transition: transform 0.3s;
}

.install-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

.install-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
    letter-spacing: 0.5px;
}

.install-subtitle {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 16px;
    line-height: 1.4;
}

.install-buttons {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.install-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.install-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.install-btn:hover::before {
    width: 300px;
    height: 300px;
}

.install-now {
    background: linear-gradient(135deg, #805AD5 0%, #6B46C1 100%);
    color: var(--light);
    box-shadow: 0 4px 15px rgba(128, 90, 213, 0.4);
}

.install-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 90, 213, 0.6);
}

.install-now:active {
    transform: translateY(0);
}

.install-later {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
}

.install-later:hover {
    color: var(--light);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

/* Close button for install banner */
.install-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 1.2rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    opacity: 0.6;
}

.install-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Features list in install banner */
.install-features {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.install-feature {
    flex: 1;
    text-align: center;
}

.install-feature-icon {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.install-feature-text {
    font-size: 0.7rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile responsive */
@media (max-width: 600px) {
    #install-banner {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        padding: 16px;
    }

    .install-title {
        font-size: 1rem;
    }

    .install-subtitle {
        font-size: 0.8rem;
    }

    .install-btn {
        padding: 10px 16px;
        font-size: 0.75rem;
    }

    .install-features {
        gap: 10px;
    }
}

/* Header - Netflix-Style with Purple Theme */
/* Netflix-Style Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0 4%;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 10%, transparent);
    backdrop-filter: blur(0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    height: 70px;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

header.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.back-button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.back-button:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.1);
}

/* Show back button only on details and search pages */
.details-page .back-button,
.search-page .back-button,
.player-page .back-button {
    display: flex;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.85;
}

.logo-img {
    height: 48px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

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

.logo-text {
    font-size: clamp(1.3rem, 1.85vw, 2rem);
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-text span:first-child {
    color: var(--primary);
}

.logo-text span:last-child {
    color: var(--light);
    margin-left: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: scale(1.1);
}

.search-btn::before {
    display: none;
}
    opacity: 0;
    animation: searchRipple 2s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes searchRipple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.search-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    animation: none;
}

.search-btn:hover::before {
    animation: none;
}

/* Header Actions Container */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Permanent Install App Button - Professional & Stylish */
.install-app-btn {
    background: linear-gradient(135deg, #805AD5 0%, #6B46C1 100%);
    border: none;
    color: var(--light);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(128, 90, 213, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.install-app-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.install-app-btn:hover::before {
    left: 100%;
}

.install-app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 90, 213, 0.5);
}

.install-app-btn:active {
    transform: translateY(0);
}

.install-app-btn i {
    font-size: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.install-text {
    font-size: 0.85rem;
}

/* Hide install button when app is installed */
.pwa-installed .install-app-btn {
    display: none;
}

/* Mobile responsive for header actions */
@media (max-width: 768px) {
    .install-app-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
        gap: 6px;
    }
    
    .install-text {
        display: none;
    }
    
    .install-app-btn i {
        font-size: 1.1rem;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    header {
        padding: 0.5rem 3%;
        height: 60px;
    }
    
    .logo-img {
        height: 38px;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .search-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .section {
        padding: 2.5vw 3%;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .movies-row {
        gap: 0.8rem;
        padding: 0.6rem 0;
    }
    
    .category-tab {
        padding: 0.55rem 1.1rem;
        font-size: 0.8rem;
    }
    
    .hero {
        min-height: 400px;
    }
    
    .hero-content {
        max-width: 90%;
        padding: 0 3%;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .install-app-btn {
        padding: 8px 12px;
        border-radius: 20px;
    }
}

/* Hero Section - More Stylish & Professional */
/* Netflix-Style Hero Banner */
.hero {
    margin-top: 0;
    padding: 0;
    position: relative;
    height: 56.25vw;
    max-height: 800px;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: top center;
    background-attachment: scroll;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(77deg, rgba(0,0,0,0.8) 0%, transparent 85%);
    background: var(--gradient-hero);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 550px;
    padding: 0 4% 4rem;
    margin-top: 0;
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    margin-bottom: 1.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-description {
    font-size: clamp(1rem, 1.9vw, 1.5rem);
    margin-bottom: 1.8rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    line-height: 1.5;
    max-width: 600px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Netflix-Style Buttons */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: clamp(0.95rem, 1.1vw, 1.2rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background-color: rgba(255, 255, 255, 0.95);
    color: #000;
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.75);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background-color: rgba(109, 109, 110, 0.5);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn i {
    font-size: 1.1em;
}

/* Netflix-Style Content Sections */
.section {
    padding: clamp(2rem, 3vw, 4rem) 4%;
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-left: 4px;
}

.section-title {
    font-size: clamp(1.1rem, 1.5vw, 1.9rem);
    font-weight: 700;
    color: #e5e5e5;
    display: inline-block;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.5px;
}

.section-title i {
    color: var(--primary);
    margin-right: 0.6rem;
    font-size: 0.9em;
}

.see-more {
    color: #b3b3b3;
    text-decoration: none;
    font-size: clamp(0.85rem, 0.95vw, 1.1rem);
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.see-more::after {
    content: '›';
    font-size: 1.4em;
    transition: transform 0.3s ease;
    display: inline-block;
}

.see-more:hover::after {
    transform: translateX(4px);
}

.movies-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.8rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--dark-light);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.movies-row::-webkit-scrollbar {
    height: 8px;
}

.movies-row::-webkit-scrollbar-track {
    background: var(--dark-light);
    border-radius: 4px;
}

.movies-row::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.movies-row::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Smooth scroll snap for movie cards */
.movies-row .movie-card {
    scroll-snap-align: start;
}

/* Movies Grid for Filtered Content */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(120px, 16vw, 200px), 1fr));
    gap: clamp(0.8rem, 1.5vw, 2rem);
    padding: 0.8rem 0;
}

/* Netflix-Style Movie Cards */
.movie-card {
    min-width: clamp(120px, 16vw, 280px);
    max-width: clamp(120px, 16vw, 280px);
    background-color: #181818;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), z-index 0s 0.4s;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.movie-card:hover {
    transform: scale(1.08);
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), z-index 0s;
}

/* Netflix-style card shadow */
.movie-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    border-radius: 4px;
    transition: box-shadow 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.movie-card:hover::after {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 
                0 0 0 1px rgba(139, 92, 246, 0.3);
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(18, 18, 18, 0.95) 100%);
    border-radius: 4px 4px 0 0;
}

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

.movie-info {
    padding: 1rem;
    background-color: #181818;
    border-radius: 0 0 4px 4px;
    transition: all 0.4s ease;
}

.movie-card:hover .movie-info {
    background-color: #2a2a2a;
    padding: 1.2rem;
}

.movie-title {
    font-size: clamp(0.8rem, 0.9vw, 1.1rem);
    font-weight: 600;
    color: #e5e5e5;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    transition: color 0.3s ease;
}

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

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #808080;
    font-size: clamp(0.7rem, 0.75vw, 0.9rem);
    flex-wrap: wrap;
    gap: 0.4rem;
}

.movie-type {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background-color: rgba(139, 92, 246, 0.95);
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: clamp(0.65rem, 0.7vw, 0.8rem);
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Continue Watching Progress */
.continue-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gray-dark);
}

.continue-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

.continue-watching-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.7);
    color: var(--light);
    padding: 1px 3px;
    border-radius: 2px;
    font-size: 0.5rem;
    font-weight: bold;
}

/* Netflix-Style Genre Section */
.genre-section {
    background-color: rgba(20, 20, 20, 0.8);
    padding: clamp(1.5rem, 2.5vw, 3rem) 4%;
    margin: 0;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.genre-section .section-title {
    font-size: clamp(1.1rem, 1.5vw, 1.8rem);
    margin-bottom: 1rem;
}

/* Netflix-Style Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.2rem 0;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    overscroll-behavior-x: contain;
    min-height: 60px;
}

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

.category-tab {
    padding: 0.65rem 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-size: clamp(0.8rem, 0.9vw, 1rem);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: fit-content;
    user-select: none;
    letter-spacing: 0.3px;
}

.category-tab i {
    font-size: 0.95em;
    opacity: 0.8;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.category-tab.active i {
    opacity: 1;
}

/* Search Page */
.search-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    padding-top: 50px;
}

.search-header {
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    border-bottom: none;
}

.search-input {
    flex: 1;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(128, 90, 213, 0.3);
    padding: 1rem 1.5rem;
    padding-left: 3rem;
    border-radius: 50px;
    color: var(--light);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23e50914" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>');
    background-repeat: no-repeat;
    background-position: 1.2rem center;
    background-size: 20px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(128, 90, 213, 0.3), 0 0 0 1px rgba(128, 90, 213, 0.1);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.search-results {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Movie Details Page */
.details-page {
    min-height: 100vh;
    background: var(--dark);
    padding-top: 50px;
}

.movie-details-content {
    padding: 0.6rem;
}

.details-poster {
    width: 100%;
    max-width: 200px;
    margin: 0 auto 0.6rem;
    display: block;
    border-radius: 5px;
}

.details-title {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.details-meta {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    color: var(--gray);
    font-size: 0.7rem;
}

.details-genre {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.genre-tag {
    background: var(--dark-light);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    font-size: 0.6rem;
}

.details-description {
    margin-bottom: 1rem;
    line-height: 1.3;
    font-size: 0.75rem;
}

.details-actions {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Share Button */
.btn-share {
    background-color: rgba(255,255,255,0.1);
    color: var(--light);
}

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

/* Trailer Section */
.trailer-section {
    width: 100%;
    margin: 0 0 0.8rem;
    position: relative;
}

.trailer-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--dark-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.trailer-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trailer-custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trailer-player:hover .trailer-custom-controls {
    opacity: 1;
}

.trailer-control-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.trailer-control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.trailer-control-btn:active {
    transform: scale(0.95);
}

/* Cast Section - MUCH SMALLER */
.cast-section {
    margin-bottom: 1rem;
}

.cast-title {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.cast-grid {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.3rem 0;
}

.cast-card {
    min-width: 55px;
    text-align: center;
    flex-shrink: 0;
}

.cast-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.3rem;
    background: var(--gray-dark);
    transition: opacity 0.3s ease;
}

.cast-avatar[data-loaded="false"] {
    opacity: 0.3;
    background: linear-gradient(135deg, var(--gray-dark) 0%, var(--dark-light) 100%);
}

.cast-avatar[data-loaded="true"] {
    opacity: 1;
}

.cast-name {
    font-size: 0.6rem;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

.cast-character {
    font-size: 0.55rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

/* Seasons & Episodes */
.seasons-section {
    margin-bottom: 1rem;
}

.seasons-title {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.season-selector {
    margin-bottom: 0.6rem;
    position: relative;
}

/* Hide the native dropdown */
.season-dropdown {
    display: none;
}

/* Custom Season Selector */
.custom-season-selector {
    width: 100%;
    position: relative;
}

.custom-season-button {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(135deg, var(--dark-light) 0%, rgba(26, 26, 26, 0.8) 100%);
    border: 1px solid var(--gray-dark);
    border-radius: 8px;
    color: var(--light);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.custom-season-button:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(128, 90, 213, 0.1) 0%, var(--dark-light) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.2);
}

.custom-season-button .season-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-season-button .season-icon {
    color: var(--primary);
    font-size: 0.9rem;
}

.custom-season-button .dropdown-arrow {
    transition: transform 0.3s ease;
    color: var(--gray);
}

.custom-season-button.active .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.custom-season-options {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    right: 0;
    background: var(--dark-light);
    border: 1px solid var(--gray-dark);
    border-radius: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.custom-season-options.active {
    max-height: 300px;
    opacity: 1;
    overflow-y: auto;
}

.custom-season-option {
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.custom-season-option:hover {
    background: rgba(128, 90, 213, 0.1);
    padding-left: 1rem;
}

.custom-season-option.selected {
    background: rgba(128, 90, 213, 0.15);
    color: var(--primary);
    font-weight: 600;
}

.custom-season-option.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.3rem;
}

.episode-card {
    background: var(--dark-light);
    border-radius: 2px;
    padding: 0.5rem 0.3rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.7rem;
}

.episode-card:hover {
    background: var(--primary);
}

.episode-number {
    font-size: 0.7rem;
    font-weight: bold;
}

/* Related Content */
.related-section {
    margin-bottom: 1rem;
}

.related-title {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* Custom Video Player Styles */
.custom-video-player {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    /* Hardware acceleration for smooth performance */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.custom-video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Enable hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Tap Zones for Skip Controls */
.tap-zone {
    position: absolute;
    top: 0;
    width: 40%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
    /* Smooth touch interactions */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tap-zone-left {
    left: 0;
}

.tap-zone-right {
    right: 0;
}

.tap-feedback {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    /* Hardware acceleration */
    will-change: opacity, transform;
    transform: translateY(-50%) translateZ(0);
}

.tap-zone-left .tap-feedback {
    left: 15%;
}

.tap-zone-right .tap-feedback {
    right: 15%;
}

.tap-feedback.show {
    opacity: 1;
    animation: tapPulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tap-feedback i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.tap-feedback span {
    font-size: 1.2rem;
    font-weight: bold;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

@keyframes tapPulse {
    0% { 
        transform: translateY(-50%) scale(0.7); 
        opacity: 0; 
    }
    50% { 
        transform: translateY(-50%) scale(1.15); 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-50%) scale(1); 
        opacity: 1; 
    }
}

/* Player Overlay Controls */
.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    /* Hardware acceleration for smooth fade */
    will-change: opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.player-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Top Controls Bar */
.player-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-left-controls,
.player-right-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-control-btn {
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    /* Smooth button interactions */
    -webkit-tap-highlight-color: transparent;
    will-change: transform, background-color;
}

.player-control-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.15);
}

.player-control-btn:active {
    transform: scale(0.95);
}

.player-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--light);
    text-align: center;
    flex: 1;
    padding: 0 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Center Controls */
.player-center-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 2rem;
    z-index: 15;
}

.player-big-btn {
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.1);
    color: var(--light);
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    /* Smooth button interactions */
    -webkit-tap-highlight-color: transparent;
    will-change: transform, background-color, box-shadow;
}

.player-big-btn:hover {
    background: rgba(229,9,20,0.9);
    border-color: rgba(229,9,20,0.5);
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(128, 90, 213, 0.4);
}

.player-big-btn:active {
    transform: scale(0.95);
}

/* Bottom Controls Bar */
.player-bottom-controls {
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.time-display {
    font-size: 0.8rem;
    color: var(--light);
    min-width: 45px;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* Smooth progress bar interactions */
    will-change: height;
}

.progress-bar:hover {
    height: 6px;
}

.progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    /* Hardware acceleration for smooth updates */
    will-change: width;
    transform: translateZ(0);
}

.progress-handle {
    position: absolute;
    top: 50%;
    right: -8px;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
    box-shadow: 0 2px 8px rgba(128, 90, 213, 0.5);
    /* Smooth handle interactions */
    will-change: opacity, transform;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.progress-handle:active {
    cursor: grabbing;
    transform: translateY(-50%) scale(1.4);
}

/* Bottom Action Controls */
.player-action-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-action-left,
.player-action-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.player-action-btn {
    background: none;
    border: none;
    color: var(--light);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.player-action-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

/* Settings Menu */
.settings-menu {
    position: absolute;
    bottom: 80px;
    left: 20px;
    background: rgba(0,0,0,0.9);
    border-radius: 8px;
    padding: 1rem;
    min-width: 150px;
    display: none;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.settings-menu.active {
    display: block;
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
}

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

.settings-submenu {
    display: none;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--primary);
}

.settings-submenu.active {
    display: block;
}

.settings-suboption {
    padding: 0.4rem 0;
    color: var(--gray);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.3s;
}

.settings-suboption:hover,
.settings-suboption.active {
    color: var(--light);
}

/* Lock State */
.player-overlay.locked {
    opacity: 0 !important;
    pointer-events: none !important;
}

.lock-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: var(--light);
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    display: none;
    animation: fadeInOut 2s ease-in-out;
}

.lock-indicator.show {
    display: block;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Fullscreen Styles */
.custom-video-player:fullscreen {
    width: 100vw;
    height: 100vh;
}

.custom-video-player:fullscreen .player-related {
    display: none;
}

.custom-video-player:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
}

.custom-video-player:-moz-full-screen {
    width: 100vw;
    height: 100vh;
}

.custom-video-player:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
}

/* Enhanced fullscreen video styling */
.custom-video-player:fullscreen video,
.custom-video-player:-webkit-full-screen video,
.custom-video-player:-moz-full-screen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Better controls visibility in fullscreen */
.custom-video-player:fullscreen .player-overlay.active,
.custom-video-player:-webkit-full-screen .player-overlay.active,
.custom-video-player:-moz-full-screen .player-overlay.active {
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 15%, transparent 85%, rgba(0,0,0,0.9) 100%);
}

/* Miniplayer Styles */
.miniplayer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 170px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.miniplayer.active {
    display: block;
}

.miniplayer .custom-video-player {
    height: 100%;
}

.miniplayer .player-overlay {
    padding: 0.5rem;
}

.miniplayer .player-top-controls {
    padding: 0.5rem;
    background: rgba(0,0,0,0.8);
}

.miniplayer .player-control-btn {
    width: 30px;
    height: 30px;
    font-size: 1rem;
}

.miniplayer .player-bottom-controls {
    padding: 0.5rem;
}

.miniplayer .progress-container {
    margin-bottom: 0.5rem;
}

.miniplayer .player-action-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
}

/* Player Page Updates */
.player-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 250;
    display: flex;
    flex-direction: column;
}

.player-header {
    padding: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.7);
    height: 50px;
}

.player-back {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-title {
    font-size: 0.8rem;
    text-align: center;
    flex: 1;
    padding: 0 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.player-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
}

.player-related {
    padding: 0.6rem;
    background: var(--dark);
}

.quality-selector {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    padding: 0.6rem;
    border-radius: 5px;
    display: none;
    width: 80%;
    max-width: 250px;
}

.quality-title {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.quality-options {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
}

.quality-option {
    padding: 0.3rem 0.6rem;
    background: var(--dark-light);
    border: none;
    border-radius: 2px;
    color: var(--light);
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.7rem;
}

.quality-option.active {
    background: var(--primary);
}

/* Download Options */
.download-options {
    background: rgba(0,0,0,0.8);
    padding: 0.6rem;
    border-radius: 5px;
    margin-top: 0.6rem;
    display: none;
}

.download-title {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.download-option {
    display: block;
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: var(--dark-light);
    border: none;
    border-radius: 2px;
    color: var(--light);
    margin-bottom: 0.3rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.3s;
    font-size: 0.7rem;
}

.download-option:hover {
    background: var(--primary);
}

/* Category Page */
.category-page {
    min-height: 100vh;
    background: var(--dark);
    padding-top: 50px;
}

.category-header {
    padding: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid var(--gray-dark);
}

.category-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

.category-content {
    padding: 0.6rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.6rem;
}

/* Footer - Stylish & Modern */
/* Netflix-Style Footer */
footer {
    background-color: #000;
    padding: 3vw 4%;
    color: #808080;
    margin-top: 4vw;
    border-top: 1px solid #333;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2vw;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 2vw;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5vw;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    margin-bottom: 0.5vw;
}

.footer-logo-img {
    width: 3vw;
    height: 3vw;
    border-radius: 4px;
}

.footer-logo-text {
    font-size: 1.2vw;
    font-weight: 700;
    letter-spacing: 1px;
}

.footer-logo-text span:first-child {
    color: var(--primary);
}

.footer-logo-text span:last-child {
    color: #fff;
}

.footer-tagline {
    color: #808080;
    font-size: 0.85vw;
    line-height: 1.5;
    margin-top: 0.5vw;
}

.footer-title {
    color: #fff;
    font-size: 1vw;
    font-weight: 600;
    margin-bottom: 1vw;
}

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

.footer-links li a {
    color: #808080;
    text-decoration: none;
    font-size: 0.85vw;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-links li a:hover {
    color: #fff;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1vw;
}

.footer-email {
    color: #808080;
    text-decoration: none;
    font-size: 0.85vw;
    display: flex;
    align-items: center;
    gap: 0.5vw;
    transition: color 0.2s ease;
}

.footer-email i {
    font-size: 1vw;
}

.footer-email:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 1vw;
    margin-top: 0.5vw;
}

.social-icon {
    width: 2.5vw;
    height: 2.5vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    border-radius: 50%;
    color: #808080;
    text-decoration: none;
    font-size: 1vw;
    transition: all 0.2s ease;
}

.social-icon:hover {
    background-color: var(--primary);
    color: #000;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 2vw 0 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8vw;
}
}

.copyright {
    color: var(--gray);
    font-size: 0.8rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-bottom-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

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

.footer-bottom-links span {
    color: var(--gray);
    font-size: 0.75rem;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-email {
        font-size: 0.85rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
    }
    
    .footer-logo-img {
        height: 40px;
    }
    
    .footer-logo-text {
        font-size: 1.3rem;
    }
    
    .footer-tagline {
        font-size: 0.85rem;
    }
    
    .footer-links li a {
        font-size: 0.85rem;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .copyright {
        font-size: 0.75rem;
    }
    
    .footer-bottom-links {
        font-size: 0.7rem;
    }
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-dark);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Loading States */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

.skeleton-card {
    min-width: 140px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(18, 18, 18, 0.95) 100%);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.skeleton-poster {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-info {
    padding: 0.8rem;
}

.skeleton-title {
    height: 14px;
    width: 80%;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-meta {
    height: 12px;
    width: 60%;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.6rem;
}

.mb-1 {
    margin-bottom: 0.6rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-light);
    color: var(--light);
    padding: 8px 12px;
    border-radius: 5px;
    border-left: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1001;
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
}

.toast.show {
    display: flex;
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
    from { bottom: -30px; opacity: 0; }
    to { bottom: 12px; opacity: 1; }
}

/* Player Loading Spinner */
.player-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 80;
    pointer-events: none;
}

.player-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spinSmooth 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    box-shadow: 0 0 20px rgba(128, 90, 213, 0.3);
    /* Hardware acceleration */
    will-change: transform;
    transform: translateZ(0);
}

@keyframes spinSmooth {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments for very small screens */
@media (max-width: 360px) {
    .movie-card {
        min-width: 140px;
        max-width: 140px;
    }
    
    .movie-poster {
        height: 200px;
    }
    
    .category-content,
    .search-results {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .hero {
        height: 45vh;
        min-height: 350px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .player-control-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .player-big-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .player-center-controls {
        gap: 1rem;
    }
    
    header {
        padding: 0.5rem 3%;
        height: 60px;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .section {
        padding: 2vw 3%;
    }
    
    .category-tab {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    header {
        padding: 0.8rem 4%;
        height: 70px;
    }
    
    .hero {
        height: 60vh;
        min-height: 500px;
        padding: 3rem 4%;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
    }
    
    .hero-description {
        font-size: clamp(1rem, 1.5vw, 1.3rem);
        max-width: 500px;
    }
    
    .hero-content {
        max-width: 550px;
    }
    
    .movie-card {
        min-width: clamp(160px, 18vw, 220px);
        max-width: clamp(160px, 18vw, 220px);
    }
    
    .movie-poster {
        height: auto;
        aspect-ratio: 2/3;
    }
    
    .section {
        padding: 3vw 4%;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem;
    }
    
    .category-tabs {
        gap: 0.8rem;
    }
    
    .category-tab {
        padding: 0.65rem 1.3rem;
        font-size: 0.9rem;
    }
    
    .movies-row {
        gap: 1rem;
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .hero {
        padding: 4rem 4%;
        height: 65vh;
        max-height: 750px;
    }
    
    .hero-content {
        max-width: 600px;
    }
    
    .hero-title {
        font-size: clamp(3rem, 5vw, 4rem);
    }
    
    .hero-description {
        font-size: clamp(1.1rem, 1.8vw, 1.4rem);
        max-width: 550px;
    }
    
    .movie-card {
        min-width: clamp(180px, 16vw, 250px);
        max-width: clamp(180px, 16vw, 250px);
    }
    
    .movie-poster {
        height: auto;
        aspect-ratio: 2/3;
    }
    
    .section {
        padding: 3vw 4%;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 2rem;
    }
    
    .category-tabs {
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .category-tab {
        padding: 0.7rem 1.4rem;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: clamp(1.3rem, 1.6vw, 2rem);
    }
    
    .movies-row {
        gap: 1.2rem;
    }
}

/* Large desktop screens */
@media (min-width: 1440px) {
    .hero {
        height: 70vh;
        max-height: 800px;
    }
    
    .hero-content {
        max-width: 650px;
    }
    
    .section {
        padding: 3vw 5%;
    }
    
    .movie-card {
        min-width: clamp(200px, 14vw, 280px);
        max-width: clamp(200px, 14vw, 280px);
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 2.5rem;
    }
    
    .category-tabs {
        gap: 1.2rem;
    }
}

/* Grid layout improvements for category pages */
.category-content .movie-card,
.search-results .movie-card {
    min-width: 100px;
}

.category-content .movie-poster,
.search-results .movie-poster {
    height: 140px;
}

/* Search Results List */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.4s ease-out backwards;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-result-item:nth-child(1) { animation-delay: 0.05s; }
.search-result-item:nth-child(2) { animation-delay: 0.1s; }
.search-result-item:nth-child(3) { animation-delay: 0.15s; }
.search-result-item:nth-child(4) { animation-delay: 0.2s; }
.search-result-item:nth-child(5) { animation-delay: 0.25s; }
.search-result-item:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.search-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(128, 90, 213, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.search-result-item:hover::before {
    opacity: 1;
}

.search-result-item:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(128, 90, 213, 0.6);
    box-shadow: 0 20px 60px rgba(128, 90, 213, 0.4), 0 8px 20px rgba(0, 0, 0, 0.5);
}

.search-result-poster {
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s ease;
    z-index: 1;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.search-result-item:hover .search-result-poster {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 15px 40px rgba(128, 90, 213, 0.5);
}

.search-result-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    z-index: 1;
    position: relative;
}

.search-result-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.search-result-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-result-meta span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.search-result-meta span::before {
    content: '•';
    color: var(--primary);
    font-size: 1rem;
}

.search-result-meta span:first-child::before {
    content: none;
}

.search-result-meta .year::before {
    content: '📅';
    font-size: 0.9rem;
}

.search-result-meta .rating::before {
    content: '⭐';
    font-size: 0.9rem;
}

.search-result-meta .type {
    background: linear-gradient(135deg, var(--primary) 0%, #d40813 100%);
    color: white;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.4);
}

.search-result-meta .type::before {
    content: none;
}

.search-result-genre {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

/* No results message */
.search-results .text-center {
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Loading state for search */
.search-results .loading {
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.search-results .loading::after {
    content: 'Searching...';
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive design for search results */
@media (max-width: 480px) {
    .search-result-item {
        padding: 0.9rem;
        gap: 0.9rem;
    }
    
    .search-result-poster {
        width: 75px;
        height: 112px;
    }
    
    .search-result-title {
        font-size: 0.95rem;
    }
    
    .search-result-meta {
        gap: 0.7rem;
    }
    
    .search-result-meta span {
        font-size: 0.7rem;
    }
}

/* New Category Page Styles - 3 Movies Per Line */
.category-page-new {
    min-height: 100vh;
    background: var(--dark);
    padding-top: 50px;
    padding-bottom: 2rem;
}

.category-header-new {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid var(--gray-dark);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(18, 18, 18, 0.95) 100%);
    position: sticky;
    top: 50px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.category-title-new {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    color: var(--light);
    text-transform: capitalize;
}

.category-content-new {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Movie card adjustments for category grid */
.category-grid .movie-card {
    width: 100%;
    min-width: unset;
}

.category-grid .movie-poster {
    height: 280px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .category-grid .movie-poster {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-content-new {
        padding: 1rem;
    }
    
    .category-header-new {
        padding: 1rem;
    }
    
    .category-title-new {
        font-size: 1.2rem;
    }
    
    .category-grid .movie-poster {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .category-content-new {
        padding: 0.8rem;
    }
    
    .category-grid .movie-poster {
        height: 180px;
    }
    
    .category-title-new {
        font-size: 1.1rem;
    }
}
    

/* ===================================
   Plyr Video Player Styles
   =================================== */

/* Plyr container styling */
.plyr-video-container {
    width: 100%;
    max-width: 100%;
    background: #000;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Plyr custom theme colors */
.plyr--video {
    background: #000;
}

.plyr--full-ui input[type=range] {
    color: #805AD5;
}

.plyr__control--overlaid {
    background: rgba(128, 90, 213, 0.8);
}

.plyr__control--overlaid:hover {
    background: #805AD5;
}

.plyr__control:hover,
.plyr__control[aria-expanded=true] {
    background: #805AD5;
}

.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before {
    background: #805AD5;
}

/* Plyr progress bar */
.plyr__progress input[type=range],
.plyr__progress__buffer {
    color: #805AD5;
}

/* Plyr volume */
.plyr--audio .plyr__control.plyr__tab-focus,
.plyr--audio .plyr__control:hover,
.plyr--audio .plyr__control[aria-expanded=true] {
    background: #805AD5;
}

/* Plyr fullscreen styling */
.plyr:-webkit-full-screen {
    width: 100%;
    height: 100%;
}

.plyr:fullscreen {
    width: 100%;
    height: 100%;
}

/* Mobile optimizations for Plyr */
@media (max-width: 768px) {
    .plyr-video-container {
        border-radius: 0;
        margin-bottom: 0;
    }
    
    .plyr__control {
        padding: 10px;
    }
    
    /* Larger touch targets on mobile */
    .plyr__controls button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Hide legacy custom player */
.custom-video-player[style*="display: none"] {
    display: none !important;
}

/* Player header styling with Plyr */
.player-page .player-header {
    margin-bottom: 0;
}

/* Ensure Plyr takes full width on player page */
.player-page .plyr-video-container {
    width: 100%;
    margin: 0;
    border-radius: 0;
}

/* Related content styling adjustment for Plyr */
.player-related {
    margin-top: 1rem;
}

/* Loading indicator for Plyr */
.plyr__poster {
    background-size: cover;
    background-position: center;
}

/* Quality badge styling */
.plyr__menu__container {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
}

.plyr__menu__container .plyr__control {
    color: #fff;
}

/* Plyr captions styling */
.plyr__caption {
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Smooth transitions */
.plyr__control,
.plyr__progress input[type=range] {
    transition: all 0.3s ease;
}

/* Focus states */
.plyr__control:focus {
    outline: 2px solid #805AD5;
    outline-offset: 2px;
}

/* Settings menu */
.plyr__menu {
    z-index: 1000;
}

/* Picture-in-Picture button */
.plyr__control[data-plyr="pip"] {
    display: inline-block;
}

/* AirPlay button */
.plyr__control[data-plyr="airplay"] {
    display: inline-block;
}

/* Time display */
.plyr__time {
    font-size: 14px;
    font-weight: 500;
}

/* Volume slider */
.plyr__volume {
    max-width: 90px;
}

/* Poster image */
.plyr__poster {
    background-color: #000;
}

/* Loading spinner customization */
.plyr--loading .plyr__progress__buffer {
    opacity: 0.5;
}


/* ====================================
   Video.js Custom Styles
   ==================================== */

/* Video container */
.video-js {
    width: 100%;
    height: 100%;
}

/* Control bar styling */
.video-js .vjs-control-bar {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    height: 4em;
}

/* Time display visibility */
.video-js .vjs-current-time,
.video-js .vjs-duration,
.video-js .vjs-time-divider {
    display: block !important;
    padding: 0 0.5em;
    font-size: 1.2em;
}

.video-js .vjs-current-time {
    padding-left: 1em;
}

.video-js .vjs-duration {
    padding-right: 1em;
}

/* Progress bar styling */
.video-js .vjs-progress-control {
    position: absolute;
    top: -0.5em;
    left: 0;
    right: 0;
    width: 100%;
    height: 0.5em;
}

.video-js .vjs-progress-holder {
    height: 0.5em;
}

.video-js .vjs-play-progress {
    background-color: #805AD5;
}

.video-js .vjs-load-progress {
    background: rgba(255, 255, 255, 0.3);
}

/* Quality button styling */
.video-js .vjs-quality-button .vjs-icon-placeholder:before {
    content: 'HD';
    font-size: 1.5em;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.video-js .vjs-quality-button .vjs-menu {
    left: auto;
    right: 0;
}

.video-js .vjs-quality-button .vjs-menu .vjs-menu-content {
    background-color: rgba(0, 0, 0, 0.9);
    max-height: 15em;
}

.video-js .vjs-quality-button .vjs-menu-item {
    padding: 0.5em 1em;
    font-size: 1.2em;
}

.video-js .vjs-quality-button .vjs-menu-item.vjs-selected {
    background-color: #805AD5;
    color: white;
}

.video-js .vjs-quality-button .vjs-menu-item:hover,
.video-js .vjs-quality-button .vjs-menu-item:focus {
    background-color: rgba(128, 90, 213, 0.7);
}

/* Big play button */
.video-js .vjs-big-play-button {
    font-size: 3em;
    background-color: rgba(128, 90, 213, 0.8);
    border: none;
    border-radius: 50%;
    width: 2em;
    height: 2em;
    line-height: 2em;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.video-js .vjs-big-play-button:hover {
    background-color: #805AD5;
}

/* Playback rate button */
.video-js .vjs-playback-rate .vjs-menu {
    left: auto;
    right: 0;
}

/* Volume panel */
.video-js .vjs-volume-panel {
    order: 2;
}

/* Control buttons */
.video-js .vjs-control {
    width: 3em;
}

/* Fullscreen adjustments */
.video-js.vjs-fullscreen {
    padding-top: 0;
}

.video-js.vjs-fullscreen .vjs-control-bar {
    height: 5em;
}

.video-js.vjs-fullscreen .vjs-current-time,
.video-js.vjs-fullscreen .vjs-duration,
.video-js.vjs-fullscreen .vjs-time-divider {
    font-size: 1.5em;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .video-js .vjs-control-bar {
        font-size: 1.2em;
    }
    
    .video-js .vjs-current-time,
    .video-js .vjs-duration {
        font-size: 1em;
    }
    
    .video-js .vjs-big-play-button {
        font-size: 2.5em;
    }
}

/* Loading spinner */
.video-js .vjs-loading-spinner {
    border-color: #805AD5 transparent transparent transparent;
}

/* Error display */
.video-js .vjs-error-display {
    background-color: rgba(0, 0, 0, 0.9);
}

.video-js .vjs-error-display:before {
    color: #805AD5;
}

/* HTTP Source Selector Plugin Styles */
.video-js .vjs-http-source-selector {
    order: 10;
}

.video-js .vjs-http-source-selector .vjs-menu-button {
    font-family: Arial, sans-serif;
}

.video-js .vjs-http-source-selector .vjs-icon-placeholder:before {
    content: 'HD';
    font-size: 1.5em;
    font-weight: bold;
}

.video-js .vjs-http-source-selector .vjs-menu {
    left: auto;
    right: 0;
}

.video-js .vjs-http-source-selector .vjs-menu .vjs-menu-content {
    background-color: rgba(0, 0, 0, 0.9);
    max-height: 15em;
}

.video-js .vjs-http-source-selector .vjs-menu-item {
    padding: 0.5em 1em;
    font-size: 1.2em;
    text-transform: none;
}

.video-js .vjs-http-source-selector .vjs-menu-item.vjs-selected {
    background-color: #805AD5;
    color: white;
}

.video-js .vjs-http-source-selector .vjs-menu-item:hover,
.video-js .vjs-http-source-selector .vjs-menu-item:focus {
    background-color: rgba(128, 90, 213, 0.7);
}

/* Quality label formatting */
.video-js .vjs-http-source-selector .vjs-menu-item .vjs-menu-item-text {
    font-weight: 500;
}

/* ============================================
   USER PROFILE SYSTEM STYLES
   ============================================ */

/* Profile Button in Header */
.profile-wrapper {
    position: relative;
}

.profile-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--light);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.profile-btn i {
    font-size: 1.5rem;
}

.profile-btn:hover {
    border-color: var(--primary);
    background: rgba(128, 90, 213, 0.1);
    transform: scale(1.1);
}

/* Profile Dropdown Menu */
.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(128, 90, 213, 0.3);
    border-radius: 16px;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(128, 90, 213, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.profile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #d40813 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--light);
    margin-bottom: 0.2rem;
}

.profile-email {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Menu Items */
.profile-menu-items {
    padding: 0.5rem 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: var(--light);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.profile-menu-item:hover {
    background: rgba(128, 90, 213, 0.2);
    color: var(--primary);
}

.profile-menu-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.profile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* Movie Card Actions (Favorite & Watchlist Buttons) */
.movie-actions {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 0.5rem;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-actions {
    opacity: 1;
}

.movie-action-btn {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.movie-action-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

.movie-action-btn.favorite-btn i.fas {
    color: #e50914;
}

.movie-action-btn.watchlist-btn i.fas {
    color: var(--primary);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(128, 90, 213, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-color: rgba(34, 197, 94, 0.5);
}

.toast-info {
    border-color: rgba(59, 130, 246, 0.5);
}

.toast i {
    font-size: 1.5rem;
}

.toast-success i {
    color: #22c55e;
}

.toast-info i {
    color: #3b82f6;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .profile-menu {
        width: 280px;
        right: -10px;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .movie-actions {
        opacity: 1;
    }
    
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* Profile Page Styles (for profile.html) */
.profile-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.profile-header {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    border: 2px solid rgba(128, 90, 213, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    border: 2px solid rgba(128, 90, 213, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--light);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.2rem;
}

/* ============================================
   ENHANCED SEARCH STYLES
   ============================================ */

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.2rem;
    pointer-events: none;
}

.search-input {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.clear-search:hover {
    color: var(--primary);
    transform: translateY(-50%) scale(1.2);
}

/* Search History */
.search-history {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.search-section-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-history-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--gray);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.clear-history-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.search-history-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.search-history-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.search-history-item:hover {
    background: rgba(128, 90, 213, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.search-history-item i {
    color: var(--gray);
}

/* Search Filters */
.search-filters {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

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

.filter-group label {
    font-weight: 600;
    color: var(--light);
    font-size: 0.9rem;
}

.filter-select {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(128, 90, 213, 0.1);
}

/* Search Results Header */
.search-results-header {
    margin-bottom: 1.5rem;
}

.search-results-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--light);
}

/* Search Empty State */
.search-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
    animation: fadeIn 0.5s ease-out;
}

.search-empty-state i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: var(--primary);
}

.search-empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--light);
}

.search-empty-state p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--gray);
}

.search-suggestions {
    margin-top: 2rem;
    text-align: left;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.search-suggestions p {
    margin-bottom: 0.8rem;
    color: var(--light);
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
}

.search-suggestions li {
    padding: 0.4rem 0;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-suggestions li::before {
    content: '•';
    color: var(--primary);
    font-size: 1.5rem;
}

.search-suggestions a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.search-suggestions a:hover {
    text-decoration: underline;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
}

.loading p {
    color: var(--gray);
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
        justify-content: space-between;
    }

    .search-empty-state {
        padding: 3rem 1rem;
    }

    .search-empty-state i {
        font-size: 3rem;
    }

    .search-empty-state h3 {
        font-size: 1.3rem;
    }

    .search-suggestions {
        width: 100%;
    }
}
