/* 视频列表页（/video.html）：卡片网格 + 播放弹层 */

.video-page {
  padding: 40px 0 80px;
}

.video-hero {
  text-align: center;
  margin-bottom: 40px;
}

.video-page-title {
  font-family: 'Alibaba-PuHuiTi', sans-serif;
  font-size: 40px;
  font-weight: 600;
  color: #03256C;
  margin: 0 0 12px;
}

.video-page-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: #353CF6;
}

.video-page-subtitle {
  font-size: 16px;
  line-height: 1.7;
  color: #4B5563;
  max-width: 640px;
  margin: 16px auto 0;
}

.video-grid {
  display: grid;
  /* minmax(0, 1fr)：长单词不会把列撑宽导致卡片溢出 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 1023px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 639px) {
  .video-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.video-card {
  min-width: 0;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.video-card:hover {
  box-shadow: 0 16px 32px rgba(3, 37, 108, 0.14);
  transform: translateY(-4px);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1F2937 0%, #4F46E5 100%);
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-thumb-fallback {
  width: 100%;
  height: 100%;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.video-play::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #353CF6;
}

.video-card:hover .video-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #FFFFFF;
}

.video-card-body {
  padding: 16px 20px 20px;
  min-width: 0;
}

.video-card-title {
  font-family: 'Alibaba-PuHuiTi', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #03256C;
  line-height: 1.5;
  margin: 0 0 10px;
  /* 两行截断，避免长短标题卡片高度参差；长英文单词强制断行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

.video-card-intro {
  font-size: 14px;
  line-height: 1.6;
  color: #4B5563;
  margin: 0 0 10px;
  /* 两行截断，过长简介不撑破卡片；长英文单词强制断行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

.video-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  background: #eef4ff;
  color: #2c5fb8;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.6;
}

.video-empty {
  padding: 64px 0;
  text-align: center;
  font-size: 16px;
  color: #6B7280;
}

/* 播放弹层 */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2100; /* 高于咨询弹窗（2000） */
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal[hidden] {
  display: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 12, 34, 0.72);
}

.video-modal-panel {
  position: relative;
  width: min(880px, calc(100vw - 32px));
  background: #0B1020;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.video-modal-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #FFFFFF;
  color: #03256C;
  font-size: 16px;
  cursor: pointer;
}

.video-modal-player {
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
}

.video-modal-player video,
.video-modal-player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.video-modal-title {
  font-family: 'Alibaba-PuHuiTi', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 12px 4px 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 639px) {
  .video-modal-close {
    top: 8px;
    right: 8px;
  }
}
