/* 基础样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --gray-color: #95a5a6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-color));
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 15px;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

header h1 a {
    color: white;
    text-decoration: none;
}

.search-container {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
    max-width: 600px;
}

.search-container input {
    padding: 12px 15px;
    border: none;
    border-radius: 30px;
    flex: 1;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-container button {
    padding: 12px 25px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-container button:hover {
    background-color: #c0392b;
}

.update-info {
    text-align: right;
    color: var(--gray-color);
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* 分类区域 */
.category-section {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 12px;
}

.category-header h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.more-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.more-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
    text-decoration: underline;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.video-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.video-thumbnail {
    position: relative;
    height: 150px;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-thumbnail:hover .play-icon {
    opacity: 1;
}

.video-item h3 {
    padding: 15px 10px;
    font-size: 0.95rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--dark-color);
    font-weight: 600;
}

.video-player {
    display: none;
    padding: 10px;
}

.video-player video {
    width: 100%;
    border-radius: 5px;
    background: #000;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
}

.pagination span.current {
    background-color: var(--primary-color);
    color: white;
}

.pagination span.disabled {
    background-color: #f1f1f1;
    color: #bdc3c7;
    cursor: not-allowed;
}

.pagination span.dots {
    background: none;
    color: var(--dark-color);
    padding: 10px 5px;
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--gray-color);
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

/* 搜索结果页 */
.result-header {
    background-color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.result-header h2 {
    font-size: 1.3rem;
    color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    header {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .category-section {
        padding: 15px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-container button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-thumbnail {
        height: 120px;
    }
}