/* 下载页：基础信息、面包屑、白面板、来源页签样式在 main.css（与详情／播放页共用），这里只有下载列表。
   顶部模糊底叠到顶栏下，内容区上内距归零；版心宽度与首页一致 */
.lb-down-main {
  padding-top: 0;
}

.lb-down-main > .lb-vd-panel + .lb-vd-panel {
  margin-top: var(--gap-panel);
}

.lb-down-main .lb-vd-panel .lb-module-title {
  font-size: 18px;
  font-weight: 700;
}

/* 标题列：右侧来源页签与下方面板相接（同选集播放） */
.lb-down-hd {
  align-items: flex-end;
  margin-bottom: 8px;
}

.lb-down-hd .lb-module-title {
  align-self: center;
  margin-right: auto;
}

.lb-down-sources {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.lb-down-sources::-webkit-scrollbar {
  display: none;
}

.lb-down-sources > li {
  flex-shrink: 0;
}

.lb-down-empty {
  margin: 17px 0 0;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.lb-down-empty a {
  color: var(--accent-tab);
}

.lb-down-panel {
  display: none;
  padding: 12px 0 0;
}

.lb-down-panel.lb-active {
  display: block;
}

.lb-down-tip {
  margin: 0 0 15px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== 下载项：勾选 + 集名 + 链接 + 动作按钮 ===== */
/* 桌机超过 15 条、手机超过约 5 条在框内滚动 */
.lb-down-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(50px * 15 + 8px * 14);
  margin: 0;
  padding: 0 5px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--border-mid) transparent;
  scrollbar-width: thin;
  list-style: none;
}

.lb-down-list::-webkit-scrollbar {
  width: 5px;
}

.lb-down-list::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: var(--border-mid);
}

.lb-down-item {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.lb-di-check,
.lb-di-check-all {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.lb-di-ep {
  flex-shrink: 0;
  min-width: 70px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.lb-di-link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lb-di-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.lb-di-btn {
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, opacity 0.15s;
}

.lb-di-btn:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--accent-tab);
}

.lb-di-btn--main {
  background: var(--grad-play);
  color: #fff;
  font-weight: 700;
}

.lb-di-btn--main:hover {
  box-shadow: none;
  color: #fff;
  opacity: 0.88;
}

.lb-down-list-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 0 12px;
}

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

.lb-di-batch-btn {
  margin-left: auto;
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--accent-tab);
  font-size: 12px;
  cursor: pointer;
}

.lb-di-batch-btn:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--accent-tab);
}

@media (max-width: 767px) {
  .lb-down-hd {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .lb-down-sources {
    order: 3;
    width: 100%;
  }

  .lb-down-list {
    max-height: 600px;
  }

  /* 手机：集名与链接一列，按钮换到下一列 */
  .lb-down-item {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .lb-di-link {
    flex-basis: calc(100% - 120px);
  }

  .lb-di-actions {
    width: 100%;
    padding-left: 28px;
  }

  .lb-di-btn {
    flex: 1;
    padding: 0 8px;
  }
}
