:root {
    --primary: #ec4899;
    --primary-accent: var(--primary);
    --bg-color: #050505;
    --nav-height: 80px;
}
@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(circle at 50% 0%, #331122 0%, #000000 20%, #050505 100%);
    color: white;
    overflow-x: hidden;
    margin: 0; padding: 0;
}

html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* RessAI Shine Effect */
@keyframes borderShine {
    0% { border-color: rgba(255,255,255,0.1); box-shadow: 0 0 0 rgba(236, 72, 153, 0); }
    50% { border-color: rgba(236, 72, 153, 0.5); box-shadow: 0 0 15px rgba(236, 72, 153, 0.2); }
    100% { border-color: rgba(255,255,255,0.1); box-shadow: 0 0 0 rgba(236, 72, 153, 0); }
}
.subtle-shine { animation: borderShine 4s infinite ease-in-out; }

.glass-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-reveal { animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }

/* Page Transitions */
body {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
body.page-transition-out {
    opacity: 0;
}
body.page-transition-out #mobile-bottom-nav {
    opacity: 1 !important; /* Keep bottom nav visible during transitions */
}
body.page-transition-in {
    animation: fadeInPage 0.4s ease-in-out forwards;
}
@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile Bottom Navigation - Exclude from body transitions */
#mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    padding-bottom: env(safe-area-inset-bottom);
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Ensure it's not affected by body opacity transitions */
    opacity: 1 !important;
    transition: none !important;
}

/* Sticky Search Container */
#search-container {
    position: sticky;
    top: 60px;
    z-index: 40;
    transition: all 0.3s ease;
    background: rgba(5,5,5,0.5);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hide-scroll::-webkit-scrollbar { display: none; }
.hide-scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* Badge Colors */
.badge-color-1 { color: #ec4899; border-color: rgba(236, 72, 153, 0.3); }
.badge-color-2 { color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.badge-color-3 { color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.badge-color-4 { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.badge-color-5 { color: #8b5cf6; border-color: rgba(139, 92, 246, 0.3); }

/* Loading Skeletons */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 0.5rem;
}
/* Disable pulse/breathing animations on hero skeleton bento cards */
/* Override Tailwind's animate-pulse utility if applied */
#hero-skeleton,
#hero-skeleton.animate-pulse {
    /* Disable any pulse animations on the container */
    animation: none !important;
    opacity: 1 !important;
}
#hero-skeleton .skeleton,
#hero-skeleton .skeleton.animate-pulse {
    /* Override pulse animations on skeleton children - keep only shimmer */
    animation: shimmer 2s infinite !important;
    opacity: 1 !important;
}
.skeleton-poster {
    aspect-ratio: 2/3;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 0.75rem;
}
.skeleton-circle {
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite;
}
.skeleton-text {
    height: 1rem;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 0.25rem;
}

/* Global Glow Effect */
@keyframes subtleGlow {
    0% { box-shadow: 0 0 5px rgba(236, 72, 153, 0.1); }
    50% { box-shadow: 0 0 15px rgba(236, 72, 153, 0.3); }
    100% { box-shadow: 0 0 5px rgba(236, 72, 153, 0.1); }
}

/* Segmented Control for Audio */
.segmented-control {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    height: auto; 
    align-items: stretch;
}

.segment-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: none;
    outline: none;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
}
.segment-btn:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}
.segment-btn.active {
    color: white;
    background: #ec4899; /* Pink */
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.3);
}
@media (max-width: 768px) {
    .segment-btn { padding: 6px 16px; font-size: 0.75rem; }
}

/* Vertical segmented control for modal */
.segmented-control.flex-col .segment-btn {
    width: 100%;
    padding: 6px 12px;
    min-width: 50px;
}

/* Hover states for interactive elements */
a:hover, button:hover, input:focus, .group:hover {
     text-shadow: 0 0 8px rgba(236, 72, 153, 0.5); 
}

/* Specific glow for cards and inputs */
.card:hover, 
.group:hover .aspect-\[2\/3\], 
.group:hover .aspect-video,
.group:hover .aspect-square,
input:focus {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
    border-color: rgba(236, 72, 153, 0.6) !important;
    transition: all 0.3s ease;
}

/* Active state for touch */
a:active, button:active, .card:active {
     text-shadow: 0 0 12px rgba(236, 72, 153, 0.8);
}

/* Remove button for continue watching */
.remove-btn {
    position: absolute;
    z-index: 20;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.remove-btn:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.remove-btn i {
    font-size: 12px;
    font-weight: bold;
}

/* Like button pulse animation */
@keyframes likePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(236, 72, 153, 0); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(236, 72, 153, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(236, 72, 153, 0); }
}

/* Halal Tooltip (from search/index) */
.halal-tooltip {
    /* Base styles if needed */
}
@media (hover: none) and (pointer: coarse) {
    .halal-tooltip {
        opacity: 0 !important;
        visibility: hidden !important;
    }
    .halal-tooltip.show-disclaimer {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Bento Grid Layout for Trending Now */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    min-height: 400px;
}

/* Bento Grid Items */
.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 2;
    grid-row: span 1;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, auto);
        min-height: auto;
    }
    
    .bento-large {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .bento-wide {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* Mobile: 1 column (stacked) */
@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 0.75rem;
    }
    
    .bento-large,
    .bento-wide {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Navigation Glider - Absolutely positioned to not affect layout */
#desktop-nav-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-pill-glider {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #ec4899 !important;
    border-radius: 9999px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
    opacity: 0.6 !important;
}

.nav-pill-glider.hidden {
    display: none;
}

/* === ANIME THEME STYLING === */

/* Anime Tab Theme (Applied to body when anime tab is active) */
body.theme-anime {
    position: relative;
}

body.theme-anime::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(236, 72, 153, 0.15) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: animeGradientPulse 8s ease-in-out infinite;
}

@keyframes animeGradientPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

/* Enhanced glow effects for anime content cards */
body.theme-anime .group:hover .aspect-\[2\/3\],
body.theme-anime .card:hover,
body.theme-anime .group:hover img {
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.4), 0 0 30px rgba(139, 92, 246, 0.2);
    border-color: rgba(236, 72, 153, 0.6) !important;
    transition: all 0.3s ease;
}

/* Anime section headers with sparkle effect */
body.theme-anime section h2 i.ph-fill.ph-sparkle {
    animation: sparkleRotate 3s linear infinite;
    filter: drop-shadow(0 0 4px rgba(236, 72, 153, 0.6));
}

@keyframes sparkleRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* === ANIME PARTICLE STYLES === */

/* Particle containers */
#anime-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

#anime-foreground {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 45;
    overflow: hidden;
}

/* Base particle styles - Background particles */
.anime-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.6), rgba(236, 72, 153, 0.2));
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 20s infinite ease-in-out;
    filter: drop-shadow(0 0 2px rgba(236, 72, 153, 0.4));
}

/* Foreground particles - smaller and more visible */
.anime-particle-fg {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.8), rgba(139, 92, 246, 0.4));
    border-radius: 50%;
    opacity: 0.6;
    animation: floatParticleFg 15s infinite ease-in-out;
    filter: drop-shadow(0 0 3px rgba(236, 72, 153, 0.5));
}

/* Particle floating animation - background */
@keyframes floatParticle {
    0% {
        transform: translate(0, 100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translate(100vw, -100px) rotate(360deg);
        opacity: 0;
    }
}

/* Particle floating animation - foreground (faster) */
@keyframes floatParticleFg {
    0% {
        transform: translate(0, 100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate(-100vw, -100px) rotate(-360deg);
        opacity: 0;
    }
}

/* Enhanced anime particles animation */
body.theme-anime #anime-background .anime-particle,
body.theme-anime #anime-foreground .anime-particle-fg {
    animation-duration: 20s;
    filter: drop-shadow(0 0 2px rgba(236, 72, 153, 0.4));
}

/* Individual particle delays for staggered effect */
body.theme-anime #anime-background .anime-particle:nth-child(1) { animation-delay: 0s; left: 10%; }
body.theme-anime #anime-background .anime-particle:nth-child(2) { animation-delay: 2s; left: 20%; }
body.theme-anime #anime-background .anime-particle:nth-child(3) { animation-delay: 4s; left: 30%; }
body.theme-anime #anime-background .anime-particle:nth-child(4) { animation-delay: 1s; left: 40%; }
body.theme-anime #anime-background .anime-particle:nth-child(5) { animation-delay: 3s; left: 50%; }
body.theme-anime #anime-background .anime-particle:nth-child(6) { animation-delay: 5s; left: 60%; }
body.theme-anime #anime-background .anime-particle:nth-child(7) { animation-delay: 1.5s; left: 70%; }
body.theme-anime #anime-background .anime-particle:nth-child(8) { animation-delay: 3.5s; left: 80%; }
body.theme-anime #anime-background .anime-particle:nth-child(9) { animation-delay: 0.5s; left: 15%; }
body.theme-anime #anime-background .anime-particle:nth-child(10) { animation-delay: 2.5s; left: 25%; }
body.theme-anime #anime-background .anime-particle:nth-child(11) { animation-delay: 4.5s; left: 35%; }
body.theme-anime #anime-background .anime-particle:nth-child(12) { animation-delay: 1.2s; left: 45%; }
body.theme-anime #anime-background .anime-particle:nth-child(13) { animation-delay: 3.2s; left: 55%; }
body.theme-anime #anime-background .anime-particle:nth-child(14) { animation-delay: 5.2s; left: 65%; }
body.theme-anime #anime-background .anime-particle:nth-child(15) { animation-delay: 2.2s; left: 75%; }

body.theme-anime #anime-foreground .anime-particle-fg:nth-child(1) { animation-delay: 0s; left: 5%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(2) { animation-delay: 1.5s; left: 15%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(3) { animation-delay: 3s; left: 25%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(4) { animation-delay: 0.5s; left: 35%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(5) { animation-delay: 2s; left: 45%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(6) { animation-delay: 4s; left: 55%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(7) { animation-delay: 1s; left: 65%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(8) { animation-delay: 2.5s; left: 75%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(9) { animation-delay: 0.3s; left: 85%; }
body.theme-anime #anime-foreground .anime-particle-fg:nth-child(10) { animation-delay: 3.5s; left: 95%; }

/* Modal particles */
.theme-anime-modal .anime-modal-particle-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.theme-anime-modal .anime-modal-particle-fg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 35;
    overflow: hidden;
}

.theme-anime-modal .anime-modal-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.6), rgba(236, 72, 153, 0.3));
    border-radius: 50%;
    opacity: 0.4;
    animation: floatParticleModal 18s infinite ease-in-out;
    filter: drop-shadow(0 0 2px rgba(236, 72, 153, 0.5));
}

.theme-anime-modal .anime-modal-particle-fg-item {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.8), rgba(139, 92, 246, 0.5));
    border-radius: 50%;
    opacity: 0.7;
    animation: floatParticleModalFg 12s infinite ease-in-out;
    filter: drop-shadow(0 0 3px rgba(236, 72, 153, 0.6));
}

@keyframes floatParticleModal {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translate(100%, -100%) rotate(360deg);
        opacity: 0;
    }
}

@keyframes floatParticleModalFg {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translate(-100%, -100%) rotate(-360deg);
        opacity: 0;
    }
}

/* Player info panel particles */
#bottom-sheet .anime-player-particle-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

#bottom-sheet .anime-player-particle-fg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    overflow: hidden;
}

#bottom-sheet .anime-player-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.5), rgba(236, 72, 153, 0.2));
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticlePlayer 16s infinite ease-in-out;
}

#bottom-sheet .anime-player-particle-fg-item {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.7), rgba(139, 92, 246, 0.4));
    border-radius: 50%;
    opacity: 0.6;
    animation: floatParticlePlayerFg 10s infinite ease-in-out;
    filter: drop-shadow(0 0 2px rgba(236, 72, 153, 0.5));
}

@keyframes floatParticlePlayer {
    0% {
        transform: translate(0, 100%) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translate(100%, -5%) rotate(360deg);
        opacity: 0;
    }
}

@keyframes floatParticlePlayerFg {
    0% {
        transform: translate(0, 100%) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate(-100%, -5%) rotate(-360deg);
        opacity: 0;
    }
}

/* Anime Modal Theme */
.theme-anime-modal {
    position: relative;
    overflow: hidden;
}

.theme-anime-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    animation: animeModalGradient 10s ease-in-out infinite;
}

@keyframes animeModalGradient {
    0%, 100% { opacity: 0.7; transform: scale(1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.05) rotate(5deg); }
}

/* Anime modal border glow */
.theme-anime-modal {
    border: 2px solid rgba(236, 72, 153, 0.3) !important;
    box-shadow: 
        0 0 10px rgba(236, 72, 153, 0.3),
        0 0 20px rgba(139, 92, 246, 0.15),
        inset 0 0 10px rgba(236, 72, 153, 0.08);
    animation: animeModalGlow 3s ease-in-out infinite;
}

@keyframes animeModalGlow {
    0%, 100% { 
        box-shadow: 
            0 0 10px rgba(236, 72, 153, 0.3),
            0 0 20px rgba(139, 92, 246, 0.15),
            inset 0 0 10px rgba(236, 72, 153, 0.08);
    }
    50% { 
        box-shadow: 
            0 0 15px rgba(236, 72, 153, 0.4),
            0 0 30px rgba(139, 92, 246, 0.25),
            inset 0 0 15px rgba(236, 72, 153, 0.12);
    }
}

/* Anime modal backdrop enhancement */
.theme-anime-modal #overlay-backdrop {
    filter: brightness(1.1) saturate(1.2);
    mix-blend-mode: overlay;
}

/* Anime modal content area with sparkle effects */
.theme-anime-modal #overlay-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 2%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 2%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 3%);
    pointer-events: none;
    z-index: 1;
    animation: sparkleFloat 6s ease-in-out infinite;
}

@keyframes sparkleFloat {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-10px); }
}

/* Anime modal tabs with enhanced styling */
.theme-anime-modal #overlay-tabs {
    background: rgba(236, 72, 153, 0.1) !important;
    border: 1px solid rgba(236, 72, 153, 0.3) !important;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.3);
}

.theme-anime-modal #overlay-tab-indicator {
    background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
}

.theme-anime-modal .tab-btn {
    color: rgba(255, 255, 255, 0.8);
}

.theme-anime-modal .tab-btn:hover {
    color: rgba(236, 72, 153, 1);
    text-shadow: 0 0 5px rgba(236, 72, 153, 0.6);
}

/* Anime modal action buttons */
.theme-anime-modal #overlay-watch-btn {
    background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.4);
}

.theme-anime-modal #overlay-watch-btn:hover {
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.6);
    transform: scale(1.05);
}

/* Anime modal like button */
.theme-anime-modal #overlay-like-btn {
    border-color: rgba(236, 72, 153, 0.4) !important;
    background: rgba(236, 72, 153, 0.1) !important;
}

.theme-anime-modal #overlay-like-btn:hover {
    background: rgba(236, 72, 153, 0.3) !important;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
}

/* Anime modal section headers */
.theme-anime-modal #overlay-content h3 {
    color: #ec4899 !important;
    text-shadow: 0 0 5px rgba(236, 72, 153, 0.4);
}

/* Enhanced Anime Controls Styling */
#anime-controls {
    backdrop-filter: blur(20px);
}

#anime-controls .anime-type-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#anime-controls .anime-type-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

#anime-controls .anime-type-btn:hover::before {
    opacity: 1;
}

#anime-controls .anime-type-btn.bg-pink-600 {
    background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

#anime-controls .anime-type-btn.bg-pink-600::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: animeButtonBorder 2s linear infinite;
}

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

/* Anime cards special styling */
body.theme-anime [class*="bg-pink-500/80"] {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.9), rgba(139, 92, 246, 0.8)) !important;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
}

/* AI Suggestions UI */
#search-suggestions {
    max-height: 500px;
    overflow-y: auto;
}

/* Horizontal scroll for movie posters */
#search-suggestions .overflow-x-auto {
    scrollbar-width: thin;
    scrollbar-color: rgba(236, 72, 153, 0.3) rgba(255, 255, 255, 0.05);
}

#search-suggestions .overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

#search-suggestions .overflow-x-auto::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

#search-suggestions .overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(236, 72, 153, 0.3);
    border-radius: 3px;
}

#search-suggestions .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 72, 153, 0.5);
}

/* Movie poster card hover effect */
#search-suggestions .group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Smooth transitions for AI suggestions */
#search-suggestions > div {
    animation: slideUp 0.3s ease-out;
}

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

/* AI Loading Shimmer Effect */
.ai-shimmer {
    animation: aiShimmerPulse 2s ease-in-out infinite;
    filter: brightness(1.1);
}

.ai-shimmer-text {
    background: linear-gradient(90deg, #ffffff 0%, #ec4899 50%, #8b5cf6 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 2s ease-in-out infinite;
}

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

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

/* Reduced glow intensity for AI icons */
#search-suggestions .bg-gradient-to-br {
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.2);
}

/* Modal Sticky Header */
#overlay-header-sticky {
    transition: all 0.3s ease;
}

#overlay-header-sticky::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#overlay-scroll-area:not([data-scroll-top="0"]) #overlay-header-sticky::after {
    opacity: 1;
}

/* Progress Cards in Action Bar */
#overlay-progress-cards {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
    overflow-x: auto;
    overflow-y: hidden;
}

#overlay-progress-cards::-webkit-scrollbar {
    height: 4px;
}

#overlay-progress-cards::-webkit-scrollbar-track {
    background: transparent;
}

#overlay-progress-cards::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

#overlay-progress-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Digital Connection Lines Animation */
.digital-connection-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    margin: -2px 0;
}

.connection-svg {
    width: 120px;
    height: 30px;
    display: block;
}

.connection-node {
    fill: #00d9ff;
    filter: drop-shadow(0 0 6px rgba(0, 217, 255, 1));
}

.connection-line {
    stroke: #00d9ff;
    stroke-width: 2.5;
    stroke-dasharray: 4, 3;
    filter: drop-shadow(0 0 4px rgba(0, 217, 255, 0.9));
}

/* Bento Widget Slide Animations */
@keyframes bentoSlideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-20px);
        opacity: 0;
    }
}

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

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

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

.bento-slide-out-left {
    animation: bentoSlideOutLeft 0.3s ease-out forwards;
}

.bento-slide-out-right {
    animation: bentoSlideOutRight 0.3s ease-out forwards;
}

.bento-slide-in-left {
    animation: bentoSlideInLeft 0.3s ease-out forwards;
}

.bento-slide-in-right {
    animation: bentoSlideInRight 0.3s ease-out forwards;
}

/* Content Page Transition Animations */
.content-transition-wrapper {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

@keyframes contentSlideExitLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-10%);
        opacity: 0;
    }
}

@keyframes contentSlideExitRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(10%);
        opacity: 0;
    }
}

@keyframes contentSlideEnterLeft {
    from {
        transform: translateX(-10%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes contentSlideEnterRight {
    from {
        transform: translateX(10%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.content-slide-exit-left {
    animation: contentSlideExitLeft 0.3s ease-out forwards;
}

.content-slide-exit-right {
    animation: contentSlideExitRight 0.3s ease-out forwards;
}

.content-slide-enter-left {
    animation: contentSlideEnterLeft 0.3s ease-out forwards;
}

.content-slide-enter-right {
    animation: contentSlideEnterRight 0.3s ease-out forwards;
}

/* Staggered Animation Delays */
.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }
.stagger-6 { animation-delay: 300ms; }
.stagger-7 { animation-delay: 350ms; }
.stagger-8 { animation-delay: 400ms; }
.stagger-9 { animation-delay: 450ms; }
.stagger-10 { animation-delay: 500ms; }

