/**
 * Grand Oasis - Animasyon Dosyası
 * Mısır Temalı QR Menü Animasyonları
 */

/* ==================== Keyframes ==================== */

/* Logo Fade In */
@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Gold Shimmer */
@keyframes goldShimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Welcome Text Fade In */
@keyframes welcomeFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Slide Up */
@keyframes buttonSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sand Particle Float */
@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(10px, -15px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translate(-5px, -30px) rotate(180deg);
        opacity: 0.5;
    }
    75% {
        transform: translate(-15px, -20px) rotate(270deg);
        opacity: 0.7;
    }
}

/* Door Open Animation */
@keyframes doorOpenLeft {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    30% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 1;
    }
}

@keyframes doorOpenRight {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    30% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 1;
    }
}

/* Category Card Entrance */
@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Slide Up */
@keyframes modalSlideUp {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(0);
    }
}

/* Product Modal Slide Up */
@keyframes productModalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Rotate */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==================== Splash Screen Animations ==================== */

.splash-screen.active .splash-logo-image {
    animation: logoFadeIn 0.6s ease-out forwards;
}

.splash-screen.active .splash-logo {
    animation: logoFadeIn 0.5s ease-out forwards;
}

.splash-screen.active .logo-text {
    background-size: 200% auto;
    animation: goldShimmer 2s linear infinite;
}

.splash-screen.active .splash-welcome {
    animation: welcomeFadeIn 0.4s ease-out 0.3s forwards;
}

.splash-screen.active .splash-btn {
    animation: buttonSlideUp 0.3s ease-out 0.6s forwards;
}

/* Video Fade In */
.splash-screen.active .splash-video {
    animation: fadeIn 1.5s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Sand Particles Animation */
.sand-particles .particle {
    animation: particleFloat 8s ease-in-out infinite;
}

.sand-particles .particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.sand-particles .particle:nth-child(2) {
    top: 40%;
    left: 80%;
    animation-delay: 1.5s;
    animation-duration: 9s;
}

.sand-particles .particle:nth-child(3) {
    top: 60%;
    left: 20%;
    animation-delay: 3s;
    animation-duration: 8s;
}

.sand-particles .particle:nth-child(4) {
    top: 80%;
    left: 70%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.sand-particles .particle:nth-child(5) {
    top: 30%;
    left: 50%;
    animation-delay: 4s;
    animation-duration: 7.5s;
}

/* ==================== Door Transition ==================== */

.door-transition.active .door-left {
    animation: doorOpenLeft 2.5s ease-in-out forwards;
}

.door-transition.active .door-right {
    animation: doorOpenRight 2.5s ease-in-out forwards;
}

/* ==================== Category Cards ==================== */

.category-card {
    opacity: 1;
}

.category-card:hover .category-icon {
    animation: pulse 0.6s ease-in-out;
}

/* ==================== Modal Animations ==================== */

.modal.active .modal-content {
    animation: modalSlideUp 0.3s ease-out forwards;
}

.product-modal.active .product-modal-content {
    animation: productModalSlideUp 0.3s ease-out forwards;
}

/* ==================== Button Hover Effects ==================== */

.splash-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.back-btn:active {
    transform: scale(0.95);
}

.social-link:active {
    transform: translateY(-2px) scale(0.95);
}

/* ==================== Loading Animation ==================== */

.loading::after {
    content: '...';
    display: inline-block;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* ==================== Scroll Animations ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    opacity: 1;
}

/* ==================== Transition Classes ==================== */

.fade-in {
    animation: fadeInUp 0.4s ease-out forwards;
}

.fade-out {
    animation: fadeInUp 0.4s ease-out reverse forwards;
}

.slide-up {
    animation: modalSlideUp 0.3s ease-out forwards;
}

.scale-in {
    animation: productModalSlideUp 0.3s ease-out forwards;
}

/* ==================== Smooth Transitions ==================== */

* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Reduced Motion ==================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
