/* ═══════════════════════════════════════════════════════════════
   剪辑篇 CSS - clips.css
   依赖 style.css 的基础变量和深色主题
   ═══════════════════════════════════════════════════════════════ */

/* ── 剪辑篇整体布局 ── */
.clips-container {
  display: flex;
  height: calc(100vh - 112px);
  max-width: 1400px;
  margin: 0 auto;
  gap: 0;
}

/* ── 左侧侧边栏 ── */
.clips-sidebar {
  width: 260px;
  min-width: 220px;
  background: #0d1220;
  border-right: 1px solid #1e2a4a;
  overflow-y: auto;
  flex-shrink: 0;
}

.clips-sidebar-title {
  padding: 20px 16px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #f97316;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid #1e2a4a;
}

.clips-module-list {
  padding: 8px 0;
}

.clips-module-item {
  cursor: pointer;
  transition: background 0.15s;
}

.clips-module-item:hover .clips-module-name {
  color: #f97316;
}

.clips-module-item.active .clips-module-header-item {
  background: linear-gradient(90deg, rgba(249,115,22,0.15), transparent);
  border-left: 3px solid #f97316;
}

.clips-module-header-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 10px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.clips-module-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.clips-module-info {
  flex: 1;
  min-width: 0;
}

.clips-module-name {
  font-size: 14px;
  font-weight: 600;
  color: #c0cce0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.clips-module-name-en {
  font-size: 11px;
  color: #4b5a7a;
  margin-top: 2px;
}

.clips-module-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #1e2a4a;
  color: #6b7a9a;
  flex-shrink: 0;
}

.clips-module-badge.has-ready {
  background: rgba(249,115,22,0.2);
  color: #f97316;
}

/* 分集子列表 */
.clips-episode-sub {
  display: none;
  background: #080c18;
  border-left: 3px solid #f97316;
  margin-left: 0;
}

.clips-module-item.active .clips-episode-sub {
  display: block;
}

.clips-ep-item {
  display: flex;
  align-items: center;
  padding: 9px 16px 9px 36px;
  cursor: pointer;
  gap: 8px;
  transition: background 0.15s;
  border-bottom: 1px solid #0d1220;
}

.clips-ep-item:hover {
  background: rgba(249,115,22,0.08);
}

.clips-ep-item.active {
  background: rgba(249,115,22,0.15);
}

.clips-ep-num {
  font-size: 11px;
  color: #4b5a7a;
  min-width: 24px;
}

.clips-ep-title {
  font-size: 13px;
  color: #a0aec0;
  flex: 1;
}

.clips-ep-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
}

.clips-ep-status.ready {
  background: rgba(34,197,94,0.2);
  color: #22c55e;
}

.clips-ep-status.processing {
  background: rgba(234,179,8,0.2);
  color: #eab308;
}

.clips-ep-status.pending {
  background: rgba(107,114,154,0.2);
  color: #6b7a9a;
}

.clips-loading {
  padding: 20px 16px;
  color: #4b5a7a;
  font-size: 13px;
}

/* ── 右侧主区域 ── */
.clips-main {
  flex: 1;
  overflow-y: auto;
  background: #0a0e1a;
  min-width: 0;
}

/* 欢迎页 */
.clips-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  text-align: center;
  padding: 40px;
}

.clips-welcome-icon {
  font-size: 64px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(249,115,22,0.4));
}

.clips-welcome-title {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(90deg, #f97316, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.clips-welcome-desc {
  font-size: 16px;
  color: #6b7a9a;
  margin-bottom: 8px;
}

.clips-welcome-hint {
  font-size: 14px;
  color: #4b5a7a;
  margin-bottom: 24px;
}

.clips-season-badge {
  padding: 8px 24px;
  background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(234,88,12,0.1));
  border: 1px solid rgba(249,115,22,0.3);
  border-radius: 20px;
  color: #f97316;
  font-size: 14px;
  font-weight: 600;
}

/* 分集列表 */
.clips-module-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid #1e2a4a;
}

.clips-module-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #e0e6f0;
}

.clips-module-header .module-en {
  font-size: 13px;
  color: #4b5a7a;
  margin-top: 4px;
}

.clips-module-header .module-desc {
  font-size: 14px;
  color: #6b7a9a;
  margin-top: 10px;
  line-height: 1.6;
}

.clips-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 24px 28px;
}

/* 分集卡片 */
.clips-ep-card {
  background: #111827;
  border: 1px solid #1e2a4a;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.clips-ep-card:hover {
  border-color: #f97316;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(249,115,22,0.15);
}

.clips-ep-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.clips-ep-card.disabled:hover {
  transform: none;
  border-color: #1e2a4a;
  box-shadow: none;
}

.clips-ep-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1f35, #0d1220);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.clips-ep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clips-ep-thumb-placeholder {
  font-size: 48px;
  opacity: 0.3;
}

.clips-ep-play-btn {
  position: absolute;
  width: 52px;
  height: 52px;
  background: rgba(249,115,22,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  transition: transform 0.2s;
  padding-left: 4px;
}

.clips-ep-card:hover .clips-ep-play-btn {
  transform: scale(1.1);
}

.clips-ep-card.disabled .clips-ep-play-btn {
  background: rgba(107,114,154,0.5);
}

.clips-ep-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.clips-ep-status-badge.ready {
  background: rgba(34,197,94,0.85);
  color: white;
}

.clips-ep-status-badge.processing {
  background: rgba(234,179,8,0.85);
  color: #1a1a00;
}

.clips-ep-status-badge.pending {
  background: rgba(30,42,74,0.9);
  color: #6b7a9a;
}

.clips-ep-duration {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  background: rgba(0,0,0,0.7);
  color: #e0e6f0;
  padding: 2px 6px;
  border-radius: 4px;
}

.clips-ep-body {
  padding: 14px 16px;
}

.clips-ep-num-tag {
  font-size: 11px;
  color: #f97316;
  font-weight: 600;
  margin-bottom: 4px;
}

.clips-ep-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #e0e6f0;
  margin-bottom: 2px;
}

.clips-ep-card-title-en {
  font-size: 12px;
  color: #4b5a7a;
  margin-bottom: 8px;
}

.clips-ep-card-desc {
  font-size: 13px;
  color: #6b7a9a;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clips-ep-meta {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  color: #4b5a7a;
}

/* ── 视频播放器 ── */
.clips-player-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.clips-player-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid #1e2a4a;
  background: #0d1220;
}

.clips-back-btn {
  padding: 7px 16px;
  background: #1e2a4a;
  border: 1px solid #2a3555;
  border-radius: 8px;
  color: #a0aec0;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
  white-space: nowrap;
}

.clips-back-btn:hover {
  background: #2a3555;
  color: #e0e6f0;
}

.clips-player-title {
  font-size: 16px;
  font-weight: 600;
  color: #e0e6f0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clips-video-wrapper {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clips-video {
  width: 100%;
  max-height: calc(100vh - 300px);
  display: block;
  outline: none;
}

.clips-player-info {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
}

.clips-player-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: #e0e6f0;
  margin-bottom: 4px;
}

.clips-player-info .ep-title-en {
  font-size: 14px;
  color: #4b5a7a;
  margin-bottom: 12px;
}

.clips-player-info .ep-desc {
  font-size: 14px;
  color: #6b7a9a;
  line-height: 1.7;
  margin-bottom: 16px;
}

.clips-player-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #4b5a7a;
}

.clips-player-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 响应式 ── */
@media (max-width: 768px) {
  .clips-container {
    flex-direction: column;
    height: auto;
  }

  .clips-sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #1e2a4a;
  }

  .clips-main {
    min-height: 400px;
  }

  .clips-episodes-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .clips-video {
    max-height: 50vw;
  }
}
