/* 下载页：基础信息与面包屑样式在 main.css（与详情页共用），这里只有下载列表 */

.dg-down-main .dg-module-title {
  font-size: 26px;
}

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

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

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

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

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

.dg-down-src-tab {
  flex-shrink: 0;
  height: 50px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.dg-down-src-tab:hover,
.dg-down-src-tab.dg-active {
  background: var(--grad-accent);
  color: var(--white);
}

.dg-down-src-tab.dg-active {
  font-weight: 700;
}

.dg-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;
}

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

.dg-down-panel {
  display: none;
  padding: 15px;
  border-radius: var(--radius) 0 var(--radius) var(--radius);
  background: var(--bg-elev);
}

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

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

/* ===== 下载项：勾选 + 集名 + 链接 + 动作按钮 ===== */
/* 桌机超过 15 条、手机超过约 5 条在框内滚动 */
.dg-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(--scrollbar) transparent;
  scrollbar-width: thin;
  list-style: none;
}

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

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

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

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

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

.dg-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;
}

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

.dg-di-btn {
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s ease-in, background 0.3s ease-in;
}

.dg-di-btn:hover {
  background: var(--grad-accent);
  color: var(--white);
}

.dg-di-btn .mac-icon {
  margin-right: 4px;
  font-size: 13px;
}

/* 三种按钮分层：迅雷（主）渐层实心；直接下载（次）主色描边；复制链接（辅）低调灰底 */
.dg-di-btn--download {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.6);
  color: var(--accent);
}

.dg-di-btn--download:hover {
  box-shadow: none;
}

.dg-di-btn--copy:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

.dg-di-btn--main {
  background: var(--grad-play);
  color: var(--white);
  font-weight: 700;
}

.dg-di-btn--main:hover {
  opacity: 0.9;
}

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

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

.dg-di-batch-btn {
  margin-left: auto;
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--bg-tag);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.3s ease-in;
}

.dg-di-batch-btn:hover {
  background: var(--grad-accent);
  color: var(--white);
}

@media (max-width: 767px) {
  .dg-down-main .dg-module-title {
    font-size: 20px;
  }

  .dg-down-hd {
    flex-wrap: wrap;
    row-gap: 10px;
  }

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

  .dg-down-src-tab {
    height: 40px;
    font-size: 13px;
  }

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

  .dg-down-panel {
    padding: 15px;
    border-radius: 0 var(--radius) var(--radius) var(--radius);
  }

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

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

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

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