/* ================================================================
   vod/down.html 页面专属样式
   ----------------------------------------------------------------
   Hero（.detail / .detail-main / .intro-grid / .detail-tags）、面包屑、
   剧情展开（.desc-*）、影视卡网格（.video-film-list）都是与详情页共用的组件，
   样式单一来源在 main.css / vod_detail.css（本页已一并加载），
   本文件**不再重复定义同名 class**（编码规则 11.9）。
   ================================================================ */

.down-main { padding: calc(var(--topbar-h) + 20px) 0 48px; }

/* 单列：vod-down 强制5.2 已删除排行 / 专题侧栏 */
.down-container {
  width: var(--container-w);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}
.down-content { min-width: 0; }

/* ==========================================
   下载区外壳
   ========================================== */
.down-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 20px;
  overflow: hidden;
}
.down-source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.down-source-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}
.down-source-title .mac-icon { color: var(--accent); font-size: 18px; }
.down-source-tip { font-size: 12px; color: var(--text-3); }

/* ==========================================
   多来源 tab（强制7.1：切换而非全部平铺），带条数角标
   ========================================== */
.down-sources {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding: 10px 16px 0;
}
.down-source-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: .15s;
}
.down-source-tab:hover { color: var(--accent); border-color: var(--accent); }
.down-source-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.dst-cnt {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(0,0,0,.10);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.down-source-tab.is-active .dst-cnt { background: rgba(255,255,255,.25); }

.down-panel { display: none; padding: 12px 16px 16px; }
.down-panel.is-active { display: block; }

/* ==========================================
   下载列表
   ========================================== */
.down-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.down-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.down-item:last-child { border-bottom: none; }
.down-item:hover { background: var(--bg-elevated); }

.di-check {
  appearance: none;
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border: 2px solid #C4C4C4;
  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: 5px; top: 2px;
  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-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.di-link--dead { background: transparent; border-style: dashed; }

/* 操作按钮组：按 URL 协议分型，模板决定渲染哪几颗（强制2） */
.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;
  cursor: pointer;
  transition: opacity 0.15s;
}
.di-btn:hover { opacity: 0.82; }
.di-btn--blue { background: var(--accent); color: #fff; }
.di-btn--gray { background: var(--bg-elevated); color: var(--text-2); border: 1px solid var(--border); }
.di-btn--copy { background: var(--bg-elevated); color: var(--accent); border: 1px solid var(--accent); }

/* 底部全选 + 复制已选链接 */
.down-list-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.di-check-all {
  appearance: none;
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border: 2px solid #C4C4C4;
  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: 5px; top: 2px;
  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 {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.di-batch-btn:hover { color: var(--accent-hover); }

/* ==========================================
   无下载源空态（强制3.1：页面其余部分照常）
   ========================================== */
.down-empty {
  margin-top: 20px;
  padding: 32px 16px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-3);
  font-size: 14px;
}
.down-empty .mac-icon { font-size: 26px; color: var(--text-3); margin-bottom: 8px; }
.down-empty p { margin-bottom: 10px; }
.down-empty-link { color: var(--accent); font-weight: 600; }

/* ==========================================
   相关推荐区块
   ========================================== */
.down-card-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}
.down-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 14px;
  padding-left: 12px;
  position: relative;
}
.down-section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--accent);
  border-radius: 1px;
}

/* ==========================================
   RWD
   ========================================== */
@media (max-width: 1024px) {
  .di-btn { font-size: 11px; padding: 4px 8px; }
}
@media (max-width: 767px) {
  .down-main { padding: calc(var(--topbar-h) + 12px) 0 68px; }
  .down-container { padding: 0 12px; }
  .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; min-width: 0; }
  .di-link    { order: 3; width: 100%; }
  .di-actions { order: 4; width: 100%; justify-content: flex-end; }
}
