.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.loading-state,
.no-results {
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.no-results i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================================
   Coin Explosion Effect
   ========================================== */
.bounce-icon {
    cursor: pointer;
    transition: transform 0.1s !important;
}

.bounce-icon:active {
    transform: scale(0.9) !important;
}

.coin-particle {
    position: fixed;
    z-index: 9999;
    font-size: 1.2rem;
    pointer-events: none;
    user-select: none;
    animation: coin-fly 0.8s ease-out forwards;
}

@keyframes coin-fly {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1.2);
    }

    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--tr)) scale(0.8);
        opacity: 0;
    }
}

/* ===========================================
   Auto-Update Notice (footer)
   ========================================== */
.auto-update-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.9rem 1.5rem;
    margin-top: 0;
    border-top: 1px solid rgba(52, 211, 153, 0.12);
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: rgba(52, 211, 153, 0.04);
    border-radius: 0 0 20px 20px;
}

.auto-update-notice strong {
    color: #34d399;
}

.auto-update-notice a {
    color: #34d399;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.auto-update-notice a:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* ===========================================
   Loading Message Rotator Animation
   ========================================== */
@keyframes loadingFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.loading-message-rotator {
    transition: opacity 0.3s ease;
}

#loadingMessageSpan {
    display: inline-block;
    animation: loadingFadeIn 0.4s ease;
}

/* 文字切換時的淡出效果（由JS動態添加/移除） */
#loadingMessageSpan.fade-out {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#loadingMessageSpan.fade-in {
    animation: loadingFadeIn 0.35s ease forwards;
}