/* video.css —— 从 photography.css 拆出（原第 408-593 行）
   视频播放器 + 首页响应式
   拆分日期：2026-10-30 */

/* ---------- 视频播放器 ---------- */
.video-container {
  position: relative;
  width: 100%;
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.video-container video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}
.custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  padding: 1rem;
  z-index: 10;
}
.control-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.control-btn {
  background: none;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.control-btn:hover {
  background: rgba(255,255,255,0.2);
}
.progress-container {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  cursor: pointer;
}
.progress-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  width: 0%;
}
.time-display {
  color: white;
  font-size: 0.85rem;
  font-family: monospace;
  min-width: 90px;
  text-align: right;
}
.volume-slider-container {
  width: 80px;
}
.volume-slider {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  cursor: pointer;
  -webkit-appearance: none;
}
.volume-slider::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  -webkit-appearance: none;
}
.video-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(244, 67, 54, 0.9);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  z-index: 20;
  font-size: 0.9rem;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .photography-home {
    padding: 1rem 1rem 1.5rem;
  }
  .section-title h2 {
    font-size: 1.4rem;
  }
  .photography-tags {
    padding: 1.5rem 1rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 12px;
  }
  .tags-cloud-photo {
    gap: 0.8rem;
  }
  .photo-tag-item {
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
  }
  .work-title {
    font-size: 0.95rem;
  }
  .polaroid-item {
    width: 220px;
  }
  .polaroid-image {
    height: 150px;
  }
  .custom-controls {
    padding: 0.8rem;
  }
  .volume-slider-container {
    width: 60px;
  }
}

@media (max-width: 480px) {
  .polaroid-row {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .polaroid-item {
    width: 250px;
  }
  .work-readtime {
    display: none;
  }
  .view-count-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    bottom: 8px;
    left: 8px;
  }
  /* 修复卡片溢出 */
  .work-item {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 auto;
  }
  .photography-home {
    padding: 1rem 0.8rem 1.5rem;
    box-sizing: border-box;
  }
}

/* =========================================
   2026-10-30 从 misc.css 合并：摄影视频外框与媒体查询
   ========================================= */
.photography-category .video-container,
.photography-category video {
  border: 2px solid rgba(139, 69, 19, 0.3);
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.15);
  position: relative;
}

.photography-category .video-container:hover,
.photography-category video:hover {
  border-color: rgba(139, 69, 19, 0.5);
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.2);
}

@media (max-width: 768px) {
  .photography-category .video-container,
  .photography-category video {
    border-width: 1px;
  }
}
