/* ===================================
   WeDevelop DNS - Animation Styles
   =================================== */

/* Smooth fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse effect for buttons */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

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

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

/* Shimmer effect for loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Glow effect */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(13, 110, 253, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(13, 110, 253, 0.8), 0 0 30px rgba(13, 110, 253, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(13, 110, 253, 0.5);
    }
}

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

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

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Ripple effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===================================
   Applied Animation Classes
   =================================== */

/* Fade in on page load */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.fade-in-delay-1 {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.1s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.2s forwards;
}

.fade-in-delay-3 {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

/* Slide animations */
.slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease-out forwards;
}

/* Hover animations */
.hover-float:hover {
    animation: float 2s ease-in-out infinite;
}

.hover-pulse:hover {
    animation: pulse 1s;
}

.hover-bounce:hover {
    animation: bounce 1s;
}

.hover-glow:hover {
    animation: glow 2s ease-in-out infinite;
}

/* Rotating spinner */
.spin {
    animation: rotate 1s linear infinite;
}

.spin-slow {
    animation: rotate 3s linear infinite;
}

/* Shimmer loading effect */
.shimmer {
    background: linear-gradient(to right, #2a2a2a 4%, #333 25%, #2a2a2a 36%);
    background-size: 1000px 100%;
    animation: shimmer 2s linear infinite;
}

/* Shake for errors */
.shake-error {
    animation: shake 0.5s;
}

/* Ripple button effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
}

.ripple:active::before {
    width: 100px;
    height: 100px;
    animation: ripple 0.6s ease-out;
}

/* ===================================
   Transition Classes
   =================================== */

/* Smooth all transitions */
.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

/* Scale on hover */
.scale-hover {
    transition: transform 0.2s ease;
}

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

.scale-hover-small:hover {
    transform: scale(1.02);
}

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

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

/* ===================================
   Easter Egg Animations
   =================================== */

/* Rainbow text animation */
@keyframes rainbow {
    0% { color: #ff0000; }
    16% { color: #ff8800; }
    33% { color: #ffff00; }
    50% { color: #00ff00; }
    66% { color: #0088ff; }
    83% { color: #8800ff; }
    100% { color: #ff0000; }
}

.rainbow-text {
    animation: rainbow 5s linear infinite;
}

/* Party mode */
@keyframes party {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }
    25% { 
        transform: rotate(5deg) scale(1.1);
        filter: hue-rotate(90deg);
    }
    50% { 
        transform: rotate(-5deg) scale(1);
        filter: hue-rotate(180deg);
    }
    75% { 
        transform: rotate(5deg) scale(1.1);
        filter: hue-rotate(270deg);
    }
}

.party-mode {
    animation: party 2s ease-in-out infinite;
}

/* Confetti animation */
@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #ff0066, #ffcc00, #00ff66, #0066ff);
    animation: confetti 3s linear;
    z-index: 9999;
}

/* ===================================
   Loading States
   =================================== */

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Pulse loader dots */
.loader-dots {
    display: inline-flex;
    gap: 5px;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0d6efd;
    animation: pulse 1.4s ease-in-out infinite both;
}

.loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

/* ===================================
   Notification Animations
   =================================== */

/* Notification slide in */
@keyframes notificationSlide {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-enter {
    animation: notificationSlide 0.3s ease-out;
}

/* Success animation */
.success-animation {
    position: relative;
}

.success-animation::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #28a745;
    font-size: 24px;
    animation: successPop 0.5s ease-out forwards;
}

@keyframes successPop {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ===================================
   Card Animations
   =================================== */

/* Card entrance */
.card-entrance {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-out forwards;
}

.card-entrance:nth-child(1) { animation-delay: 0.1s; }
.card-entrance:nth-child(2) { animation-delay: 0.2s; }
.card-entrance:nth-child(3) { animation-delay: 0.3s; }
.card-entrance:nth-child(4) { animation-delay: 0.4s; }
.card-entrance:nth-child(5) { animation-delay: 0.5s; }

/* Hover card flip */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

/* ===================================
   Interactive Elements
   =================================== */

/* Button press effect */
.btn-press {
    transition: transform 0.1s ease;
}

.btn-press:active {
    transform: scale(0.95);
}

/* Toggle switch animation */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    transition: background 0.3s ease;
    cursor: pointer;
}

.toggle-switch.active {
    background: #0d6efd;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(30px);
}

/* ===================================
   Scroll Animations
   =================================== */

/* Fade in on scroll */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax effect */
.parallax {
    transition: transform 0.1s ease-out;
}

/* ===================================
   Special Effects
   =================================== */

/* Glitch effect */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 #00fffc, -0.05em -0.025em 0 #fc00ff,
            0.025em 0.05em 0 #fffc00;
    }
    15% {
        text-shadow: 0.05em 0 0 #00fffc, -0.05em -0.025em 0 #fc00ff,
            0.025em 0.05em 0 #fffc00;
    }
    16% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.025em 0 #fc00ff,
            -0.05em -0.05em 0 #fffc00;
    }
    49% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.025em 0 #fc00ff,
            -0.05em -0.05em 0 #fffc00;
    }
    50% {
        text-shadow: 0.025em 0.05em 0 #00fffc, 0.05em 0 0 #fc00ff,
            0 -0.05em 0 #fffc00;
    }
    99% {
        text-shadow: 0.025em 0.05em 0 #00fffc, 0.05em 0 0 #fc00ff,
            0 -0.05em 0 #fffc00;
    }
    100% {
        text-shadow: -0.025em 0 0 #00fffc, -0.025em -0.025em 0 #fc00ff,
            -0.025em -0.05em 0 #fffc00;
    }
}

.glitch {
    animation: glitch 0.5s infinite;
}

/* Neon glow */
.neon {
    text-shadow: 0 0 10px currentColor,
                 0 0 20px currentColor,
                 0 0 40px currentColor,
                 0 0 80px currentColor;
}

/* ===================================
   Responsive Animations
   =================================== */

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

/* Mobile optimizations */
@media (max-width: 768px) {
    @keyframes mobileSlideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .mobile-slide-up {
        animation: mobileSlideUp 0.3s ease-out;
    }
}