html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-moz-selection {
    background-color: #1a56db;
    color: #ffffff;
}

::selection {
    background-color: #1a56db;
    color: #ffffff;
}

@media (max-width: 767px) {
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
}

#countdown-area {
    animation: cdFadeIn 0.4s ease-out;
}

@keyframes cdFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#countdown-progress {
    transition: stroke-dashoffset 1s linear;
}

#countdown-num {
    animation: cdPulse 0.6s ease-in-out infinite alternate;
}

@keyframes cdPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.12);
    }
}

#submit-query:hover:not(:disabled) {
    box-shadow: 0 10px 25px -5px rgba(26, 86, 219, 0.4);
}

#submit-query:active:not(:disabled) {
    transform: scale(0.97);
}

#province:focus {
    outline: none;
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
}

#province:hover {
    border-color: #93c5fd;
}

#province.is-error {
    border-color: #e02424;
    box-shadow: 0 0 0 3px rgba(224, 36, 36, 0.15);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #1a56db;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 40;
    border: none;
    outline: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #1e40af;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top:focus-visible {
    outline: 2px solid #1a56db;
    outline-offset: 2px;
}