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

/* Keyframes */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(46, 204, 113, 0.5); }
    50% { box-shadow: 0 0 20px rgba(46, 204, 113, 0.8); }
    100% { box-shadow: 0 0 5px rgba(46, 204, 113, 0.5); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes slideInDown {
    from {
        transform: translate3d(0, -100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInUp {
    from {
        transform: translate3d(0, 100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(100%, 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;
    }
}

/* Animation Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-glow {
    animation: glow 2s infinite;
}

.animate-spin {
    animation: spin 2s linear infinite;
}

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

.animate-slide-in-down {
    animation: slideInDown 0.5s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.5s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.5s ease-out;
}

.animate-zoom-in {
    animation: zoomIn 0.5s ease-out;
}

/* 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; }

/* Minecraft Block Animation */
@keyframes blockBreak {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

.block-break {
    animation: blockBreak 0.5s ease-out forwards;
}

/* Particle Animation */
@keyframes particleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: particleFloat 2s ease-out forwards;
}

/* Hover Animations */
.hover-scale {
    transition: transform 0.3s ease;
}

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

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

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

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

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Text Animation */
@keyframes textShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.text-shine {
    background: linear-gradient(90deg, #fff, #2ecc71, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 3s linear infinite;
}

/* Button Hover Effects */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-hover-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn-hover-effect:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}

/* Loading Bar */
@keyframes loadingBar {
    0% { width: 0; }
    100% { width: 100%; }
}

.loading-bar {
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, #2ecc71, #3498db);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    animation: loadingBar 2s ease-out forwards;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

/* Glitch Text */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    10% { clip: rect(112px, 9999px, 76px, 0); }
    20% { clip: rect(85px, 9999px, 77px, 0); }
    30% { clip: rect(27px, 9999px, 97px, 0); }
    40% { clip: rect(64px, 9999px, 98px, 0); }
    50% { clip: rect(61px, 9999px, 85px, 0); }
    60% { clip: rect(99px, 9999px, 114px, 0); }
    70% { clip: rect(34px, 9999px, 115px, 0); }
    80% { clip: rect(98px, 9999px, 129px, 0); }
    90% { clip: rect(43px, 9999px, 96px, 0); }
    100% { clip: rect(82px, 9999px, 64px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 119px, 0); }
    10% { clip: rect(65px, 9999px, 119px, 0); }
    20% { clip: rect(45px, 9999px, 66px, 0); }
    30% { clip: rect(110px, 9999px, 85px, 0); }
    40% { clip: rect(10px, 9999px, 2px, 0); }
    50% { clip: rect(75px, 9999px, 53px, 0); }
    60% { clip: rect(93px, 9999px, 96px, 0); }
    70% { clip: rect(98px, 9999px, 9px, 0); }
    80% { clip: rect(95px, 9999px, 98px, 0); }
    90% { clip: rect(6px, 9999px, 23px, 0); }
    100% { clip: rect(14px, 9999px, 79px, 0); }
}

/* Floating Blocks */
.floating-block {
    position: absolute;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.2);
    pointer-events: none;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

/* Cursor Effect */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #2ecc71;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transition: transform 0.1s ease;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(46, 204, 113, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.3s ease-out;
    transform: translate(-50%, -50%);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .custom-cursor,
    .cursor-follower {
        display: none;
    }
}
