/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

/* 主内容区样式 */
main {
    min-height: calc(100vh - 140px);
    padding: 20px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 视频卡片样式 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-thumbnail {
    width: 100%;
    height: 160px;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-card:hover .play-icon {
    opacity: 1;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 14px;
    color: #666;
    display: flex;
    gap: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
    
    .video-thumbnail {
        height: 140px;
    }
    
    .play-icon {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}

/* 状态消息样式 */
.no-videos, .error {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
}

.error {
    color: #e74c3c;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    font-size: 14px;
    margin-top: 40px;
}
