/* ==========================================
   vod/down.html — 暗色主題下載頁
   基础信息模块与详情页共用 widget/detail_hero（样式在 vod_detail.css），
   本檔案只留下載頁自己的專屬區塊（下載線路 tab/列表、相關推薦、空態）。
   ========================================== */

.down-main { padding: 24px 0 48px; }

.down-breadcrumb-wrap {
  max-width: 1760px;
  margin: 0 auto;
  padding: 16px 20px 0;
}

.down-container {
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================
   下载区块
   ========================================== */
.down-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}
.down-box-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.down-box-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}
.down-source-tip { font-size: 12px; color: var(--text-3); }

/* ===== 来源 tab（强制7.1） ===== */
.down-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.down-source-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-pill);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.down-source-tab:hover { color: var(--text-1); }
.down-source-tab.is-active { color: #fff; background: var(--accent); }
.dst-cnt {
  font-size: 11px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.down-panel { display: none; }
.down-panel.is-active { display: block; }

/* ==========================================
   下载列表
   ========================================== */
.down-list {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  list-style: none;
  padding: 0;
}

.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-child { border-bottom: none; }
.down-item:hover { background: var(--bg-card); }

/* 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);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 90px;
  cursor: pointer;
}
.di-ep--dead { color: var(--text-3); cursor: default; }

/* 链接文字 */
.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-link--dead { color: var(--text-3); font-style: italic; }

/* 操作按钮组 */
.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: #3b82f6; color: #fff; }
.di-btn--gray { background: var(--bg-card); color: var(--text-2); border: 1px solid var(--border-2); }
.di-btn--outline { background: none; color: var(--accent); border: 1px solid var(--accent); }

/* 底部全选 */
.down-list-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--bg-card);
  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);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s;
}
.di-batch-btn:hover { color: var(--accent-hover); }

/* ==========================================
   空态（强制3.1）
   ========================================== */
.down-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
}
.down-empty svg { width: 32px; height: 32px; margin-bottom: 10px; }
.down-empty p { margin: 0 0 10px; font-size: 14px; }
.down-empty-link { color: var(--accent); font-size: 13px; }

/* ==========================================
   相关推荐区块
   ========================================== */
.down-card-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

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

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

@media (max-width: 767px) {
  .down-main { padding: 12px 0 68px; }
  .down-breadcrumb-wrap { padding: 12px 12px 0; }
  .down-container { padding: 0 12px; }
  .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; }
}
