/* 页面加载动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 应用动画的通用类 */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

/* 列表项依次显示动画 */
.stagger-animation > * {
    opacity: 0;
    animation: slideIn 0.5s ease-out forwards;
}

/* 为列表项设置延迟，实现依次显示效果 */
.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; } /* 电学计算器 */
.stagger-animation > *:nth-child(7) { animation-delay: 0.7s; } /* 热学计算器 */
.stagger-animation > *:nth-child(8) { animation-delay: 0.8s; } /* 磁学计算器 */

/* 交互动画 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 按钮点击动画 */
.button-press {
    transition: transform 0.1s ease;
}

.button-press:active {
    transform: scale(0.95);
}

/* 切换动画 */
.fade-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-transition.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
} 