/**
 * 3D Animations and Effects
 * This file contains CSS animations and effects for the 3D experience page
 */

/* 3D Card Effect */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.5s ease;
}

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

.card-3d .card-content {
    transform: translateZ(20px);
}

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

.float-slow {
    animation: floating 5s ease-in-out infinite;
}

.float-fast {
    animation: floating 2s ease-in-out infinite;
}

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

/* Parallax Effect */
.parallax {
    transition: transform 0.2s ease-out;
}

/* Glow Effects */
.glow {
    box-shadow: 0 0 10px rgba(66, 135, 245, 0.5);
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(66, 135, 245, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(122, 9, 183, 0.8);
    }
}

/* Tilt Effect */
.tilt {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

/* Button 3D Effect */
.btn-3d {
    position: relative;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.btn-3d:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateZ(-5px);
    filter: blur(5px);
    transition: all 0.3s ease;
}

.btn-3d:hover {
    transform: translateY(-3px) translateZ(10px);
}

.btn-3d:hover:before {
    transform: translateZ(-10px);
    filter: blur(10px);
}

/* 3D Scene Elements */
.scene-overlay {
    pointer-events: none;
}

.scene-interactive {
    pointer-events: auto;
    cursor: pointer;
}

/* Loading Animation */
.loading-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient 2s linear infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Feature Cards 3D Effect */
.feature-card-3d {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.feature-card-3d:hover {
    transform: translateZ(20px) rotateX(2deg) rotateY(5deg);
}

.feature-card-3d .feature-icon {
    transform: translateZ(40px);
}

.feature-card-3d .feature-title {
    transform: translateZ(30px);
}

.feature-card-3d .feature-description {
    transform: translateZ(20px);
}

/* Rotate Animation */
.rotate {
    animation: rotate 10s linear infinite;
}

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* 3D Text Effect */
.text-3d {
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.2),
                 0px 2px 0px rgba(255, 255, 255, 0.1),
                 0px 3px 0px rgba(255, 255, 255, 0.05),
                 0px 4px 5px rgba(0, 0, 0, 0.3);
}

/* Highlight Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #ffffff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Dynamic shadows */
.dynamic-shadow {
    position: relative;
}

.dynamic-shadow:after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 5%;
    width: 90%;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    filter: blur(10px);
    z-index: -1;
    transition: all 0.3s ease;
}

.dynamic-shadow:hover:after {
    bottom: -15px;
    filter: blur(15px);
    background: rgba(0, 0, 0, 0.4);
}