@import url("fonts.css");
@import url("root.css");

html {
    scroll-behavior: smooth;
}

@media (min-width: 641px) and (max-width: 1600px) {
    html {
        font-size: 13px; 
    }
}

@media (max-width: 640px) {
    html {
        font-size: 14px; 
    }
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::-webkit-scrollbar {
    width: 0.5rem;
}

::-webkit-scrollbar-track {
    background-color: var(--color-outline);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    cursor: pointer;
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-secondary);
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.decorative-icon {
    position: absolute;
    pointer-events: none;
    opacity: 0.1;
    z-index: 0;
    color: var(--color-text);
}

:root[data-color-scheme="dark"] .decorative-icon {
    opacity: 0.1;
}

.shadow-float {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.shadow-float-sm {
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
}

.shadow-float-md {
    box-shadow: 0 5px 20px -10px rgba(0, 0, 0, 0.1);
}

.btn-cta {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 0 #238a8e;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10;
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.05);
    box-shadow: 0 7px 0 #238a8e, 0 15px 30px -5px rgba(49, 175, 180, 0.5);
}

.btn-cta:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 0 #238a8e;
}

.btn-cta::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}

.btn-cta:hover::after {
    animation: shine 0.7s ease-in-out;
}

.input-container.password {
    position: relative;
}

.input-container.password input {
    padding-right: 3rem;
}

.input-container.password .toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 3rem;
    height: 100%;
    background-color: transparent;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>');
    background-size: 1.25rem;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
}

.input-container.password input[type="password"] + .toggle {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>');
}

.grecaptcha-badge {
    visibility: hidden;
}

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

.fade-in {
    animation: fade-in 0.4s ease-in-out;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

fade-in-up {
    animation: fade-in-up 0.5s ease-out forwards;
}

@keyframes slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

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

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slide-down 0.3s ease-out forwards;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(10px, -15px) rotate(4deg);
    }
    66% {
        transform: translate(-8px, -5px) rotate(-2deg);
    }
}

.float {
    animation: float 6s ease-in-out infinite
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

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

.spin {
    animation: spin 0.8s linear infinite;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--color-outline);
    border-radius: 50%;
    border-top-color: var(--color-content);
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes shine {
    0% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 4px 0 #238a8e, 0 0 0 0 rgba(49, 175, 180, 0.7);
    }
    50% {
        box-shadow: 0 4px 0 #238a8e, 0 0 0 10px rgba(49, 175, 180, 0);
    }
}

.subtle-pulse {
    animation: subtle-pulse 3s infinite;
}

.subtle-pulse:hover {
    animation: none;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--color-outline), 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--color-outline), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--color-outline), 0);
    }
}

.pulse-ring {
    animation: pulse-ring 2s infinite;
}

@keyframes pop-scale {
    0%, 40% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.5);
    }
    60%, 100% {
        transform: scale(1);
    }
}

.pop-scale {
    animation: pop-scale 3s ease-in-out infinite;
    transform-origin: center;
}

@keyframes magnet-swarm {
    0% {
        transform: translate(var(--tx), var(--ty));
        opacity: 0;
    }

    40% {
        transform: translate(0, 0);
        opacity: 1;
    }

    100% {
        transform: translate(0, 0);
        opacity: 1;
    }
}

.magnet-swarm {
    animation: magnet-swarm 3s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
    animation-delay: var(--delay);
    opacity: 0;
}
