/* ==========================================
   vod/down.html — 暗色主題下載頁
   ========================================== */

.down-main { padding: 0 0 48px; }   /* 顶部留白由 .breadcrumb--wide 的上外距提供，避免叠成双倍 */

.down-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.down-content { flex: 1; min-width: 0; }

/* ==========================================
   片头资讯
   ========================================== */

/* ===== 其他资讯（参考 vod/detail.html 影片资讯区） ===== */

/* ==========================================
   下载线路标题
   ========================================== */
.down-source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 12px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  flex-wrap: wrap;
  gap: 6px;
}
.down-source-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}
.down-source-title .mac-icon { color: var(--accent-deep); font-size: 18px; }
.down-source-tip { font-size: 12px; color: var(--text-3); }

/* ==========================================
   下载列表
   ========================================== */
.down-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: var(--section-gap);
  overflow: hidden;
}

.down-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.down-item:last-of-type { border-bottom: none; }
.down-item:hover { background: var(--bg-elevated); }

/* checkbox */
.di-check {
  appearance: none;
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border: 2px solid var(--border-2);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.di-check:checked { background: var(--accent); border-color: var(--accent); }
.di-check:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 0;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}

/* 集数 */
.di-ep {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-deep);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 90px;
  cursor: pointer;
}

/* 链接文字 */
.di-link {
  flex: 1;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  padding: 4px 8px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* 操作按钮组 */
.di-actions { display: flex; gap: 6px; flex-shrink: 0; }
.di-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 4px;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.di-btn:hover { opacity: 0.82; }
.di-btn--blue   { background: var(--accent-deep); color: #fff; }   /* 原写死蓝色 #3b82f6，改走主题色 token */
.di-btn--gray   { background: var(--bg-elevated); color: var(--text-2); border: 1px solid var(--border-2); }

/* 底部全选 */
.down-list-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.di-check-all {
  appearance: none;
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border: 2px solid var(--border-2);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.di-check-all:checked,
.di-check-all:indeterminate { background: var(--accent); border-color: var(--accent); }
.di-check-all:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 0;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.di-check-all:indeterminate::after {
  content: '';
  position: absolute;
  left: 2px; top: 5px;
  width: 9px; height: 2px;
  background: #fff;
}

.di-check-all-label { font-size: 13px; color: var(--text-1); cursor: pointer; }

.di-batch-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-deep);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s;
}
.di-batch-btn:hover { color: var(--accent-hover); }

/* ==========================================
   通用卡片区块（描述 / 相关 / 阅读）
   ========================================== */
.down-card-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: var(--section-gap);
}

/* 無下載來源空態 */
.down-empty {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 16px;
  margin-bottom: var(--section-gap);
  text-align: center;
  color: var(--text-3);
}

.down-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 12px;
}

/* ==========================================
   相关推荐 vod grid
   ========================================== */
/* .vod-grid 單一來源在 main.css */

/* ==========================================
   RWD
   ========================================== */
@media (max-width: 1024px) {
  .di-btn { font-size: 10px; padding: 3px 7px; }
}

@media (max-width: 767px) {
  .down-main { padding: 12px 0 68px; }
  .down-source-header { flex-direction: column; align-items: flex-start; }
  .down-item { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
  .di-check  { order: 1; }
  .di-ep     { order: 2; }
  .di-link   { order: 3; width: 100%; }
  .di-actions { order: 4; width: 100%; justify-content: flex-end; }
  .di-btn { font-size: 11px; padding: 4px 8px; }
}

/* ===== 多來源 tab（vod-down 強制 7）：只顯示當前來源面板 ===== */
.down-src-tabs {
  display: flex; flex-wrap: nowrap; gap: 8px; margin-bottom: 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.down-src-tabs::-webkit-scrollbar { display: none; }
.down-src-tab {
  flex: 0 0 auto; white-space: nowrap;
  padding: 6px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-2); background: var(--bg-card);
  font-size: 14px; color: var(--text-2); transition: all 0.2s;
}
.down-src-tab:hover { color: var(--accent-deep); border-color: var(--accent); }
.down-src-count {
  display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--bg-elevated); color: var(--text-3);
  font-size: 11px; line-height: 18px; text-align: center;
}
.down-src-tab.is-active .down-src-count { background: rgba(255,255,255,0.25); color: #fff; }
.down-src-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.down-src-panel { display: none; }
.down-src-panel.is-active { display: block; }

