/* ===================================
   Unruly Movies - Modern UI Enhancements
   Glassmorphism, Animations & Transitions
   =================================== */

/* ============ GLASSMORPHISM CLASSES ============ */

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.glass-dark {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.glass-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    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.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(124, 252, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(124, 252, 0, 0.3);
}

.glass-button {
    background: linear-gradient(
        135deg,
        rgba(124, 252, 0, 0.2) 0%,
        rgba(0, 217, 255, 0.2) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 252, 0, 0.3);
    border-radius: 12px;
    padding: 12px 24px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass-button:hover {
    background: linear-gradient(
        135deg,
        rgba(124, 252, 0, 0.4) 0%,
        rgba(0, 217, 255, 0.4) 100%
    );
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 252, 0, 0.3);
}

/* ============ MODERN ANIMATIONS ============ */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(124, 252, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(124, 252, 0, 0.5);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Rotate Gradient */
@keyframes rotateGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============ ANIMATION CLASSES ============ */

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.5s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-bounce-in {
    animation: bounceIn 0.6s ease-out forwards;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ============ SKELETON LOADING ============ */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-image {
    width: 100%;
    padding-top: 150%;
    border-radius: 12px;
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px;
}

/* ============ SMOOTH TRANSITIONS ============ */

.smooth-transition {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-fast {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-slow {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ HOVER EFFECTS ============ */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(124, 252, 0, 0.4);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* ============ GRADIENT TEXT ============ */

.gradient-text {
    background: linear-gradient(135deg, #7CFC00 0%, #00D9FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FF6B9D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-purple {
    background: linear-gradient(135deg, #9D4EDD 0%, #00D9FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ ANIMATED BORDERS ============ */

.animated-border {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        #7CFC00, #00D9FF, #9D4EDD, #FFD700, #7CFC00
    );
    background-size: 400% 400%;
    animation: rotateGradient 3s ease infinite;
    border-radius: 18px;
    z-index: -1;
}

.animated-border::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--background-dark);
    border-radius: 14px;
    z-index: -1;
}

/* ============ RIPPLE BUTTON ============ */

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    pointer-events: none;
}

.btn-ripple:active::after {
    animation: ripple 0.6s ease-out;
}

/* ============ NEON EFFECTS ============ */

.neon-green {
    text-shadow: 
        0 0 5px #7CFC00,
        0 0 10px #7CFC00,
        0 0 20px #7CFC00,
        0 0 40px #7CFC00;
}

.neon-blue {
    text-shadow: 
        0 0 5px #00D9FF,
        0 0 10px #00D9FF,
        0 0 20px #00D9FF,
        0 0 40px #00D9FF;
}

.neon-box-green {
    box-shadow: 
        0 0 5px #7CFC00,
        0 0 10px #7CFC00,
        0 0 20px rgba(124, 252, 0, 0.5),
        inset 0 0 10px rgba(124, 252, 0, 0.2);
}

.neon-box-blue {
    box-shadow: 
        0 0 5px #00D9FF,
        0 0 10px #00D9FF,
        0 0 20px rgba(0, 217, 255, 0.5),
        inset 0 0 10px rgba(0, 217, 255, 0.2);
}

/* ============ MODERN CARDS ============ */

.modern-card {
    background: linear-gradient(
        145deg,
        rgba(26, 26, 37, 0.9) 0%,
        rgba(18, 18, 26, 0.95) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(124, 252, 0, 0.5),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-card:hover::before {
    opacity: 1;
}

.modern-card:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 252, 0, 0.2);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(124, 252, 0, 0.1);
}

/* ============ PREMIUM BADGE ============ */

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.premium-badge::before {
    content: '👑';
}

/* ============ SCROLL REVEAL ============ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ============ PROGRESS BARS ============ */

.progress-bar-modern {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-modern .progress {
    height: 100%;
    background: linear-gradient(90deg, #7CFC00 0%, #00D9FF 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar-modern .progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* ============ MODERN INPUTS ============ */

.modern-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.modern-input:focus {
    outline: none;
    border-color: #7CFC00;
    background: rgba(124, 252, 0, 0.05);
    box-shadow: 0 0 0 3px rgba(124, 252, 0, 0.1);
}

.modern-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ============ MODERN BUTTONS ============ */

.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-modern-primary {
    background: linear-gradient(135deg, #7CFC00 0%, #66CC00 100%);
    color: #000;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 252, 0, 0.4);
}

.btn-modern-secondary {
    background: transparent;
    border: 2px solid #7CFC00;
    color: #7CFC00;
}

.btn-modern-secondary:hover {
    background: rgba(124, 252, 0, 0.1);
    transform: translateY(-2px);
}

.btn-modern-gradient {
    background: linear-gradient(135deg, #7CFC00 0%, #00D9FF 50%, #9D4EDD 100%);
    background-size: 200% 200%;
    color: #000;
    animation: rotateGradient 3s ease infinite;
}

.btn-modern-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 252, 0, 0.3);
}

/* ============ MODAL STYLES ============ */

.modal-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-modern.active {
    opacity: 1;
    visibility: visible;
}

.modal-modern-content {
    background: linear-gradient(
        145deg,
        rgba(26, 26, 37, 0.98) 0%,
        rgba(18, 18, 26, 0.98) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-modern.active .modal-modern-content {
    transform: scale(1) translateY(0);
}

/* ============ LOADING SPINNER ============ */

.spinner-modern {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(124, 252, 0, 0.2);
    border-top-color: #7CFC00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ TOOLTIP ============ */

.tooltip-modern {
    position: relative;
}

.tooltip-modern::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.tooltip-modern:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* ============ NOTIFICATION TOAST ============ */

.toast-modern {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: rgba(26, 26, 37, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
}

.toast-modern.show {
    transform: translateX(0);
}

.toast-modern.success {
    border-left: 4px solid #7CFC00;
}

.toast-modern.error {
    border-left: 4px solid #ff4444;
}

.toast-modern.warning {
    border-left: 4px solid #FFD700;
}

.toast-modern.info {
    border-left: 4px solid #00D9FF;
}

/* ============ SCROLL ANIMATIONS OBSERVER ============ */
/* Add this JS to activate: 
const observer = new IntersectionObserver((entries) => {
    entries.forEach(entry => {
        if (entry.isIntersecting) {
            entry.target.classList.add('revealed');
        }
    });
}, { threshold: 0.1 });

document.querySelectorAll('.reveal, .reveal-left, .reveal-right').forEach(el => {
    observer.observe(el);
});
*/
