/* Custom Global Animations */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1f293b 25%, #334155 37%, #1f293b 63%);
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Fade In */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Pulse */
.btn-pulse:active {
    transform: scale(0.95);
}

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 640px) {

    /* Improve Typography */
    html {
        font-size: 14px;
    }

    h1,
    .text-4xl {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    h2,
    .text-2xl {
        font-size: 1.5rem !important;
    }

    /* Improve Touch Targets */
    button,
    a.btn,
    a.nav-link,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Better Spacing */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Test Area Improvements */
    #test-area {
        font-size: 16px !important;
        /* Prevent zoom on input */
        padding: 12px !important;
    }

    /* Fix potential overflow */
    img {
        max-width: 100%;
        height: auto;
    }
}