/* 梧铜次元视频网站样式文件 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Arial', sans-serif; line-height: 1.6; color: #333; margin: 0; padding: 0; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 10px; }

/* 主内容区域 */
.main-content { min-height: 100vh; padding: 0; }

/* 热门视频样式 */
.trending { padding: 0 0 20px 0; }

/* 网站头部 */
.site-header { margin-bottom: 20px; text-align: center; padding: 0; }
.site-name { font-size: 36px; font-weight: bold; color: #e50914; margin: 0; padding: 10px 0; }

/* 搜索框样式 */
.search-container { display: flex; justify-content: center; align-items: center; margin-top: 20px; }
#search-input { width: 300px; padding: 10px 15px; font-size: 14px; border: 1px solid #ddd; border-radius: 4px 0 0 4px; outline: none; }
#search-input:focus { border-color: #e50914; }
#search-button { padding: 10px 20px; background: #e50914; color: white; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px; font-weight: bold; transition: background 0.3s ease; }
#search-button:hover { background: #f40612; }

/* 视频网格 */
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }

/* 视频卡片 */
.video-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.video-card:hover { transform: translateY(-5px); box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15); }

/* 视频缩略图 */
.video-thumbnail { position: relative; height: 180px; overflow: hidden; }
.video-thumbnail img, .video-thumbnail video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.video-card:hover .video-thumbnail img, 
.video-card:hover .video-thumbnail video { 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: 3px; font-size: 9px; font-weight: 500; }

/* 视频信息 */
.video-info { padding: 12px; }
.video-title { font-size: 14px; font-weight: bold; margin-bottom: 8px; color: #333; line-height: 1.4; text-align: center; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.video-meta { font-size: 10px; color: #666; text-align: center; }

/* 无搜索结果提示 */
.no-result { grid-column: 1 / -1; text-align: center; padding: 60px 20px; font-size: 16px; color: #666; background: #f9f9f9; border-radius: 8px; margin: 20px 0; }

/* 视频播放窗口 */
.video-player-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.video-player { position: relative; background: #fff; border-radius: 8px; width: 90%; max-width: 800px; max-height: 80vh; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.close-button { position: absolute; top: 10px; right: 15px; background: rgba(0, 0, 0, 0.7); border: none; border-radius: 50%; width: 30px; height: 30px; font-size: 20px; color: #fff; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; }
.player-title { padding: 15px; margin: 0; background: #333; color: #fff; font-size: 16px; font-weight: bold; }
.player-controls { padding: 10px 15px; background: #f5f5f5; border-bottom: 1px solid #ddd; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.player-controls label { font-size: 14px; color: #333; font-weight: 500; white-space: nowrap; }
.player-controls input[type="color"] { width: 40px; height: 30px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; }
.player-controls .color-control { display: flex; align-items: center; gap: 8px; }
.player-video-container { padding: 20px; background: #000; }
.player-video-container video { width: 100%; height: auto; max-height: 60vh; }
.video-error { color: #ff0000; text-align: center; padding: 40px 20px; font-size: 14px; }

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content { padding: 10px 0; min-height: 100vh; display: flex; flex-direction: column; }
    .trending { padding: 10px 0; flex: 1; display: flex; flex-direction: column; }
    .container { flex: 1; display: flex; flex-direction: column; }
    .site-header { margin-bottom: 10px; padding: 5px 0; }
    .site-name { font-size: 24px; margin: 0; padding: 5px 0; }
    .search-container { margin-top: 10px; margin-bottom: 10px; }
    #search-input { width: 250px; padding: 8px 12px; font-size: 13px; }
    #search-button { padding: 8px 16px; font-size: 13px; }
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; flex: 1; }
    .video-thumbnail { height: 140px; }
    .video-info { padding: 8px; }
    .video-title { font-size: 11px; margin-bottom: 4px; }
    .video-meta { font-size: 9px; }
}

@media (max-width: 480px) {
    .main-content { padding: 8px 0; }
    .trending { padding: 8px 0; }
    .site-name { font-size: 20px; }
    .search-container { margin-top: 8px; margin-bottom: 8px; }
    #search-input { width: 200px; padding: 6px 10px; font-size: 12px; }
    #search-button { padding: 6px 12px; font-size: 12px; }
    .video-grid { gap: 8px; }
    .video-thumbnail { height: 120px; }
    .video-info { padding: 6px; }
    .video-title { font-size: 10px; }
    .video-meta { font-size: 8px; }
}