/* ============================================================
   video.css — 视频区域、网格卡片、弹框播放器、播放列表
   ============================================================ */

/* ----- Video Section ----- */
#videos {
  padding: 0px 0 80px;
  background: white;
}

/* ----- Video Grid: 左侧高图 + 中列错落 + 右列等高 ----- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 44px;
  height: 780px;   /* 300(顶) + 12(gap) + 468(底) */
  align-items: stretch;
}

/* 左侧高图：撑满整列 */
.video-grid > .video-card {
  height: 100%;
}

/* 中列 / 右列：flex 纵向容器 */
.video-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

/* 中列：顶部固定矮，底部弹性填满（错落） */
.video-col--mid .video-card:first-child { flex: 0 0 300px; }
.video-col--mid .video-card:last-child  { flex: 1; }

/* 右列：两张等高 */
.video-col--right .video-card { flex: 1; }

/* ----- Video Card ----- */
.video-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transition: box-shadow 0.38s, transform 0.38s;
  background: #111;
}
.video-card:hover {
  box-shadow: 0 20px 56px rgba(0,0,0,0.24);
  transform: translateY(-4px) scale(1.01);
}

/* 背景图 */
.video-card img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.video-card:hover img { transform: scale(1.06); }

/* 渐变遮罩 */
.video-shade {
  position: absolute; inset: 0;
  /* background: linear-gradient(
    180deg,
    rgba(0,0,0,0.08)  0%,
    rgba(0,0,0,0.12) 40%,
    rgba(0,0,0,0.52) 100%
  ); */
  transition: opacity 0.38s;
  opacity: 1;
}
.video-card:hover .video-shade {
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.15)  0%,
    rgba(0,0,0,0.18) 40%,
    rgba(0,0,0,0.68) 100%
  );
}

/* ----- 卡片文字信息（居中叠加） ----- */
.video-info {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 20px;
  z-index: 2;
  pointer-events: none;
}

.video-cn-title {
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 900;
  color: white;
  letter-spacing: 4px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
  line-height: 1.15;
  transition: transform 0.35s, text-shadow 0.35s;
}
/* 左侧高图字号放大 */
.video-card:first-child .video-cn-title {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: 6px;
}
.video-card:hover .video-cn-title {
  transform: translateY(-3px);
  text-shadow: 0 4px 28px rgba(0,0,0,0.7);
}

.video-en-title {
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  letter-spacing: 2px;
  font-weight: 500;
  text-transform: uppercase;
  margin-top: 7px;
  transition: opacity 0.35s;
}
.video-card:first-child .video-en-title { font-size: 13.5px; margin-top: 9px; }

/* 圆形播放/展开按钮 */
.video-play-ring {
  margin-top: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 1.5px solid rgba(255,255,255,0.46);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: white;
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
  pointer-events: auto;
}
.video-card:first-child .video-play-ring { width: 50px; height: 50px; margin-top: 26px; }
.video-card:hover .video-play-ring {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.8);
  transform: scale(1.12);
}
.video-play-ring svg { width: 18px; height: 18px; }
.video-card:first-child .video-play-ring svg { width: 22px; height: 22px; }

/* ===== Video Modal ===== */
.vmodal-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4,8,20,0.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.vmodal-backdrop.open { opacity: 1; visibility: visible; }

.vmodal-box {
  width: min(1160px, 96vw); max-height: 88vh;
  background: #0d1117;
  border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 36px 96px rgba(0,0,0,0.75);
  display: flex; flex-direction: column;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.42s cubic-bezier(0.34,1.4,0.64,1);
}
.vmodal-backdrop.open .vmodal-box { transform: scale(1) translateY(0); }

/* Modal Header */
.vmodal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 20px; flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.vmodal-zone-badge { width: 5px; height: 22px; border-radius: 3px; flex-shrink: 0; }
.vmodal-title { font-size: 16px; font-weight: 800; color: white; letter-spacing: 0.3px; flex: 1; }
.vmodal-count { font-size: 12px; color: rgba(255,255,255,0.3); margin-right: 8px; }
.vmodal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.07); border: none;
  color: rgba(255,255,255,0.55); font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s; flex-shrink: 0;
}
.vmodal-close:hover { background: rgba(255,255,255,0.18); color: white; }

/* Modal Body */
.vmodal-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* Left — player */
.vmodal-left { flex: 1 1 0; display: flex; flex-direction: column; min-width: 0; }
.vmodal-player {
  position: relative; width: 100%; padding-top: 56.25%; background: #000; flex-shrink: 0;
}
.vmodal-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.vmodal-now-playing {
  padding: 12px 18px 14px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0;
}
.vmodal-np-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--blue);
}
.vmodal-np-title {
  font-size: 14px; font-weight: 700; color: white;
  margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Right — playlist */
.vmodal-playlist {
  width: 290px; flex-shrink: 0;
  background: rgba(0,0,0,0.25);
  border-left: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column; overflow: hidden;
}
.vpl-header {
  padding: 12px 16px 10px; flex-shrink: 0;
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px;
  text-transform: uppercase; color: rgba(255,255,255,0.28);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vpl-list { overflow-y: auto; flex: 1; }
.vpl-list::-webkit-scrollbar { width: 4px; }
.vpl-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.vpl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.2s; position: relative;
}
.vpl-item:hover { background: rgba(255,255,255,0.05); }
.vpl-item.active { background: rgba(26,111,244,0.12); }
.vpl-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 0 2px 2px 0;
}
.vpl-num {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.2); width: 18px; text-align: center; flex-shrink: 0;
}
.vpl-item.active .vpl-num { color: var(--blue); }
.vpl-thumb {
  width: 76px; height: 44px; border-radius: 6px; overflow: hidden;
  flex-shrink: 0; position: relative; background: #1a1e2e;
}
.vpl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vpl-thumb-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.28); opacity: 0; transition: opacity 0.2s;
}
.vpl-item:hover .vpl-thumb-overlay,
.vpl-item.active .vpl-thumb-overlay { opacity: 1; }
.vpl-item.active .vpl-thumb-overlay { background: rgba(26,111,244,0.4); }
.vpl-thumb-overlay svg { width: 16px; height: 16px; color: white; }
.vpl-info { flex: 1; min-width: 0; }
.vpl-title {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.65);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4;
}
.vpl-item.active .vpl-title { color: white; }
.vpl-duration { font-size: 11px; color: rgba(255,255,255,0.28); margin-top: 3px; }

/* ----- Responsive ----- */

/* Tablet (601–1023px)：双列，左高图 + 右侧一个 flex 列 */
@media (max-width: 1023px) and (min-width: 601px) {
  .video-grid {
    grid-template-columns: 1fr 1fr;
    height: auto;
    grid-template-rows: none;
  }
  /* 平板：左高图固定高度 */
  .video-grid > .video-card { height: 500px; }
  /* 中列：顶矮底高 */
  .video-col--mid .video-card:first-child { flex: 0 0 190px; }
  /* 右列等高由 flex:1 保持 */
  /* 第三列换行到第二行 */
  .video-col--right {
    grid-column: 1 / -1;
    flex-direction: row;
    height: 220px;
  }
}

/* Mobile：单列堆叠，取消 flex 容器限制 */
@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: 1fr;
    height: auto;
    gap: 10px;
  }
  .video-grid > .video-card { height: 200px; }
  .video-col {
    flex-direction: column;
    height: auto;
    gap: 10px;
  }
  .video-col--mid .video-card:first-child { flex: 0 0 180px; }
  .video-col--mid .video-card:last-child  { flex: 0 0 220px; }
  .video-col--right .video-card           { flex: 0 0 200px; }
}

/* Modal 竖向布局 */
@media (max-width: 700px) {
  .vmodal-body { flex-direction: column; }
  .vmodal-playlist {
    width: 100%; max-height: 220px;
    border-left: none; border-top: 1px solid rgba(255,255,255,0.07);
  }
}
