/* ================================================
   1337 MEDIA BV - Advanced Animations
   ================================================ */

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

/* Fade Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(96, 230, 197, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(96, 230, 197, 0);
    }
}

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

@keyframes floatRotate {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Gradient Shift */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

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

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(96, 230, 197, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(96, 230, 197, 0.6));
    }
}

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

/* Text Reveal */
@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

/* Morph */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

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

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Line Draw */
@keyframes lineDraw {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Wiggle */
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* ================================================
   ANIMATION UTILITY CLASSES
   ================================================ */

/* Fade In */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out forwards;
}

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

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

/* Scale */
.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

/* Pulse */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Float */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-rotate {
    animation: floatRotate 4s ease-in-out infinite;
}

/* Rotate */
.animate-rotate {
    animation: rotate 20s linear infinite;
}

.animate-rotate-reverse {
    animation: rotateReverse 20s linear infinite;
}

/* Bounce */
.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* Shimmer */
.animate-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Glow */
.animate-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Morph */
.animate-morph {
    animation: morph 8s ease-in-out infinite;
}

/* ================================================
   ANIMATION DELAY UTILITIES
   ================================================ */

.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; }

/* ================================================
   ANIMATION DURATION UTILITIES
   ================================================ */

.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.5s; }
.duration-slow { animation-duration: 0.8s; }
.duration-slower { animation-duration: 1.2s; }

/* ================================================
   HOVER EFFECTS
   ================================================ */

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

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Scale Effect */
.hover-scale {
    transition: transform 0.3s ease;
}

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

/* Glow Effect */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(96, 230, 197, 0.3);
}

/* Border Glow */
.hover-border-glow {
    position: relative;
    transition: all 0.3s ease;
}

.hover-border-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #60E6C5, #5B8DEF, #A855F7, #60E6C5);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hover-border-glow:hover::before {
    opacity: 1;
    animation: gradientShift 3s ease infinite;
}

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

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

/* Underline Animation */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #60E6C5, #5B8DEF);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.hover-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ================================================
   SPECIAL EFFECTS
   ================================================ */

/* Gradient Text Animation */
.gradient-text-animated {
    background: linear-gradient(
        135deg,
        #60E6C5 0%,
        #5B8DEF 25%,
        #A855F7 50%,
        #5B8DEF 75%,
        #60E6C5 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s linear infinite;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

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

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

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

@keyframes glitch-1 {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    5% { clip: rect(70px, 9999px, 71px, 0); }
    10% { clip: rect(29px, 9999px, 24px, 0); }
    15% { clip: rect(69px, 9999px, 68px, 0); }
    20% { clip: rect(67px, 9999px, 96px, 0); }
    25% { clip: rect(44px, 9999px, 47px, 0); }
    30% { clip: rect(25px, 9999px, 75px, 0); }
    35% { clip: rect(35px, 9999px, 87px, 0); }
    40% { clip: rect(33px, 9999px, 54px, 0); }
    45% { clip: rect(62px, 9999px, 33px, 0); }
    50% { clip: rect(29px, 9999px, 51px, 0); }
    55% { clip: rect(15px, 9999px, 85px, 0); }
    60% { clip: rect(70px, 9999px, 17px, 0); }
    65% { clip: rect(95px, 9999px, 62px, 0); }
    70% { clip: rect(45px, 9999px, 72px, 0); }
    75% { clip: rect(38px, 9999px, 98px, 0); }
    80% { clip: rect(73px, 9999px, 15px, 0); }
    85% { clip: rect(24px, 9999px, 89px, 0); }
    90% { clip: rect(18px, 9999px, 42px, 0); }
    95% { clip: rect(67px, 9999px, 31px, 0); }
    100% { clip: rect(52px, 9999px, 77px, 0); }
}

@keyframes glitch-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); }
    15% { clip: rect(75px, 9999px, 5px, 0); }
    20% { clip: rect(67px, 9999px, 61px, 0); }
    25% { clip: rect(14px, 9999px, 79px, 0); }
    30% { clip: rect(1px, 9999px, 66px, 0); }
    35% { clip: rect(86px, 9999px, 30px, 0); }
    40% { clip: rect(23px, 9999px, 98px, 0); }
    45% { clip: rect(85px, 9999px, 72px, 0); }
    50% { clip: rect(71px, 9999px, 75px, 0); }
    55% { clip: rect(2px, 9999px, 48px, 0); }
    60% { clip: rect(30px, 9999px, 16px, 0); }
    65% { clip: rect(59px, 9999px, 50px, 0); }
    70% { clip: rect(41px, 9999px, 62px, 0); }
    75% { clip: rect(2px, 9999px, 82px, 0); }
    80% { clip: rect(47px, 9999px, 73px, 0); }
    85% { clip: rect(3px, 9999px, 27px, 0); }
    90% { clip: rect(26px, 9999px, 55px, 0); }
    95% { clip: rect(42px, 9999px, 25px, 0); }
    100% { clip: rect(38px, 9999px, 91px, 0); }
}

/* Spotlight Effect */
.spotlight {
    position: relative;
    overflow: hidden;
}

.spotlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(96, 230, 197, 0.1) 0%,
        transparent 50%
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.spotlight:hover::before {
    opacity: 1;
}

/* Noise Texture */
.noise-texture {
    position: relative;
}

.noise-texture::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* ================================================
   LOADING STATES
   ================================================ */

/* Skeleton Loader */
.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #60E6C5;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

/* Dots Loading */
.dots-loading {
    display: flex;
    gap: 8px;
}

.dots-loading span {
    width: 8px;
    height: 8px;
    background: #60E6C5;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.dots-loading span:nth-child(1) { animation-delay: 0s; }
.dots-loading span:nth-child(2) { animation-delay: 0.2s; }
.dots-loading span:nth-child(3) { animation-delay: 0.4s; }

/* ================================================
   TRANSITION UTILITIES
   ================================================ */

.transition-none { transition: none; }
.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
.transition-opacity { transition: opacity 0.3s ease; }
.transition-transform { transition: transform 0.3s ease; }
.transition-shadow { transition: box-shadow 0.3s ease; }

/* ================================================
   REDUCED MOTION
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-float,
    .animate-pulse,
    .animate-rotate,
    .animate-bounce,
    .animate-shimmer,
    .animate-glow,
    .animate-morph {
        animation: none !important;
    }
}
