/* 🎬 Modern Netflix-Style Design for Age Group 15-35 */
/* Optimized for TikTok/Instagram generation with glassmorphism and smooth animations */

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== ANIMATED FLOATING BACKGROUND ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
    25% { transform: translateY(-10px) rotate(2deg) scale(1.02); }
    50% { transform: translateY(-20px) rotate(0deg) scale(0.98); }
    75% { transform: translateY(-10px) rotate(-2deg) scale(1.02); }
}

@keyframes drift {
    0% { 
        transform: translateX(-100px); 
        opacity: 0; 
    }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { 
        transform: translateX(calc(100vw + 100px)); 
        opacity: 0; 
    }
}

.floating-bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    opacity: 0.08;
    animation: drift linear infinite;
    font-size: 2rem;
    color: #8B5CF6;
}

.floating-element:nth-child(1) { animation-duration: 20s; top: 10%; animation-delay: 0s; }
.floating-element:nth-child(2) { animation-duration: 25s; top: 25%; animation-delay: 5s; }
.floating-element:nth-child(3) { animation-duration: 30s; top: 45%; animation-delay: 10s; }
.floating-element:nth-child(4) { animation-duration: 22s; top: 65%; animation-delay: 3s; }
.floating-element:nth-child(5) { animation-duration: 28s; top: 85%; animation-delay: 8s; }

/* ===== MODERN GLASSMORPHISM CARDS ===== */
.glass-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 
        0 20px 40px rgba(139, 92, 246, 0.2),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-10px);
}

/* ===== NETFLIX-STYLE INTERACTIVE BUTTONS ===== */
.mood-btn, .time-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.mood-btn::before, .time-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
    border-radius: 50%;
}

.mood-btn:hover::before, .time-btn:hover::before {
    width: 400px;
    height: 400px;
}

.mood-btn:hover, .time-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(139, 92, 246, 0.3),
        0 0 0 1px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.6) !important;
}

.mood-btn:active, .time-btn:active {
    transform: translateY(-4px) scale(1.02);
    transition: all 0.1s ease;
}

/* Active state styling */
.mood-btn.border-purple-400, .time-btn.border-purple-400 {
    background: rgba(139, 92, 246, 0.2) !important;
    border-color: rgba(139, 92, 246, 0.8) !important;
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Emoji float animation */
.mood-btn:hover .text-4xl,
.time-btn:hover .text-3xl {
    animation: float 2s ease-in-out infinite;
}

/* ===== PREMIUM PLATFORM BADGES ===== */
.platform-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.platform-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.platform-badge:hover::before {
    left: 100%;
}

.platform-netflix {
    background: linear-gradient(135deg, #E50914, #B20710);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.platform-prime {
    background: linear-gradient(135deg, #00A8E1, #0086B3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 168, 225, 0.4);
}

.platform-disney {
    background: linear-gradient(135deg, #113CCF, #0E2F9E);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 60, 207, 0.4);
}

.platform-hulu {
    background: linear-gradient(135deg, #1CE783, #17C470);
    color: black;
    box-shadow: 0 4px 15px rgba(28, 231, 131, 0.4);
}

.platform-hbo {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.platform-apple {
    background: linear-gradient(135deg, #000000, #333333);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

/* ===== RECOMMENDATION CARDS - PREMIUM NETFLIX STYLE ===== */
.recommendation-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(236, 72, 153, 0.1) 50%, 
        rgba(59, 130, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.recommendation-card:hover::before {
    opacity: 1;
}

.recommendation-card:hover {
    transform: translateY(-15px) scale(1.03);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.recommendation-card img {
    transition: all 0.4s ease;
    border-radius: 16px;
}

.recommendation-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.2);
}

/* ===== SMOOTH REVEAL ANIMATIONS ===== */
.recommendation-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    animation: revealCard 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.recommendation-reveal:nth-child(1) { animation-delay: 0.1s; }
.recommendation-reveal:nth-child(2) { animation-delay: 0.3s; }
.recommendation-reveal:nth-child(3) { animation-delay: 0.5s; }

@keyframes revealCard {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== TRENDING SECTION ENHANCEMENTS ===== */
.trending-item {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    animation-play-state: paused;
}

.trending-item:nth-child(1) { animation-delay: 0.1s; }
.trending-item:nth-child(2) { animation-delay: 0.2s; }
.trending-item:nth-child(3) { animation-delay: 0.3s; }
.trending-item:nth-child(4) { animation-delay: 0.4s; }

.trending-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(139, 92, 246, 0.2), 
        transparent);
    transition: left 0.6s ease;
}

.trending-item:hover::after {
    left: 100%;
}

.trending-item:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FEATURE CARDS ANIMATION ===== */
.feature-card {
    opacity: 0;
    transform: scale(0.9);
    animation: zoomIn 0.6s ease forwards;
    animation-play-state: paused;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== AI THINKING ENHANCEMENT ===== */
#aiThinking {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* ===== BUTTON ENHANCEMENTS ===== */
#shareRecommendations {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    transition: all 0.3s ease;
}

#shareRecommendations::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

#shareRecommendations:hover::before {
    animation: shine 0.6s ease-in-out;
}

#shareRecommendations:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* ===== MOBILE MENU ANIMATION ===== */
.mobile-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.show {
    display: block;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PREMIUM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7C3AED, #DB2777);
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .recommendation-card:hover {
        transform: translateY(-8px) scale(1.02);
    }
    
    .mood-btn:hover, .time-btn:hover {
        transform: translateY(-4px) scale(1.02);
    }
    
    .glass-card:hover {
        transform: translateY(-5px);
    }
    
    .trending-item:hover {
        transform: translateY(-4px);
    }
}

/* ===== ACCESSIBILITY & PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
    .floating-element,
    .recommendation-reveal,
    .trending-item::after,
    #aiThinking {
        animation: none;
    }
    
    .mood-btn:hover,
    .time-btn:hover,
    .recommendation-card:hover,
    .trending-item:hover {
        transform: none;
    }
    
    .mood-btn::before,
    .time-btn::before {
        display: none;
    }
}

/* ===== SELECTION & FOCUS STATES ===== */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

button:focus,
a:focus,
.mood-btn:focus,
.time-btn:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

button, a, .mood-btn, .time-btn, .trending-item, .feature-card, .recommendation-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== STAT COUNTER ENHANCEMENTS ===== */
.stat-counter {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* ===== PRINT STYLES ===== */
@media print {
    .fixed, nav, footer, .floating-bg-elements {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .glass-card, .recommendation-card, .trending-item {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
}
