/* ============================================
   CREATIVE ANIMATIONS FOR UAE ENTERTAINMENT SPACES
   ============================================ */

/* Parallax Container */
.parallax-container {
    position: relative;
    overflow: hidden;
    height: 100vh;
    perspective: 1000px;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* Morphing Shapes Background */
.morphing-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.morph-shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 165, 116, 0.1));
    animation: morph 20s ease-in-out infinite;
    filter: blur(60px);
}

.morph-shape:nth-child(1) {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.morph-shape:nth-child(2) {
    width: 500px;
    height: 500px;
    top: 50%;
    right: 10%;
    animation-delay: 5s;
    background: linear-gradient(135deg, rgba(74, 144, 164, 0.1), rgba(91, 168, 196, 0.1));
}

.morph-shape:nth-child(3) {
    width: 350px;
    height: 350px;
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
    background: linear-gradient(135deg, rgba(232, 197, 71, 0.1), rgba(212, 107, 107, 0.1));
}

@keyframes morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
        transform: translate(50px, -30px) rotate(90deg);
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
        transform: translate(-30px, 50px) rotate(180deg);
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
        transform: translate(30px, 30px) rotate(270deg);
    }
}

/* Text Reveal Animation */
.reveal-text {
    overflow: hidden;
    display: inline-block;
}

.reveal-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: revealText 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.reveal-text span:nth-child(1) { animation-delay: 0.1s; }
.reveal-text span:nth-child(2) { animation-delay: 0.2s; }
.reveal-text span:nth-child(3) { animation-delay: 0.3s; }
.reveal-text span:nth-child(4) { animation-delay: 0.4s; }
.reveal-text span:nth-child(5) { animation-delay: 0.5s; }
.reveal-text span:nth-child(6) { animation-delay: 0.6s; }
.reveal-text span:nth-child(7) { animation-delay: 0.7s; }

@keyframes revealText {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Hover Effects */
.image-hover-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.image-hover-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-hover-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(74, 144, 164, 0.3));
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
}

.image-hover-container:hover img {
    transform: scale(1.1) rotate(2deg);
}

.image-hover-container:hover::before {
    opacity: 1;
}

.image-hover-container::after {
    content: 'Explore';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    color: white;
    font-weight: 600;
    font-size: 18px;
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 2;
}

.image-hover-container:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Scroll-triggered Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Gradient Animations */
.animated-gradient {
    background: linear-gradient(-45deg, #d4af37, #d4a574, #4a90a4, #5ba8c4);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 3D Card Transforms */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(5deg) rotateX(5deg);
}

.card-3d-front,
.card-3d-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
}

.card-3d-back {
    transform: rotateY(180deg);
}

/* Floating Elements */
.floating {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Particle Background */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    animation: particleFloat 20s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) scale(1);
        opacity: 0;
    }
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

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

/* Custom Cursor (Desktop only) */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-accent-gold);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
    transform: translate(-50%, -50%);
    display: none;
}

.custom-cursor.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
    background: rgba(212, 175, 55, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .morph-shape {
        width: 200px !important;
        height: 200px !important;
        filter: blur(40px);
    }
    
    .card-3d:hover .card-3d-inner {
        transform: none;
    }
    
    .image-hover-container:hover img {
        transform: scale(1.05);
    }
    
    .custom-cursor {
        display: none;
    }
}

