﻿/* ================================================================
   视频展示页面样式
   ================================================================ */

/* ------------------------------------------------------------
   01. Hero样式
   ------------------------------------------------------------ */
.video-hero .hero-badge.video {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* ===== 筛选区域 ===== */
.video-filter-section {
  background: #fff;
  padding: 30px 0;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 80px;
  z-index: 100;
}

/* 格式切换 */
.format-switcher {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}

.format-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 35px;
  background: #f8f8f8;
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.format-btn:hover {
  background: #f0f0f0;
}

.format-btn.active {
  background: linear-gradient(135deg, rgba(45, 90, 39, 0.1), rgba(45, 90, 39, 0.05));
  border-color: var(--primary);
}

.format-icon {
  font-size: 2rem;
}

.format-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.format-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* 分类筛选 */
.category-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.category-btn {
  padding: 10px 24px;
  background: #f5f5f5;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: #eee;
}

.category-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ===== 视频区域 ===== */
.video-section {
  padding: 60px 0;
}

.video-section:nth-child(even) {
  background: #f8faf8;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 40px;
}

.section-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.section-title-group .section-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(45, 90, 39, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.section-title-group .section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.section-title-group .section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* 视图切换 */
.view-toggle {
  display: flex;
  gap: 8px;
}

.view-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.view-btn:hover {
  background: #eee;
}

.view-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ===== 视频网格 ===== */
.video-grid {
  display: grid;
  gap: 25px;
}

/* 横屏视频网格 */
.landscape-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* 竖屏视频网格 */
.portrait-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== 视频卡片 ===== */
.video-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.video-card.featured {
  grid-column: span 2;
}

.video-card.featured .video-thumbnail {
  height: 280px;
}

/* 视频缩略图 */
.video-thumbnail {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #1a1a1a;
}

.video-thumbnail.portrait {
  height: 320px;
}

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

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

/* 视频时长 */
.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* 视频画质 */
.video-quality {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* 播放按钮遮罩 */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
  opacity: 1;
}

.play-btn {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.play-btn:hover {
  transform: scale(1.1);
  background: #fff;
}

.play-btn svg {
  margin-left: 4px;
}

/* 精选标记 */
.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* 视频信息 */
.video-info {
  padding: 20px;
}

.video-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.video-tag {
  padding: 4px 12px;
  background: rgba(45, 90, 39, 0.1);
  color: var(--primary);
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  gap: 15px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== 视频播放弹窗 ===== */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
}

.video-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* modalSlideIn 已移至 main.css 通用定义 */

.video-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container.portrait {
  aspect-ratio: 9 / 16;
  max-height: 70vh;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-modal-info {
  padding: 20px 24px;
  background: #1a1a1a;
}

.video-modal-title,
.video-modal-info h3 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 600;
}

.video-modal-desc,
.video-modal-info p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* ===== 竖屏视频弹窗 ===== */
.video-modal.portrait .video-modal-content {
  max-width: 450px;
}

.video-modal.portrait .video-container {
  aspect-ratio: 9 / 16;
  max-height: 70vh;
}

.video-modal.portrait .video-modal-info {
  padding: 16px 20px;
}

/* ===== 视频占位符 ===== */
.video-placeholder {
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* pulse 已移至 main.css */

.video-placeholder p {
  font-size: 1rem;
  opacity: 0.7;
}

/* ===== 列表视图 ===== */
.video-grid.list-view {
  grid-template-columns: 1fr;
}

.video-grid.list-view .video-card {
  display: flex;
  flex-direction: row;
}

.video-grid.list-view .video-card.featured {
  grid-column: span 1;
}

.video-grid.list-view .video-thumbnail {
  width: 300px;
  height: 170px;
  flex-shrink: 0;
}

.video-grid.list-view .video-thumbnail.portrait {
  width: 150px;
  height: 267px;
}

.video-grid.list-view .video-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== 隐藏状态 ===== */
.video-card.hidden {
  display: none;
}

.video-section.hidden {
  display: none;
}

/* ===== 响应式设计 ===== */








/* ===== 加载动画 ===== */
/* fadeInUp 已移至 main.css 通用定义 */
.video-card {
  animation: fadeInUp 0.5s ease;
}

/* 交错动画 */
.video-card:nth-child(1) { animation-delay: 0.1s; }
.video-card:nth-child(2) { animation-delay: 0.15s; }
.video-card:nth-child(3) { animation-delay: 0.2s; }
.video-card:nth-child(4) { animation-delay: 0.25s; }
.video-card:nth-child(5) { animation-delay: 0.3s; }
.video-card:nth-child(6) { animation-delay: 0.35s; }
.video-card:nth-child(7) { animation-delay: 0.4s; }
.video-card:nth-child(8) { animation-delay: 0.45s; }
