/* 基础动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/*链接样式*/
a {
text-decoration: none; 
color: inherit; 
font-weight: inherit; 
font-style: inherit; 
}

/* 元素动画 */
.tool-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }

.announcement-card {
    animation: fadeIn 0.8s ease forwards;
}

.brand-name {
    animation: fadeIn 1s ease forwards;
}

.logo {
    animation: pulse 2s infinite;
}

/* 悬停动画 */
.nav-item a:hover {
    animation: fadeIn 0.3s ease;
}

.tool-card:hover .tool-icon {
    animation: pulse 0.6s ease;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* 按钮动画 */
.auth-btn:hover, .modal-btn:hover, .search-btn:hover {
    animation: pulse 0.5s ease;
}

/* 背景动画 */
.navbar {
    animation: fadeInDown 0.5s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 成功图标动画 */
.success-icon i {
    animation: fadeIn 0.5s ease, float 2s ease infinite;
}
