/* ============================================================
   DNF私服辅助工具下载站 全站样式
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #c91f2f;        /* 主红 */
  --primary-dark: #9e1623;
  --accent: #f0a020;         /* 暗金 */
  --dark: #1b1d24;
  --dark-2: #262a35;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg: #f4f5f7;
  --border: #e3e5ea;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
.container { width: 1200px; max-width: 94%; margin: 0 auto; }
.fl { float: left; }
.fr { float: right; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------------- 顶部条 ---------------- */
.topbar {
  background: var(--dark);
  color: #bbb;
  font-size: 12px;
  line-height: 34px;
}
.topbar a { color: #bbb; margin: 0 8px; }
.topbar a:hover { color: var(--accent); }
.topbar .fl span { margin-right: 14px; }

/* ---------------- 头部 ---------------- */
header.site-header {
  background: linear-gradient(135deg, #20232c 0%, #2c3040 100%);
  padding: 22px 0 18px;
  border-bottom: 3px solid var(--primary);
}
.header-inner { display: flex; align-items: center; gap: 36px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: bold; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.logo-text h1 {
  font-size: 22px; color: #fff; letter-spacing: 1px;
  font-weight: 700;
}
.logo-text p { font-size: 12px; color: #9aa0b0; }

/* 搜索框 */
.search-box { flex: 1; max-width: 460px; display: flex; }
.search-box input {
  flex: 1; height: 40px; padding: 0 14px;
  border: none; border-radius: 20px 0 0 20px;
  outline: none; font-size: 14px;
}
.search-box button {
  height: 40px; padding: 0 26px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 15px; border-radius: 0 20px 20px 0;
}
.search-box button:hover { filter: brightness(1.1); }

.header-qr { text-align: center; color: #9aa0b0; font-size: 12px; }
.header-qr .qr-box {
  width: 52px; height: 52px; margin: 0 auto 2px;
  background: #fff; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}

/* ---------------- 主导航 ---------------- */
nav.main-nav { background: var(--primary); }
nav.main-nav ul { display: flex; }
nav.main-nav li a {
  display: block; padding: 0 26px; height: 46px; line-height: 46px;
  color: #fff; font-size: 15px; font-weight: 500;
}
nav.main-nav li a:hover,
nav.main-nav li.active a {
  background: var(--primary-dark); color: #ffe9b0;
}

/* ---------------- 面包屑 ---------------- */
.crumb {
  background: #fff; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-light);
}
.crumb .container { padding-top: 10px; padding-bottom: 10px; }
.crumb a:hover { color: var(--primary); }
.crumb span.sep { margin: 0 8px; color: #ccc; }

/* ---------------- 通用区块 ---------------- */
.section { margin: 22px 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  border-left: 4px solid var(--primary);
  padding-left: 12px; margin-bottom: 14px;
}
.section-head h2 {
  font-size: 20px; font-weight: 700; color: var(--dark);
}
.section-head h2 small {
  font-size: 12px; color: var(--text-muted); font-weight: normal; margin-left: 8px;
}
.section-head .more { font-size: 13px; color: var(--text-light); }
.section-head .more:hover { color: var(--primary); }

/* 主体两栏布局 */
.layout { display: flex; gap: 20px; }
.layout .main-col { flex: 1; min-width: 0; }
.layout .side-col { width: 300px; flex-shrink: 0; }

/* 卡片 */
.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card + .card { margin-top: 18px; }
.card-title {
  font-size: 16px; font-weight: 700; padding-bottom: 10px;
  border-bottom: 1px solid var(--border); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: ""; width: 4px; height: 16px; background: var(--primary);
  border-radius: 2px;
}

/* ---------------- 首页轮播 ---------------- */
.banner-wrap { display: flex; gap: 16px; margin: 20px 0; }
.banner {
  flex: 1; height: 320px; border-radius: var(--radius);
  overflow: hidden; position: relative;
  background:
    radial-gradient(circle at 75% 30%, rgba(240,160,32,.35), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(201,31,47,.4), transparent 50%),
    linear-gradient(135deg, #14161d, #2b2e3b);
  display: flex; align-items: center;
}
.banner-inner { padding: 0 44px; color: #fff; max-width: 70%; }
.banner-inner .tag {
  display: inline-block; background: var(--primary); color: #fff;
  font-size: 12px; padding: 2px 10px; border-radius: 3px; margin-bottom: 14px;
}
.banner-inner h2 { font-size: 34px; line-height: 1.3; margin-bottom: 12px; }
.banner-inner p { color: #c7cbd6; margin-bottom: 22px; font-size: 15px; }
.banner-btn {
  display: inline-block; background: linear-gradient(135deg, var(--accent), #d98a10);
  color: #2a1a00; font-weight: 700; padding: 11px 34px;
  border-radius: 24px; font-size: 16px;
}
.banner-btn:hover { color: #2a1a00; filter: brightness(1.08); }
.banner-side {
  width: 280px; display: flex; flex-direction: column; gap: 16px;
}
.banner-side .mini {
  flex: 1; border-radius: var(--radius); padding: 18px;
  color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.banner-side .mini:nth-child(1) { background: linear-gradient(135deg, #3a2330, #6e2130); }
.banner-side .mini:nth-child(2) { background: linear-gradient(135deg, #1f3a3a, #1d5a52); }
.banner-side .mini h3 { font-size: 17px; margin-bottom: 6px; }
.banner-side .mini p { font-size: 12px; color: rgba(255,255,255,.75); }

/* ---------------- 软件网格 ---------------- */
.soft-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.soft-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.soft-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(0,0,0,.13); }
.soft-thumb {
  height: 130px; display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: #fff; position: relative;
}
.soft-thumb .badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px;
  padding: 1px 8px; border-radius: 3px;
}
.soft-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.soft-body h3 {
  font-size: 15px; font-weight: 600; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.soft-body .desc {
  font-size: 12px; color: var(--text-light); height: 36px; overflow: hidden;
  margin-bottom: 8px;
}
.soft-meta {
  margin-top: auto; display: flex; justify-content: space-between;
  align-items: center; font-size: 12px; color: var(--text-muted);
}
.soft-meta .dl-btn {
  background: var(--primary); color: #fff; padding: 4px 14px;
  border-radius: 14px; font-size: 12px;
}
.soft-meta .dl-btn:hover { background: var(--primary-dark); color: #fff; }

/* 图标配色 */
.ic-1 { background: linear-gradient(135deg,#c0392b,#e67e22); }
.ic-2 { background: linear-gradient(135deg,#2c3e50,#4ca1af); }
.ic-3 { background: linear-gradient(135deg,#6a3093,#a044ff); }
.ic-4 { background: linear-gradient(135deg,#134e5e,#71b280); }
.ic-5 { background: linear-gradient(135deg,#355c7d,#c06c84); }
.ic-6 { background: linear-gradient(135deg,#8e2de2,#4a00e0); }
.ic-7 { background: linear-gradient(135deg,#d35400,#f39c12); }
.ic-8 { background: linear-gradient(135deg,#1f4037,#99f2c8); color:#1f4037; }

/* ---------------- 软件列表(行式) ---------------- */
.soft-list .soft-row {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}
.soft-list .soft-row:last-child { border-bottom: none; }
.soft-row .soft-thumb {
  width: 80px; height: 80px; border-radius: 8px; flex-shrink: 0;
  font-size: 32px;
}
.soft-row .soft-info { flex: 1; min-width: 0; }
.soft-row .soft-info h3 { font-size: 16px; margin-bottom: 4px; }
.soft-row .soft-info h3 .ver { font-size: 12px; color: var(--text-muted); font-weight: normal; margin-left: 8px; }
.soft-row .soft-info .desc { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.soft-row .soft-info .meta { font-size: 12px; color: var(--text-muted); }
.soft-row .soft-info .meta span { margin-right: 16px; }
.soft-row .dl-col {
  width: 110px; text-align: center; flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.btn-dl {
  display: block; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; padding: 8px 0; border-radius: 4px; font-size: 14px;
}
.btn-dl:hover { color: #fff; filter: brightness(1.1); }
.dl-col .size { font-size: 12px; color: var(--text-muted); }

/* ---------------- 排行侧栏 ---------------- */
.rank-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.rank-list li:last-child { border-bottom: none; }
.rank-num {
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 4px; background: #d8dbe2; color: #fff; font-size: 12px;
  font-style: normal; flex-shrink: 0;
}
.rank-list li:nth-child(1) .rank-num { background: #e74c3c; }
.rank-list li:nth-child(2) .rank-num { background: #e67e22; }
.rank-list li:nth-child(3) .rank-num { background: #f1c40f; }
.rank-list a {
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-list .num { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }

/* ---------------- 资讯列表 ---------------- */
.news-list li {
  padding: 12px 0; border-bottom: 1px dashed var(--border);
  display: flex; justify-content: space-between; gap: 16px;
}
.news-list li:last-child { border-bottom: none; }
.news-list a {
  font-size: 14px; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.news-list a::before { content: "•"; color: var(--primary); margin-right: 8px; }
.news-list a.hot { font-weight: 600; }
.news-list .date { color: var(--text-muted); font-size: 12px; flex-shrink: 0; }

/* 图文资讯 */
.news-item {
  display: flex; gap: 16px; padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-item .news-pic {
  width: 200px; height: 120px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: #fff;
}
.news-item .news-text h3 { font-size: 17px; margin-bottom: 8px; }
.news-item .news-text p {
  font-size: 13px; color: var(--text-light); margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item .news-text .meta { font-size: 12px; color: var(--text-muted); }

/* ---------------- 标签/分类 ---------------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  padding: 5px 14px; background: #f2f3f5; border-radius: 14px;
  font-size: 13px; color: var(--text-light);
}
.tag-cloud a:hover { background: var(--primary); color: #fff; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.cat-tabs a {
  padding: 7px 20px; background: #fff; border: 1px solid var(--border);
  border-radius: 20px; font-size: 14px;
}
.cat-tabs a.active, .cat-tabs a:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ---------------- 分页 ---------------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0 8px; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; line-height: 36px; text-align: center;
  padding: 0 10px; border: 1px solid var(--border); border-radius: 4px;
  background: #fff; font-size: 14px;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* ---------------- 详情页 ---------------- */
.detail-head { display: flex; gap: 22px; }
.detail-head .soft-thumb {
  width: 110px; height: 110px; border-radius: 12px; font-size: 48px;
}
.detail-head .info { flex: 1; }
.detail-head .info h1 { font-size: 24px; margin-bottom: 10px; }
.detail-head .info .badges { margin-bottom: 10px; }
.detail-head .info .badges em {
  font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 3px;
  margin-right: 8px; color: #fff;
}
.badge-safe { background: #27ae60; }
.badge-free { background: var(--accent); color:#60360a !important; }
.badge-hot { background: var(--primary); }
.detail-head .info table { font-size: 13px; color: var(--text-light); }
.detail-head .info td { padding: 2px 18px 2px 0; }
.detail-download {
  width: 220px; flex-shrink: 0; text-align: center;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.big-dl {
  display: block; height: 50px; line-height: 50px; border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 18px; font-weight: 700;
}
.big-dl:hover { color: #fff; filter: brightness(1.08); }
.alt-dl {
  display: block; padding: 9px 0; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; color: var(--text-light);
}
.alt-dl:hover { border-color: var(--primary); color: var(--primary); }

.detail-tabs {
  display: flex; border-bottom: 2px solid var(--border); margin: 22px 0 18px;
}
.detail-tabs a {
  padding: 10px 28px; font-size: 15px; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.detail-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

.article { font-size: 15px; }
.article h2 { font-size: 19px; margin: 24px 0 12px; padding-left: 10px; border-left: 4px solid var(--primary); }
.article h3 { font-size: 16px; margin: 18px 0 8px; color: var(--dark); }
.article p { margin-bottom: 12px; color: #444; }
.article ul { padding-left: 4px; margin-bottom: 12px; }
.article ul li {
  padding-left: 20px; position: relative; margin-bottom: 6px; color: #444;
}
.article ul li::before {
  content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: bold;
}
.article img {
  border-radius: 6px; margin: 12px 0; border: 1px solid var(--border);
}
.article .tip {
  background: #fff8ec; border-left: 4px solid var(--accent);
  padding: 12px 16px; border-radius: 4px; margin: 14px 0; font-size: 14px;
}
.article .warn {
  background: #fdeeee; border-left: 4px solid var(--primary);
  padding: 12px 16px; border-radius: 4px; margin: 14px 0; font-size: 14px;
}

/* 截图区 */
.shot-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 12px 0; }
.shot {
  height: 150px; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; color: rgba(255,255,255,.85); font-size: 14px;
  background: linear-gradient(135deg,#2b2e3b,#44485c);
}

/* 信息表 */
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.info-table td, .info-table th {
  border: 1px solid var(--border); padding: 10px 14px; text-align: left;
}
.info-table th { background: #f7f8fa; width: 130px; color: var(--text-light); font-weight: normal; }

/* 评论 */
.comment { padding: 14px 0; border-bottom: 1px dashed var(--border); }
.comment .c-head { font-size: 13px; margin-bottom: 4px; }
.comment .c-head .name { font-weight: 600; margin-right: 10px; }
.comment .c-head .date { color: var(--text-muted); }
.comment p { font-size: 14px; color: #444; }

/* 相关软件 */
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.related-grid .soft-card .soft-thumb { height: 90px; font-size: 32px; }

/* ---------------- 帮助/教程页 ---------------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer; padding: 15px 0; font-size: 15px; font-weight: 600;
  list-style: none; position: relative; padding-right: 28px;
}
.faq-item summary::after {
  content: "+"; position: absolute; right: 6px; top: 13px;
  font-size: 20px; color: var(--primary);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 0 15px; color: var(--text-light); font-size: 14px; }

.step-list { counter-reset: step; margin: 14px 0; }
.step-list li {
  position: relative; padding: 0 0 18px 46px;
}
.step-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; line-height: 30px; text-align: center;
  background: var(--primary); color: #fff; border-radius: 50%; font-weight: bold;
}
.step-list li::after {
  content: ""; position: absolute; left: 14px; top: 32px; bottom: 0;
  width: 2px; background: #e8e9ee;
}
.step-list li:last-child::after { display: none; }
.step-list h4 { font-size: 15px; margin-bottom: 4px; }
.step-list p { font-size: 13px; color: var(--text-light); }

/* ---------------- 关于页 ---------------- */
.about-hero {
  background: linear-gradient(135deg,#1b1d24,#34384a);
  color: #fff; border-radius: var(--radius); padding: 40px; text-align: center;
}
.about-hero h1 { font-size: 30px; margin-bottom: 12px; }
.about-hero p { color: #b9becb; max-width: 760px; margin: 0 auto; }
.stat-row { display: flex; justify-content: center; gap: 60px; margin-top: 26px; }
.stat-row .stat b { display: block; font-size: 30px; color: var(--accent); }
.stat-row .stat span { font-size: 13px; color: #9aa0b0; }

/* ---------------- 友情链接/底部 ---------------- */
.friend-links {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; margin: 22px 0;
}
.friend-links h2 {
  font-size: 15px; margin-bottom: 10px; display: inline-block;
  vertical-align: middle;
}
.friend-links .links { display: inline; font-size: 13px; color: var(--text-light); }
.friend-links .links a { margin: 0 10px; }

footer.site-footer {
  background: var(--dark); color: #8b90a0; font-size: 13px;
  padding: 34px 0 20px; margin-top: 30px;
}
.footer-cols { display: flex; gap: 40px; margin-bottom: 22px; }
.footer-col { flex: 1; }
.footer-col h4 { color: #d5d8e0; font-size: 14px; margin-bottom: 12px; }
.footer-col a { display: block; color: #8b90a0; margin-bottom: 7px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #333746; padding-top: 16px; text-align: center;
  font-size: 12px; line-height: 2;
}
.footer-bottom a { color: #8b90a0; margin: 0 6px; }

/* ---------------- 浮动侧栏 ---------------- */
.float-bar {
  position: fixed; right: 16px; bottom: 80px; z-index: 99;
  display: flex; flex-direction: column; gap: 8px;
}
.float-bar a {
  width: 52px; height: 52px; border-radius: 8px; background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-light);
}
.float-bar a i { font-size: 18px; font-style: normal; line-height: 1.2; }
.float-bar a:hover { background: var(--primary); color: #fff; }
.float-bar .back-top { display: none; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 992px) {
  .layout { flex-direction: column; }
  .layout .side-col { width: 100%; }
  .soft-grid { grid-template-columns: repeat(3,1fr); }
  .banner-side { display: none; }
  .banner-inner { max-width: 100%; }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 14px; }
  .search-box { order: 3; max-width: 100%; flex-basis: 100%; }
  .header-qr { display: none; }
  nav.main-nav li a { padding: 0 15px; font-size: 14px; }
  .soft-grid { grid-template-columns: repeat(2,1fr); }
  .news-item .news-pic { width: 130px; height: 90px; font-size: 26px; }
  .detail-head { flex-wrap: wrap; }
  .detail-download { width: 100%; }
  .related-grid { grid-template-columns: repeat(2,1fr); }
  .shot-grid { grid-template-columns: repeat(2,1fr); }
  .footer-cols { flex-wrap: wrap; gap: 22px; }
  .footer-col { flex-basis: 40%; }
  .stat-row { gap: 30px; }
}
@media (max-width: 480px) {
  .soft-grid { grid-template-columns: 1fr; }
  .banner-inner h2 { font-size: 24px; }
  .soft-row .dl-col { width: 80px; }
  .news-item .news-pic { display: none; }
}
