/* ============================================================
   TDSI 官网 · 资源下载页
   ============================================================ */

.dl-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

/* 筛选标签 */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.filter {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
  box-shadow: var(--shadow-xs);
}

.filter:hover {
  color: var(--c-brand);
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-1px);
}

.filter--active {
  color: #fff;
  background: var(--c-grad);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.3);
}
.filter--active:hover { color: #fff; transform: none; }

/* 分类标题 */
.dl-cat {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-6) 0 var(--sp-4);
}

.dl-cat:first-child { margin-top: 0; }

.dl-cat h2 {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.dl-cat__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  padding: 2px 9px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.dl-cat::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* 资源列表 */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--sp-3);
}

.dl-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) ease;
}

.dl-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(14, 165, 233, 0.32);
}

.dl-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: rgba(14, 165, 233, 0.1);
  color: var(--c-brand);
  flex-shrink: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.dl-item__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dl-item__icon--modpack { background: rgba(99, 102, 241, 0.12); color: var(--c-brand-2); }
.dl-item__icon--exe { background: rgba(16, 185, 129, 0.12); color: var(--c-success); }
.dl-item__icon--zip { background: rgba(245, 158, 11, 0.12); color: #b45309; }

.dl-item__body {
  flex: 1;
  min-width: 0;
}

.dl-item__name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 1px;
}

.dl-item__desc {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-item__size {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.dl-item .btn { flex-shrink: 0; }

/* 整合包突出卡片 */
.dl-feature {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-inset), 0 18px 48px rgba(99, 102, 241, 0.1);
  margin-bottom: var(--sp-5);
}

html.dark-mode .dl-feature { box-shadow: var(--shadow-inset), 0 18px 48px rgba(99, 102, 241, 0.16); }

.dl-feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--r-md);
  background: rgba(99, 102, 241, 0.13);
  color: var(--c-brand-2);
  flex-shrink: 0;
}
.dl-feature__icon svg { width: 28px; height: 28px; }

.dl-feature__name {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 3px;
}

.dl-feature__desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 6px;
}

.dl-feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* 提示 */
.dl-note {
  margin-bottom: var(--sp-5);
}

@media (max-width: 720px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-feature {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .dl-feature__icon { width: 48px; height: 48px; }
  .dl-item { padding: var(--sp-3); gap: var(--sp-2); }
  .dl-item__icon { width: 38px; height: 38px; }
  .dl-item__size { display: none; }
}
