/* ========================================
   CRITICAL: Prevent White Flash on Scroll
   ======================================== */

/* Apply dark background immediately to prevent white flashes */
html {
    background: #0c0c0c;
    background-color: #0c0c0c;
}

html, body {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    background-attachment: fixed;
    background-color: #0c0c0c; /* Fallback */
    min-height: 100vh;
}

/* Ensure all containers have dark backgrounds */
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Local Font Imports */
@font-face {
    font-family: 'Fredoka';
    src: url('./fonts/Fredoka-VariableFont_wdth,wght.ttf') format('truetype-variations');
    font-weight: 300 700;
    font-stretch: 75% 125%;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('./fonts/Nunito-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 200 1000;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('./fonts/Nunito-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 200 1000;
    font-style: italic;
    font-display: swap;
}

/* Custom Scrollbar Styles - Hide all scrollbars site-wide - v2.0 */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    display: none !important;
}

::-webkit-scrollbar-track {
    display: none !important;
}

::-webkit-scrollbar-thumb {
    display: none !important;
}

::-webkit-scrollbar-thumb:hover {
    display: none !important;
}

::-webkit-scrollbar-thumb:active {
    display: none !important;
}

::-webkit-scrollbar-corner {
    display: none !important;
}

/* Firefox */
html {
    scrollbar-width: none !important;
}

/* Hide scrollbars for all elements */
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Hide scrollbars for specific containers */
.movies-grid,
.anime-grid,
.manga-grid,
.search-results,
.genre-movies-scroll,
.cast-grid,
.staff-grid {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.movies-grid::-webkit-scrollbar,
.anime-grid::-webkit-scrollbar,
.manga-grid::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.genre-movies-scroll::-webkit-scrollbar,
.cast-grid::-webkit-scrollbar,
.staff-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ========================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Hide logo text on tablets and mobile */
@media (max-width: 900px) {
    .logo-text {
        display: none !important;
    }
}

/* Disable expensive backdrop-filter on mobile devices */
@media (max-width: 768px) {
    /* Replace backdrop-filter with solid backgrounds on mobile (except navbar) */
    .user-dropdown-menu,
    .content-type-dropdown-menu,
    .trending-filter-menu,
    .search-dropdown,
    .modal,
    .floating-actions,
    .genre-card-overlay,
    .movie-card,
    .movie-info,
    .trailer-card-overlay,
    .calendar-day-header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    
    
    .main,
    .container,
    .genres-container,
    .genre-group,
    .trending-section,
    .upcoming-calendar-section,
    .trending-trailers-section,
    .genre-cards-grid {
        background-color: transparent;
    }
    
    /* Ensure content scrolls under the navbar for glass effect visibility */
    .main {
        margin-top: 0 !important;
        padding-top: 65px !important; /* Use padding instead of margin */
    }
    
    /* Optimize scroll containers */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Reduce animation complexity on mobile */
    .skeleton {
        animation-duration: 2s !important;
        background-color: #2a2a2a;
    }
    
    /* Pause animations during scroll for smoother performance */
    body.scrolling * {
        animation-play-state: paused !important;
        transition: none !important;
    }
    
    /* CSS Containment for better performance */
    .genre-group,
    .trending-section,
    .upcoming-calendar-section,
    .trending-trailers-section {
        contain: layout style paint;
    }
    
    .movie-card,
    .genre-card,
    .trailer-card,
    .calendar-movie-item,
    .calendar-card {
        contain: layout paint;
    }
    
    /* Optimize transforms for GPU acceleration */
    .movie-card,
    .genre-card,
    .trending-card,
    .trailer-card,
    .calendar-movie-item,
    .calendar-card {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: auto;
    }
    
    /* Disable smooth scroll on mobile for better performance */
    html {
        scroll-behavior: auto !important;
    }
    
    /* Reduce expensive CSS properties on mobile cards */
    .movie-card,
    .genre-card,
    .genre-movie-card,
    .trending-card,
    .trailer-card,
    .calendar-movie-item,
    .calendar-card {
        box-shadow: none !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        background: var(--dark-secondary) !important;
        background-image: none !important;
        transition: none !important;
    }
    
    /* Simplify card hover effects on mobile */
    .movie-card:active,
    .genre-card:active,
    .trending-card:active,
    .trailer-card:active,
    .calendar-movie-item:active,
    .calendar-card:active {
        transform: scale(0.98) translateZ(0);
        opacity: 0.9;
    }
    
    /* Optimize trending, trailers, and calendar sections */
    .trending-section,
    .trending-trailers-section,
    .upcoming-calendar-section {
        gap: 0.75rem !important;
    }
    
    /* Optimize images on mobile */
    .movie-poster,
    .card-poster,
    .genre-card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Reduce grid gaps for better performance (but keep some spacing) */
    .movies-grid,
    .genre-cards-grid,
    .genre-movies-grid {
        gap: 0.75rem !important;
    }
    
    /* Simplify gradients and borders */
    .movie-card {
        border-radius: 6px !important;
    }
}

/* Extra thin scrollbars for dropdowns and small containers */
.content-type-dropdown-menu,
.user-dropdown-menu,
.help-overlay,
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: #e50914 rgba(15, 15, 35, 0.5);
}

.content-type-dropdown-menu::-webkit-scrollbar,
.user-dropdown-menu::-webkit-scrollbar,
.help-overlay::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.content-type-dropdown-menu::-webkit-scrollbar-thumb,
.user-dropdown-menu::-webkit-scrollbar-thumb,
.help-overlay::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 4px;
}

/* Modern Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 320px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1);
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.toast-content {
    flex: 1;
    color: white;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: scale(1.1);
}

/* Toast Types */
.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.toast-loading {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border-color: rgba(107, 114, 128, 0.3);
}

/* Toast Animations */
@keyframes toastSlideIn {
    0% {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
}

/* Loading spinner for loading toasts */
.toast-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Progress bar for timed toasts */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 12px 12px;
    animation: toastProgress linear;
}

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Prevent zoom on touch devices */
    touch-action: manipulation;
}

/* Global overflow prevention */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}


.container, .main, .hero-section, .movies-section, .anime-section, .manga-section {
    max-width: 100vw;
    overflow-x: hidden;
}

/* PWA Specific Styles */
.standalone-mode {
    /* Adjustments for when app is running in standalone mode */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* PWA Install Button */
.install-pwa-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInUp 0.5s ease-out;
}

.install-pwa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    max-width: 400px;
    width: 90%;
    animation: slideInDown 0.5s ease-out;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.update-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.update-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--dark-tertiary);
    color: var(--text-primary);
}

/* Connection Status - Removed */

/* PWA Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Mobile PWA Optimizations */
@media (max-width: 768px) {
    .standalone-mode .header {
        padding-top: env(safe-area-inset-top);
    }
    
    .standalone-mode .main {
        margin-top: 0 !important;
        padding-top: calc(65px + env(safe-area-inset-top)) !important;
    }
    

    .nav {
        padding: 0.5rem 0.8rem;
        min-height: 45px;
        border-radius: 40px;
    }
}


.pwa-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.pwa-splash.hidden {
    opacity: 0;
    pointer-events: none;
}

.pwa-splash-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.pwa-splash-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pwa-splash-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.pwa-splash-loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* PWA Share Button */
.share-btn {
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 100;
}

.share-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* PWA Offline Indicator */
.offline-indicator {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInUp 0.5s ease-out;
}

.offline-indicator.online {
    background: #28a745;
}

/* PWA Touch Actions */
.touch-action-manipulation {
    touch-action: manipulation;
}

/* PWA Viewport Units */
.pwa-vh {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
}

.pwa-vw {
    width: 100vw;
    width: 100dvw; /* Dynamic viewport width for mobile browsers */
}

/* PWA Guide Modal */
.pwa-guide {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.step-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.step-content ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0.5rem 0 0 0;
    padding-left: 1.2rem;
}

.step-content li {
    margin-bottom: 0.25rem;
}

/* Modal Footer Buttons */
.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-primary {
    font-family: 'Fredoka', sans-serif;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    border: 2px solid transparent;
    background: linear-gradient(var(--dark-secondary), var(--dark-secondary)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.15);
}

.btn-secondary:hover {
    background: linear-gradient(var(--dark-tertiary), var(--dark-tertiary)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
    transform: translateY(-1px);
}


/* PWA Status Indicators */
.pwa-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pwa-status.installed {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.pwa-status.offline {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

:root {
    --primary-color: #01b4e4;
    --primary-dark: #0099cc;
    --secondary-color: #90cea1;
    --accent-color: #01b4e4;
    --dark-bg: #0d1117;
    --dark-secondary: #161b22;
    --dark-tertiary: #21262d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --border-color: #30363d;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-dark: linear-gradient(135deg, var(--dark-bg), var(--dark-secondary));
    --rating-green: #21d07a;
    
    /* Prevent zooming */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    --rating-orange: #d2d531;
    --rating-red: #db2360;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #000000;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    
    /* Prevent zooming */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Use more width on larger desktop screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
        padding: 0 1.5rem;
    }
}

/* Container padding for mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 4px;
    }
}

/* Navigation Styles (now independent, not wrapped in header) */

/* Content Type Navigation */
.content-type-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-right: 1rem;
}

.content-type-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: transparent;
}

.content-type-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.content-type-link.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(1, 180, 228, 0.1), rgba(229, 9, 20, 0.1));
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(1, 180, 228, 0.2);
}

.content-type-link i {
    font-size: 1rem;
}

/* Compact Time Display Overlay Styles */
.time-display-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    margin-top: 60px;
    display: none; /* Hidden by default - using navbar version */
}

.time-display-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.4rem 0.8rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
    min-width: 100px;
}

.time-display-content:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

.time-main {
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #60a5fa;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    font-style: italic;
}

.time-date {
    font-family: 'Nunito', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    font-style: italic;
}


.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 0.2rem 0.2rem;
    max-width: 100vw;
    overflow: visible;
    background: transparent;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0.3rem;
    margin: 0;
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 2px solid #3b82f6;
    border-radius: 50px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 10px rgba(59, 130, 246, 0.1);
    gap: 0.5rem;
    margin-top: 2px;
    max-width: 100%;
    width: 100%;
    overflow: visible;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Nav hover effect removed to prevent disappearing */

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.2rem 0;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo:hover .logo-icon {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.3), 0 4px 12px rgba(229, 9, 20, 0.4);
}

.logo-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e50914, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin: 0;
    white-space: nowrap;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e50914, #ff1744);
    border-radius: 50%;
    border: 2px solid #e50914;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
    overflow: hidden;
}

.logo-icon img {
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(1, 180, 228, 0.1);
    border-color: rgba(1, 180, 228, 0.2);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(1, 180, 228, 0.15);
    border-color: rgba(1, 180, 228, 0.3);
    box-shadow: 0 2px 8px rgba(1, 180, 228, 0.2);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gradient);
    border-radius: 1px;
}





/* Navbar Controls */
.navbar-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.8rem;
    padding: 0.2rem 0;
    overflow: visible;
    position: relative;
    z-index: 100001;
}


.search-input-container {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
}

.search-input-icon {
    color: var(--text-secondary);
    font-size: 1rem;
}

.search-btn {
    background: #3b82f6;
    color: white;
    border: 2px solid #3b82f6;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.search-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.search-btn i {
    font-size: 0.9rem;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    padding: 0.5rem 0;
}

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

.clear-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    color: var(--text-primary);
    background: var(--dark-tertiary);
}

.search-suggestions {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.search-suggestion-item:hover {
    background: var(--dark-tertiary);
    color: var(--text-primary);
}

.search-suggestion-item i {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.search-suggestion-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Search Results Modal */
.search-results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.search-results-modal.show {
    display: flex;
}

.search-results-content {
    background: var(--dark-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.search-results-header h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.close-search-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.close-search-modal:hover {
    color: var(--text-primary);
    background: var(--dark-tertiary);
}

.search-results-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem 2rem;
}

.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Search Bar Section */
/* Dark-themed Compact Search Bar */
.search-bar-section {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.search-bar-container {
    max-width: 700px;
    margin: 0 auto;
}

/* Telegram Button Above Search Bar */
.telegram-button-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.telegram-button-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    width: 50%;
    max-width: 350px;
    background: linear-gradient(135deg, #0088cc, #006699);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.telegram-button-compact:hover {
    background: linear-gradient(135deg, #00a8e8, #0088cc);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
}

.telegram-button-compact i {
    font-size: 1.2rem;
}

.telegram-button-compact span {
    white-space: nowrap;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.search-bar:focus-within {
    border-color: rgba(229, 9, 20, 0.5);
    box-shadow: 0 2px 12px rgba(229, 9, 20, 0.2);
    background: rgba(25, 25, 25, 0.98);
}

.search-bar-icon {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.search-bar:focus-within .search-bar-icon {
    color: rgba(229, 9, 20, 0.8);
}

.search-bar-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 400;
    outline: none;
    padding: 0.35rem 0;
    min-width: 0;
    /* Mobile performance optimizations */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

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

.search-bar-btn {
    background: rgba(229, 9, 20, 0.9);
    color: white;
    border: 1px solid rgba(229, 9, 20, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.85rem;
    min-width: 44px;
    height: 36px;
    flex-shrink: 0;
}

.search-bar-btn:hover {
    background: rgba(229, 9, 20, 1);
    border-color: rgba(229, 9, 20, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.search-bar-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(229, 9, 20, 0.2);
}

.search-bar .clear-search-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.search-bar .clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.search-bar .clear-search-btn:active {
    background: rgba(255, 255, 255, 0.15);
}

/* Search Results Section */
.search-results-section {
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
    will-change: opacity, transform;
}

.search-results-section.hidden {
    display: none;
}

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

.search-results-section .search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
    border-bottom: none;
}

.search-results-section .search-results-title {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Fredoka', sans-serif;
}

.search-results-section .search-results-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.clear-search-btn {
    background: var(--dark-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-search-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.search-results-container {
    background: var(--dark-secondary);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-results-section .search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Search loading and no results states */
.search-results-section .loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.search-results-section .loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.search-results-section .no-search-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.search-results-section .no-search-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.search-results-section .no-search-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.search-results-section .no-search-results p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Search Load More Button */
.search-load-more-container {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem 0;
}

.search-load-more-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.search-load-more-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.search-load-more-btn:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.search-load-more-btn i {
    font-size: 0.9rem;
}

/* Because You Watched Section */
.because-you-watched-section {
    margin: 2rem 0;
    padding: 0 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.because-you-watched-section .section-header {
    margin-bottom: 1.5rem;
}

.because-you-watched-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    font-family: 'Fredoka', sans-serif;
}

.because-you-watched-section .section-title i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.watched-recommendations-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.watched-movie-recommendation {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.watched-movie-header {
    margin-bottom: 1rem;
}

.watched-movie-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Fredoka', sans-serif;
}

.watched-movie-title i {
    color: var(--primary-color);
    font-size: 1rem;
}

.watched-movie-title .movie-name {
    color: var(--primary-color);
    font-style: italic;
}

.watched-movies-scroll-container {
    position: relative;
    overflow: hidden;
    margin: 0 -1rem; /* Extend to container edges */
}

.watched-movies-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 1rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.watched-movies-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Fade effect at edges */
/* Removed fade effects for performance */

.watched-movie-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: linear-gradient(var(--dark-secondary), var(--dark-secondary)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    position: relative;
    flex: 0 0 160px; /* Fixed width for horizontal scroll */
    width: 160px;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.15);
}

.watched-movie-card:hover {
    transform: translateY(-1px);
    background: linear-gradient(var(--dark-tertiary), var(--dark-tertiary)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(229, 9, 20, 0.2);
}

.watched-movie-poster-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.watched-movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watched-movie-card:hover .watched-movie-poster {
    transform: none;
}

.watched-movie-poster-placeholder {
    width: 100%;
    height: 100%;
    background: var(--dark-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.watched-movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.watched-movie-overlay i {
    color: white;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.watched-movie-info {
    padding: 1rem;
}

.watched-movie-info .watched-movie-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.watched-movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.watched-movie-year {
    font-weight: 500;
}

.watched-movie-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #fbbf24;
    font-weight: 600;
}

.watched-movie-rating i {
    font-size: 0.7rem;
}

/* Responsive Design for Because You Watched */
@media (max-width: 768px) {
    .because-you-watched-section {
        margin: 1.5rem 0;
        padding: 0 0.5rem;
    }
    
    .watched-movie-recommendation {
        padding: 1rem;
    }
    
    .watched-movies-scroll-container {
        margin: 0 -0.5rem; /* Adjust for smaller padding */
    }
    
    .watched-movies-scroll {
        padding: 0.5rem 0.5rem;
        gap: 0.75rem;
    }
    
    .watched-movie-card {
        flex: 0 0 140px;
        width: 140px;
    }
    
    .watched-movie-poster-container {
        height: 200px;
    }
    
    .watched-movie-info {
        padding: 0.75rem;
    }
    
    .watched-movie-info .watched-movie-title {
        font-size: 0.85rem;
    }
    
    .watched-movie-meta {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .watched-movie-card {
        flex: 0 0 120px;
        width: 120px;
    }
    
    .watched-movies-scroll {
        gap: 0.5rem;
    }
    
    .watched-movie-poster-container {
        height: 180px;
    }
    
    .watched-movie-info {
        padding: 0.5rem;
    }
    
    .watched-movie-info .watched-movie-title {
        font-size: 0.8rem;
    }
}

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

.search-result-item {
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 70px;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    background: var(--dark-tertiary);
    border-color: var(--primary-color);
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.search-result-item:active {
    transform: translateX(3px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

.search-result-poster {
    width: 40px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}

.search-result-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.search-result-type {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.search-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.search-result-badge i {
    font-size: 0.65rem;
}

.search-result-badge-movie {
    background: linear-gradient(135deg, #e50914, #ff6b35);
    color: white;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.search-result-badge-tv,
.search-result-badge-tv_show {
    background: linear-gradient(135deg, #01b4e4, #0096c7);
    color: white;
    box-shadow: 0 2px 8px rgba(1, 180, 228, 0.3);
}

.search-result-badge-anime {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.search-result-badge-manga {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.search-result-year {
    color: var(--text-muted);
}

.search-result-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.search-result-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.search-result-item:hover .search-result-actions {
    opacity: 1;
    transform: translateX(2px);
}

.search-result-arrow {
    color: var(--primary-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-result-item:hover .search-result-arrow {
    color: var(--secondary-color);
    transform: scale(1.1);
}


/* Responsive styles */
@media (max-width: 768px) {
    .search-bar-section {
        padding: 0 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .search-bar-container {
        max-width: 100%;
    }
    
    .telegram-button-compact {
        width: 100%;
        max-width: 100%;
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .search-bar {
        padding: 0.45rem 0.65rem;
        gap: 0.45rem;
        border-radius: 8px;
    }
    
    .search-bar-icon {
        font-size: 0.9rem;
    }
    
    .search-bar-btn {
        padding: 0.45rem 0.85rem;
        min-width: 40px;
        height: 34px;
        font-size: 0.8rem;
    }
    
    .search-bar-input {
        font-size: 16px; /* Prevent iOS zoom on focus - must be at least 16px */
        padding: 0.3rem 0;
    }
    
    .search-bar .clear-search-btn {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .search-bar-section {
        padding: 0 0.5rem;
        margin-bottom: 1rem;
    }
    
    .telegram-button-compact {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
    
    .telegram-button-compact i {
        font-size: 1rem;
    }
    
    .search-bar {
        padding: 0.4rem 0.55rem;
        gap: 0.4rem;
        border-radius: 8px;
    }
    
    .search-bar-icon {
        font-size: 0.85rem;
    }
    
    .search-bar-btn {
        padding: 0.4rem 0.75rem;
        min-width: 36px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .search-bar-input {
        font-size: 16px; /* Prevent iOS zoom on focus - must be at least 16px */
        padding: 0.25rem 0;
    }
    
    .search-bar .clear-search-btn {
        width: 24px;
        height: 24px;
    }
    
    .search-result-item {
        min-height: 60px;
        padding: 0.6rem 0.8rem;
    }
    
    .search-result-poster {
        width: 35px;
        height: 50px;
    }
    
    .search-result-arrow {
        font-size: 0.9rem;
    }
}




.search-result-title {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.search-result-rating {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.search-result-overview {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== AUTHENTICATION UI ===== */
.auth-button {
    font-family: 'Fredoka', sans-serif;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: 1rem;
}

.auth-button:hover {
    background: #ff6b35;
    transform: translateY(-2px);
}

.user-menu {
    position: relative;
    margin-left: 1rem;
    overflow: visible;
    z-index: 100001;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    border-color: #ff6b35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

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

.hidden {
    display: none !important;
}

.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-actions {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    border-top: 1px solid #333;
    border-bottom: 2px solid transparent;
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
    background: linear-gradient(#1a1a1a, #1a1a1a) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    z-index: 100002;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: visible;
}

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

.user-action-btn {
    font-family: 'Fredoka', sans-serif;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
}

.user-action-btn:hover {
    background: var(--dark-secondary);
    color: var(--primary-color);
}

.user-action-btn i {
    width: 16px;
    text-align: center;
}

/* Mobile responsive for auth UI */
@media (max-width: 768px) {
    .auth-button {
        padding: 0.4rem;
        font-size: 0.8rem;
        margin-left: 0.5rem;
        width: 32px;
        height: 32px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .user-avatar-placeholder {
        font-size: 1rem;
    }
    
    .user-actions {
        min-width: 180px;
    }
    
    .user-action-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ===== MIXED SEARCH RESULTS ===== */
.mixed-search-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-content-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-section-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
    margin-bottom: 0.5rem;
}

.search-section-title {
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.search-section-title i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.search-section-count {
    background: var(--dark-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: auto;
}

.search-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

/* Enhanced search result items */
.search-result-poster-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.search-result-poster-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-tertiary), var(--dark-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 3rem;
}

.search-result-item:hover .search-result-poster {
    transform: none;
}

.search-result-content-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-result-badge-movie {
    background: rgba(229, 9, 20, 0.9);
    color: white;
}

.search-result-badge-anime {
    background: rgba(0, 212, 170, 0.9);
    color: white;
}

.search-result-badge-manga {
    background: rgba(255, 107, 53, 0.9);
    color: white;
}

/* Content type specific styling */
.search-result-movie {
    border-left: 4px solid #e50914;
}

.search-result-anime {
    border-left: 4px solid #00d4aa;
}

.search-result-manga {
    border-left: 4px solid #ff6b35;
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.search-result-rating-movie {
    background: rgba(229, 9, 20, 0.2);
    color: #e50914;
    border: 1px solid rgba(229, 9, 20, 0.3);
}

.search-result-rating-anime {
    background: rgba(0, 212, 170, 0.2);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.search-result-rating-manga {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.search-result-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

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

.search-result-additional {
    background: var(--dark-tertiary);
    color: var(--text-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-search-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-search-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.no-search-results h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.no-search-results p {
    margin: 0;
    font-size: 0.9rem;
}

/* Content Type Dropdown */
.content-type-dropdown {
    position: relative;
}

.content-type-dropdown-btn {
    font-family: 'Fredoka', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 6px 12px;
    background: #e50914;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
    height: 32px;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.content-type-dropdown-btn:hover {
    background: linear-gradient(45deg, #dc2626, #ea580c, #e11d48, #be185d);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.4);
    transform: translateY(-1px);
}

.content-type-dropdown-btn i {
    font-size: 1rem;
}

/* Dropdown arrow removed for more compact design */

.content-type-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 99999 !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 10px rgba(229, 9, 20, 0.1);
    background: linear-gradient(var(--dark-secondary), var(--dark-secondary)) padding-box,
               linear-gradient(45deg, transparent, transparent, #e50914, #ff6b35, #ff1744, #e91e63, transparent, transparent) border-box;
    border-left: 2px solid #e50914;
    border-right: 2px solid #e91e63;
    border-bottom: 2px solid #ff6b35;
    border-top: none;
}

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

.content-type-dropdown.open .content-type-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.content-type-option {
    font-family: 'Fredoka', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    text-align: left;
}

.content-type-option:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.content-type-option.active {
    background: #e50914;
    color: white;
}

.content-type-option i {
    font-size: 1rem;
}


/* Trending Section - Global Styles */
.trending-section {
    padding: 2rem 0;
    max-width: 1600px;
    margin: 0 auto;
}

@media (min-width: 1920px) {
    .trending-section {
        max-width: 1800px;
    }
}

/* Upcoming Calendar Section Styles */
.upcoming-calendar-section {
    padding: 2rem 0;
    max-width: 1600px;
    margin: 0 auto;
    contain: layout style paint;
    overflow: hidden;
    position: relative;
    z-index: var(--z-content);
}

@media (min-width: 1920px) {
    .upcoming-calendar-section {
        max-width: 1800px;
    }
}

.calendar-scroll-container {
    position: relative;
    padding: 0 1rem;
}

.calendar-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.calendar-scroll-btn:hover {
    background: rgba(229, 9, 20, 0.95);
    border-color: #e50914;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.4);
}

.calendar-scroll-btn.left {
    left: 10px;
}

.calendar-scroll-btn.right {
    right: 10px;
}

.calendar-scroll-btn:disabled {
    opacity: 0.8;
    cursor: pointer;
}

.calendar-content {
    margin-top: 1.5rem;
}

.calendar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.calendar-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.calendar-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 1rem;
}

.calendar-grid::-webkit-scrollbar {
    display: none;
}

.calendar-card {
    flex: 0 0 180px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: default;
    border: 2px solid transparent;
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(229, 9, 20, 0.15);
    height: 240px;
    width: 180px;
    contain: layout style paint;
    overflow: hidden;
    position: relative;
    z-index: var(--z-content);
}

.calendar-poster {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.calendar-poster-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 2rem;
}

.calendar-title-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    color: white;
    padding: 20px 12px 12px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 3px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.calendar-date-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: var(--z-elevated);
}

.calendar-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: var(--z-elevated);
}

.calendar-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: var(--z-elevated);
    text-transform: uppercase;
}

/* Responsive Design for Calendar */
@media (max-width: 768px) {
    .calendar-scroll-container {
        padding: 0 0.5rem;
    }
    
    .calendar-grid {
        gap: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .calendar-card {
        flex: 0 0 160px;
        height: 220px;
        width: 160px;
    }
    
    .calendar-title-text {
        font-size: 0.9rem;
        padding: 15px 10px 10px;
    }
    
    .calendar-rating-badge {
        font-size: 0.7rem;
        width: 28px;
        height: 28px;
    }
    
    .calendar-date-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .calendar-scroll-btn {
        width: 36px;
        height: 36px;
    }
    
    .calendar-scroll-btn.left {
        left: 5px;
    }
    
    .calendar-scroll-btn.right {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .upcoming-calendar-section {
        padding: 1rem 0;
    }
    
    .calendar-grid {
        padding: 0;
    }
    
    .calendar-card {
        flex: 0 0 140px;
        height: 200px;
        width: 140px;
    }
    
    .calendar-title-text {
        font-size: 0.8rem;
        padding: 12px 8px 8px;
    }
    
    .calendar-rating-badge {
        font-size: 0.65rem;
        width: 24px;
        height: 24px;
    }
    
    .calendar-date-badge {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    .calendar-scroll-btn {
        width: 32px;
        height: 32px;
    }
}

/* Trending Trailers Section */
.trending-trailers-section {
    padding: 2rem 0;
    max-width: 1600px;
    margin: 0 auto;
    contain: layout style paint;
    overflow: hidden;
    position: relative;
    z-index: var(--z-content);
}

@media (min-width: 1920px) {
    .trending-trailers-section {
        max-width: 1800px;
    }
}

.trailers-scroll-container {
    position: relative;
    padding: 0 1rem;
}

.trailers-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.trailers-scroll-btn:hover {
    background: rgba(229, 9, 20, 0.95);
    border-color: #e50914;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.4);
}

.trailers-scroll-btn.left {
    left: 10px;
}

.trailers-scroll-btn.right {
    right: 10px;
}

.trailers-scroll-btn:disabled {
    opacity: 0.8;
    cursor: pointer;
}

.trailers-content {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.trailers-content::-webkit-scrollbar {
    display: none;
}

.trailers-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    min-height: 300px;
    width: 100%;
}

.trailers-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.trailer-card {
    flex: 0 0 300px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(229, 9, 20, 0.15);
    transition: all 0.3s ease;
    height: 200px;
    width: 300px;
    contain: layout style paint;
    overflow: hidden;
    position: relative;
    z-index: var(--z-content);
}

/* Removed hover effect for performance */

.trailer-poster-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.trailer-poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.trailer-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    backdrop-filter: blur(5px);
}

/* Removed hover effect for performance */

.trailer-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: var(--text-secondary);
}

.trailer-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.trailer-placeholder p {
    font-size: 0.8rem;
    margin: 0;
}

.trailer-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    color: white;
    padding: 20px 12px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 3px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.trailer-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: var(--z-elevated);
    text-transform: uppercase;
}

.trailer-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: var(--z-elevated);
}

/* Responsive Design for Trailers */
@media (max-width: 768px) {
    .trending-trailers-section {
        padding: 1.5rem 0;
    }

    .trailers-scroll-container {
        padding: 0 0.5rem;
    }
    
    .trailer-card {
        flex: 0 0 250px;
        height: 180px;
        width: 250px;
    }
    
    .trailer-play-overlay {
        width: 50px;
        height: 50px;
        font-size: 0.9rem;
    }
    
    .trailer-info {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .trailer-type-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .trailer-rating-badge {
        font-size: 0.7rem;
        width: 28px;
        height: 28px;
    }

    .no-trailer-badge {
        font-size: 0.6rem;
        padding: 0.3rem 0.5rem;
    }
    
    .trailers-scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
    
    .trailers-scroll-btn.left {
        left: 5px;
    }
    
    .trailers-scroll-btn.right {
        right: 5px;
    }

    .trailers-content {
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .trailers-loading {
        min-height: 250px;
        padding: 2rem 0.5rem;
    }

    .trailers-empty,
    .trailers-error {
        padding: 3rem 1rem;
        min-height: 250px;
    }

    .trailers-empty i,
    .trailers-error i {
        font-size: 3rem;
    }

    .trailers-empty h3,
    .trailers-error h3 {
        font-size: 1.2rem;
    }

    .trailers-empty p,
    .trailers-error p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .trending-trailers-section {
        padding: 1rem 0;
    }

    .trailers-scroll-container {
        padding: 0 0.25rem;
    }

    .trailers-scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 0.7rem;
    }

    .trailers-scroll-btn.left {
        left: 2px;
    }

    .trailers-scroll-btn.right {
        right: 2px;
    }

    .trailers-content {
        gap: 0.5rem;
        padding: 0 0.25rem;
    }

    .trailer-card {
        flex: 0 0 200px;
        height: 150px;
        width: 200px;
    }

    .trailer-play-overlay {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .trailer-info {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .trailer-type-badge,
    .trailer-rating-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .trailer-rating-badge {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }

    .no-trailer-badge {
        font-size: 0.55rem;
        padding: 0.25rem 0.4rem;
    }

    .trailers-loading {
        min-height: 200px;
        padding: 1.5rem 0.25rem;
    }

    .trailers-empty,
    .trailers-error {
        padding: 2rem 0.5rem;
        min-height: 200px;
    }

    .trailers-empty i,
    .trailers-error i {
        font-size: 2.5rem;
    }

    .trailers-empty h3,
    .trailers-error h3 {
        font-size: 1.1rem;
    }

    .trailers-empty p,
    .trailers-error p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .trailers-scroll-container {
        padding: 0;
    }
    
    .trailer-card {
        flex: 0 0 200px;
        height: 160px;
        width: 200px;
    }
    
    .trailer-play-overlay {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .trailer-info {
        font-size: 0.75rem;
        padding: 12px 8px 8px;
    }
    
    .trailer-type-badge {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    .trailer-rating-badge {
        font-size: 0.65rem;
        width: 24px;
        height: 24px;
    }
    
    .trailers-scroll-btn {
        width: 32px;
        height: 32px;
    }
}

/* Trailers Empty and Error States */
.trailers-empty,
.trailers-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    grid-column: 1 / -1;
    min-height: 300px;
}

.trailers-empty i,
.trailers-error i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
    color: var(--primary-color);
}

.trailers-empty h3,
.trailers-error h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.trailers-empty p,
.trailers-error p {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Calendar Empty and Error States */
.calendar-empty,
.calendar-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    grid-column: 1 / -1;
    min-height: 300px;
}

.calendar-empty i,
.calendar-error i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
    color: var(--primary-color);
}

.calendar-empty h3,
.calendar-error h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.calendar-empty p,
.calendar-error p {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.retry-btn:hover {
    background: #f40612;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
}

.trending-section .genre-header {
    padding: 0 1rem;
}

.trending-scroll-container {
    position: relative;
}

.trending-content {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.trending-content::-webkit-scrollbar {
    display: none;
}

.trending-card {
    flex: 0 0 160px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(229, 9, 20, 0.15);
    transition: all 0.3s ease;
    height: 240px;
    width: 160px;
}

/* Removed hover effect for performance */

.trending-poster {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

/* Removed hover effect for performance */




.no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    color: #666;
}

.no-image-placeholder i {
    font-size: 2rem;
}

.trending-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.trending-scroll-btn:hover {
    background: rgba(229, 9, 20, 0.95);
    border-color: #e50914;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.4);
}

.trending-scroll-btn.left {
    left: 10px;
}

.trending-scroll-btn.right {
    right: 10px;
}

.trending-scroll-btn:disabled {
    opacity: 0.8;
    cursor: pointer;
}

/* Trending Content Styles */
.trending-content {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.trending-content::-webkit-scrollbar {
    display: none;
}

/* Removed duplicate .trending-card definition - using the one at line 3493 */

.trending-poster {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

/* Removed hover effect for performance */

.trending-poster-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 2rem;
}

.trending-title-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    color: white;
    padding: 20px 12px 12px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 3px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.trending-year-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: var(--z-elevated);
}

.trending-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: var(--z-elevated);
}

.trending-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: var(--z-elevated);
    text-transform: uppercase;
}

/* Responsive Design for Trending Section */
@media (max-width: 768px) {
    .trending-section {
        padding: 1rem 0;
    }

    .trending-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .trending-title {
        font-size: 1.25rem;
    }

    .trending-content {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
}


/* Trending Filter Dropdown - Global Styles */
.trending-filter-dropdown {
    position: relative;
    display: inline-block;
}

.trending-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e50914;
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.trending-filter-btn:hover {
    background: linear-gradient(45deg, #dc2626, #ea580c, #e11d48, #be185d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}


.trending-filter-btn.open i {
    transform: rotate(180deg);
}

.trending-filter-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-top: 0.5rem;
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

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

.trending-filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.trending-filter-option:first-child {
    border-radius: 12px 12px 0 0;
}

.trending-filter-option:last-child {
    border-radius: 0 0 12px 12px;
}

.trending-filter-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.trending-filter-option.active {
    background: rgba(229, 9, 20, 0.2);
    color: #e50914;
}

.trending-filter-option i {
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nav {
        padding: 0.4rem 0.5rem;
        min-height: 50px;
    }
    
    .logo {
        padding-left: 0.5rem;
    }
    
    .navbar-controls {
        margin-left: 0.5rem;
        gap: 0.25rem;
        padding-right: 0.5rem;
    }
    
    .search-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .search-dropdown-content {
        width: 320px;
        right: -50px;
    }
    
    .search-input-container {
        padding: 0.75rem;
    }
    
    .search-input {
        font-size: 0.9rem;
    }
    
    .search-results-content {
        max-height: 90vh;
        margin: 0.5rem;
    }
    
    .search-results-header {
        padding: 1rem 1.5rem;
    }
    
    .search-results-header h3 {
        font-size: 1.2rem;
    }
    
    .search-results-body {
        padding: 0.75rem 1.5rem 1.5rem;
    }
    
    .search-results-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .search-content-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.6rem;
    }
    
    .search-results-section .search-results-title {
        font-size: 1.1rem;
    }
    
    .search-results-container {
        padding: 0.9rem;
    }
    
    .search-section-title {
        font-size: 0.95rem;
    }
    
    .search-result-poster {
        height: 200px;
    }
    
    .search-result-info {
        padding: 0.75rem;
    }
    
    .search-result-title {
        font-size: 0.9rem;
    }
    
    .content-type-dropdown-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
        min-width: 70px;
        height: 28px;
    }
    
    .content-type-dropdown-menu {
        left: -50%;
        right: -50%;
        width: 200%;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section - v2.1 */
.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    overflow: hidden;
    padding: 1.5rem 0;
    margin-top: 65px; /* Space for fixed navbar */
    border-bottom: 3px solid #e50914;
}

/* Remove top margin on tablet and mobile */
@media (max-width: 768px) {
    .hero {
        margin-top: 0;
    }
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-color: #000000; /* Fallback when no image */
    transition: opacity 0.6s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 2;
}

.hero-content {
    text-align: center;
    z-index: 3;
    position: relative;
    max-width: 900px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-movie-info {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 1px 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
    transition: opacity 0.6s ease-in-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 1px 1px 2px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    transition: opacity 0.6s ease-in-out;
}

/* TMDb logo inside hero title */
.hero-title .hero-logo {
    max-width: 70%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}

/* Logo/text stacking: show either text or logo */
.hero-title .hero-title-text { display: inline-block; }
.hero-title .hero-title-logo { display: block; }

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.3s both;
    transition: opacity 0.6s ease-in-out;
}

.hero-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    min-width: auto;
    width: 100%;
    max-width: 500px;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hero-action-btn.primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    border: 2px solid #3b82f6;
}

.hero-action-btn.primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.hero-action-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-action-btn.secondary#heroDetailsBtn {
    background: rgba(59, 130, 246, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #60a5fa;
}

.hero-action-btn.secondary#heroDetailsBtn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Desktop-specific hero button width */
@media (min-width: 1024px) {
    .hero-action-btn {
        width: 500px;
        max-width: 500px;
    }
}

.hero-indicators {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.4;
    border: none;
}

.hero-indicator.active {
    background: white;
    transform: scale(1.2);
    opacity: 1;
    box-shadow: none;
}

.hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 2px solid #3b82f6;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 4;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.hero-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: #2563eb;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.hero-nav-btn.prev {
    left: 2rem;
}

.hero-nav-btn.next {
    right: 2rem;
}

/* Search Container */
.search-container {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.4rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.search-icon {
    color: var(--text-muted);
    margin: 0 1rem;
    font-size: 1.2rem;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.8rem 0;
}

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

.search-btn {
    background: #3b82f6;
    border: 2px solid #3b82f6;
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.search-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.clear-search-btn {
    background: var(--dark-tertiary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-left: 0.5rem;
    will-change: opacity, transform;
}

.clear-search-btn.hidden {
    display: none;
}

.clear-search-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

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

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.suggestion-item:hover {
    background: var(--dark-tertiary);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.suggestion-info h4 {
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
}

.suggestion-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.suggestion-rating {
    background: var(--rating-green);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: auto;
}

/* Main Content */
.main {
    padding: 0;
    padding-top: 65px; /* Use padding instead of margin for glass effect */
    min-height: auto;
    margin-top: 0; /* Changed from 60px to allow content under navbar */
    max-width: 100vw;
    overflow-x: hidden;
}

/* Trending Section */
.trending-section {
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
}

.trending-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.section-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.trending-tabs {
    display: flex;
    gap: 0.5rem;
}

.trending-tab {
    font-family: 'Fredoka', sans-serif;
    background: var(--dark-secondary);
    color: var(--text-secondary);
    border: 2px solid transparent;
    background: linear-gradient(var(--dark-secondary), var(--dark-secondary)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.1);
    font-size: 0.85rem;
}

.trending-tab:hover,
.trending-tab.active {
    background: #e50914;
    color: white;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
}

.trending-movies {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.5rem 0;
    scroll-behavior: smooth;
    position: relative;
    max-width: 100%;
    width: 100%;
}

/* Custom scrollbar for trending section */
.trending-movies::-webkit-scrollbar {
    height: 6px;
}

.trending-movies::-webkit-scrollbar-track {
    background: var(--dark-tertiary);
    border-radius: 3px;
}

.trending-movies::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.trending-movies::-webkit-scrollbar-thumb:hover {
    background: #ff6b35;
}

/* Firefox scrollbar */
.trending-movies {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--dark-tertiary);
}

/* Scroll buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.8;
}

.scroll-btn:hover {
    background: var(--dark-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-left {
    left: -20px;
}

.scroll-right {
    right: -20px;
}

.scroll-btn i {
    font-size: 0.9rem;
}

/* Hide scroll buttons on mobile */
@media (max-width: 768px) {
    .scroll-btn {
        display: none;
    }
}



.trending-menu {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 15;
    backdrop-filter: blur(4px);
    font-size: 0.8rem;
}

.trending-menu:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Context Menu */
.context-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

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

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.context-menu-item:hover {
    background: #f5f5f5;
    color: #000;
}

.context-menu-item i {
    width: 16px;
    text-align: center;
    color: #666;
}

.context-menu-item:hover i {
    color: #000;
}

/* No Image Placeholder */
.no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    gap: 0.5rem;
    border-radius: 8px;
}

.no-image-placeholder i {
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.7;
}

.no-image-placeholder span {
    font-weight: 500;
}

.no-image-placeholder-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--dark-secondary);
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    min-height: 400px;
    width: 100%;
}

.no-image-placeholder-large i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--primary-color);
}

/* Movies Section */
.movies-section {
    margin-top: 0.5rem;
}

/* Filter Header */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Sort Dropdown */
.sort-dropdown {
    position: relative;
}

.sort-btn {
    font-family: 'Fredoka', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
}

.sort-btn:hover {
    background: var(--dark-tertiary);
    border-color: var(--primary-color);
    color: var(--text-primary);
}



.sort-btn.active i:last-child {
    transform: rotate(180deg);
}

.sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    padding: 0.4rem 0;
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

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

.sort-option {
    display: block;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.sort-option:hover {
    background: var(--dark-tertiary);
    color: var(--text-primary);
}

.sort-option.active {
    background: var(--primary-color);
    color: white;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: var(--dark-secondary);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border-color);
}

.view-btn {
    font-family: 'Fredoka', sans-serif;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.view-btn:hover {
    color: var(--text-primary);
    background: var(--dark-tertiary);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.filter-btn {
    font-family: 'Fredoka', sans-serif;
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.loading.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.movies-grid.list-view {
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.movies-grid.list-view .movie-card {
    display: flex;
    flex-direction: row;
    height: 180px;
    min-height: 180px;
}

.movies-grid.list-view .movie-poster {
    width: 140px;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
}

.movies-grid.list-view .movie-info {
    flex: 1;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
    height: 100%;
}

.movies-grid.list-view .movie-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
}

.movies-grid.list-view .movie-overview {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    flex: 1;
    min-height: 4.2rem; /* 3 lines * 1.4 line-height * 0.9rem font-size */
    max-height: 4.2rem;
}

.movies-grid.list-view .movie-overview.truncated::after {
    content: "Read more";
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.5rem;
}

.movies-grid.list-view .movie-overview:empty::before {
    content: "No description available";
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.7;
}

.movies-grid.list-view .movie-overview.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
}

.movies-grid.list-view .movie-meta {
    margin-bottom: 0;
        margin-top: auto;
        flex-shrink: 0;
        gap: 0.5rem;
        padding: 0.3rem 0;
    }
    
    .movies-grid.list-view .movie-rating-badges {
        gap: 0.5rem;
    }
    
    .movies-grid.list-view .movie-rating .rating-circle {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .movies-grid.list-view .movie-rating-badge {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .movies-grid.list-view .movie-year {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
    

.movie-card {
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    background: linear-gradient(var(--dark-secondary), var(--dark-secondary)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    position: relative;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.15);
}


/* Removed hover effect for performance */

.movie-poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
}


.movie-rating .rating-circle {
    z-index: 10;
    position: relative;
}

.movie-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
}

.movie-overview {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    min-height: 4.5rem;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    margin-top: auto;
    flex-shrink: 0;
    padding: 0.5rem 0;
    width: 100%;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.movie-rating .rating-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.15);
    border: 2x solid greenyellow
}

.movie-rating .rating-circle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: #e50914;
    z-index: -1;
}

.movie-rating .rating-circle.green,
.movie-rating .rating-circle.orange,
.movie-rating .rating-circle.red {
    background: transparent;
}

.movie-year {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    margin-left: auto;
    border: 2px solid transparent;
    background: linear-gradient(var(--dark-tertiary), var(--dark-tertiary)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.15);
    transition: all 0.3s ease;
}

.movie-rating-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: space-between;
}

.movie-rating-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.movie-rating-badge.pg-13 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.movie-rating-badge.pg {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.movie-rating-badge.r {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.movie-rating-badge.g {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.movie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 1.5rem;
}

.load-more-btn {
    font-family: 'Fredoka', sans-serif;
    background: var(--gradient);
    border: none;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--dark-secondary);
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color);
    animation: slideInUp 0.3s ease;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

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

.modal-body {
    padding: 2rem;
}

.modal-movie {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.modal-poster {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.modal-info h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-overview {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    background: var(--dark-tertiary);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #e50914;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(45deg, #dc2626, #ea580c, #e11d48, #be185d);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.6);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* Watch Providers Modal Styles */
.watch-providers-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.watch-providers-modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.watch-providers-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #00d4aa 0%, #00a8cc 100%);
}

.watch-providers-modal-header h3 {
    font-family: 'Fredoka', sans-serif;
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
}

.watch-providers-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.watch-providers-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.watch-providers-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.loading-watch-providers {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.watch-providers-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.provider-section h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
}

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

.provider-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.provider-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.provider-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.provider-name {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}
    
    .watch-providers-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .provider-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .provider-item {
        padding: 0.75rem;
    }
    
    .provider-logo {
        width: 35px;
        height: 35px;
    }
    
    .provider-name {
        font-size: 0.8rem;
    }
    
    .no-watch-options {
        text-align: center;
        padding: 2rem;
    }
    
    .no-options-icon {
        font-size: 3rem;
        color: var(--text-secondary);
        margin-bottom: 1rem;
    }
    
    .no-watch-options h3 {
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }
    
    .no-watch-options p {
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
    }
    
    .alternative-options {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 1rem;
        text-align: left;
    }
    
    .alternative-options h4 {
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }
    
    .alternative-options ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .alternative-options li {
        color: var(--text-secondary);
        padding: 0.25rem 0;
        position: relative;
        padding-left: 1.5rem;
    }
    
    .alternative-options li:before {
        content: "•";
        color: var(--accent-color);
        position: absolute;
        left: 0;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        padding: 0.3rem 0.2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    
    .content-type-switcher {
        display: none;
    }
    
    .logo {
        gap: 0.4rem;
    }
    
    .logo-text {
        display: none !important;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .hero {
        min-height: 35vh;
        padding: 1rem 0;
        margin-top: 65px; /* Space for fixed navbar */
        background: transparent; /* Ensure no black background */
    }
    
    .hero-title {
        font-size: 2rem;
        text-align: center;
        margin-top: 0;
        color: white;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        max-width: 300px;
    }
    
    
    .hero-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .hero-nav-btn.prev {
        left: 1rem;
    }
    
    .hero-nav-btn.next {
        right: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.6rem;
        align-items: center;
    }
    
    .search-input {
        text-align: center;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.8rem;
        justify-items: center;
    }
    
    .movie-card {
        text-align: center;
        min-height: 380px;
    }
    
    .movie-info {
        padding: 1rem;
    }
    
    .movie-overview {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: 3rem;
    }
    
    .trending-movie-card {
        flex: 0 0 140px;
    }
    
    /* Removed conflicting responsive trending styles */
    
    .movie-poster {
        height: 220px;
        margin: 0 auto;
    }
    
    .movies-grid.list-view .movie-card {
        height: 140px;
        min-height: 140px;
    }
    
    .movies-grid.list-view .movie-poster {
        width: 100px;
    }
    
    .movies-grid.list-view .movie-info {
        padding: 1rem;
        height: 100%;
    }
    
    .movies-grid.list-view .movie-title {
        font-size: 1rem;
    }
    
    .movies-grid.list-view .movie-overview {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: 2.8rem; /* 2 lines * 1.4 line-height * 0.8rem font-size */
        max-height: 2.8rem;
    }
    
    
    /* Removed conflicting responsive trending styles */
    
    .modal-movie {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-details {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .filter-tabs {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .load-more-btn {
        margin: 0 auto;
        display: block;
    }
    
    .no-results {
        text-align: center;
    }
    
    .no-results h3,
    .no-results p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 4px;
    }
    
    .nav {
        padding: 0.3rem 0.5rem;
        min-height: 45px;
    }
    
    .logo {
        padding-left: 0.25rem;
    }
    
    .navbar-controls {
        padding-right: 0.25rem;
    }
    
    .search-dropdown-content {
        width: 280px;
        right: -80px;
    }
    
    .search-results-content {
        margin: 0.25rem;
        max-height: 95vh;
    }
    
    .search-results-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .search-content-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .search-results-section .search-results-title {
        font-size: 1rem;
    }
    
    .search-results-container {
        padding: 0.75rem;
    }
    
    .search-section-title {
        font-size: 0.9rem;
    }
    
    .search-result-poster {
        height: 160px;
    }
    
    .search-result-info {
        padding: 0.5rem;
    }
    
    .search-result-title {
        font-size: 0.8rem;
    }
    
    .search-result-overview {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .logo {
        gap: 0.4rem;
    }
    
    .logo-text {
        display: none !important;
    }
    
    .logo-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .hero {
        min-height: 30vh;
        margin-top: 0; /* Removed top margin */
    }
    
    .hero-title {
        font-size: 1.8rem;
        text-align: center;
        margin-top: 60px;
        color: white;
    }
    
    .movies-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .movie-card {
        text-align: center;
        min-height: 380px;
    }
    
    .movie-info {
        padding: 1rem;
    }
    
    .movie-overview {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        min-height: 3rem;
    }
    
    .trending-movie-card {
        flex: 0 0 140px;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem;
        text-align: center;
    }
    
    .modal-movie {
        text-align: center;
    }
    
    .modal-details {
        text-align: center;
    }
    
    .load-more-btn {
        margin: 0 auto;
        display: block;
    }
    
    .no-results {
        text-align: center;
    }
    
    .no-results h3,
    .no-results p {
        text-align: center;
    }
}

/* Movie Details Page */
.movie-details-main {
    padding: 1rem 0;
    min-height: 100vh;
    padding-top: 2rem;
    position: relative;
    z-index: 1;
}

.movie-details-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

@media (min-width: 1920px) {
    .movie-details-container {
        max-width: 1800px;
        padding: 0 1.5rem;
    }
}

.movie-details-hero {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    contain: layout;
    transform: translateZ(0);
    /* Transparent background - can be overridden by inline styles */
    background: rgba(12, 12, 12, 0.45) !important;
    background-color: rgba(12, 12, 12, 0.45) !important;
}

.anime-manga-hero {
    padding-top: 0.5rem;
    padding-bottom: 2rem;
    /* Simplified for performance */
    contain: layout;
    transform: translateZ(0);
}

/* Enhanced Anime/Manga Score Section */
.movie-details-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    position: relative;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-circle:hover {
    transform: none;
    box-shadow: 
        0 12px 48px rgba(59, 130, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.score-circle.green {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 
        0 8px 32px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.score-circle.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 
        0 8px 32px rgba(245, 158, 11, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.score-circle.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 
        0 8px 32px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.score-number {
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.score-label {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.score-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.score-item .score-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-item .score-value {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design for Score Section */
@media (max-width: 768px) {
    .movie-details-score {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.25rem;
        text-align: center;
    }
    
    .score-circle {
        width: 80px;
        height: 80px;
    }
    
    .score-number {
        font-size: 1.5rem;
    }
    
    .score-details {
        width: 100%;
    }
    
    .score-item {
        padding: 0.6rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .movie-details-score {
        padding: 1rem;
        gap: 1rem;
    }
    
    .score-circle {
        width: 70px;
        height: 70px;
    }
    
    .score-number {
        font-size: 1.3rem;
    }
    
    .score-label {
        font-size: 0.7rem;
    }
    
    .score-item .score-label {
        font-size: 0.8rem;
    }
    
    .score-item .score-value {
        font-size: 0.9rem;
    }
}

/* Enhanced Rating Badge and Meta Info */
.movie-details-rating-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.movie-details-rating-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.movie-details-rating-badge[data-rating="g"] {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.movie-details-rating-badge[data-rating="pg"] {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.movie-details-rating-badge[data-rating="pg-13"] {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.movie-details-rating-badge[data-rating="r"] {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.movie-details-release-date {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #f1f5f9;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.movie-details-release-date:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.movie-details-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

/* Responsive Meta Info */
@media (max-width: 768px) {
    .movie-details-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .movie-details-rating-badge,
    .movie-details-release-date {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .movie-details-rating-badge,
    .movie-details-release-date {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
}

.movie-details-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 1;
    opacity: 0.4;
}

.movie-details-backdrop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.9) 0%, rgba(13, 17, 23, 0.7) 50%, rgba(13, 17, 23, 0.95) 100%);
}

.movie-details-poster {
    position: relative;
    z-index: 50;
    flex: 0 0 300px;
    /* Simplified for performance */
    contain: layout;
    transform: translateZ(0);
}

.movie-details-info {
    position: relative;
    z-index: 1;
    border-top: 3px solid blue;
}

/* Backdrop Gallery Styles */
.backdrop-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.backdrop-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.backdrop-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.backdrop-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.backdrop-item:hover .backdrop-image {
    transform: none;
}

/* Image Modal Styles */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.movie-details-poster-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e50914;
    /* Simplified for performance */
    transform: translateZ(0);
}

/* Removed hover effect for performance */

.movie-details-rating {
    position: absolute;
    bottom: 0.8rem;
    left: 0.8rem;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    z-index: 15;
    border: 2px solid white;
}

.movie-details-rating:hover {
    transform: scale(1.1);
}

.movie-details-rating.green {
    background: #21d07a;
}

.movie-details-rating.orange {
    background: #d2d531;
}

.movie-details-rating.red {
    background: #db2360;
}

.movie-details-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    /* Simplified for performance */
    contain: layout;
    transform: translateZ(0);
}

.movie-details-header {
    margin-bottom: 1rem;
}

.movie-details-meta {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
}

.movie-details-rating-badge {
    background: #ff6b35;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Different colors for different ratings */
.movie-details-rating-badge[data-rating="g"] {
    background: #4CAF50 !important;
}

.movie-details-rating-badge[data-rating="pg"] {
    background: #2196F3 !important;
}

.movie-details-rating-badge[data-rating="pg-13"] {
    background: #FF9800 !important;
}

.movie-details-rating-badge[data-rating="r"] {
    background: #F44336 !important;
}

/* Content Rating Badges for Movie Cards */
.content-rating-badge {
    background: #ff6b35;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

/* Different colors for different ratings */
.content-rating-badge[data-rating="g"] {
    background: #4CAF50 !important;
}

.content-rating-badge[data-rating="pg"] {
    background: #2196F3 !important;
}

.content-rating-badge[data-rating="pg-13"] {
    background: #FF9800 !important;
}

.content-rating-badge[data-rating="r"] {
    background: #F44336 !important;
}

/* Content Rating Container */
.movie-content-rating,
.trending-content-rating,
.suggestion-content-rating {
    margin-top: 0.3rem;
    text-align: center;
}

.suggestion-content-rating {
    margin-top: 0.2rem;
}

.movie-details-release-date,
.movie-details-genres,
.movie-details-runtime {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.movie-details-release-date {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.3));
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.movie-details-genres {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.movie-details-runtime {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.movie-details-release-date:hover,
.movie-details-genres:hover,
.movie-details-runtime:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.movie-details-user-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 1rem 0;
}

.user-score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.user-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-score-circle:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.user-score-circle.green {
    background: #21d07a;
}

.user-score-circle.orange {
    background: #d2d531;
}

.user-score-circle.red {
    background: #db2360;
}

.user-score-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Ultra Compact Mood Section */
.mood-section-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    backdrop-filter: blur(5px);
}

.mood-title-compact {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

.mood-emojis-compact {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.mood-emoji-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.mood-emoji-compact:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mood-emoji-compact.active {
    transform: scale(1.15);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Removed pseudo effects for performance */

.mood-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mood-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.mood-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #e2e8f0 50%, 
        #cbd5e1 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mood-emojis {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mood-emoji {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

/* Removed pseudo effects for performance */

/* Removed hover effect for performance */

.mood-emoji.active {
    transform: translateY(-6px) scale(1.1);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.2), 
        rgba(147, 51, 234, 0.2)
    );
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 
        0 12px 32px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.emoji {
    font-size: 2rem;
}

/* Removed hover effect for performance */

.mood-emoji.active .emoji {
    transform: scale(1.3);
}

.mood-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mood-emoji.active .mood-label {
    color: #60a5fa;
    font-weight: 700;
}

.movie-details-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #86efac, #bef264, #fef3c7, #fefce8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.2;
}

.movie-details-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    background: linear-gradient(45deg, #86efac, #bef264, #fef3c7, #fefce8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0 0 0;
    opacity: 0.8;
    font-style: italic;
}

.movie-details-meta {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.movie-details-year,
.movie-details-runtime,
.movie-details-genres {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.movie-details-year {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.3));
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.movie-details-genres {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.movie-details-runtime {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.movie-details-year:hover,
.movie-details-runtime:hover,
.movie-details-genres:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}



.movie-details-overview h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.movie-details-overview p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.read-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.8rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.read-more-btn:hover {
    background: #ff6b35;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* View More Buttons */
.view-more-container {
    text-align: center;
    margin-top: 1rem;
}

.view-more-btn {
    background: #00bfff;
    color: white;
    border: 2px solid #00bfff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.3);
}

.view-more-btn:hover {
    background: #0099cc;
    border-color: #0099cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 191, 255, 0.4);
}

.floating-actions {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 100;
    padding: 0 1rem 1rem 1rem;
}

.floating-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Pseudo animations removed */

.floating-action-btn:hover {
    transform: translateY(-4px) scale(1.1);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.floating-action-btn.active {
    background: linear-gradient(135deg, 
        #ef4444 0%, 
        #dc2626 50%, 
        #b91c1c 100%
    );
    border-color: rgba(239, 68, 68, 0.5);
    color: white;
    box-shadow: 
        0 12px 48px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.floating-action-btn.active:hover {
    background: linear-gradient(135deg, 
        #f87171 0%, 
        #ef4444 50%, 
        #dc2626 100%
    );
}

.movie-details-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 100;
}

.action-btn.list-btn,
.action-btn.heart-btn,
.action-btn.bookmark-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.action-btn.play-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ff6b35;
    border: 2px solid #e65100;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.4);
}

.action-btn.list-btn:hover,
.action-btn.heart-btn:hover,
.action-btn.bookmark-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.action-btn.play-btn:hover {
    background: #ff6b35;
    border-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

/* Button state styles */
.action-btn.favorited {
    background: #e74c3c !important;
    color: white !important;
    border-color: #e74c3c !important;
}

.action-btn.watchlisted {
    background: #f39c12 !important;
    color: white !important;
    border-color: #f39c12 !important;
}

.action-btn.list-btn.active {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.action-btn.favorite-btn.active,
.anime-action-btn.active,
.manga-action-btn.active {
    background: #e74c3c !important;
    color: white !important;
    border-color: #e74c3c !important;
}

.action-btn.watchlist-btn.active {
    background: #f39c12 !important;
    color: white !important;
    border-color: #f39c12 !important;
}

/* Trailer Modal Styles */
.trailer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.trailer-modal-content {
    background: var(--dark-secondary);
    border-radius: 12px;
    width: 95%;
    max-width: 900px;
    max-height: 95vh;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    margin: 1rem;
}

.trailer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--dark-bg);
    flex-shrink: 0;
    min-height: 60px;
}

.trailer-modal-header h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.trailer-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.trailer-close-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.trailer-modal-body {
    padding: 1.5rem;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.trailer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.trailer-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.trailer-placeholder p {
    font-size: 1.1rem;
    margin: 0;
}

.trailer-note {
    font-size: 0.9rem !important;
    color: var(--text-secondary);
    opacity: 0.8;
}

.trailer-video-container {
    width: 100%;
    max-width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.trailer-video-container iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    max-height: 500px;
    border-radius: 8px;
    border: none;
    flex: 1;
}

.trailer-info {
    margin-top: 1rem;
    text-align: center;
}

.trailer-info h4 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.trailer-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.movie-quote {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
}

.movie-quote p {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

/* Pseudo animations removed */

.action-btn.primary {
    background: var(--gradient);
    color: white;
}

.action-btn.secondary {
    background: var(--dark-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.movie-details-stats {
    background: var(--dark-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    opacity: 1;
    transform: none;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* Additional Info Sections */
.movie-details-additional-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.info-section {
    background: var(--dark-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.info-section h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section h3 i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Cast & Crew Grid */
.cast-crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.cast-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: var(--dark-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cast-member:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cast-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.8rem;
    position: relative;
}

.cast-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-photo {
    width: 100%;
    height: 100%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.cast-info {
    width: 100%;
}

.cast-name {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.3rem 0;
    line-height: 1.2;
}

.cast-character {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.3;
}

/* Production Info */
.production-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.production-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.production-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.production-value {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Keywords */
.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.keyword-tag:hover {
    background: #ff6b35;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Release Info */
.release-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.release-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.release-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.release-value {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Loading and No Data States */
.loading-cast,
.loading-keywords,
.no-data {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

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

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.stat-value {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.floating-back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    animation: slideInLeft 0.6s ease-out;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.back-button {
    font-family: 'Fredoka', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid transparent;
    background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.back-button:hover {
    background: linear-gradient(rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.95)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    transform: translateX(5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

/* Search Page */
.search-main {
    padding: 1.5rem 0;
    min-height: 100vh;
}

.search-hero {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

.search-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.search-results {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1920px) {
    .search-results {
        max-width: 1800px;
        padding: 0 1.5rem;
    }
}

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

.search-results-header h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.search-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.no-results h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.no-results p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive Design for Movie Details */
@media (max-width: 768px) {
    .movie-details-hero {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 1rem;
    }
    
    .movie-details-poster {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .movie-details-poster-img {
        height: 350px;
        max-width: 250px;
        margin: 0 auto;
        display: block;
        border-radius: 8px;
        border: 2px solid #e50914;
    }
    
    .movie-details-info {
        background: rgba(15, 23, 42, 0.95);
        border-radius: 8px;
        padding: 1.5rem;
        margin-top: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        border-top:6px solid red;
    }
    
    .movie-details-title {
        font-size: 2.2rem;
        text-align: center;
        margin-top: 2rem;
        background: linear-gradient(45deg, #86efac, #bef264, #fef3c7, #fefce8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .movie-details-subtitle {
        font-size: 1.1rem;
        text-align: center;
        margin-top: 0.5rem;
        background: linear-gradient(45deg, #86efac, #bef264, #fef3c7, #fefce8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .movie-details-meta {
        justify-content: center;
        text-align: center;
    }
    
    .movie-details-user-section {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        align-items: center;
    }
    
    .user-score-section {
        align-items: center;
    }
    
    .mood-section-compact {
        padding: 0.3rem 0.6rem;
        gap: 0.4rem;
    }
    
    .mood-title-compact {
        font-size: 0.7rem;
    }
    
    .mood-emojis-compact {
        gap: 0.25rem;
    }
    
    .mood-emoji-compact {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }
    
    .mood-section {
        align-items: center;
        text-align: center;
        padding: 1rem;
    }
    
    .mood-emojis {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .mood-emoji {
        min-width: 70px;
        padding: 0.8rem;
    }
    
    .floating-actions {
        bottom: 0;
        gap: 0.4rem;
        padding: 0 0.8rem 0.8rem 0.8rem;
    }
    
    .floating-action-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .movie-details-actions {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .action-btn.list-btn,
    .action-btn.heart-btn,
    .action-btn.bookmark-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .action-btn.play-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .movie-quote {
        text-align: center;
    }
    
    .movie-quote p {
        text-align: center;
    }
    
    .movie-details-overview {
        text-align: center;
    }
    
    .movie-details-overview h3 {
        text-align: center;
    }
    
    .movie-details-overview p {
        text-align: center;
    }
    
    .read-more-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin: 0.8rem auto 0;
        display: block;
        width: fit-content;
    }
    
    .movie-details-stats {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .floating-back-button {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 9999;
        display: flex;
        gap: 0.4rem;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .back-button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .movie-details-additional-info {
        gap: 1.5rem;
    }
    
    .info-section {
        padding: 1rem;
        text-align: center;
    }
    
    .info-section h3 {
        text-align: center;
        justify-content: center;
    }
    
    .cast-crew-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
        justify-items: center;
    }
    
    .cast-member {
        padding: 0.8rem;
        text-align: center;
    }
    
    .cast-photo {
        width: 60px;
        height: 60px;
        margin: 0 auto 0.8rem;
    }
    
    .cast-name {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .cast-character {
        font-size: 0.75rem;
        text-align: center;
    }
    
    .production-info {
        text-align: center;
    }
    
    .production-item {
        text-align: center;
    }
    
    .production-label,
    .production-value {
        text-align: center;
    }
    
    .keywords-container {
        justify-content: center;
    }
    
    .keyword-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .release-info {
        text-align: center;
    }
    
    .release-item {
        text-align: center;
    }
    
    .release-label,
    .release-value {
        text-align: center;
    }
    
    .view-more-container {
        text-align: center;
    }
    
    .view-more-btn {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
    
    .loading-cast,
    .loading-keywords,
    .no-data {
        text-align: center;
    }
    
    .trailer-modal-content {
        width: 98%;
        margin: 0.5rem;
        max-height: 98vh;
        border-radius: 8px;
    }
    
    .trailer-modal-header {
        padding: 0.8rem 1rem;
        min-height: 50px;
    }
    
    .trailer-modal-header h3 {
        font-size: 1rem;
    }
    
    .trailer-close-btn {
        font-size: 1.2rem;
        padding: 0.3rem;
    }
    
    .trailer-modal-body {
        padding: 1rem;
    }
    
    .trailer-video-container iframe {
        min-height: 200px;
        max-height: 300px;
    }
    
    .trailer-placeholder i {
        font-size: 3rem;
    }
    
    .trailer-placeholder p {
        font-size: 1rem;
    }
    
    .trailer-note {
        font-size: 0.8rem !important;
    }
    
    .search-title {
        font-size: 2rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .movie-details-hero {
        padding: 0.75rem;
        gap: 0;
    }
    
    .movie-details-poster {
        margin-bottom: -50px;
        transform: translateY(25px);
    }
    
    .movie-details-poster-img {
        height: 300px;
        max-width: 200px;
    }
    
    .movie-details-info {
        padding: 1.75rem 1rem 1rem;
        margin-top: 25px;
    }
    
    /* Compact Time Display Overlay Responsive */
    .time-display-overlay {
        top: 0;
        transform: translateX(-50%) translateY(-50%);
        margin-top: 50px;
    }
    
    .time-display-content {
        min-width: 100px;
        padding: 0.4rem 0.8rem;
        gap: 0.6rem;
    }
    
    .time-main {
        font-size: 0.9rem;
    }
    
    .time-date {
        font-size: 0.65rem;
    }
}

/* Compact Time Display Overlay Responsive for 768px */
@media (max-width: 768px) {
    .time-display-overlay {
        top: 0;
        transform: translateX(-50%) translateY(-50%);
        margin-top: 50px;
    }
    
    .time-display-content {
        min-width: 110px;
        padding: 0.45rem 0.9rem;
        gap: 0.7rem;
    }
    
    .time-main {
        font-size: 0.95rem;
    }
    
    .time-date {
        font-size: 0.68rem;
    }
    }


.navbar-time-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 6px 12px;
    min-width: 80px;
    height: 32px;
    text-align: center;
    transition: all 0.3s ease;
    margin: 0 8px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.navbar-time-display:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: #60a5fa;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.navbar-time-display .time-main {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.navbar-time-display .time-date {
    display: none;
}

/* Navbar Time Display Responsive */
@media (max-width: 768px) {
    .navbar-time-display {
        padding: 4px 8px;
        min-width: 70px;
        margin: 0 4px;
    }
    
    .navbar-time-display .time-main {
        font-size: 13px;
    }
    
    .navbar-time-display .time-date {
        display: none;
    }
}

@media (max-width: 480px) {
    .navbar-time-display {
        padding: 3px 6px;
        min-width: 60px;
        margin: 0 2px;
    }
    
    .navbar-time-display .time-main {
        font-size: 12px;
    }
    
    .navbar-time-display .time-date {
        display: none;
    }
    }
    
    .movie-details-title {
        font-size: 1.8rem;
        text-align: center;
        margin-top: 1.5rem;
        background: linear-gradient(45deg, #86efac, #bef264, #fef3c7, #fefce8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .movie-details-subtitle {
        font-size: 1rem;
        text-align: center;
        margin-top: 0.4rem;
        background: linear-gradient(45deg, #86efac, #bef264, #fef3c7, #fefce8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .movie-details-meta {
        justify-content: center;
        text-align: center;
        flex-wrap: wrap;
    }
    
    .movie-details-user-section {
        gap: 1rem;
        text-align: center;
        align-items: center;
    }
    
    .user-score-circle {
        width: 70px;
        height: 70px;
        font-size: 1rem;
    }
    
    .mood-section-compact {
        padding: 0.25rem 0.5rem;
        gap: 0.3rem;
    }
    
    .mood-title-compact {
        font-size: 0.65rem;
    }
    
    .mood-emojis-compact {
        gap: 0.2rem;
    }
    
    .mood-emoji-compact {
        width: 22px;
        height: 22px;
        font-size: 0.85rem;
    }
    
    .mood-section {
        align-items: center;
        text-align: center;
        padding: 0.8rem;
    }
    
    .mood-emojis {
        gap: 0.6rem;
    }
    
    .mood-emoji {
        min-width: 60px;
        padding: 0.6rem;
    }
    
    .emoji {
        font-size: 1.5rem;
    }
    
    .mood-label {
        font-size: 0.7rem;
    }
    
    .floating-actions {
        bottom: 0;
        gap: 0.3rem;
        padding: 0 0.6rem 0.6rem 0.6rem;
    }
    
    .floating-action-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .movie-details-actions {
        justify-content: center;
        gap: 0.6rem;
    }
    
    .action-btn.list-btn,
    .action-btn.heart-btn,
    .action-btn.bookmark-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .action-btn.play-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .movie-quote {
        text-align: center;
        padding: 0.8rem;
    }
    
    .movie-quote p {
        text-align: center;
        font-size: 0.9rem;
    }
    
    .movie-details-overview {
        text-align: center;
    }
    
    .movie-details-overview h3 {
        text-align: center;
        font-size: 1rem;
    }
    
    .movie-details-overview p {
        text-align: center;
        font-size: 0.85rem;
    }
    
    .read-more-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        margin: 0.6rem auto 0;
    }
    
    .movie-details-stats {
        padding: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .info-section {
        padding: 0.8rem;
        text-align: center;
    }
    
    .info-section h3 {
        text-align: center;
        justify-content: center;
        font-size: 1rem;
    }
    
    .cast-crew-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.6rem;
        justify-items: center;
    }
    
    .cast-member {
        padding: 0.6rem;
        text-align: center;
    }
    
    .cast-photo {
        width: 50px;
        height: 50px;
        margin: 0 auto 0.6rem;
    }
    
    .cast-name {
        font-size: 0.75rem;
        text-align: center;
    }
    
    .cast-character {
        font-size: 0.7rem;
        text-align: center;
    }
    
    .production-info,
    .release-info {
        text-align: center;
    }
    
    .production-item,
    .release-item {
        text-align: center;
    }
    
    .production-label,
    .production-value,
    .release-label,
    .release-value {
        text-align: center;
        font-size: 0.85rem;
    }
    
    .keywords-container {
        justify-content: center;
    }
    
    .keyword-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .view-more-container {
        text-align: center;
    }
    
    .view-more-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    .loading-cast,
    .loading-keywords,
    .no-data {
        text-align: center;
        font-size: 0.85rem;
    }
    
    .trailer-modal-content {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }
    
    .trailer-modal-header {
        padding: 0.6rem 0.8rem;
        min-height: 45px;
    }
    
    .trailer-modal-header h3 {
        font-size: 0.9rem;
    }
    
    .trailer-close-btn {
        font-size: 1.1rem;
        padding: 0.2rem;
    }
    
    .trailer-modal-body {
        padding: 0.8rem;
    }
    
    .trailer-video-container iframe {
        min-height: 180px;
        max-height: 250px;
    }
    
    .trailer-placeholder i {
        font-size: 2.5rem;
    }
    
    .trailer-placeholder p {
        font-size: 0.9rem;
    }
    
    .trailer-note {
        font-size: 0.75rem !important;
}

/* Large Desktop Screens */
@media (min-width: 1200px) {
    .trailer-modal-content {
        max-width: 1000px;
        width: 90%;
    }
    
    .trailer-video-container iframe {
        min-height: 400px;
        max-height: 600px;
    }
}

/* Ultra-wide Screens */
@media (min-width: 1600px) {
    .trailer-modal-content {
        max-width: 1200px;
        width: 85%;
    }
    
    .trailer-video-container iframe {
        min-height: 500px;
        max-height: 700px;
    }
}

/* Mobile Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .trailer-modal-content {
        width: 95%;
        height: 95vh;
        margin: 0.5rem;
    }
    
    .trailer-modal-header {
        padding: 0.5rem 1rem;
        min-height: 40px;
    }
    
    .trailer-modal-body {
        padding: 0.8rem;
    }
    
    .trailer-video-container iframe {
        min-height: 150px;
        max-height: 200px;
    }
    
    .trailer-placeholder i {
        font-size: 2rem;
    }
    
    .trailer-placeholder p {
        font-size: 0.8rem;
    }
    
    .trailer-note {
        font-size: 0.7rem !important;
    }
}

/* Tablet Portrait */
@media (min-width: 481px) and (max-width: 1024px) and (orientation: portrait) {
    .trailer-modal-content {
        width: 90%;
        max-width: 600px;
    }
    
    .trailer-video-container iframe {
        min-height: 250px;
        max-height: 400px;
    }
}

/* Tablet Landscape */
@media (min-width: 481px) and (max-width: 1024px) and (orientation: landscape) {
    .trailer-modal-content {
        width: 90%;
        max-width: 800px;
    }
    
    .trailer-video-container iframe {
        min-height: 200px;
        max-height: 350px;
    }
}
    
    .search-results-header {
        flex-direction: column;
        align-items: stretch;
    }

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Old shimmer animation removed for performance */


/* Simple loading spinner */
.loading .spinner {
    animation: spin 1s linear infinite;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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


/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile responsive styles for search results */
@media (max-width: 768px) {
    .search-result-item {
        padding: 0.6rem 0.8rem;
        min-height: 50px;
    }
    
    .search-result-poster {
        width: 35px;
        height: 50px;
    }
    
    .search-result-title {
        font-size: 0.9rem;
    }
    
    .search-result-meta {
        gap: 0.5rem;
        font-size: 0.75rem;
    }
    
    .search-result-type {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .search-result-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .search-result-actions {
        gap: 0.3rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* DMCA Footer Styles */
.dmca-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.dmca-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.6;
}

.dmca-content h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
}

.dmca-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.dmca-content ul {
    margin: 1rem 0 1.5rem 1.5rem;
    padding: 0;
}

.dmca-content li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.dmca-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.dmca-note {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
}

.dmca-note em {
    color: #ffc107;
    font-style: italic;
}

/* Footer Social Media Styles */
.footer-social {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-social h4 {
    color: var(--text-primary);
    font-family: 'Fredoka', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-link.telegram {
    color: #0088cc;
}

.social-link.telegram:hover {
    background: rgba(0, 136, 204, 0.1);
    border-color: #0088cc;
    color: #00a8e8;
}

.social-link i {
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main {
        margin-top: 70px; /* Smaller margin for mobile */
    }
    
    .trending-section {
        padding: 1rem 0;
    }
    
    .trending-section .genre-header {
        padding: 0 1rem;
    }
    
    .trending-content {
        padding: 0 1rem;
    }
    
    .trending-card {
        flex: 0 0 160px;
        height: 220px;
        width: 160px;
    }
    
    .trending-title-text {
        font-size: 0.9rem;
        padding: 15px 10px 10px;
    }
    
    .trending-rating-badge {
        font-size: 0.7rem;
        width: 28px;
        height: 28px;
    }
    
    .trending-year-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    /* Overall page padding adjustments for tablet */
    .genre-section {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .genre-section-header {
        padding: 0 1rem;
    }
    
    .genre-cards-scroll {
        padding: 0 1rem;
    }
    
    .dmca-footer {
        padding: 2rem 0 1.5rem;
        margin-top: 2rem;
    }
    
    .dmca-content {
        padding: 0 1rem;
    }
    
    .dmca-content h3 {
        font-size: 1.3rem;
    }
    
    .dmca-content p,
    .dmca-content li {
        font-size: 0.85rem;
    }
    
    .footer-social {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .footer-social h4 {
        font-size: 1rem;
    }
    
    .social-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .social-link i {
        font-size: 1rem;
    }
}

/* Comprehensive Overflow Prevention */
* {
    max-width: 100%;
}

/* Ensure all text doesn't overflow */
h1, h2, h3, h4, h5, h6, p, span, div, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Fix for any remaining overflow issues */
body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Ensure all containers respect viewport */
.container, .main, .hero-section, .movies-section, .anime-section, .manga-section, 
.trending-section, .genre-sections, .movie-details-main, .movie-details-container {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Fix for any flex containers that might overflow */
.flex, .d-flex, [class*="flex-"] {
    min-width: 0;
    max-width: 100%;
}

/* Fix for grid containers */
.grid, .d-grid, [class*="grid-"] {
    max-width: 100%;
    overflow-x: hidden;
}

/* Mobile-specific overflow fixes */
@media (max-width: 768px) {
    * {
        max-width: 100vw;
    }
    
    .container, .main, .hero-section, .movies-section, .anime-section, .manga-section {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}

@media (max-width: 480px) {
    .container, .main, .hero-section, .movies-section, .anime-section, .manga-section {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    
    .trending-section {
        padding: 0.5rem 0;
    }
    
    .trending-section .genre-header {
        padding: 0 0.2rem;
    }
    
    .trending-content {
        padding: 0 0.5rem;
    }
    
    .trending-card {
        flex: 0 0 140px;
        height: 200px;
        width: 140px;
    }
    
    .trending-title-text {
        font-size: 0.8rem;
        padding: 12px 8px 8px;
    }
    
    .trending-rating-badge {
        font-size: 0.65rem;
        width: 24px;
        height: 24px;
    }
    
    .trending-year-badge {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    /* Overall page padding adjustments for mobile */
    .genre-section {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .genre-section-header {
        padding: 0 0.5rem;
    }
    
    .genre-cards-scroll {
        padding: 0 0.5rem;
    }
}

/* Staff & Cast Section */
.anime-staff-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.anime-staff-section h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.staff-content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.staff-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 100%;
}

.staff-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.staff-section h4 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.staff-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.staff-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.staff-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.staff-role {
    color: var(--text-secondary);
    font-size: 0.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.staff-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
    gap: 1rem;
}

.staff-loading .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design for Staff Section */
@media (max-width: 768px) {
    .anime-staff-section {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    
    .anime-staff-section h3 {
        font-size: 1.3rem;
        margin-bottom: 1.25rem;
    }
    
    .staff-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .staff-section {
        padding: 1rem;
    }
    
    .staff-section h4 {
        font-size: 1rem;
    }
    
    .staff-list {
        max-height: 300px;
    }
    
    .staff-item {
        padding: 0.6rem;
    }
    
    .staff-name {
        font-size: 0.85rem;
    }
    
    .staff-role {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .anime-staff-section {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .anime-staff-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .staff-container {
        gap: 1.25rem;
    }
    
    .staff-section {
        padding: 0.75rem;
    }
    
    .staff-section h4 {
        font-size: 0.95rem;
    }
    
    .staff-list {
        max-height: 250px;
        gap: 0.6rem;
    }
    
    .staff-item {
        padding: 0.5rem;
    }
    
    .staff-name {
        font-size: 0.8rem;
    }
    
    .staff-role {
        font-size: 0.7rem;
    }
}

/* Genre Headings and Cards */
.genres-container {
    margin: 2rem 0;
    max-width: 100%;
    padding: 0;
}

.genre-group {
    margin-bottom: 3rem;
}

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

.genre-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-left: 0.5rem;
    border-left: 4px solid var(--primary-color);
    margin: 0;
}

/* Duplicate view-more-btn style - using main style above */

.view-more-btn i {
    font-size: 0.8rem;
}

.view-more-btn:hover i {
    transform: translateX(2px);
}

.genre-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 160px);
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.genre-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(229, 9, 20, 0.15);
    transition: all 0.3s ease;
    height: 240px;
    width: 160px;
    flex-shrink: 0;
}

.genre-card:hover {
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(229, 9, 20, 0.3);
}

.genre-card .card-poster-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.genre-card .card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 3rem;
}

/* Year badge - top left like the poster */
.genre-card .card-year-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Rating badge - top right like the poster */
.genre-card .card-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Title at bottom - like the poster */
.genre-card .card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    color: white;
    padding: 20px 12px 12px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 3px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Loading state for genre cards */
.genre-card.loading {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .genres-container {
        padding: 0;
    }
    
    .genre-group {
        margin-bottom: 2rem;
    }
    
    .genre-header {
        margin-bottom: 0.8rem;
    }
    
    .genre-heading {
        font-size: 1.3rem;
        margin: 0;
    }
    
    .view-more-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .genre-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.8rem;
    }
    
    .genre-card {
        height: 220px;
    }
    
    .genre-card .card-poster-container {
        height: 100%;
    }
    
    .genre-card .card-title {
        font-size: 0.85rem;
        padding: 15px 8px 8px;
        text-shadow:
            0 1px 2px rgba(0, 0, 0, 0.9),
            0 2px 4px rgba(0, 0, 0, 0.8),
            0 3px 8px rgba(0, 0, 0, 0.6);
        letter-spacing: 0.3px;
    }
    
    .genre-card .card-year-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .genre-card .card-rating-badge {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .genres-container {
        padding: 0;
    }
    
    .genre-group {
        margin-bottom: 1.5rem;
    }
    
    .genre-header {
        margin-bottom: 0.6rem;
    }
    
    .genre-heading {
        font-size: 1.2rem;
        margin: 0;
    }
    
    .view-more-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .genre-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.6rem;
    }
    
    .genre-card {
        height: 200px;
    }
    
    .genre-card .card-poster-container {
        height: 100%;
    }
    
    .genre-card .card-title {
        font-size: 0.8rem;
        padding: 12px 6px 6px;
        text-shadow:
            0 1px 2px rgba(0, 0, 0, 0.9),
            0 2px 4px rgba(0, 0, 0, 0.8),
            0 3px 6px rgba(0, 0, 0, 0.6);
        letter-spacing: 0.2px;
    }
    
    .genre-card .card-year-badge {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    .genre-card .card-rating-badge {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }
}


/* Genre Skeleton Loading - Ultra Optimized for Mobile */
.genre-skeleton {
    opacity: 0.8;
    contain: layout style paint; /* Performance optimization */
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex: 0 0 160px;
    contain: layout style paint; /* Isolate repaints */
    will-change: auto; /* Let browser optimize */
}

.skeleton-poster {
    width: 100%;
    height: 220px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    contain: layout style paint;
}

/* Ultra-optimized shimmer using transform instead of position */
.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transform: translateX(-100%);
    will-change: transform;
    animation: shimmer-optimized 2s infinite ease-in-out;
}

/* Hardware-accelerated animation using transform */
@keyframes shimmer-optimized {
    0% {
        transform: translateX(-100%) translateZ(0);
    }
    100% {
        transform: translateX(100%) translateZ(0);
    }
}

/* Individual Section Loading Indicators */
.genre-section-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    min-height: 200px;
}

/* Infinite Scroll Loading Indicator */
.infinite-scroll-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.infinite-scroll-loading.show {
    opacity: 1;
    transform: translateY(0);
}

.infinite-scroll-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid transparent;
    border-radius: 50%;
    margin-bottom: 1rem;
    position: relative;
    animation: spin 1s linear infinite;
}

.infinite-scroll-spinner::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: #e50914;
    z-index: -1;
}

.infinite-scroll-spinner::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--dark-bg);
    z-index: 1;
}

.infinite-scroll-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    font-family: 'Nunito', sans-serif;
}

/* End of Content Indicator */
.end-of-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    margin: 2rem 0;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    border: 2px solid transparent;
    background: linear-gradient(var(--dark-secondary), var(--dark-secondary)) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.15);
}

.end-of-content.show {
    opacity: 1;
    transform: translateY(0);
}

.end-of-content-icon {
    font-size: 2.5rem;
    color: #4CAF50;
    margin-bottom: 1rem;
    animation: checkPulse 2s ease-in-out infinite;
}

.end-of-content-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: 'Nunito', sans-serif;
}

.end-of-content-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
    font-family: 'Nunito', sans-serif;
}

@keyframes checkPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Duplicate Detection Styles */
.duplicate-hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.unique-item {
    position: relative;
}

/* Debug mode - show duplicates with red border (for development) */
.debug-mode .duplicate-hidden {
    display: block !important;
    opacity: 0.3;
    border: 3px solid #ff0000 !important;
    position: relative;
}

.debug-mode .duplicate-hidden::before {
    content: 'DUPLICATE';
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ff0000;
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 1000;
}

.debug-mode .missing-id::before {
    content: 'NO ID';
    background: #ff9800;
}

/* Unique item indicator (for development) */
.debug-mode .unique-item::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #4CAF50;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
}

.genre-section-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-radius: 50%;
    margin-bottom: 1rem;
    position: relative;
    animation: spin 1.2s linear infinite;
}

.genre-section-spinner::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: #e50914;
    z-index: -1;
}

.genre-section-spinner::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--dark-bg);
    z-index: 1;
}

.genre-section-loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    font-family: 'Nunito', sans-serif;
}

/* Enhanced skeleton section with loading state */
.genre-skeleton {
    position: relative;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.genre-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(229, 9, 20, 0.05),
        transparent
    );
    animation: skeleton-pulse 2s infinite ease-in-out;
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Loading progress bar for genre sections */
.genre-loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.2);
    z-index: 9998;
    overflow: hidden;
}

.genre-loading-progress-bar {
    height: 100%;
    background: #e50914;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

/* Individual section loading state */
.genre-section.loading {
    pointer-events: none;
}

.genre-section.loading .genre-section-title {
    opacity: 0.6;
}

.genre-section.loading .genre-view-more-btn {
    opacity: 0.5;
    pointer-events: none;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .skeleton-shimmer {
        animation: none;
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Responsive skeleton adjustments - Mobile Optimized */
@media (max-width: 768px) {
    .skeleton-card {
        flex: 0 0 140px;
        contain: strict; /* Maximum performance isolation */
    }
    
    .skeleton-poster {
        height: 180px;
    }
    
    /* Reduce animation intensity on tablets */
    .skeleton-shimmer {
        animation-duration: 2.5s;
        opacity: 0.8;
    }
}

@media (max-width: 480px) {
    .skeleton-card {
        flex: 0 0 120px;
        contain: strict; /* Maximum performance isolation */
    }
    
    .skeleton-poster {
        height: 160px;
    }
    
    /* Further optimize for mobile phones */
    .skeleton-shimmer {
        animation-duration: 3s; /* Slower animation for better performance */
        opacity: 0.6;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.06), /* Reduced opacity */
            transparent
        );
    }
    
    /* Pause animations when not in viewport on mobile */
    .genre-skeleton:not(.in-viewport) .skeleton-shimmer {
        animation-play-state: paused;
    }
}

.genre-section {
    margin-bottom: 2rem;
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid transparent;
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.15);
    transition: all 0.3s ease;
}

.genre-section:hover {
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.3);
}

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

.genre-section-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.genre-view-more-btn {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 80px;
    justify-content: center;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #01b4e4, #0099cc) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.15);
}

.genre-view-more-btn:hover {
    background: linear-gradient(135deg, #0099cc, #007bb3) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
    color: #ffffff;
}

.genre-view-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.genre-movies-container {
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.genre-movies-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
    width: 100%;
}

.genre-movies-scroll::-webkit-scrollbar {
    display: none;
}

/* Desktop scroll buttons */
.genre-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.genre-scroll-btn:hover {
    background: rgba(1, 180, 228, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.genre-scroll-btn.left {
    left: 10px;
}

.genre-scroll-btn.right {
    right: 10px;
}

.genre-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.genre-movie-card {
    flex: 0 0 160px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(229, 9, 20, 0.15);
    transition: all 0.3s ease;
}

.genre-movie-card:hover {
    background: linear-gradient(#000000, #000000) padding-box,
               linear-gradient(45deg, #e50914, #ff6b35, #ff1744, #e91e63) border-box;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(229, 9, 20, 0.3);
    transform: translateY(-2px);
}

.genre-movie-poster-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.genre-movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.genre-movie-poster-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 2rem;
}

/* Year badge - top left like the poster */
.genre-movie-year-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Rating badge - top right like the poster */
.genre-movie-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Title at bottom - like the poster */
.genre-movie-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    color: white;
    padding: 20px 12px 12px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 2px 6px rgba(0, 0, 0, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
    backdrop-filter: blur(1px);
}

.genre-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.genre-scroll-btn:hover {
    background: rgba(1, 180, 228, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.genre-scroll-btn.left {
    left: 10px;
}

.genre-scroll-btn.right {
    right: 10px;
}

.genre-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Genre Page Styles */
.genre-page-header {
    background: linear-gradient(135deg, rgba(1, 180, 228, 0.1), rgba(144, 19, 254, 0.1));
    padding: 3rem 0;
    margin-top: 80px; /* Add space for fixed navbar */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.genre-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.genre-header-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.genre-icon {
    width: 80px;
    height: 80px;
    background: #01b4e4;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 25px rgba(1, 180, 228, 0.3);
}

.genre-details h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.genre-description {
    color: #cccccc;
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
}

.genre-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #01b4e4;
    font-weight: 500;
}

.genre-separator {
    color: #666;
}

.genre-actions {
    display: flex;
    gap: 1rem;
}

.genre-action-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
}

.genre-action-btn:hover {
    background: rgba(1, 180, 228, 0.2);
    border-color: #01b4e4;
    transform: translateY(-2px);
}

.genre-filters {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.genre-filter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.genre-filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.genre-filter-tab {
    background: rgba(255, 255, 255, 0.05);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.genre-filter-tab.active,
.genre-filter-tab:hover {
    background: #01b4e4;
    color: white;
    border-color: transparent;
}

.genre-sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.genre-sort-dropdown {
    position: relative;
}

.genre-sort-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.genre-sort-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(1, 180, 228, 0.3);
}

.genre-sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(20px);
}

.genre-sort-menu.show {
    display: block;
}

.genre-sort-option {
    width: 100%;
    background: none;
    color: #cccccc;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.genre-sort-option:hover {
    background: rgba(1, 180, 228, 0.1);
    color: #01b4e4;
}

.genre-view-toggle {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.25rem;
}

.genre-view-btn {
    background: none;
    color: #cccccc;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.genre-view-btn.active,
.genre-view-btn:hover {
    background: #01b4e4;
    color: white;
}

.genre-main {
    padding: 3rem 0;
}

.genre-movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.genre-load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.genre-load-more-btn {
    background: #01b4e4;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.genre-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 180, 228, 0.3);
}

.genre-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design for Genre Sections */
@media (max-width: 768px) {
    .genre-section {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .genre-section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .genre-section-title {
        font-size: 1.1rem;
        flex: 1;
        min-width: 0;
    }
    
    .genre-view-more-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        min-width: 70px;
    }
    
    .genre-scroll-btn {
        display: none; /* Hide scroll buttons on mobile - use touch scrolling */
    }
    
    .genre-movie-card {
        flex: 0 0 140px;
    }
    
    .genre-movie-poster-container {
        height: 210px;
    }
    
    .genre-movie-title {
        font-size: 0.85rem;
        padding: 15px 8px 8px;
        text-shadow: 
            0 1px 2px rgba(0, 0, 0, 0.9),
            0 2px 4px rgba(0, 0, 0, 0.8),
            0 3px 8px rgba(0, 0, 0, 0.6);
        letter-spacing: 0.3px;
    }
    
    .genre-movie-year-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .genre-movie-rating-badge {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .genre-page-header {
        padding: 2rem 0;
        margin-top: 70px; /* Slightly less margin on mobile */
    }
    
    .genre-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .genre-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .genre-details h1 {
        font-size: 2rem;
    }
    
    .genre-filter-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .genre-filter-tabs {
        flex-wrap: wrap;
    }
    
    .genre-movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .genre-section {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .genre-movie-card {
        flex: 0 0 120px;
    }
    
    .genre-movie-poster-container {
        height: 280px;
    }
    
    .genre-movie-title {
        font-size: 0.8rem;
        padding: 12px 6px 6px;
        text-shadow: 
            0 1px 2px rgba(0, 0, 0, 0.9),
            0 2px 4px rgba(0, 0, 0, 0.8),
            0 3px 6px rgba(0, 0, 0, 0.6);
        letter-spacing: 0.2px;
    }
    
    .genre-movie-year-badge {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    
    .genre-movie-rating-badge {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }
    
    .genre-movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
}

/* ===== FLOATING HELP BUTTON ===== */
.floating-help-button {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: #e50914;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.floating-help-button:hover {
    background: linear-gradient(45deg, #dc2626, #ea580c, #e11d48, #be185d);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.6);
}

.floating-help-button i {
    font-size: 1.5rem;
}

/* Prevent double-tap zoom on interactive elements */
button, 
.btn, 
.movie-card, 
.trending-card, 
.genre-card,
.trailer-card,
.search-result,
.navbar-item,
.content-type-option,
.floating-action-btn,
.trending-tab,
.genre-filter-tab,
.genre-view-btn,
.genre-load-more-btn,
.genre-movie-card,
.search-load-more-btn,
.action-btn,
.back-button,
.genre-view-more-btn,
.floating-help-button {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


/* Loading animation enhancements */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Skeleton card animation */
.skeleton-card {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Mobile responsive for floating help button */
@media (max-width: 768px) {
    .floating-help-button {
        bottom: 1rem;
        left: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .floating-help-button i {
        font-size: 1.1rem;
    }
}
