/* =====================================================
   KURD STORES - ANIMATIONS & MICRO-INTERACTIONS
   Smooth, Professional Animations
   ===================================================== */

/* =====================================================
   ENTRANCE ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes flipInX {
    from {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-10deg);
    }
    70% {
        transform: perspective(400px) rotateX(10deg);
    }
    to {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

/* =====================================================
   EXIT ANIMATIONS
   ===================================================== */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* =====================================================
   ATTENTION SEEKERS
   ===================================================== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes swing {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

@keyframes tada {
    0%, 100% { transform: scale(1) rotate(0); }
    10%, 20% { transform: scale(0.9) rotate(-3deg); }
    30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
    40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

@keyframes wobble {
    0% { transform: translateX(0); }
    15% { transform: translateX(-25%) rotate(-5deg); }
    30% { transform: translateX(20%) rotate(3deg); }
    45% { transform: translateX(-15%) rotate(-3deg); }
    60% { transform: translateX(10%) rotate(2deg); }
    75% { transform: translateX(-5%) rotate(-1deg); }
    100% { transform: translateX(0); }
}

@keyframes jello {
    0%, 11.1%, 100% { transform: none; }
    22.2% { transform: skewX(-12.5deg) skewY(-12.5deg); }
    33.3% { transform: skewX(6.25deg) skewY(6.25deg); }
    44.4% { transform: skewX(-3.125deg) skewY(-3.125deg); }
    55.5% { transform: skewX(1.5625deg) skewY(1.5625deg); }
    66.6% { transform: skewX(-0.78125deg) skewY(-0.78125deg); }
    77.7% { transform: skewX(0.390625deg) skewY(0.390625deg); }
    88.8% { transform: skewX(-0.1953125deg) skewY(-0.1953125deg); }
}

/* =====================================================
   CONTINUOUS ANIMATIONS
   ===================================================== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(5, 214, 193, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(5, 214, 193, 0.6);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { opacity: 0; }
}

/* =====================================================
   LOADING ANIMATIONS
   ===================================================== */
@keyframes dots {
    0%, 20% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.3; transform: scale(1); }
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* =====================================================
   BUTTON ANIMATIONS
   ===================================================== */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* =====================================================
   CARD ANIMATIONS
   ===================================================== */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-hover-glow {
    transition: all 0.3s ease;
}

.card-hover-glow:hover {
    box-shadow: 0 0 30px rgba(5, 214, 193, 0.3);
}

.card-hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-scale:hover {
    transform: scale(1.02);
}

.card-hover-border {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.card-hover-border:hover {
    border-color: var(--primary);
}

/* =====================================================
   IMAGE ANIMATIONS
   ===================================================== */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

.img-hover-rotate {
    overflow: hidden;
}

.img-hover-rotate img {
    transition: transform 0.6s ease;
}

.img-hover-rotate:hover img {
    transform: rotate(5deg) scale(1.1);
}

.img-hover-brightness img {
    transition: filter 0.3s ease;
}

.img-hover-brightness:hover img {
    filter: brightness(1.1);
}

.img-hover-grayscale img {
    transition: filter 0.5s ease;
    filter: grayscale(100%);
}

.img-hover-grayscale:hover img {
    filter: grayscale(0%);
}

/* =====================================================
   TEXT ANIMATIONS
   ===================================================== */
.text-gradient-animate {
    background: linear-gradient(90deg, #1E90FF, #667eea, #764ba2, #1E90FF);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

.text-typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(30, end);
}

.text-cursor::after {
    content: '|';
    animation: blink 1s infinite;
}

/* =====================================================
   LINK ANIMATIONS
   ===================================================== */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

.link-underline-center {
    position: relative;
}

.link-underline-center::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
}

.link-underline-center:hover::after {
    left: 0;
    width: 100%;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.link-arrow i {
    transition: transform 0.3s ease;
}

.link-arrow:hover i {
    transform: translateX(5px);
}

/* =====================================================
   FORM ANIMATIONS
   ===================================================== */
.input-focus-glow:focus {
    animation: glow 1.5s ease-in-out infinite;
}

.input-shake-error {
    animation: shake 0.5s ease;
}

.label-float {
    transition: all 0.3s ease;
}

.input-wrapper:focus-within .label-float {
    transform: translateY(-25px) scale(0.85);
    color: var(--primary);
}

/* =====================================================
   NOTIFICATION ANIMATIONS
   ===================================================== */
.notification-enter {
    animation: fadeInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-exit {
    animation: fadeOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* =====================================================
   MODAL ANIMATIONS
   ===================================================== */
.modal-enter {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-exit {
    animation: scaleOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-backdrop-enter {
    animation: fadeIn 0.3s ease;
}

.modal-backdrop-exit {
    animation: fadeOut 0.2s ease forwards;
}

/* =====================================================
   DROPDOWN ANIMATIONS
   ===================================================== */
.dropdown-enter {
    animation: fadeInDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-exit {
    animation: fadeOutUp 0.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =====================================================
   PAGE TRANSITIONS
   ===================================================== */
.page-enter {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-exit {
    animation: fadeOutDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =====================================================
   STAGGER ANIMATIONS (for list items)
   ===================================================== */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }
.stagger-item:nth-child(7) { animation-delay: 0.35s; }
.stagger-item:nth-child(8) { animation-delay: 0.4s; }
.stagger-item:nth-child(9) { animation-delay: 0.45s; }
.stagger-item:nth-child(10) { animation-delay: 0.5s; }
.stagger-item:nth-child(11) { animation-delay: 0.55s; }
.stagger-item:nth-child(12) { animation-delay: 0.6s; }

/* =====================================================
   SKELETON LOADERS
   ===================================================== */
.skeleton-box {
    background: linear-gradient(
        90deg,
        var(--bg-elevated) 25%,
        var(--bg-card-hover) 37%,
        var(--bg-elevated) 63%
    );
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-image {
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
}

.skeleton-card {
    border-radius: var(--radius-xl);
    padding: var(--space-5);
}

/* =====================================================
   PROGRESS BAR ANIMATIONS
   ===================================================== */
.progress-bar-animated {
    position: relative;
    overflow: hidden;
}

.progress-bar-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* =====================================================
   ICON ANIMATIONS
   ===================================================== */
.icon-spin {
    animation: spin 1s linear infinite;
}

.icon-pulse {
    animation: pulse 1.5s ease infinite;
}

.icon-bounce {
    animation: bounce 1s infinite;
}

.icon-shake {
    animation: shake 0.5s ease;
}

.icon-heartbeat {
    animation: heartbeat 1.5s ease infinite;
}

/* =====================================================
   TOOLTIP ANIMATIONS
   ===================================================== */
.tooltip-animated {
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.2s ease;
}

.tooltip-trigger:hover .tooltip-animated {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =====================================================
   COUNTER ANIMATIONS
   ===================================================== */
.counter-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* =====================================================
   CHECKBOX & TOGGLE ANIMATIONS
   ===================================================== */
.checkbox-animated input:checked + .checkbox-visual {
    animation: bounceIn 0.4s ease;
}

.toggle-animated {
    transition: background 0.3s ease;
}

.toggle-animated .toggle-knob {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-animated input:checked + .toggle-visual .toggle-knob {
    transform: translateX(100%);
}

/* =====================================================
   PARALLAX EFFECT
   ===================================================== */
.parallax-slow {
    transform: translateY(calc(var(--scroll) * 0.3px));
}

.parallax-medium {
    transform: translateY(calc(var(--scroll) * 0.5px));
}

.parallax-fast {
    transform: translateY(calc(var(--scroll) * 0.8px));
}

/* =====================================================
   HOVER EFFECTS
   ===================================================== */
.hover-tilt {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg);
}

.hover-lift-shadow {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   UTILITY ANIMATION CLASSES
   ===================================================== */
.animate-once { animation-iteration-count: 1; }
.animate-twice { animation-iteration-count: 2; }
.animate-infinite { animation-iteration-count: infinite; }

.animate-fast { animation-duration: 0.3s; }
.animate-normal { animation-duration: 0.5s; }
.animate-slow { animation-duration: 0.8s; }
.animate-slower { animation-duration: 1.2s; }

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-delay-700 { animation-delay: 0.7s; }
.animate-delay-1000 { animation-delay: 1s; }

/* =====================================================
   READY-TO-USE ANIMATION CLASSES
   ===================================================== */
.animate-fadeIn {
    animation: fadeIn 0.6s ease-out both;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out both;
}

.animate-fadeInDown {
    animation: fadeInDown 0.6s ease-out both;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out both;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out both;
}

.animate-scaleIn {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-bounceIn {
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.animate-slideUp {
    animation: slideInUp 0.5s ease-out both;
}

.animate-slideDown {
    animation: slideInDown 0.5s ease-out both;
}

/* =====================================================
   REDUCED MOTION PREFERENCE
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

