/* --- Styles from index.html --- */

/* Custom Scrollbar for Webkit browsers */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    /* gray-300 */
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    /* gray-400 */
}

/* 加载动画样式 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid transparent;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #667eea, #764ba2, #667eea);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingOverlay {
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

#loadingOverlay.show {
    opacity: 1;
    visibility: visible;
}

/* 字符导航栏样式 */
.character-nav-btn {
    min-width: 40px;
    white-space: nowrap;
}

/* 移动端优化 */
@media (max-width: 640px) {
    .character-nav-btn {
        min-width: 36px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    #characterNavigation {
        padding: 12px;
    }
    
    #characterNavigation .text-sm {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .character-nav-btn {
        min-width: 32px;
        padding: 6px 10px;
        font-size: 11px;
    }
}


/* --- Styles from dashboard.html --- */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    transition: all 0.3s ease-in-out;
}

/* 列表项动画 */
@keyframes flash-bg {
    from {
        background-color: #fefce8;
        /* Tailwind yellow-50 */
    }

    to {
        background-color: transparent;
    }
}

.flash-add {
    animation: flash-bg 1.5s ease-out;
}

/* 移除列表项的过渡效果 */
.list-item {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    opacity: 1;
    transform: translateX(0);
}

.list-item.fade-out {
    opacity: 0;
    transform: translateX(-20px);
}