/* ============================================
   PREMIUM ANIMATIONS - TECHLIFE Flows
   Skeleton Loaders & Micro-interactions
   ============================================ */

/* ============================================
   1. SKELETON LOADERS
   ============================================ */

/* Keyframe de animación shimmer */
@keyframes shimmer {
    0% {
        background-position: -800px 0;
    }

    100% {
        background-position: 800px 0;
    }
}

/* Clase base de skeleton */
.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 0%,
            #e0e0e0 20%,
            #f0f0f0 40%,
            #f0f0f0 100%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
}

/* Skeleton en modo oscuro */
.dark .skeleton {
    background: linear-gradient(90deg,
            #1f2937 0%,
            #374151 20%,
            #1f2937 40%,
            #1f2937 100%);
    background-size: 800px 100%;
}

/* Variantes de skeleton */
.skeleton-text {
    height: 1rem;
    border-radius: 4px;
}

.skeleton-text-sm {
    height: 0.75rem;
    border-radius: 4px;
}

.skeleton-text-lg {
    height: 1.5rem;
    border-radius: 6px;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-card {
    min-height: 200px;
    border-radius: 16px;
}

.skeleton-button {
    height: 44px;
    border-radius: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* ============================================
   2. BUTTON MICRO-INTERACTIONS
   ============================================ */

/* Botón Premium con hover lift */
.btn-premium {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(0, 119, 255, 0.5);
}

.btn-premium:active {
    transform: translateY(0);
    box-shadow: 0 5px 20px -5px rgba(0, 119, 255, 0.4);
}

/* Botón con ripple glow */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow::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-glow:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   3. CARD MICRO-INTERACTIONS
   ============================================ */

/* Card con elevación suave */
.card-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

.dark .card-lift:hover {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

/* Card con borde glow */
.card-glow {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.card-glow:hover {
    border-color: rgba(0, 119, 255, 0.3);
    box-shadow: 0 0 30px -10px rgba(0, 119, 255, 0.3);
}

/* ============================================
   4. MODAL ANIMATIONS
   ============================================ */

/* Modal fade + slide desde abajo */
.modal-animate {
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal fade out */
.modal-animate-out {
    animation: modalSlideOut 0.2s ease-out forwards;
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
}

/* Backdrop del modal */
.modal-backdrop {
    animation: backdropFadeIn 0.2s ease-out;
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   5. DARK MODE TOGGLE ANIMATION
   ============================================ */

.theme-toggle-icon {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-icon.rotate {
    transform: rotate(360deg);
}

/* ============================================
   6. COUNT-UP ANIMATION
   ============================================ */

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-up {
    animation: countUp 0.5s ease-out forwards;
}

/* ============================================
   7. NAVIGATION ANIMATIONS
   ============================================ */

/* Indicador de tab activo animado */
.nav-slide-indicator {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Link de navegación con hover */
.nav-link-hover {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0077FF, #60a5fa);
    transition: width 0.3s ease;
}

.nav-link-hover:hover::after {
    width: 100%;
}

/* ============================================
   8. LOADING STATES
   ============================================ */

/* Pulse suave para elementos loading */
.loading-pulse {
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Spinner moderno */
.spinner-modern {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #0077FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.dark .spinner-modern {
    border-color: #374151;
    border-top-color: #60a5fa;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   9. TABLE ROW ANIMATIONS
   ============================================ */

/* Filas de tabla con fade-in escalonado */
.table-row-animate {
    animation: tableRowFadeIn 0.3s ease-out forwards;
    opacity: 0;
}

@keyframes tableRowFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover de fila de tabla */
.table-row-hover {
    transition: background-color 0.15s ease;
}

.table-row-hover:hover {
    background-color: rgba(0, 119, 255, 0.05);
}

.dark .table-row-hover:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ============================================
   10. UTILITY ANIMATIONS
   ============================================ */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide Up */
.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce suave */
.animate-bounce-soft {
    animation: bounceSoft 0.6s ease-out;
}

@keyframes bounceSoft {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }

    60% {
        transform: translateY(3px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
    }
}

/* ============================================
   11. GLASSMORPHISM EFFECTS
   ============================================ */

/* Card con efecto glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dark .glass-card {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Glassmorphism más intenso */
.glass-card-strong {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.dark .glass-card-strong {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Glassmorphism sutil para headers/navs */
.glass-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .glass-nav {
    background: rgba(17, 24, 39, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Glassmorphism con gradiente */
.glass-gradient {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass-gradient {
    background: linear-gradient(135deg,
            rgba(17, 24, 39, 0.8) 0%,
            rgba(17, 24, 39, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Glassmorphism con color accent */
.glass-primary {
    background: rgba(0, 119, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 119, 255, 0.2);
}

/* ============================================
   12. COMBINED EFFECTS (card-lift + glass)
   ============================================ */

.card-premium {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-premium:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 119, 255, 0.2);
}

.dark .card-premium {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dark .card-premium:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-color: rgba(96, 165, 250, 0.3);
}

/* Botón con efecto gradiente animado */
.btn-gradient-animated {
    background: linear-gradient(90deg, #0077FF, #60a5fa, #0077FF);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    transition: all 0.3s ease;
}

.btn-gradient-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 119, 255, 0.5);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ============================================
   13. CUSTOM UTILITIES
   ============================================ */

@keyframes shimmer-infinite {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer-infinite 2s infinite linear;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

/* ==========================================
   TIPOGRAFÍA PERSONALIZADA (NEXMOD)
   ========================================== */
@font-face {
    font-family: 'Nexmod';
    src: url('../fonts/Nexmod Regular.otf') format('opentype'),
        url('../fonts/Nexmod Regular.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nexmod Outline';
    src: url('../fonts/Nexmod Outline.otf') format('opentype'),
        url('../fonts/Nexmod Outline.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.font-nexmod {
    font-family: 'Nexmod', system-ui, -apple-system, sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.font-nexmod-outline {
    font-family: 'Nexmod Outline', system-ui, -apple-system, sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}