/* ==========================================================================
   123合击 - 传奇合击私服发布网 全局样式
   站点：www.123hj.com | 引擎：自适应 PC / 手机端
   ========================================================================== */

/* ---------- 变量与基础 ---------- */
:root {
  --gold: #f0b429;
  --gold-light: #ffd75e;
  --gold-dark: #b8860b;
  --red: #a5281d;
  --red-deep: #7a120e;
  --bg-dark: #140b06;
  --bg-card: rgba(26, 14, 8, 0.92);
  --bg-card-2: rgba(40, 22, 10, 0.9);
  --line: rgba(240, 180, 41, 0.28);
  --line-soft: rgba(240, 180, 41, 0.14);
  --text-main: #e8d5a8;
  --text-sub: #b99a66;
  --text-dim: #8a6f45;
  --text-title: #ffd75e;
  --shadow-gold: 0 0 12px rgba(240, 180, 41, 0.35);
  --radius: 8px;
  --font-stack: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-stack);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-main);
  background-color: #100804;
  background-image: url("../images/bj.png");
  background-repeat: repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--gold-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; text-decoration: underline; }

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
ul, ol { list-style: none; }
input, button, select { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4 { font-weight: 700; color: var(--text-title); line-height: 1.4; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 14px; }

/* 通用标题模块 */
.mod-title {
  display: flex;
  align-items: center;
  margin: 26px 0 16px;
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
}
.mod-title .bar {
  width: 6px; height: 22px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  border-radius: 3px;
  margin-right: 10px;
  box-shadow: var(--shadow-gold);
}
.mod-title h2 { font-size: 20px; letter-spacing: 2px; }
.mod-title .more { margin-left: auto; font-size: 13px; color: var(--text-sub); }
.mod-title .more:hover { color: var(--gold-light); }

/* ==========================================================================
   顶部信息条
   ========================================================================== */
.topbar {
  background: linear-gradient(90deg, #1a0a05, #2b1207, #1a0a05);
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--text-sub);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 34px; }
.topbar .tb-links a { margin: 0 8px; }
.topbar .tb-hot { color: var(--gold); }
.topbar .tb-hot i { font-style: normal; color: #ff6a4d; font-weight: 700; }

/* ==========================================================================
   页头：Logo + 站名 + 搜索
   ========================================================================== */
.header { background: rgba(10, 5, 2, 0.94); border-bottom: 3px solid var(--red); box-shadow: 0 4px 18px rgba(0,0,0,0.6); }
.header .wrap { display: flex; align-items: center; padding: 14px 14px; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 62px; height: 62px; border-radius: 12px; border: 2px solid var(--gold-dark); box-shadow: var(--shadow-gold); }
.brand .site-name { font-size: 30px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(180deg, #ffe9a8 0%, #f0b429 45%, #9c6b0a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 8px rgba(240, 180, 41, 0.25); line-height: 1.1; }
.brand .site-sub { font-size: 12px; color: var(--text-sub); letter-spacing: 1px; }
.brand .site-sub b { color: var(--gold-light); font-weight: 400; }

.header-search { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-search form { display: flex; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: rgba(0,0,0,0.4); }
.header-search input { border: 0; background: transparent; color: var(--text-main); padding: 8px 14px; width: 220px; outline: none; font-size: 13px; }
.header-search input::placeholder { color: var(--text-dim); }
.header-search button { border: 0; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); color: #2a1006; font-weight: 700; padding: 8px 18px; cursor: pointer; font-size: 13px; }
.header-search button:hover { filter: brightness(1.12); }

/* ==========================================================================
   主导航
   ========================================================================== */
.navbar { background: linear-gradient(180deg, #3a1508, #2a0e05); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--red-deep); position: relative; }
.navbar .nav-list { display: flex; flex-wrap: wrap; }
.navbar .nav-list > li { position: relative; }
.navbar .nav-list > li > a {
  display: block; padding: 13px 20px; color: var(--text-main); font-size: 15px; font-weight: 700;
  letter-spacing: 1px; border-right: 1px solid rgba(240,180,41,0.12);
}
.navbar .nav-list > li > a:hover, .navbar .nav-list > li.active > a {
  color: #fff; text-decoration: none;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  text-shadow: 0 0 8px rgba(255, 200, 80, 0.6);
}
.navbar .nav-list > li > a .tag-hot {
  position: absolute; top: 2px; right: 4px; font-size: 10px; font-style: normal;
  color: #fff; background: #d43b2a; border-radius: 3px; padding: 0 4px; line-height: 16px;
}

/* 移动端菜单按钮 */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line); color: var(--gold-light); font-size: 22px; padding: 4px 14px; border-radius: 6px; cursor: pointer; line-height: 1.4; }

/* ==========================================================================
   横幅 Banner（1200 x 250 自动适配）
   ========================================================================== */
.banner { margin: 18px 0 6px; text-align: center; }
.banner a { display: block; }
.banner img {
  width: 1200px; max-width: 100%; height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   广告位（仅首页）
   ========================================================================== */
.ad-slot { margin: 16px 0; min-height: 90px; }
.ad-slot .ad-inner {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ad-slot .ad-inner iframe, .ad-slot .ad-inner img { border: 0; display: block; }

/* ==========================================================================
   主体两栏布局
   ========================================================================== */
.main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding: 18px 0 30px; align-items: start; }
.main .col-main { min-width: 0; }
.main .col-side { min-width: 0; }

/* ==========================================================================
   卡片通用
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.card:hover { border-color: var(--line); }

/* 侧栏小组件 */
.side-box { margin-bottom: 18px; }
.side-box .sb-head {
  display: flex; align-items: center; gap: 8px;
  border-left: 4px solid var(--red);
  padding: 6px 10px;
  background: linear-gradient(90deg, rgba(165,40,29,0.28), rgba(165,40,29,0));
}
.side-box .sb-head h3 { font-size: 16px; letter-spacing: 1px; }
.side-box .sb-body { padding: 10px 4px 4px; }
.side-box .sb-body li { padding: 7px 4px; border-bottom: 1px dashed rgba(240,180,41,0.12); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-box .sb-body li:last-child { border-bottom: 0; }
.side-box .sb-body li .num { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; background: rgba(240,180,41,0.15); color: var(--gold-light); font-size: 12px; margin-right: 8px; font-style: normal; }
.side-box .sb-body li:nth-child(-n+3) .num { background: linear-gradient(180deg, var(--red), var(--red-deep)); color: #fff; }

/* 公告 */
.notice { background: linear-gradient(90deg, rgba(165,40,29,0.5), rgba(40,22,10,0.5)); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; overflow: hidden; }
.notice .n-label { flex: none; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); color: #2a1006; font-weight: 700; padding: 2px 10px; border-radius: 4px; font-size: 13px; letter-spacing: 1px; }
.notice .n-text { flex: 1; color: var(--text-main); font-size: 13px; white-space: nowrap; overflow: hidden; }

/* ==========================================================================
   开服表
   ========================================================================== */
.kaifu-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kaifu-table thead th {
  background: linear-gradient(180deg, #5c1d10, #3a1208);
  color: var(--gold-light); padding: 10px 8px; border: 1px solid rgba(240,180,41,0.2);
  font-weight: 700; white-space: nowrap; text-align: center;
}
.kaifu-table tbody td { padding: 10px 8px; border: 1px solid rgba(240,180,41,0.12); text-align: center; color: var(--text-main); background: rgba(20, 11, 6, 0.6); }
.kaifu-table tbody tr:nth-child(even) td { background: rgba(40, 22, 10, 0.5); }
.kaifu-table tbody tr:hover td { background: rgba(165, 40, 29, 0.22); }
.kaifu-table .gname { font-weight: 700; color: var(--gold-light); }
.kaifu-table .gname a { color: inherit; }
.kaifu-table .gname a:hover { color: #fff; }
.kaifu-table .ver-tag { display: inline-block; font-size: 12px; color: var(--text-sub); border: 1px solid var(--line-soft); border-radius: 4px; padding: 0 8px; line-height: 22px; background: rgba(0,0,0,0.3); }
.kaifu-table .st-open { color: #58d68d; font-weight: 700; }
.kaifu-table .st-wait { color: var(--gold); font-weight: 700; }
.btn-dl {
  display: inline-block; padding: 5px 16px; border-radius: 4px;
  background: linear-gradient(180deg, #ff6a3d, #d4341f);
  color: #fff !important; font-weight: 700; font-size: 13px; text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(212, 52, 31, 0.5);
}
.btn-dl:hover { filter: brightness(1.15); }
.btn-dl.gold { background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); color: #2a1006 !important; box-shadow: 0 2px 8px rgba(240,180,41,0.4); }

/* ==========================================================================
   游戏卡片网格
   ========================================================================== */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--gold-dark); box-shadow: 0 10px 26px rgba(0,0,0,0.55), 0 0 16px rgba(240,180,41,0.18); }
.game-card .gc-img { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.game-card .gc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.game-card:hover .gc-img img { transform: scale(1.05); }
.game-card .gc-img .gc-tag {
  position: absolute; left: 10px; top: 10px; font-size: 12px; font-style: normal;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  color: #fff; border-radius: 4px; padding: 2px 10px; letter-spacing: 1px;
}
.game-card .gc-img .gc-hot {
  position: absolute; right: 10px; top: 10px; font-size: 12px; font-style: normal;
  background: rgba(0,0,0,0.6); color: var(--gold-light); border: 1px solid var(--gold-dark);
  border-radius: 4px; padding: 1px 8px;
}
.game-card .gc-body { padding: 12px 14px 14px; }
.game-card .gc-body h3 { font-size: 16px; margin-bottom: 8px; }
.game-card .gc-body h3 a { color: var(--gold-light); }
.game-card .gc-body h3 a:hover { color: #fff; }
.game-card .gc-meta { font-size: 12px; color: var(--text-sub); line-height: 2; }
.game-card .gc-meta b { color: var(--text-main); font-weight: 400; }
.game-card .gc-ft { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(240,180,41,0.14); }
.game-card .gc-ft .gc-time { font-size: 12px; color: var(--text-dim); }
.game-card .gc-ft .gc-time em { font-style: normal; color: #58d68d; }

/* ==========================================================================
   区块分类入口
   ========================================================================== */
.cat-enter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.cat-enter a {
  display: block; text-align: center; padding: 16px 8px;
  background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  transition: all 0.2s;
}
.cat-enter a:hover { border-color: var(--gold-dark); transform: translateY(-3px); box-shadow: var(--shadow-gold); text-decoration: none; }
.cat-enter .ce-icon {
  width: 46px; height: 46px; line-height: 46px; margin: 0 auto 8px;
  border-radius: 50%; font-size: 20px; font-style: normal; font-weight: 700;
  background: linear-gradient(180deg, #5c1d10, #3a1208);
  color: var(--gold-light); border: 1px solid var(--line);
}
.cat-enter .ce-name { font-size: 14px; font-weight: 700; color: var(--text-main); display: block; }
.cat-enter .ce-num { font-size: 11px; color: var(--text-dim); display: block; margin-top: 2px; }

/* ==========================================================================
   文章列表
   ========================================================================== */
.article-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px dashed rgba(240,180,41,0.14); font-size: 14px;
}
.article-list li:last-child { border-bottom: 0; }
.article-list .a-date { margin-left: auto; flex: none; font-size: 12px; color: var(--text-dim); }
.article-list li a { color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-list li a:hover { color: var(--gold-light); }
.article-list .a-cat { flex: none; font-size: 12px; color: var(--gold); border: 1px solid var(--line-soft); border-radius: 3px; padding: 0 6px; }

/* ==========================================================================
   下载中心
   ========================================================================== */
.dl-banner {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(92,29,16,0.7), rgba(20,11,6,0.7));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px;
}
.dl-banner .dl-info { flex: 1; min-width: 240px; }
.dl-banner .dl-info h3 { font-size: 20px; margin-bottom: 6px; }
.dl-banner .dl-info p { color: var(--text-sub); font-size: 13px; }
.dl-banner .dl-btn {
  display: inline-block; padding: 12px 34px; border-radius: 8px; font-size: 18px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(180deg, #ff7a45, #d4341f 60%, #a5281d);
  color: #fff !important; text-decoration: none !important;
  box-shadow: 0 4px 18px rgba(212, 52, 31, 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}
.dl-banner .dl-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.dl-banner .dl-tip { font-size: 12px; color: var(--text-dim); }

/* ==========================================================================
   SEO 正文区
   ========================================================================== */
.seo-text { font-size: 14px; color: var(--text-main); }
.seo-text h3 { font-size: 17px; margin: 16px 0 8px; color: var(--gold-light); }
.seo-text p { margin-bottom: 10px; text-indent: 2em; }
.seo-text ul { margin: 8px 0 12px 2em; }
.seo-text ul li { list-style: disc; color: var(--text-sub); margin-bottom: 4px; }

/* ==========================================================================
   友情链接
   ========================================================================== */
.friend-links { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-links a {
  font-size: 13px; color: var(--text-sub);
  border: 1px solid var(--line-soft); border-radius: 4px; padding: 3px 12px;
}
.friend-links a:hover { color: var(--gold-light); border-color: var(--gold-dark); text-decoration: none; }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer { background: rgba(10, 5, 2, 0.96); border-top: 3px solid var(--red-deep); margin-top: 30px; padding: 26px 0 20px; font-size: 13px; color: var(--text-sub); }
.footer .wrap { text-align: center; }
.footer .f-nav { margin-bottom: 12px; }
.footer .f-nav a { color: var(--text-sub); margin: 0 8px; font-size: 13px; }
.footer .f-nav a:hover { color: var(--gold-light); }
.footer .f-line { margin: 6px 0; }
.footer .f-line a { color: var(--gold); }
.footer .f-email { color: var(--gold-light); }
.footer .f-copy { color: var(--text-dim); font-size: 12px; margin-top: 8px; }

/* ==========================================================================
   面包屑
   ========================================================================== */
.crumb { font-size: 13px; color: var(--text-sub); padding: 14px 0 4px; }
.crumb a { color: var(--text-sub); }
.crumb a:hover { color: var(--gold-light); }
.crumb .sep { margin: 0 8px; color: var(--text-dim); }
.crumb .cur { color: var(--gold-light); }

/* ==========================================================================
   详情页
   ========================================================================== */
.detail-head { display: flex; gap: 20px; flex-wrap: wrap; }
.detail-head .dh-img { flex: 0 0 340px; max-width: 100%; }
.detail-head .dh-img img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.detail-head .dh-info { flex: 1; min-width: 260px; }
.detail-head .dh-info h1 { font-size: 24px; margin-bottom: 12px; letter-spacing: 1px; }
.detail-head .dh-info .dh-tags { margin-bottom: 12px; }
.detail-head .dh-info .dh-tags span { display: inline-block; font-size: 12px; color: var(--gold-light); border: 1px solid var(--gold-dark); border-radius: 4px; padding: 2px 10px; margin: 0 6px 6px 0; background: rgba(240,180,41,0.08); }
.info-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.info-table td { border: 1px solid rgba(240,180,41,0.14); padding: 8px 12px; }
.info-table td:first-child { width: 110px; color: var(--text-sub); background: rgba(0,0,0,0.3); }
.dh-dl { margin-top: 14px; }
.dh-dl .btn-dl { padding: 10px 30px; font-size: 16px; }

.detail-body h2 { font-size: 18px; margin: 22px 0 10px; color: var(--gold-light); border-left: 4px solid var(--red); padding-left: 10px; }
.detail-body p { margin-bottom: 10px; }
.detail-body ul { margin: 8px 0 12px 2em; }
.detail-body ul li { list-style: disc; margin-bottom: 5px; color: var(--text-main); }

/* 相关游戏 */
.rel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rel-item { background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; text-align: center; padding-bottom: 10px; }
.rel-item:hover { border-color: var(--gold-dark); }
.rel-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.rel-item .r-name { font-size: 13px; padding: 8px 6px 2px; color: var(--gold-light); display: block; }
.rel-item .r-time { font-size: 12px; color: var(--text-dim); }

/* ==========================================================================
   分页
   ========================================================================== */
.pager { display: flex; justify-content: center; gap: 6px; margin: 20px 0; flex-wrap: wrap; }
.pager a, .pager span { display: inline-block; min-width: 34px; padding: 6px 10px; text-align: center; border: 1px solid var(--line-soft); border-radius: 4px; color: var(--text-main); font-size: 13px; }
.pager a:hover { border-color: var(--gold-dark); color: var(--gold-light); text-decoration: none; }
.pager .cur { background: linear-gradient(180deg, var(--red), var(--red-deep)); color: #fff; border-color: var(--red); }

/* ==========================================================================
   返回顶部
   ========================================================================== */
.back-top {
  position: fixed; right: 18px; bottom: 30px; z-index: 99;
  width: 44px; height: 44px; line-height: 44px; text-align: center;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  color: #fff; border-radius: 8px; font-size: 20px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5); opacity: 0; visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s; cursor: pointer; text-decoration: none !important;
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { filter: brightness(1.2); }

/* 搜索无结果提示 */
.no-result { text-align: center; color: var(--text-sub); padding: 40px 0; font-size: 14px; display: none; }
.no-result.show { display: block; }

/* ==========================================================================
   响应式：平板 / 手机
   ========================================================================== */
@media (max-width: 992px) {
  .main { grid-template-columns: 1fr; }
  .cat-enter { grid-template-columns: repeat(3, 1fr); }
  .rel-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar .tb-right { display: none; }
  .topbar .wrap { justify-content: center; }
  .header .wrap { padding: 10px 14px; gap: 10px; }
  .brand img { width: 48px; height: 48px; }
  .brand .site-name { font-size: 22px; letter-spacing: 2px; }
  .brand .site-sub { font-size: 11px; }
  .header-search { margin-left: 0; width: 100%; order: 3; }
  .header-search form { width: 100%; }
  .header-search input { flex: 1; width: auto; }

  /* 汉堡菜单 */
  .nav-toggle { display: block; margin-left: auto; }
  .navbar .nav-list { display: none; flex-direction: column; width: 100%; }
  .navbar .nav-list.open { display: flex; }
  .navbar .nav-list > li > a { border-right: 0; border-bottom: 1px solid rgba(240,180,41,0.1); padding: 12px 16px; }

  .mod-title h2 { font-size: 17px; }
  .banner { margin: 12px 0 4px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card .gc-body { padding: 10px; }
  .game-card .gc-body h3 { font-size: 14px; }
  .kaifu-table { font-size: 12px; }
  .kaifu-table thead th, .kaifu-table tbody td { padding: 8px 4px; }
  .btn-dl { padding: 4px 10px; font-size: 12px; }
  .detail-head .dh-img { flex-basis: 100%; }
  .detail-head .dh-info h1 { font-size: 20px; }
  .dl-banner { flex-direction: column; text-align: center; }
  .footer { padding: 20px 0 16px; }
  .back-top { right: 12px; bottom: 20px; width: 38px; height: 38px; line-height: 38px; font-size: 17px; }
}

@media (max-width: 420px) {
  .game-grid { grid-template-columns: 1fr; }
  .cat-enter { grid-template-columns: repeat(2, 1fr); }
  .brand .site-sub { display: none; }
}
