/* ============================================================
   DL Source V2 - 参考20源站版式
   ============================================================ */

.dl-source-v2 { --dl-gap: 18px; }

/* Hero V2 */
.dl-hero-v2 {
  padding: 60px 0 70px;
  background: linear-gradient(135deg, var(--dl-hero-from) 0%, var(--dl-hero-to) 100%);
  color: #fff;
}
.dl-hero-v2 .container {
  display: grid;
  grid-template-columns: 1.4fr 340px;
  gap: 40px;
  align-items: start;
}
.dl-hero-main { padding-top: 10px; }
.dl-hero-v2 .dl-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 14px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.dl-hero-v2 .dl-hero-desc {
  font-size: 1.05rem;
  opacity: 0.95;
  margin-bottom: 24px;
  max-width: 560px;
}
.dl-hero-search {
  max-width: 520px;
  margin-bottom: 22px;
}
.dl-hero-search .search-form {
  display: flex;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.dl-hero-search .search-field {
  flex: 1;
  border: none;
  padding: 14px 22px;
  font-size: 1rem;
  outline: none;
}
.dl-hero-search .search-submit {
  background: var(--dl-accent);
  color: #fff;
  border: none;
  padding: 0 28px;
  font-weight: 600;
  cursor: pointer;
}
.dl-hero-rank {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border-radius: var(--dl-radius-lg);
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.18);
}
.dl-rank-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dl-rank-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dl-rank-list li:last-child { border-bottom: none; }
.dl-rank-num {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.dl-rank-top { background: var(--dl-accent); color: #fff; }
.dl-rank-normal { background: rgba(255,255,255,0.2); color: #fff; }
.dl-rank-list a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Section Header */
.dl-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--dl-border);
  padding-bottom: 12px;
}
.dl-section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.dl-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dl-text);
  margin: 0;
}
.dl-section-subtitle {
  font-size: 0.9rem;
  color: var(--dl-muted);
  font-weight: 400;
}
.dl-section-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dl-tab {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  color: var(--dl-muted);
  cursor: pointer;
  transition: all 0.18s;
}
.dl-tab.active, .dl-tab:hover {
  background: var(--dl-primary);
  color: #fff;
}
.dl-section-more {
  color: var(--dl-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-left: 10px;
}
.dl-section-more:hover { color: var(--dl-primary); }

/* Soft Grid Cards */
.dl-soft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.dl-soft-card {
  background: var(--dl-card-bg);
  border-radius: var(--dl-radius);
  padding: 18px 14px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--dl-shadow);
  transition: transform 0.18s, box-shadow 0.18s;
  border: 1px solid var(--dl-border);
}
.dl-soft-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dl-shadow-hover);
}
.dl-soft-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.dl-soft-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-soft-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--dl-text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-soft-meta {
  font-size: 0.78rem;
  color: var(--dl-muted);
  margin-bottom: 8px;
}
.dl-soft-desc {
  font-size: 0.8rem;
  color: var(--dl-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* App List (horizontal cards) */
.dl-app-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.dl-app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--dl-card-bg);
  border-radius: var(--dl-radius);
  padding: 14px 16px;
  box-shadow: var(--dl-shadow);
  border: 1px solid var(--dl-border);
}
.dl-row-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dl-row-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-row-info { flex: 1; min-width: 0; }
.dl-row-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.dl-row-title a {
  color: var(--dl-text);
  text-decoration: none;
}
.dl-row-title a:hover { color: var(--dl-primary); }
.dl-row-meta {
  font-size: 0.78rem;
  color: var(--dl-muted);
}

/* Mixed Section */
.dl-mixed-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
}
.dl-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.dl-game-card {
  background: var(--dl-card-bg);
  border-radius: var(--dl-radius);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--dl-shadow);
  border: 1px solid var(--dl-border);
  transition: transform 0.18s, box-shadow 0.18s;
}
.dl-game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dl-shadow-hover);
}
.dl-game-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.dl-game-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-game-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dl-text);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-game-meta {
  font-size: 0.75rem;
  color: var(--dl-muted);
  margin-bottom: 8px;
}
.dl-game-desc {
  font-size: 0.8rem;
  color: var(--dl-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mixed Side */
.dl-mixed-side { }
.dl-side-block {
  background: var(--dl-card-bg);
  border-radius: var(--dl-radius-lg);
  padding: 20px;
  box-shadow: var(--dl-shadow);
  margin-bottom: 20px;
  border: 1px solid var(--dl-border);
}
.dl-side-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dl-text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--dl-primary);
}
.dl-side-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dl-side-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--dl-border);
}
.dl-side-list li:last-child { border-bottom: none; }
.dl-side-list a {
  display: flex;
  gap: 10px;
  color: var(--dl-text);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.45;
}
.dl-side-list a:hover { color: var(--dl-primary); }
.dl-side-date {
  color: var(--dl-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* Category Quick */
.dl-cat-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.dl-cat-quick-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--dl-card-bg);
  border-radius: var(--dl-radius);
  padding: 14px 16px;
  text-decoration: none;
  box-shadow: var(--dl-shadow);
  border: 1px solid var(--dl-border);
  transition: all 0.18s;
}
.dl-cat-quick-card:hover {
  border-color: var(--dl-primary);
  transform: translateY(-2px);
}
.dl-cat-quick-name {
  font-weight: 600;
  color: var(--dl-text);
}
.dl-cat-quick-count {
  font-size: 0.78rem;
  color: var(--dl-muted);
}

/* CTA */
.dl-cta-box {
  background: linear-gradient(135deg, var(--dl-hero-from), var(--dl-hero-to));
  color: #fff;
  border-radius: var(--dl-radius-lg);
  padding: 44px;
  text-align: center;
}
.dl-cta-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.dl-cta-box p { margin-bottom: 22px; opacity: 0.95; }
.dl-cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
  .dl-hero-v2 .container { grid-template-columns: 1fr; }
  .dl-hero-rank { display: none; }
  .dl-mixed-grid { grid-template-columns: 1fr; }
  .dl-app-list { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .dl-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .dl-soft-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .dl-soft-card { padding: 12px 8px; }
  .dl-soft-icon { width: 56px; height: 56px; border-radius: 14px; }
  .dl-soft-desc { display: none; }
  .dl-game-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-game-desc { display: none; }
  .dl-cat-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-cta-box { padding: 28px 20px; }
}
