/* ===========================================================
   视频嵌入样式
   - 视频缩略图展示
   - 视频播放器样式
   - 加载状态和错误处理
   - 响应式布局
   =========================================================== */

/* 视频缩略图样式 */
.t1-thumb--video {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(20, 25, 35, 0.9), rgba(10, 15, 25, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.t1-thumb--video::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    transparent 0%, 
    transparent 50%, 
    rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
  pointer-events: none;
}

.t1-thumb--video:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 170, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
              0 0 20px rgba(120, 170, 255, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.t1-thumb--video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.t1-thumb--video:hover img {
  transform: scale(1.05);
}

/* 视频播放按钮覆盖层 */
.t1-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, 
    rgba(120, 170, 255, 0.95), 
    rgba(80, 130, 220, 0.95));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4),
              0 0 0 4px rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.t1-thumb__play::before {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.t1-thumb--video:hover .t1-thumb__play {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(120, 170, 255, 0.4),
              0 0 0 6px rgba(255, 255, 255, 0.15);
}

/* 视频平台标识 */
.t1-thumb__platform {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
  z-index: 2;
  text-transform: uppercase;
}

/* 视频时长/观看次数 */
.t1-thumb__meta {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.t1-thumb__views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.t1-thumb__views::before {
  content: '▶';
  font-size: 10px;
}

/* 视频标题覆盖层 */
.t1-thumb__video-title {
  position: absolute;
  bottom: 36px;
  left: 12px;
  right: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  z-index: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 视频区域标题 */
.t1-gallery__video-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.t1-gallery__video-title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 24px;
  text-align: center;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 视频网格布局 */
.t1-gallery__video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .t1-gallery__video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 灯箱视频播放器 */
.t1-lightbox__video-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.t1-video__wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  max-height: 80vh;
}

.t1-video__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* 视频加载状态 */
.t1-video__loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(20, 25, 35, 0.98), rgba(10, 15, 25, 0.99));
  z-index: 10;
  gap: 16px;
}

.t1-video__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(120, 170, 255, 0.2);
  border-top-color: rgba(120, 170, 255, 0.9);
  border-radius: 50%;
  animation: t1-video-spin 1s linear infinite;
}

@keyframes t1-video-spin {
  to {
    transform: rotate(360deg);
  }
}

.t1-video__loader-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
}

/* 视频错误状态 */
.t1-video__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(40, 20, 20, 0.98), rgba(25, 10, 10, 0.99));
  gap: 16px;
  padding: 32px;
  text-align: center;
}

.t1-video__error-icon {
  font-size: 48px;
  opacity: 0.8;
}

.t1-video__error-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.t1-video__retry-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, 
    rgba(120, 170, 255, 0.9), 
    rgba(80, 130, 220, 0.9));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.t1-video__retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(120, 170, 255, 0.4);
}

/* 视频标题区域 */
.t1-video__caption {
  text-align: center;
  padding: 20px 16px;
}

.t1-video__title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.t1-video__desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
  line-height: 1.5;
}

.t1-video__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.t1-video__views {
  display: flex;
  align-items: center;
  gap: 6px;
}

.t1-video__platform {
  padding: 4px 10px;
  background: rgba(120, 170, 255, 0.15);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(120, 170, 255, 0.9);
}

/* 灯箱视频适配 */
.t1-lightbox--video .t1-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.t1-lightbox--video .t1-lightbox__figure {
  max-width: 100%;
  width: 100%;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .t1-thumb__play {
    width: 48px;
    height: 48px;
  }
  
  .t1-thumb__play::before {
    border-width: 10px 0 10px 16px;
  }
  
  .t1-thumb__platform {
    font-size: 10px;
    padding: 4px 8px;
  }
  
  .t1-video__wrapper {
    border-radius: 8px;
  }
  
  .t1-video__title {
    font-size: 16px;
  }
  
  .t1-video__caption {
    padding: 16px 12px;
  }
}

@media (max-width: 480px) {
  .t1-gallery__video-grid {
    gap: 12px;
  }
  
  .t1-thumb--video {
    border-radius: 8px;
  }
  
  .t1-video__wrapper {
    border-radius: 6px;
  }
}

/* 深色模式优化 */
@media (prefers-color-scheme: dark) {
  .t1-video__wrapper {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .t1-thumb--video,
  .t1-thumb--video img,
  .t1-thumb__play,
  .t1-video__spinner {
    transition: none;
    animation: none;
  }
  
  .t1-video__spinner {
    border-top-color: rgba(120, 170, 255, 0.6);
  }
}
