/* ==========================================
   vod/down.html — 暗色主題下載頁
   ========================================== */

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

.down-container {
  max-width: 1760px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.down-content { flex: 1; min-width: 0; }

.down-sidebar {
  width: 260px;
  flex-shrink: 0;
  display: none;
}
@media (min-width: 1200px) {
  .down-sidebar { display: block; }
}

/* ==========================================
   片头资讯
   ========================================== */
.down-hero {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.down-hero-thumb {
  position: relative;
  width: 64px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}
.down-hero-thumb img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}
.down-hero-score {
  position: absolute;
  bottom: 3px; left: 3px;
  background: rgba(240, 180, 41, 0.9);
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

.down-hero-info { flex: 1; min-width: 0; }

.down-hero-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.5;
  margin-bottom: 8px;
}
.down-hero-title a { color: var(--text-1); transition: color 0.15s; }
.down-hero-title a:hover { color: var(--accent); }

.down-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 12px;
}
.down-hero-meta a { color: var(--text-2); transition: color 0.15s; }
.down-hero-meta a:hover { color: var(--accent); }
.down-hero-sep { color: var(--border-2); }

.down-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  transition: background 0.15s;
}
.down-watch-btn:hover { background: var(--accent-hover); color: #fff; }

/* ==========================================
   下载线路标题
   ========================================== */
.down-source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 12px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  flex-wrap: wrap;
  gap: 6px;
}
.down-source-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}
.down-source-title iconify-icon { color: var(--accent); font-size: 18px; }
.down-source-tip { font-size: 12px; color: var(--text-3); }

/* ==========================================
   下载列表
   ========================================== */
.down-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 16px;
  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-of-type { 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);
  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-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-actions { display: flex; flex-wrap: wrap; 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: var(--accent); color: #fff; }
.di-btn--orange { background: var(--btn-orange); color: #fff; }
.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);
  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); }

/* ==========================================
   通用卡片区块（描述 / 相关 / 阅读）
   ========================================== */
.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;
}

/* ==========================================
   相关推荐 vod grid
   ========================================== */
.vod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

/* ==========================================
   推荐阅读
   ========================================== */
.down-read-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.down-read-header .down-section-title { margin-bottom: 0; }
.down-read-more { font-size: 12px; color: var(--text-2); transition: color 0.15s; }
.down-read-more:hover { color: var(--accent); }

.read-card { border-bottom: 1px solid var(--border); }
.read-card:last-child { border-bottom: none; }
.read-card a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
.read-info { flex: 1; min-width: 0; }
.read-info h4 {
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  transition: color 0.15s;
}
.read-card:hover .read-info h4 { color: var(--accent); }
.read-cat { font-size: 11px; color: var(--text-3); }
.read-thumb { width: 80px; height: 56px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.read-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==========================================
   RWD
   ========================================== */
@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-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; }
  .di-link   { order: 3; width: 100%; }
  .di-actions { order: 4; width: 100%; justify-content: flex-end; }
  .di-btn { font-size: 11px; padding: 4px 8px; }
}

@media (max-width: 479px) {
  .di-actions { width: 100%; justify-content: flex-end; }
  .di-btn { font-size: 10px; padding: 4px 7px; }
}
