/* Animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translate3d(0, 100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInDown {
    from {
        transform: translate3d(0, -100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translate3d(-100%, 0, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        transform: translate3d(100%, 0, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(0.97, 0.97, 0.97);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes flipInX {
    from {
        transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
        animation-timing-function: ease-in;
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
        animation-timing-function: ease-in;
    }
    60% {
        transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
        opacity: 1;
    }
    80% {
        transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
    }
    to {
        transform: perspective(400px);
    }
}

@keyframes flipInY {
    from {
        transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
        animation-timing-function: ease-in;
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
        animation-timing-function: ease-in;
    }
    60% {
        transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
        opacity: 1;
    }
    80% {
        transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
    }
    to {
        transform: perspective(400px);
    }
}

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-zoomIn {
    animation: zoomIn 0.8s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slideInUp {
    animation: slideInUp 0.8s ease forwards;
}

.animate-slideInDown {
    animation: slideInDown 0.8s ease forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease forwards;
}

.animate-bounceIn {
    animation: bounceIn 1s ease forwards;
}

.animate-flipInX {
    animation: flipInX 1s ease forwards;
    backface-visibility: visible !important;
}

.animate-flipInY {
    animation: flipInY 1s ease forwards;
    backface-visibility: visible !important;
}

/* Staggered Animation Delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

.delay-900 {
    animation-delay: 0.9s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Scroll Animation Classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hover-shake:hover {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

/* Text Animation */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Magnetic Button Effect */
.magnetic-area {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.magnetic-content {
    transform: translate(0, 0);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Glow Effects */
.glow {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.glow-primary {
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
}

.glow-secondary {
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.4);
}

.glow-accent {
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.4);
}

/* Floating Animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translate(0, 0px); }
    50% { transform: translate(0, -15px); }
    100% { transform: translate(0, 0px); }
}

/* 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, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: .2;
    transition: 0s;
}

/* Card Hover Effects */
@keyframes cardHover {
    0% {
        transform: translateY(0) rotateX(0);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: translateY(-5px) rotateX(5deg);
        box-shadow: 0 10px 25px rgba(0, 217, 255, 0.15);
    }
    100% {
        transform: translateY(-10px) rotateX(0);
        box-shadow: 0 15px 30px rgba(0, 217, 255, 0.2);
    }
}

.detail-card:hover {
    animation: cardHover 0.5s ease forwards;
}

/* Icon Pulse Effect */
@keyframes iconPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 217, 255, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 217, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 217, 255, 0);
    }
}

.detail-card:hover .detail-icon {
    animation: iconPulse 1s ease;
}

/* Text Glow Effect */
.text-glow {
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.detail-card:hover .detail-content h4 {
    animation: textGlow 1s ease;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(0, 217, 255, 0.3); }
    50% { text-shadow: 0 0 15px rgba(0, 217, 255, 0.7); }
    100% { text-shadow: 0 0 5px rgba(0, 217, 255, 0.3); }
}

/* Title Underline Animation */
@keyframes underlineSlide {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.animated-title::after {
    animation: underlineSlide 0.8s ease forwards;
    animation-delay: 0.5s;
}

/* Fade In Up Animation for Cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-card {
    animation: fadeInUp 0.8s ease forwards;
}

.detail-card:nth-child(1) { animation-delay: 0.1s; }
.detail-card:nth-child(2) { animation-delay: 0.2s; }
.detail-card:nth-child(3) { animation-delay: 0.3s; }
.detail-card:nth-child(4) { animation-delay: 0.4s; }