/**
 * 3D Animation Theme - Modern Cyan/Blue/Purple Palette
 * Perfect for 3D Animation/Donghua content
 * Inspired by: Pixar, DreamWorks, Modern 3D aesthetics
 */

:root {
    /* ============================================================================
       PRIMARY COLORS - Vibrant 3D Theme
       ========================================================================== */

    /* Main Brand Colors - Vibrant Aurora (Magenta/Cyan/Norse Blue) */
    --primary: #FF00E5; /* Vibrant Magenta */
    --primary-glow: rgba(255, 0, 229, 0.45);
    --primary-hover: #FF33EB;
    
    --secondary: #00D9FF; /* Electric Cyan */
    --secondary-glow: rgba(0, 217, 255, 0.45);
    --secondary-hover: #33E1FF;

    /* Accent Colors for High Contrast */
    --accent-indigo: #6E00FF;
    --accent-teal: #00FFCC;
    --accent-orange: #FF6B00;
    --accent-gold: #FFD700;

    /* ============================================================================
       GRADIENTS - Immersive & Vibrant
       ========================================================================== */

    /* Primary Gradient - Aurora Flow */
    --gradient: linear-gradient(135deg, #FF00E5 0%, #6E00FF 100%);
    --gradient-hover: linear-gradient(135deg, #FF33EB 0%, #8A33FF 100%);
    --gradient-aurora: linear-gradient(to right, #FF00E5, #6E00FF, #00D9FF);
    --gradient-dark: linear-gradient(to top, #0A0F1E, transparent);

    /* Text Gradient - High Contrast Aurora */
    --gradient-text: linear-gradient(135deg, #fff 0%, #FF00E5 50%, #00D9FF 100%);
    --text-shadow-glow: 0 0 20px rgba(255, 0, 229, 0.35);

    /* Background Gradient - Immersive Mesh Effect */
    --gradient-bg: radial-gradient(circle at 10% 10%, rgba(255, 0, 229, 0.15) 0%, transparent 45%),
                   radial-gradient(circle at 90% 10%, rgba(0, 217, 255, 0.15) 0%, transparent 45%),
                   radial-gradient(circle at 50% 100%, rgba(110, 0, 255, 0.1) 0%, transparent 50%),
                   #060912; /* Deep Black/Blue Base */

    /* ============================================================================
       BACKGROUND COLORS - Deep Indigo
       ========================================================================== */

    --bg-body: #060912;
    --bg-card: #0F1322;
    --bg-glass: rgba(15, 19, 34, 0.85);
    --bg-overlay: rgba(6, 9, 18, 0.96);

    /* ============================================================================
       TEXT COLORS - High contrast
       ========================================================================== */

    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-tertiary: #64748B;
    --text-accent: #00D9FF;

    /* ============================================================================
       SHADOWS & GLOWS - 3D depth effects
       ========================================================================== */

    /* Card shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px var(--primary-glow);
    --shadow-primary: 0 8px 30px rgba(0, 217, 255, 0.3);

    /* Text shadows for depth */
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    --text-shadow-glow: 0 0 12px rgba(0, 217, 255, 0.5);

    /* ============================================================================
       MODERN UI TOKENS
       ========================================================================== */

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --container-max: 1400px;
    --nav-height: 72px;

    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================================
   BODY & BACKGROUND - Immersive 3D atmosphere
   ========================================================================== */

body {
    background: var(--bg-body);
    background-image:
        /* Cyan glow top-left */
        radial-gradient(at 0% 0%, rgba(0, 217, 255, 0.15) 0px, transparent 50%),
        /* Purple glow top-right */
        radial-gradient(at 100% 0%, rgba(102, 126, 234, 0.15) 0px, transparent 50%),
        /* Pink glow bottom */
        radial-gradient(at 50% 100%, rgba(240, 147, 251, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* ============================================================================
   HEADER - Glassmorphism with gradient
   ========================================================================== */

.header {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Logo with gradient */
.logo i {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5));
}

.logo span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   NAVIGATION - Active state with gradient
   ========================================================================== */

.nav-link.active {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-link:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
}

/* ============================================================================
   SEARCH BOX - Modern with glow
   ========================================================================== */

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.2);
    background: rgba(20, 27, 45, 0.8);
}

.search-box button {
    background: var(--gradient);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.search-box button:hover {
    box-shadow: var(--shadow-glow);
}

/* ============================================================================
   FILTERS - Pill style with gradient
   ========================================================================== */

.filter-btn.active {
    background: var(--gradient);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.filter-btn:hover {
    background: rgba(0, 217, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================================================
   SECTION TITLES - Gradient text with glow
   ========================================================================== */

.section-title {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(var(--text-shadow-glow));
}

.section-title i {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   MOVIE CARDS - Enhanced with glow on hover
   ========================================================================== */

.movie-card:hover .poster-wrapper {
    box-shadow: var(--shadow-card-hover);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.poster-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}

/* Play icon with gradient */
.play-icon {
    background: var(--gradient);
    border: 2px solid white;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.4);
}

/* Rating badge */
.movie-rating {
    background: rgba(0, 217, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--primary);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

/* ============================================================================
   TRENDING SLIDER - Rainbow gradient ranks
   ========================================================================== */

/* Top 3 with gradient */
.trending-card:nth-child(1) .rank-badge,
.trending-card:nth-child(2) .rank-badge,
.trending-card:nth-child(3) .rank-badge {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 0;
    filter: drop-shadow(var(--text-shadow-glow));
}

.trending-card:hover {
    transform: translateY(-10px) scale(1.05);
}

.trending-card:hover .trending-poster-wrap {
    box-shadow: var(--shadow-card-hover);
}

/* ============================================================================
   BUTTONS - Gradient with glow
   ========================================================================== */

.load-more-btn,
.btn-primary {
    background: var(--gradient);
    box-shadow: var(--shadow-glow);
}

.load-more-btn:hover,
.btn-primary:hover {
    background: var(--gradient-hover);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.5);
    transform: translateY(-3px);
}

/* ============================================================================
   FLOATING BUTTONS - Gradient with pulse
   ========================================================================== */

.scroll-top,
.donate-floating-btn {
    background: var(--gradient);
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: var(--shadow-glow);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 217, 255, 0.6);
    }
}

.scroll-top:hover,
.donate-floating-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-5px);
}

/* ============================================================================
   MODAL - Glassmorphism
   ========================================================================== */

.modal {
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.modal-close:hover {
    background: var(--gradient);
    color: white;
}

/* ============================================================================
   LOADING SPINNER - Gradient
   ========================================================================== */

.loading {
    color: var(--primary);
}

.loading i {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   SCROLLBAR - Themed
   ========================================================================== */

::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 4px;
}

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

/* ============================================================================
   TOAST NOTIFICATIONS - Gradient borders
   ========================================================================== */

.toast-success {
    border-left: 4px solid var(--primary);
    background: rgba(0, 217, 255, 0.1);
}

.toast-error {
    border-left: 4px solid #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.toast-info {
    border-left: 4px solid var(--secondary);
    background: rgba(102, 126, 234, 0.1);
}

/* ============================================================================
   FOCUS STATES - Cyan glow
   ========================================================================== */

button:focus-visible,
a:focus-visible,
.movie-card:focus-visible,
.trending-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(0, 217, 255, 0.2);
}

/* ============================================================================
   SPECIAL EFFECTS - Shimmer on hover
   ========================================================================== */

.movie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 217, 255, 0.2),
            transparent);
    transition: left 0.5s;
    pointer-events: none;
    z-index: 10;
}

.movie-card:hover::before {
    left: 100%;
}

/* ============================================================================
   HERO SECTION (if exists) - Epic gradient
   ========================================================================== */

.hero {
    background: var(--gradient-bg);
}

.hero-bg::after {
    background: linear-gradient(to top,
            var(--bg-body) 10%,
            rgba(10, 14, 26, 0.4) 50%,
            transparent 100%),
        linear-gradient(to right,
            var(--bg-body) 10%,
            transparent 70%);
}

.trending-tag {
    background: rgba(0, 217, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

/* ============================================================================
   RESPONSIVE - Maintain theme on mobile
   ========================================================================== */

@media (max-width: 768px) {
    body {
        background-image:
            radial-gradient(at 50% 0%, rgba(0, 217, 255, 0.2) 0px, transparent 50%),
            radial-gradient(at 50% 100%, rgba(102, 126, 234, 0.15) 0px, transparent 50%);
    }
}

/* ============================================================================
   PRINT - Remove gradients for print
   ========================================================================== */

@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}