/* 自定义样式 */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

.api-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.api-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.api-card.hidden {
    display: none;
}

@media (max-width: 768px) {
    .search-container {
        top: 68px;
    }
}


/* 添加Toast样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.3s ease;
}

.toast.show {
    display: flex !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.toast i {
    font-size: 16px;
}

.toast.success {
    background: #10B981;
}

.toast.error {
    background: #EF4444;
}

.toast.warning {
    background: #F59E0B;
}

/* 添加Toast样式 end */


/* 返回顶部样式 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    animation: fadeInUp 0.3s ease-out;
}

#backToTop {
    transition-property: opacity, transform, box-shadow;
    transition-duration: 0.3s;
}

/* 返回顶部样式 end*/