/* =====================================================================
   dl-card.css · 资源下载列表（PC）
   2026-11-01 新建。背景：站长反馈「下载卡片窗体内排版不好」，
   希望按参考图做成：方形图标 + 标题 / 星级 / 下载次数 + 底部
   「下载」与「价格」两个按钮，两列排布，单个窗体约 16:9。
   依赖 tokens.css 的颜色变量（带兼容默认值）。
   回滚：删 lists_download.htm 里本文件的引用即可。
   ================================================================== */

/* ---------- 1. 顶部分类标签 ---------- */
.dl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid #EEF0F3;
}
.dl-tab {
  display: inline-block;
  height: 34px;
  line-height: 32px;
  padding: 0 16px;
  border: 1px solid #E1E4E8;
  border-radius: 17px;
  background: #fff;
  font-size: 13px;
  color: #4E5969;
  text-decoration: none;
  box-sizing: border-box;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.dl-tab:hover {
  border-color: #B8860B;
  color: #B8860B;
}
.dl-tab.is-on {
  background: #1B2A41;
  border-color: #1B2A41;
  color: #fff;
  font-weight: 600;
}
.dl-tab.is-on:hover {
  color: #fff;
}

/* ---------- 2. 两列网格 ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* ---------- 3. 卡片本体（16:9 窗体） ---------- */
.dlc {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 9;
  padding: 16px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #EBEEF5;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.dlc:hover {
  border-color: #B8860B;
  box-shadow: 0 10px 26px rgba(27, 42, 65, .10);
  transform: translateY(-2px);
}
.dlc__top {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

/* 方形图标窗：图片等比完整显示（不裁切、不变形） */
.dlc__ico {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #F7F8FA;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dlc__ico img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.dlc__ph {
  font-size: 28px;
  line-height: 1;
  opacity: .5;
}

.dlc__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dlc__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #1A1D21;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dlc:hover .dlc__title {
  color: #B8860B;
}

/* 星级：按后台评分字段点亮，无评分时全灰 */
.dlc__stars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 15px;
  margin: 0 0 6px;
}
.dlc__stars i {
  width: 13px;
  height: 13px;
  display: block;
  background: #E3E7ED;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.dlc__stars i.on {
  background: #F5A623;
}
.dlc__score {
  margin-left: 6px;
  font-style: normal;
  font-size: 12px;
  color: #9AA0A8;
  line-height: 1;
}

.dlc__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  font-size: 12px;
  color: #9AA0A8;
  line-height: 1.6;
}

/* ---------- 4. 底部操作区：左下载 · 右价格 ---------- */
.dlc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #EEF0F3;
}
.dlc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 18px;
  border-radius: 17px;
  background: linear-gradient(90deg, #2C5A86, #1B2A41);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(27, 42, 65, .16);
}
.dlc__btn svg {
  width: 15px;
  height: 15px;
}
.dlc:hover .dlc__btn {
  filter: brightness(1.08);
}
.dlc__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 18px;
  border-radius: 17px;
  background: #FDF6E7;
  border: 1px solid #F0DCAE;
  color: #B8860B;
  font-size: 16px;
  font-weight: 700;
  font-family: "DIN Alternate", Arial, sans-serif;
  box-sizing: border-box;
}
.dlc__price small {
  font-size: 11px;
  font-weight: 400;
  margin-right: 1px;
}
.dlc__price--free {
  background: #EFF7F1;
  border-color: #CFE7D6;
  color: #2E8B57;
  font-size: 14px;
}

/* ---------- 5. 窄屏降级：单列 + 不限高 ---------- */
@media (max-width: 1100px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dlc { aspect-ratio: auto; min-height: 156px; }
}
@media (max-width: 640px) {
  .dlc { padding: 12px; }
  .dlc__ico { flex: 0 0 64px; width: 64px; height: 64px; }
  .dlc__title { font-size: 15px; }
}
