/* ============================================================
   DL Master Common - 大师级版式通用样式
   覆盖首页/栏目页/内页，保留 Hero 注册下载按钮与栏目名称
   ============================================================ */

/* ---------- 通用变量（依赖 dl-color-schemes.css） ---------- */
.dl-master-front,
.dl-master-archive,
.dl-master-single {
  --dl-master-gap: 22px;
  --dl-radius: 12px;
  --dl-radius-lg: 18px;
  color: var(--dl-text);
}

/* 容器统一响应式内边距 */
.dl-master-front .container,
.dl-master-archive .container,
.dl-master-single .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

/* ---------- 按钮 ---------- */
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 50px; font-weight: 700; font-size: 0.92rem;
  text-decoration: none; cursor: pointer; transition: all 0.18s; border: none;
  /* 立体质感：高光内边 + 下沉式实体阴影 */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.10),
    0 4px 0 rgba(0,0,0,0.12),
    0 6px 12px rgba(0,0,0,0.18);
}
.dl-btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.dl-btn-xs { padding: 5px 12px; font-size: 0.75rem; }
.dl-btn-lg { padding: 14px 30px; font-size: 1rem; }
.dl-btn-primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 40%), linear-gradient(135deg, var(--dl-accent), var(--dl-accent-2));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.dl-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -2px 0 rgba(0,0,0,0.10),
    0 6px 0 rgba(0,0,0,0.12),
    0 10px 18px rgba(0,0,0,0.22);
  filter: brightness(1.04);
}
.dl-btn-secondary {
  background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
  color: var(--dl-primary);
  border: 1px solid var(--dl-primary);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.80),
    inset 0 -2px 0 rgba(0,0,0,0.06),
    0 4px 0 rgba(0,0,0,0.10),
    0 6px 12px rgba(0,0,0,0.14);
}
.dl-btn-secondary:hover {
  background: linear-gradient(180deg, var(--dl-primary) 0%, var(--dl-primary-dark, var(--dl-primary)) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -2px 0 rgba(0,0,0,0.12),
    0 6px 0 rgba(0,0,0,0.12),
    0 10px 18px rgba(0,0,0,0.20);
}
.dl-btn-success {
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 40%), linear-gradient(135deg, var(--dl-primary), var(--dl-secondary));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.dl-btn-success:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -2px 0 rgba(0,0,0,0.10),
    0 6px 0 rgba(0,0,0,0.12),
    0 10px 18px rgba(0,0,0,0.22);
  filter: brightness(1.04);
}
.dl-btn-outline {
  background: transparent;
  color: var(--dl-primary);
  border: 1.5px solid var(--dl-primary);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 3px 0 rgba(0,0,0,0.08),
    0 5px 10px rgba(0,0,0,0.10);
}
.dl-btn-outline:hover {
  background: var(--dl-primary);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -2px 0 rgba(0,0,0,0.12),
    0 6px 0 rgba(0,0,0,0.12),
    0 10px 18px rgba(0,0,0,0.20);
}

.dl-icon-arrow::before { content: '→'; font-style: normal; }
.dl-icon-down::before {
  content: '↓';
  font-style: normal;
  display: inline-block;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.25),
    0 2px 0 rgba(0,0,0,0.20),
    0 3px 0 rgba(0,0,0,0.15),
    0 4px 6px rgba(0,0,0,0.25);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.25));
  transform: translateY(-1px);
}
.dl-icon-fire::before { content: '🔥'; font-style: normal; font-size: 0.9em; }

/* ---------- 区块标题 ---------- */
.dl-section { padding: 46px 0; }
.dl-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; border-bottom: 2px solid var(--dl-border); padding-bottom: 12px; }
.dl-section-title { font-size: 1.45rem; font-weight: 800; color: var(--dl-text); margin: 0; }
.dl-section-title span { display: inline-block; border-bottom: 3px solid var(--dl-primary); padding-bottom: 4px; margin-bottom: -15px; }
.dl-section-more { color: var(--dl-muted); font-size: 0.88rem; text-decoration: none; }
.dl-section-more:hover { color: var(--dl-primary); }
.dl-section-tabs { display: flex; gap: 8px; }
.dl-tab { padding: 5px 14px; border-radius: 20px; font-size: 0.86rem; color: var(--dl-muted); cursor: pointer; transition: all 0.18s; }
.dl-tab.active, .dl-tab:hover { background: var(--dl-primary); color: #fff; }

/* ---------- Hero 通用 ---------- */
.dl-hero { padding: 60px 0; background: linear-gradient(135deg, var(--dl-hero-from) 0%, var(--dl-hero-to) 100%); color: #fff; }
.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-desc { font-size: 1.05rem; opacity: 0.95; margin-bottom: 24px; max-width: 560px; }
.dl-hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero 区按钮高对比 + 放大 */
.dl-hero .dl-btn { padding: 15px 34px; font-size: 1.05rem; }
.dl-hero .dl-btn-primary { background: #fff; color: var(--dl-primary); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
.dl-hero .dl-btn-primary:hover { background: #f0f0f0; transform: translateY(-2px); }
.dl-hero .dl-btn-secondary { background: rgba(255,255,255,0.15); color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.dl-hero .dl-btn-secondary:hover { background: rgba(255,255,255,0.28); }

/* ---------- 面包屑 ---------- */
.dl-single-breadcrumb { padding: 18px 0; font-size: 0.88rem; color: var(--dl-muted); }
.dl-single-breadcrumb a { color: var(--dl-text); text-decoration: none; }
.dl-single-breadcrumb a:hover { color: var(--dl-primary); }
.dl-single-breadcrumb .sep { margin: 0 8px; color: var(--dl-muted); }

/* ============================================================
   首页 8 种版式
   ============================================================ */

/* Layout 1: ZOL 焦点+排行 */
.dl-master-layout-1 .dl-hero-grid { display: grid; grid-template-columns: 1.4fr 360px; gap: 40px; align-items: start; }
.dl-master-layout-1 .dl-hero-rank { background: rgba(255,255,255,0.12); backdrop-filter: blur(10px); border-radius: var(--dl-radius-lg); padding: 24px; border: 1px solid rgba(255,255,255,0.18); }
.dl-master-layout-1 .dl-soft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 20px; }
.dl-master-layout-1 .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); border: 1px solid var(--dl-border); transition: all 0.18s; }
.dl-master-layout-1 .dl-soft-card:hover { transform: translateY(-4px); box-shadow: var(--dl-shadow-hover); }
.dl-master-layout-1 .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-master-layout-1 .dl-soft-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-master-layout-1 .dl-soft-name { font-size: 0.95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-master-layout-1 .dl-soft-meta { font-size: 0.76rem; color: var(--dl-muted); margin: 6px 0; }
.dl-master-layout-1 .dl-soft-desc { font-size: 0.78rem; color: var(--dl-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Layout 2: 天极 Tab列表 */
.dl-master-layout-2 .dl-app-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px,1fr)); gap: 16px; }
.dl-master-layout-2 .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-master-layout-2 .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-master-layout-2 .dl-row-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-master-layout-2 .dl-row-info { flex: 1; min-width: 0; }
.dl-master-layout-2 .dl-row-title { font-size: 0.96rem; font-weight: 700; margin-bottom: 5px; }
.dl-master-layout-2 .dl-row-title a { color: var(--dl-text); text-decoration: none; }
.dl-master-layout-2 .dl-row-title a:hover { color: var(--dl-primary); }
.dl-master-layout-2 .dl-row-meta { font-size: 0.76rem; color: var(--dl-muted); }

/* Layout 3: 东坡 瀑布流 */
.dl-master-layout-3 .dl-mixed-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; }
.dl-master-layout-3 .dl-waterfall { column-count: 3; column-gap: 18px; }
.dl-master-layout-3 .dl-waterfall-card { display: inline-block; width: 100%; background: var(--dl-card-bg); border-radius: var(--dl-radius); margin-bottom: 18px; overflow: hidden; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); text-decoration: none; color: inherit; transition: all 0.18s; }
.dl-master-layout-3 .dl-waterfall-card:hover { transform: translateY(-3px); box-shadow: var(--dl-shadow-hover); }
.dl-master-layout-3 .dl-waterfall-img { height: 140px; background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); display: flex; align-items: center; justify-content: center; }
.dl-master-layout-3 .dl-waterfall-img img { width: 100%; height: 100%; object-fit: cover; }
.dl-master-layout-3 .dl-waterfall-card h3 { padding: 12px 14px 4px; font-size: 0.95rem; margin: 0; }
.dl-master-layout-3 .dl-waterfall-card span { display: block; padding: 0 14px 14px; font-size: 0.76rem; color: var(--dl-muted); }

/* Layout 4: 3322 三栏分类 */
.dl-master-layout-4 .dl-three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dl-master-layout-4 .dl-cat-col { background: var(--dl-card-bg); border-radius: var(--dl-radius-lg); padding: 22px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); }
.dl-master-layout-4 .dl-cat-list { display: flex; flex-direction: column; gap: 10px; }
.dl-master-layout-4 .dl-cat-row { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 8px; border-radius: 8px; transition: background 0.15s; }
.dl-master-layout-4 .dl-cat-row:hover { background: var(--dl-bg-light); }
.dl-master-layout-4 .dl-row-icon-sm { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl-master-layout-4 .dl-row-title-sm { flex: 1; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Layout 5: 比克尔 排行榜 */
.dl-master-layout-5 .dl-rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 18px; }
.dl-master-layout-5 .dl-rank-item { 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-master-layout-5 .dl-rank-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-master-layout-5 .dl-rank-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-master-layout-5 .dl-rank-info { flex: 1; min-width: 0; }
.dl-master-layout-5 .dl-rank-info h3 { font-size: 0.95rem; margin: 0 0 4px; }
.dl-master-layout-5 .dl-rank-info h3 a { color: var(--dl-text); text-decoration: none; }
.dl-master-layout-5 .dl-rank-info h3 a:hover { color: var(--dl-primary); }
.dl-master-layout-5 .dl-rank-info span { font-size: 0.74rem; color: var(--dl-muted); }

/* Layout 6: 我机网 大图标网格 */
.dl-master-layout-6 .dl-big-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 20px; }
.dl-master-layout-6 .dl-big-card { text-align: center; text-decoration: none; color: inherit; background: var(--dl-card-bg); border-radius: var(--dl-radius); padding: 18px 10px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); transition: all 0.18s; }
.dl-master-layout-6 .dl-big-card:hover { transform: translateY(-4px); box-shadow: var(--dl-shadow-hover); }
.dl-master-layout-6 .dl-big-icon { width: 80px; height: 80px; border-radius: 20px; 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-master-layout-6 .dl-big-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-master-layout-6 .dl-big-card h3 { font-size: 0.92rem; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-master-layout-6 .dl-big-card span { font-size: 0.74rem; color: var(--dl-muted); }

/* Layout 7: 完美 杂志精选 */
.dl-master-layout-7 .dl-hero-mag-grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.dl-master-layout-7 .dl-hero-side { background: rgba(255,255,255,0.12); border-radius: var(--dl-radius-lg); padding: 22px; }
.dl-master-layout-7 .dl-hero-side h3 { margin: 0 0 14px; font-size: 1.1rem; }
.dl-master-layout-7 .dl-hero-news { list-style: none; padding: 0; margin: 0; }
.dl-master-layout-7 .dl-hero-news li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dl-master-layout-7 .dl-hero-news a { color: #fff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.dl-master-layout-7 .dl-hero-news span { font-size: 0.78rem; opacity: 0.8; }
.dl-master-layout-7 .dl-mag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 20px; }
.dl-master-layout-7 .dl-mag-card { display: block; background: var(--dl-card-bg); border-radius: var(--dl-radius); overflow: hidden; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); text-decoration: none; color: inherit; transition: all 0.18s; }
.dl-master-layout-7 .dl-mag-card:hover { transform: translateY(-3px); box-shadow: var(--dl-shadow-hover); }
.dl-master-layout-7 .dl-mag-thumb { height: 150px; background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); display: flex; align-items: center; justify-content: center; }
.dl-master-layout-7 .dl-mag-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dl-master-layout-7 .dl-mag-body { padding: 14px; }
.dl-master-layout-7 .dl-mag-body h3 { font-size: 0.96rem; margin: 0 0 6px; }
.dl-master-layout-7 .dl-mag-body span { font-size: 0.76rem; color: var(--dl-muted); }

/* Layout 8: 游侠 游戏门户大图 */
.dl-master-layout-8 .dl-game-focus { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.dl-master-layout-8 .dl-game-focus-card { display: block; background: rgba(255,255,255,0.12); border-radius: var(--dl-radius-lg); overflow: hidden; text-decoration: none; color: #fff; border: 1px solid rgba(255,255,255,0.18); }
.dl-master-layout-8 .dl-game-focus-thumb { height: 260px; background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); display: flex; align-items: center; justify-content: center; }
.dl-master-layout-8 .dl-game-focus-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dl-master-layout-8 .dl-game-focus-info { padding: 22px; }
.dl-master-layout-8 .dl-game-focus-info h1 { font-size: 1.5rem; margin: 0 0 10px; }
.dl-master-layout-8 .dl-game-focus-info p { opacity: 0.9; margin: 0 0 16px; }
.dl-master-layout-8 .dl-game-focus-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dl-master-layout-8 .dl-game-focus-small { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.12); border-radius: var(--dl-radius); padding: 12px; text-decoration: none; color: #fff; border: 1px solid rgba(255,255,255,0.18); }
.dl-master-layout-8 .dl-game-focus-small img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.dl-master-layout-8 .dl-game-focus-small span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-master-layout-8 .dl-hero-game-btns { margin-top: 24px; }
.dl-master-layout-8 .dl-news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 12px; }
.dl-master-layout-8 .dl-news-row { display: flex; gap: 12px; padding: 12px 14px; background: var(--dl-card-bg); border-radius: var(--dl-radius); box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); text-decoration: none; color: inherit; }
.dl-master-layout-8 .dl-news-row:hover { border-color: var(--dl-primary); }
.dl-master-layout-8 .dl-news-date { color: var(--dl-muted); font-size: 0.78rem; white-space: nowrap; }
.dl-master-layout-8 .dl-news-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 通用 rank 列表 */
.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(0,0,0,0.06); }
.dl-rank-list li:last-child { border-bottom: none; }
.dl-rank-list a { color: var(--dl-text); text-decoration: none; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-rank-list a:hover { color: var(--dl-primary); }
.dl-rank-num { width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.76rem; font-weight: 700; flex-shrink: 0; }
.dl-rank-top { background: var(--dl-accent); color: #fff; }
.dl-rank-normal { background: var(--dl-border); color: var(--dl-muted); }

/* 通用图标文字 */
.dl-icon-text { color: #fff; font-weight: 800; font-size: 1.6rem; }

/* 通用 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-box h2 { font-size: 1.7rem; 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; }

/* ============================================================
   大师级导航栏（单排 + 移动端汉堡菜单）
   ============================================================ */
.dl-master-nav {
  background: linear-gradient(90deg, var(--dl-hero-from), var(--dl-hero-to));
  position: relative;
  z-index: 100;
}
.dl-master-nav .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.dl-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
}
.dl-nav-menu {
  flex: 1 1 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dl-nav-menu::-webkit-scrollbar { display: none; }
.dl-nav-menu > div > ul,
.dl-nav-menu > ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
.dl-nav-menu li { position: relative; }
.dl-nav-menu li a {
  display: block;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  border-radius: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.15s;
}
.dl-nav-menu li a:hover,
.dl-nav-menu li.current-menu-item a,
.dl-nav-menu li.current-menu-parent a,
.dl-nav-menu li.current-category-ancestor a {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.dl-nav-menu .sub-menu,
.dl-nav-menu .children { display: none; }

.dl-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.dl-header-actions .dl-btn-sm { padding: 7px 14px; font-size: 0.78rem; }
/* 导航栏按钮专属高对比样式（覆盖全局btn颜色，确保在深色渐变导航背景上清晰可见） */
.dl-header-actions .dl-btn-primary { background: #fff; color: var(--dl-primary); border: none; box-shadow: none; }
.dl-header-actions .dl-btn-primary:hover { background: rgba(255,255,255,0.88); transform: none; }
.dl-header-actions .dl-btn-secondary { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.75); box-shadow: none; }
.dl-header-actions .dl-btn-secondary:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

.dl-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.dl-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.25s;
}
.dl-nav-toggle.dl-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dl-nav-toggle.dl-open span:nth-child(2) { opacity: 0; }
.dl-nav-toggle.dl-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   悬浮窗活动
   ============================================================ */
.dl-float-popup {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 280px;
  max-width: calc(100% - 40px);
  background: linear-gradient(135deg, var(--dl-hero-from, #1a1a2e) 0%, var(--dl-primary, #2d1b4e) 50%, var(--dl-hero-to, #16213e) 100%);
  color: #fff;
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-shadow: 0 12px 45px rgba(0,0,0,0.28);
  z-index: 99999;
  pointer-events: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  transition: bottom 0.3s ease;
}
.dl-float-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 50%;
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.dl-float-popup-close:hover { background: rgba(255,255,255,0.22); color: #fff; }
.dl-float-popup-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; line-height: 1.3; }
.dl-float-popup-desc { font-size: 0.82rem; opacity: 0.88; margin-bottom: 14px; line-height: 1.45; }
.dl-float-popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1a1a2e;
  padding: 10px 24px;
  border-radius: 24px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.18s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.dl-float-popup-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.22); }

/* ============================================================
   栏目页
   ============================================================ */
.dl-master-archive { padding-bottom: 50px; }
.dl-archive-header { display: flex; justify-content: space-between; align-items: center; background: var(--dl-card-bg); border-radius: var(--dl-radius-lg); padding: 28px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); margin-bottom: 24px; }
.dl-archive-title { font-size: 1.8rem; margin: 0 0 8px; }
.dl-archive-desc { color: var(--dl-muted); margin: 0; }
.dl-archive-actions { display: flex; gap: 10px; }
.dl-archive-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; }
.dl-filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 16px; background: var(--dl-card-bg); border-radius: var(--dl-radius); border: 1px solid var(--dl-border); }
.dl-filter-label { color: var(--dl-muted); font-size: 0.88rem; }
.dl-filter-item { padding: 5px 14px; border-radius: 20px; font-size: 0.86rem; color: var(--dl-muted); text-decoration: none; }
.dl-filter-item.active, .dl-filter-item:hover { background: var(--dl-primary); color: #fff; }
.dl-archive-item { display: flex; align-items: center; gap: 18px; background: var(--dl-card-bg); border-radius: var(--dl-radius); padding: 18px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); margin-bottom: 14px; transition: all 0.18s; }
.dl-archive-item:hover { border-color: var(--dl-primary); transform: translateX(4px); }
.dl-archive-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; flex-shrink: 0; }
.dl-archive-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-archive-body { flex: 1; min-width: 0; }
.dl-archive-item-title { font-size: 1.05rem; margin: 0 0 8px; }
.dl-archive-item-title a { color: var(--dl-text); text-decoration: none; }
.dl-archive-item-title a:hover { color: var(--dl-primary); }
.dl-archive-item-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: var(--dl-muted); margin-bottom: 8px; }
.dl-archive-item-desc { font-size: 0.85rem; color: var(--dl-muted); line-height: 1.5; margin-bottom: 8px; }
.dl-archive-item-tags { display: flex; gap: 6px; }
.dl-archive-item-actions { display: flex; flex-direction: column; gap: 8px; }
.dl-tag { display: inline-block; padding: 2px 8px; background: var(--dl-bg-light); border-radius: 4px; font-size: 0.72rem; color: var(--dl-muted); }
.dl-pagination { margin-top: 28px; }
.dl-pagination .nav-links { display: flex; gap: 8px; justify-content: center; }
.dl-pagination .page-numbers { padding: 8px 14px; background: var(--dl-card-bg); border: 1px solid var(--dl-border); border-radius: 8px; text-decoration: none; color: var(--dl-text); }
.dl-pagination .page-numbers.current { background: var(--dl-primary); color: #fff; border-color: var(--dl-primary); }

/* ============================================================
   内页详情
   ============================================================ */
.dl-master-single { padding-bottom: 50px; }
.dl-single-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; }

/* App 详情头 - 默认卡片 */
.dl-app-header {
  display: flex;
  gap: 24px;
  background: var(--dl-card-bg);
  border-radius: var(--dl-radius-lg);
  padding: 28px;
  box-shadow: var(--dl-shadow);
  border: 1px solid var(--dl-border);
  margin-bottom: 24px;
}

/* App 详情头 - Hero 全宽沉浸 */
.dl-app-header-hero {
  min-height: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--dl-hero-from) 0%, var(--dl-primary) 50%, var(--dl-hero-to) 100%);
  color: #fff;
  border: none;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 80px 20px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.dl-app-header-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08) 0%, transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
  pointer-events: none;
}
.dl-app-header-hero > * { position: relative; z-index: 1; }
.dl-app-header-hero .dl-app-icon {
  width: 150px;
  height: 150px;
  border-radius: 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.dl-app-header-hero .dl-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
}
.dl-app-header-hero .dl-app-info { max-width: 720px; }
.dl-app-header-hero .dl-app-title { color: #fff; font-size: 2.2rem; margin-bottom: 14px; }
.dl-app-header-hero .dl-app-badges { justify-content: center; }
.dl-app-header-hero .dl-badge-safe { background: rgba(46,204,113,0.2); color: #2ecc71; }
.dl-app-header-hero .dl-badge-official { background: rgba(66,153,225,0.2); color: #63b3ed; }
.dl-app-header-hero .dl-badge-free { background: rgba(237,137,54,0.2); color: #f6ad55; }
.dl-app-header-hero .dl-app-meta { color: rgba(255,255,255,0.75); justify-content: center; }
.dl-app-header-hero .dl-app-publisher { color: rgba(255,255,255,0.65); justify-content: center; }
.dl-app-header-hero .dl-app-publisher em { color: #fff; }
.dl-app-header-hero .dl-app-actions { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; }
.dl-app-header-hero .dl-app-actions .dl-btn-lg { padding: 16px 38px; font-size: 1.08rem; }
.dl-app-header-hero .dl-btn-primary { background: #fff; color: var(--dl-hero-from); }
.dl-app-header-hero .dl-btn-primary:hover { opacity: 0.9; }
.dl-app-header-hero .dl-btn-success { background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); color: #fff; }
.dl-app-header-hero .dl-btn-success:hover { opacity: 0.9; }

.dl-info-table-section { background: var(--dl-card-bg); border-radius: var(--dl-radius-lg); padding: 24px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); margin-bottom: 24px; }
.dl-info-table { width: 100%; border-collapse: collapse; }
.dl-info-table th, .dl-info-table td { padding: 12px 14px; border: 1px solid var(--dl-border); font-size: 0.88rem; text-align: left; }
.dl-info-table th { background: var(--dl-bg-light); width: 110px; color: var(--dl-muted); }
.dl-article-content { background: var(--dl-card-bg); border-radius: var(--dl-radius-lg); padding: 28px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); margin-bottom: 24px; line-height: 1.8; word-wrap: break-word; overflow-wrap: break-word; }
.dl-article-content .dl-cta-block:nth-of-type(n+2) { display: none; }
.dl-install-steps { background: var(--dl-card-bg); border-radius: var(--dl-radius-lg); padding: 24px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); margin-bottom: 24px; }
.dl-steps-list { list-style: none; padding: 0; margin: 0; }
.dl-steps-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--dl-border); }
.dl-steps-list li:last-child { border-bottom: none; }
.dl-step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--dl-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.dl-step-text { flex: 1; line-height: 1.6; }
.dl-related-section { margin-bottom: 24px; }
.dl-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; }
.dl-related-card { display: flex; align-items: center; gap: 12px; background: var(--dl-card-bg); border-radius: var(--dl-radius); padding: 14px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); text-decoration: none; color: inherit; transition: all 0.18s; }
.dl-related-card:hover { border-color: var(--dl-primary); }
.dl-related-icon { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl-related-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-related-body { flex: 1; min-width: 0; }
.dl-related-body h4 { font-size: 0.92rem; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-related-meta { font-size: 0.74rem; color: var(--dl-muted); }

/* 侧边栏 */
.dl-single-sidebar,
.dl-archive-sidebar { width: 100%; min-width: 0; }
.dl-sidebar-section { background: var(--dl-card-bg); border-radius: var(--dl-radius-lg); padding: 20px; box-shadow: var(--dl-shadow); border: 1px solid var(--dl-border); margin-bottom: 20px; }
.dl-sidebar-title { font-size: 1.08rem; font-weight: 700; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--dl-primary); }
.dl-sidebar-list { list-style: none; padding: 0; margin: 0; }
.dl-sidebar-list li { padding: 9px 0; border-bottom: 1px solid var(--dl-border); }
.dl-sidebar-list li:last-child { border-bottom: none; }
.dl-sidebar-list a { display: block; color: var(--dl-text); text-decoration: none; font-size: 0.88rem; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-sidebar-list a:hover { color: var(--dl-primary); }

/* 侧边栏：类似软件 */
.dl-similar-list { display: flex; flex-direction: column; gap: 10px; }
.dl-similar-item { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 10px; border-radius: 10px; transition: background 0.15s; }
.dl-similar-item:hover { background: var(--dl-bg-light); }
.dl-similar-icon { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl-similar-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-similar-info { flex: 1; min-width: 0; }
.dl-similar-title { font-size: 0.86rem; font-weight: 600; margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-similar-meta { font-size: 0.72rem; color: var(--dl-muted); }

/* 侧边栏：热门推荐（单列，避免溢出） */
.dl-hot-grid { display: flex; flex-direction: column; gap: 10px; }
.dl-hot-item { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 10px; border-radius: 10px; transition: background 0.15s; }
.dl-hot-item:hover { background: var(--dl-bg-light); }
.dl-hot-icon { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl-hot-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-hot-title { flex: 1; min-width: 0; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 侧边栏：广告位 */
.dl-ad-card { background: linear-gradient(135deg, var(--dl-primary), var(--dl-secondary)); color: #fff; border-radius: var(--dl-radius); padding: 18px; text-align: center; }
.dl-ad-label { display: inline-block; background: rgba(255,255,255,0.2); color: #fff; font-size: 0.7rem; padding: 2px 8px; border-radius: 4px; margin-bottom: 10px; }
.dl-ad-card h4 { margin: 0 0 8px; font-size: 1rem; }
.dl-ad-card p { margin: 0 0 14px; font-size: 0.84rem; opacity: 0.95; }

/* 侧边栏：标签云 */
.dl-tag-cloud { line-height: 1.8; }
.dl-tag-cloud a { display: inline-block; margin: 0 8px 8px 0; padding: 4px 10px; background: var(--dl-bg-light); border-radius: 20px; font-size: 0.8rem !important; color: var(--dl-text); text-decoration: none; transition: all 0.15s; }
.dl-tag-cloud a:hover { background: var(--dl-primary); color: #fff; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .dl-master-layout-1 .dl-hero-grid,
  .dl-master-layout-7 .dl-hero-mag-grid,
  .dl-master-layout-8 .dl-game-focus,
  .dl-master-layout-3 .dl-mixed-grid,
  .dl-archive-grid,
  .dl-single-grid { grid-template-columns: 1fr; }
  .dl-master-layout-8 .dl-game-focus-list { grid-template-columns: 1fr 1fr; }
  .dl-hero-rank,
  .dl-hero-side,
  .dl-archive-sidebar,
  .dl-single-sidebar { display: none; }
  .dl-master-layout-3 .dl-waterfall { column-count: 2; }

  .dl-app-header-hero {
    padding: 60px 20px;
  }
  .dl-app-header-hero .dl-app-icon { width: 120px; height: 120px; }
  .dl-app-header-hero .dl-app-title { font-size: 1.7rem; }
}

@media (max-width: 768px) {
  /* 防止任何子元素导致水平溢出，解决右侧空白 */
  html, body { overflow-x: hidden; }
  .dl-master-front .container,
  .dl-master-archive .container { padding: 0 14px; }
  .dl-master-single .container { padding: 0; max-width: 100vw; }
  .dl-master-single .dl-app-meta,
  .dl-master-single .dl-app-publisher { flex-wrap: wrap; word-break: break-all; }
  .dl-master-single .dl-info-table { table-layout: fixed; word-wrap: break-word; }
  .dl-hero { padding: 40px 0; }
  .dl-hero-title { font-size: 1.7rem; }
  .dl-hero .dl-btn { width: 100%; }
  .dl-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .dl-master-layout-4 .dl-three-col { grid-template-columns: 1fr; }
  .dl-master-layout-3 .dl-waterfall { column-count: 1; }
  .dl-master-layout-6 .dl-big-grid { grid-template-columns: repeat(3, 1fr); }
  .dl-master-layout-8 .dl-game-focus { grid-template-columns: 1fr; }
  .dl-master-layout-8 .dl-game-focus-list { grid-template-columns: 1fr; }
  .dl-app-header { flex-direction: column; align-items: center; text-align: center; padding: 20px; }
  .dl-app-icon { width: 90px; height: 90px; border-radius: 18px; }
  .dl-app-title { font-size: 1.35rem; }
  .dl-app-actions { justify-content: center; }
  .dl-app-actions .dl-btn-lg { padding: 12px 24px; font-size: 0.95rem; }
  .dl-archive-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .dl-archive-item { flex-direction: column; align-items: flex-start; }
  .dl-archive-item-actions { flex-direction: row; width: 100%; }
  .dl-info-table th, .dl-info-table td { display: block; width: 100%; box-sizing: border-box; }
  .dl-related-grid { grid-template-columns: 1fr; }
  .dl-cta-box { padding: 28px 20px; }

  /* 移动端导航变汉堡菜单 */
  .dl-master-nav .container { padding: 0 14px; }
  .dl-nav-inner { min-height: 50px; }
  .dl-nav-toggle { display: block; order: 3; }
  .dl-nav-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--dl-card-bg);
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.18);
    padding: 70px 0 24px;
    box-sizing: border-box;
  }
  .dl-nav-menu.dl-open { left: 0; }
  .dl-nav-menu > div > ul,
  .dl-nav-menu > ul {
    flex-direction: column;
    gap: 0;
    white-space: normal;
    padding: 0 20px;
  }
  .dl-nav-menu li { width: 100%; }
  .dl-nav-menu li a {
    color: var(--dl-text);
    padding: 14px 0;
    border-bottom: 1px solid var(--dl-border);
    border-radius: 0;
    font-size: 0.95rem;
  }
  .dl-nav-menu li a:hover,
  .dl-nav-menu li.current-menu-item a { background: transparent; color: var(--dl-primary); }
  .dl-header-actions { order: 2; }
  .dl-header-actions .dl-btn-sm { padding: 6px 12px; font-size: 0.72rem; }

  /* 悬浮窗移动端适配 - 上移避免被底部操作栏遮挡 */
  .dl-float-popup {
    right: 12px;
    bottom: 80px;
    width: calc(100% - 24px);
    max-width: 320px;
  }

  /* 移动端单页全宽：container 无 padding 已在上面声明 */
  .dl-single-breadcrumb { padding: 10px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 内页 Hero 移动端 */
  .dl-app-header-hero {
    padding: 40px 16px 30px;
    box-shadow: none;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    overflow: hidden;
  }
  .dl-app-header-hero .dl-app-icon { width: 100px; height: 100px; border-radius: 24px; }
  .dl-app-header-hero .dl-app-title { font-size: 1.45rem; word-break: break-word; overflow-wrap: break-word; }
  .dl-app-header-hero .dl-app-info { max-width: 100%; overflow: hidden; }
  .dl-app-header-hero .dl-app-meta,
  .dl-app-header-hero .dl-app-publisher { flex-wrap: wrap; max-width: 100%; box-sizing: border-box; }
  .dl-app-header-hero .dl-app-meta span,
  .dl-app-header-hero .dl-app-publisher span { flex-shrink: 1; min-width: 0; }
  .dl-app-header-hero .dl-app-actions { display: none; }
  /* 信息表和正文区移动端全宽 */
  .dl-info-table-section { border-radius: 0; border-left: none; border-right: none; padding: 20px 14px; }
  .dl-article-content { border-radius: 0; padding: 20px 14px; }
  .dl-install-steps { border-radius: 0; padding: 20px 14px; }
  .dl-related-section { padding: 0 14px; }
  .dl-related-card { padding: 10px; }
}

@media (max-width: 480px) {
  .dl-master-layout-6 .dl-big-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-master-layout-1 .dl-soft-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-master-layout-2 .dl-app-list { grid-template-columns: 1fr; }
  .dl-master-layout-5 .dl-rank-grid { grid-template-columns: 1fr; }
  .dl-master-layout-7 .dl-mag-grid { grid-template-columns: 1fr; }
}
