/* ============================================================
   传奇私服发布网 - 全局样式
   深色底 + 经典金 + 暗红 的传奇视觉语言，响应式适配
   ============================================================ */

:root{
  --bg:#14110d;
  --bg2:#1d1812;
  --bg3:#26201a;
  --line:#3a3126;
  --line2:#4a3e2e;
  --gold:#d8a64a;
  --gold2:#f0c674;
  --red:#a83a2c;
  --red2:#c24d3b;
  --text:#e9e0cd;
  --text2:#a2967d;
  --radius:6px;
}

*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);
  color:var(--text);
  font-family:"Microsoft YaHei","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC",sans-serif;
  font-size:15px;
  line-height:1.75;
}
a{color:var(--gold);text-decoration:none}
a:hover{color:var(--gold2)}
img{max-width:100%;display:block}
ul,ol{list-style:none}

.container{max-width:1160px;margin:0 auto;padding:0 16px}

/* ---------------- 顶部导航 ---------------- */
.site-header{background:var(--bg2);border-bottom:1px solid var(--line)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;max-width:1160px;margin:0 auto}
.logo a{display:flex;align-items:center;gap:10px}
.logo-mark{
  width:34px;height:34px;flex:none;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,var(--red),#7a241c);
  color:#f4e3c0;font-weight:800;font-size:17px;border-radius:6px;
  border:1px solid var(--line2);
}
.logo-text{line-height:1.3}
.logo-text b{display:block;font-size:19px;color:var(--gold2);letter-spacing:.5px;font-weight:800}
.logo-text span{display:block;font-size:11px;color:var(--text2);letter-spacing:2px}
.main-nav{display:flex;flex-wrap:wrap;gap:2px}
.main-nav a{
  display:block;padding:8px 13px;border-radius:var(--radius);
  color:var(--text2);font-size:14px;white-space:nowrap;
}
.main-nav a:hover{color:var(--gold2);background:var(--bg3)}
.main-nav a.active{color:var(--gold2);background:var(--bg3);font-weight:700}

/* ---------------- Hero 区 ---------------- */
.hero{
  background:
    radial-gradient(900px 300px at 15% -20%, rgba(168,58,44,.28), transparent 60%),
    radial-gradient(700px 260px at 90% -10%, rgba(216,166,74,.14), transparent 55%),
    var(--bg);
  border-bottom:1px solid var(--line);
  padding:34px 0 30px;
}
.hero-inner{max-width:1160px;margin:0 auto;padding:0 16px}
.hero-tag{
  display:inline-block;padding:3px 12px;border:1px solid var(--red2);
  color:var(--red2);font-size:12px;border-radius:20px;letter-spacing:1px;margin-bottom:14px;
}
.hero h1{
  font-size:clamp(24px,4.6vw,38px);line-height:1.35;color:var(--gold2);
  font-weight:800;margin-bottom:10px;
}
.hero h1 em{font-style:normal;color:var(--red2)}
.hero p{color:var(--text2);font-size:15px;max-width:760px;margin-bottom:20px}
.hero-links{display:flex;flex-wrap:wrap;gap:10px}
.hero-links a{
  padding:9px 18px;border-radius:var(--radius);font-size:14px;font-weight:700;
}
.hero-links a.primary{background:var(--red);color:#f6ecd8}
.hero-links a.primary:hover{background:var(--red2);color:#fff}
.hero-links a.ghost{border:1px solid var(--line2);color:var(--gold)}
.hero-links a.ghost:hover{border-color:var(--gold);color:var(--gold2)}

/* ---------------- 通用区块 ---------------- */
.section{margin:26px 0}
.section-title{
  display:flex;align-items:center;gap:10px;margin-bottom:16px;
}
.section-title .bar{width:4px;height:18px;background:var(--red);border-radius:2px}
.section-title h2{font-size:20px;color:var(--gold2);font-weight:800}
.section-title .more{margin-left:auto;font-size:13px;color:var(--text2)}
.section-title .more:hover{color:var(--gold2)}

/* ---------------- 首页布局 ---------------- */
.home-grid{display:grid;grid-template-columns:1fr;gap:26px}
@media(min-width:900px){.home-grid{grid-template-columns:1fr 320px}}
.main-col{min-width:0}

/* 栏目卡片 */
.cat-grid{display:grid;grid-template-columns:1fr;gap:14px}
@media(min-width:560px){.cat-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:900px){.cat-grid{grid-template-columns:repeat(4,1fr)}}
/* 双列布局下奇数张卡片时，最后一张占满整行，避免孤卡 */
.cat-card:last-child:nth-child(odd){grid-column:span 2}
@media(min-width:900px){.cat-card:last-child:nth-child(odd){grid-column:auto}}
.cat-card{
  display:block;background:var(--bg2);border:1px solid var(--line);
  border-radius:var(--radius);padding:18px;position:relative;overflow:hidden;
}
.cat-card:hover{border-color:var(--gold);transform:translateY(-2px)}
.cat-card .num{
  position:absolute;right:10px;top:6px;font-size:34px;font-weight:800;
  color:rgba(216,166,74,.12);line-height:1;
}
.cat-card h3{font-size:17px;color:var(--gold2);margin-bottom:6px}
.cat-card p{font-size:13px;color:var(--text2);margin-bottom:10px}
.cat-card .go{font-size:13px;color:var(--red2);font-weight:700}

/* 文章条目列表 */
.post-list{display:flex;flex-direction:column;gap:12px}
.post-item{
  display:flex;flex-direction:column;gap:4px;
  background:var(--bg2);border:1px solid var(--line);
  border-radius:var(--radius);padding:14px 16px;
}
.post-item:hover{border-color:var(--line2)}
.post-item h3{font-size:16px;line-height:1.5}
.post-item h3 a{color:var(--text);font-weight:700}
.post-item h3 a:hover{color:var(--gold2)}
.post-item p{font-size:13.5px;color:var(--text2)}
.post-meta{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--text2)}
.post-meta .cat{color:var(--red2)}
.post-meta time{color:#8a7f68}

/* 侧边栏 */
.sidebar{display:flex;flex-direction:column;gap:20px;min-width:0}
.panel{background:var(--bg2);border:1px solid var(--line);border-radius:var(--radius);padding:16px}
.panel h3{
  font-size:15px;color:var(--gold2);font-weight:800;margin-bottom:12px;
  padding-bottom:10px;border-bottom:1px solid var(--line);
}
.panel ul{display:flex;flex-direction:column;gap:8px}
.panel li{font-size:13.5px;line-height:1.55}
.panel li a{color:var(--text2)}
.panel li a:hover{color:var(--gold2)}
.panel li .d{display:block;font-size:11px;color:#8a7f68}
.cat-nav li a{display:flex;justify-content:space-between;align-items:center}
.cat-nav li a i{font-style:normal;font-size:11px;color:var(--red2)}

/* ---------------- 内页通用 ---------------- */
.page{max-width:1160px;margin:0 auto;padding:22px 16px 40px}
.breadcrumb{font-size:12.5px;color:var(--text2);margin-bottom:18px}
.breadcrumb a{color:var(--text2)}
.breadcrumb a:hover{color:var(--gold2)}
.breadcrumb .sep{margin:0 7px;color:#6d6350}

.page-head h1{font-size:26px;color:var(--gold2);font-weight:800;line-height:1.4;margin-bottom:8px}
.page-head .sub{color:var(--text2);font-size:14px;margin-bottom:22px}

/* 栏目页布局 */
.cat-layout{display:grid;grid-template-columns:1fr;gap:26px}
@media(min-width:900px){.cat-layout{grid-template-columns:1fr 300px}}
.cat-head{
  background:var(--bg2);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px;margin-bottom:20px;
}
.cat-head .tag{display:inline-block;font-size:12px;color:var(--red2);border:1px solid var(--red2);border-radius:20px;padding:2px 11px;margin-bottom:10px;letter-spacing:1px}
.cat-head h1{font-size:24px;color:var(--gold2);font-weight:800;margin-bottom:6px}
.cat-head p{color:var(--text2);font-size:14px}

/* 文章详情 */
.article-box{background:var(--bg2);border:1px solid var(--line);border-radius:var(--radius);padding:26px 22px}
@media(min-width:768px){.article-box{padding:34px 38px}}
.article-head{border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:22px}
.article-head h1{font-size:24px;line-height:1.5;color:var(--gold2);font-weight:800}
.article-meta{display:flex;flex-wrap:wrap;gap:14px;margin-top:12px;font-size:13px;color:var(--text2)}
.article-meta a{color:var(--red2)}
.article-body p{margin-bottom:16px;text-align:justify;color:#e2d9c6}
.article-body h2{font-size:19px;color:var(--gold2);margin:24px 0 12px;padding-left:12px;border-left:4px solid var(--red)}
.article-body ul,.article-body ol{padding-left:22px;margin-bottom:16px}
.article-body ul{list-style:disc}
.article-body ol{list-style:decimal}
.article-body li{margin-bottom:6px}
.article-nav{display:flex;flex-wrap:wrap;gap:10px;margin-top:26px;padding-top:16px;border-top:1px solid var(--line);font-size:13.5px}
.article-nav a{color:var(--text2)}
.article-nav a:hover{color:var(--gold2)}
.article-nav .next{margin-left:auto;text-align:right}

/* 相关文章 */
.related h3{font-size:17px;color:var(--gold2);font-weight:800;margin:26px 0 12px}
.related .post-list{gap:10px}

/* ---------------- 页脚 ---------------- */
.site-footer{background:var(--bg2);border-top:1px solid var(--line);margin-top:40px}
.footer-inner{max-width:1160px;margin:0 auto;padding:30px 16px 24px}
.footer-cols{display:grid;grid-template-columns:1fr;gap:22px;margin-bottom:22px}
@media(min-width:700px){.footer-cols{grid-template-columns:1.4fr 1fr 1fr}}
.footer-cols h4{font-size:15px;color:var(--gold2);font-weight:800;margin-bottom:10px}
.footer-cols p{font-size:13px;color:var(--text2)}
.footer-cols ul{display:flex;flex-direction:column;gap:6px}
.footer-cols ul a{font-size:13px;color:var(--text2)}
.footer-cols ul a:hover{color:var(--gold2)}
.footer-bottom{
  border-top:1px solid var(--line);padding-top:16px;
  font-size:12.5px;color:#8a7f68;text-align:center;line-height:2;
}
.footer-bottom .icp{color:#6d6350}

/* 404 */
.notfound{text-align:center;padding:70px 16px}
.notfound h1{font-size:60px;color:var(--red2);font-weight:800}
.notfound p{color:var(--text2);margin:12px 0 22px}

/* 可访问性 */
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
}
