/* ==========================================
   vod/down.html — 淺色下載頁（藍色主調）
   ========================================== */

/* ===== desc_expand widget ===== */
/* .desc-* （widget/desc_expand）样式在 main.css（单一来源） */
.down-main { padding: 20px 0 48px; }
.down-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;   /* 本主题无视窗留白，容器自带 gutter */
}
/* 单列（基线：删整列侧栏） */
.down-content { min-width: 0; }
.down-content .detail-hero-wrap { margin-bottom: 24px; }
/* ==========================================
   下载地址区块 + 来源 tab
   ========================================== */
.down-box { margin-bottom: 24px; }
.down-box-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.down-box-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-1);
}
.down-box-title .mac-icon { color: var(--accent); }
.down-source-tip { font-size: 12px; color: var(--text-3); }
/* 来源 tab：一行横排，窄屏横滑（这一行是 button、没有 hover 弹层，overflow-x 不会裁弹层） */
.down-sources {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.down-sources::-webkit-scrollbar { display: none; }
.down-source-tab {
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}
.down-source-tab:hover { border-color: var(--accent); color: var(--accent); }
.down-source-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.dst-cnt {
  padding: 0 6px;
  border-radius: 8px;
  background: var(--bg-elevated);
  font-size: 11px;
  color: var(--text-3);
}
.down-source-tab.is-active .dst-cnt { background: rgba(255, 255, 255, .22); color: #fff; }
.down-panel { display: none; }
.down-panel.is-active { display: block; }
/* ==========================================
   下载列表
   ========================================== */
.down-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  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-child { 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);
  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-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-elevated);
  border: 1px solid var(--border);
}
/* 操作按钮组 */
.di-actions { display: flex; gap: 6px; flex-shrink: 0; }
.di-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.di-btn:hover { opacity: 0.82; }
.di-btn--blue { background: var(--accent); color: #fff; }
.di-btn--copy { background: var(--bg-card); color: var(--accent); border: 1px solid var(--accent); }
.di-btn--copy:hover { background: var(--accent-light); opacity: 1; }
.di-ep--dead, .di-link--dead { color: var(--text-3); cursor: default; }
.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);
  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: var(--bg-card);
}
.di-check-all-label { font-size: 13px; color: var(--text-1); cursor: pointer; }
.di-batch-btn {
  margin-left: auto;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all 0.15s;
}
.di-batch-btn:hover { background: var(--accent-light); }
/* 空态：没有下载源 */
.down-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 48px 24px;
  margin-bottom: 24px;
  color: var(--text-3);
  font-size: 14px;
}
.down-empty .mac-icon { width: 28px; height: 28px; }
.down-empty p { margin: 0; }
.down-empty-link { color: var(--accent); font-size: 13px; }
/* ==========================================
   通用卡片区块（描述 / 相关 / 阅读）
   ========================================== */
.down-card-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 24px;
}
.down-section-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
/* ==========================================
   RWD
   ========================================== */
@media (max-width: 1199px) {
  /* 平板：定寬容器加回左右留白，避免貼邊 */
  .down-container { padding: 0 16px; }
}
@media (max-width: 1024px) {
  .di-btn { font-size: 10px; padding: 3px 7px; }
}
@media (max-width: 767px) {
  .down-main { padding: 12px 0 68px; }
  .down-container { padding: 0 12px; }
  .down-box-hd { flex-direction: column; align-items: flex-start; }
  .di-actions { flex-wrap: wrap; }
  .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; }
}
