/* 基础动画定义 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    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); }
}

/* 自定义加载动画 */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 视频卡片样式 */
.video-card {
    display: block;
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #A7C7E7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8bb4d8;
}

/* 自定义按钮效果 */
button, a {
    transition: all 0.2s ease;
}

button:active, a:active {
    transform: scale(0.95);
}

/* 渐入动画类 */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* 各部分的延迟动画 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* 响应式调整 */
@media (max-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-3 {
        grid-template-columns: 1fr;
    }
}
