@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
    font-family: 'RuanMeng';
    src: url('RuanMeng-subset-fixed.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html,
body {
    font-family: 'Nunito', sans-serif;
    overscroll-behavior: none;
    touch-action: pan-y;
    height: 100%;
}

@keyframes shine {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

.animate-shine {
    animation: shine 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes snowfall {
    0% {
        transform: translate(0, -20px) rotate(0deg);
    }

    100% {
        transform: translate(200px, 105vh) rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-stagger-fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-pop-in {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes floatFall {
    0% {
        top: -10%;
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 110%;
        transform: translateX(0) rotate(360deg);
        opacity: 0;
    }
}

.animate-float-fall {
    position: fixed;
    right: 5%;
    animation: floatFall 25s linear infinite;
    z-index: 50;
}

.pause-on-hover:hover {
    animation-play-state: paused;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.dark select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}