/* 搜索结果页面样式 */
.search-header {
    width: 100%;
    margin: 0;
    padding: 8px;
    box-sizing: border-box;
}

.search-info {
    background: #333;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    margin-bottom: 20px;
}

.search-keyword {
    color: orange;
    font-weight: bold;
}

.search-stats {
    color: #ccc;
    font-size: 14px;
}

/* 搜索结果网格 */
.search-results {
    width: 100%;
    margin: 0;
    padding: 8px;
    box-sizing: border-box;
    min-width: 0;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.video-card {
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 165, 0, 0.3);
}

.video-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 15px;
}

.video-title {
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px; /* 确保标题区域固定高度 */
}

.video-info .video-description {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 6px 0;
    color: #999;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 15px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 11px;
    margin-bottom: 4px;
}

.video-stats {
    display: flex;
    gap: 10px;
}

.video-category {
    color: orange;
    font-size: 11px;
}

/* 分页样式 */
.pagination {
    width: 100%;
    margin: 30px 0;
    padding: 0 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.pagination a, .pagination span {
    padding: 10px 15px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background: orange;
}

.pagination .current {
    background: orange;
    color: white;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 无结果提示 */
.no-results {
    width: 100%;
    margin: 50px 0;
    padding: 40px 8px;
    text-align: center;
    color: #999;
    box-sizing: border-box;
}

.no-results h3 {
    color: white;
    margin-bottom: 15px;
}

.no-results p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.search-suggestions {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.search-suggestions h4 {
    color: orange;
    margin-bottom: 10px;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
}

.search-suggestions li {
    margin: 5px 0;
}

.search-suggestions a {
    color: #ccc;
    text-decoration: none;
}

.search-suggestions a:hover {
    color: orange;
}

/* 推荐视频样式 */
.recommended-videos {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #444;
}

.recommended-videos h4 {
    color: orange;
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-header, .search-results, .pagination, .no-results {
        margin: 10px 0;
        padding: 0 5px;
    }
    
    .videos-grid {
        grid-template-columns: repeat(2, 1fr); /* 移动端每行2个 */
        gap: 10px;
    }
    
    .video-thumbnail {
        height: 120px;
    }
    
    .video-info {
        padding: 10px;
    }
    
    .video-title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination a, .pagination span {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-header, .search-results, .pagination, .no-results {
        padding: 0 3px;
    }
    
    .videos-grid {
        grid-template-columns: repeat(2, 1fr); /* 小屏幕依然保持每行2个 */
        gap: 8px;
    }
    
    .video-thumbnail {
        height: 100px;
    }
    
    .video-info {
        padding: 8px;
    }
    
    .video-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        font-size: 11px;
    }
    
    .video-stats {
        gap: 8px;
    }
}