/* ==========================================================
   传奇私服发布网 · 全站共用样式
   ========================================================== */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;
  background:#f2f2f2; color:#333; font-size:14px; line-height:1.8;
}
a { color:#333; text-decoration:none; }
a:hover { color:#c00; }
img { max-width:100%; display:block; border:0; }
ul { list-style:none; }
.container { width:1180px; margin:0 auto; }

/* ---------- 顶部 ---------- */
.topbar { background:#1a1a1a; color:#bbb; font-size:12px; padding:6px 0; }
.topbar .container { display:flex; justify-content:space-between; }
.topbar a { color:#bbb; margin-left:12px; }
.topbar a:hover { color:#fff; }

/* ---------- 头部 ---------- */
.header { background:#fff; border-bottom:3px solid #c00; }
.header-main { display:flex; align-items:center; justify-content:space-between; padding:18px 0; }
.logo { display:flex; align-items:center; gap:12px; }
.logo .badge {
  width:52px; height:52px; background:#c00; color:#fff; border-radius:8px;
  display:flex; align-items:center; justify-content:center; font-size:26px; font-weight:bold;
}
.logo h1 { font-size:26px; color:#c00; letter-spacing:1px; }
.logo .sub { font-size:12px; color:#999; }
.header-search { display:flex; }
.header-search input {
  width:240px; height:38px; border:1px solid #c00; border-right:0; padding:0 10px; outline:none;
}
.header-search button {
  width:80px; height:38px; background:#c00; color:#fff; border:0; cursor:pointer; font-size:14px;
}
.header-search button:hover { background:#a00; }

/* ---------- 导航 ---------- */
.nav { background:#222; }
.nav ul { display:flex; }
.nav li a {
  display:block; padding:12px 26px; color:#fff; font-size:15px; transition:.2s;
}
.nav li a:hover, .nav li a.on { background:#c00; color:#fff; }

/* ---------- 布局块 ---------- */
.section { margin-top:20px; }
.section-title {
  display:flex; align-items:center; justify-content:space-between;
  background:#fff; border-left:4px solid #c00; padding:10px 14px; margin-bottom:12px;
}
.section-title h2 { font-size:18px; color:#222; }
.section-title h2 span { color:#c00; }
.section-title a.more { color:#999; font-size:12px; }
.section-title a.more:hover { color:#c00; }

/* ---------- 面包屑 ---------- */
.crumb { padding:12px 0; font-size:13px; color:#999; }
.crumb a { color:#666; }
.crumb a:hover { color:#c00; }

/* ---------- 推荐区（首图+推荐列表） ---------- */
.recommend { display:flex; gap:14px; align-items:stretch; }
.recommend .focus { width:540px; height:340px; position:relative; overflow:hidden; border-radius:4px; flex-shrink:0; }
.focus-track { display:flex; width:100%; height:100%; transition:transform .5s ease; }
.focus-slide { flex:0 0 100%; height:100%; position:relative; }
.focus-slide img { width:100%; height:100%; object-fit:cover; display:block; }
.focus-slide .badge { position:absolute; left:14px; top:14px; background:#e60012; color:#fff; font-size:13px;
  padding:3px 12px; border-radius:3px; font-weight:bold; z-index:3; box-shadow:0 2px 6px rgba(0,0,0,.35); }
.recommend .focus .mask {
  position:absolute; left:0; right:0; bottom:0; padding:34px 20px 18px;
  background:linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.35) 55%, rgba(0,0,0,0)); color:#fff; z-index:2;
}
.recommend .focus .mask h3 { font-size:19px; line-height:1.35; }
.recommend .focus .mask p { font-size:12.5px; color:#ffd98a; margin-top:6px; }
.rec-list { flex:1; display:grid; grid-template-columns:1fr 1fr; gap:10px; align-content:start; }
.rec-item { background:#fff; padding:8px; display:flex; gap:8px; border:1px solid #eee; text-decoration:none; transition:border-color .2s; }
.rec-item:hover { border-color:#c00; }
.rec-item img { width:90px; height:64px; object-fit:cover; border-radius:3px; flex-shrink:0; }
.rec-item .info { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; }
.rec-item .info h4 { font-size:13px; line-height:1.4; height:36px; overflow:hidden; color:#333; }
.rec-item:hover .info h4 { color:#c00; }
.rec-item .info p { font-size:12px; color:#c00; margin-top:3px; }
.rec-more { flex-direction:column; align-items:center; justify-content:center; text-align:center; background:#fafafa; border:1px dashed #c00; }
.rec-more span { color:#c00; font-size:15px; font-weight:bold; }
.rec-more small { color:#999; font-size:12px; margin-top:4px; }

/* ---------- 每日一荐（全宽三列，横向卡片） ---------- */
.rec-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.rec-card { display:flex; gap:12px; padding:12px; background:#fff; border:1px solid #eee; border-radius:4px; text-decoration:none; transition:border-color .2s,box-shadow .2s; }
.rec-card:hover { border-color:#c00; box-shadow:0 2px 8px rgba(204,0,0,.12); }
.rec-card img { width:150px; height:106px; object-fit:cover; border-radius:3px; flex-shrink:0; }
.rec-card .rec-cap { flex:1; display:flex; flex-direction:column; justify-content:center; min-width:0; }
.rec-card .tag { display:inline-block; background:#c00; color:#fff; font-size:11px; padding:2px 8px; border-radius:2px; margin-bottom:5px; align-self:flex-start; }
.rec-card h3 { font-size:15px; line-height:1.45; color:#333; margin-bottom:6px; }
.rec-card:hover h3 { color:#c00; }
.rec-card p { font-size:12.5px; color:#888; line-height:1.65; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }

/* ---------- 排行卡 ---------- */
.rank-card { background:#fff; padding:12px; border:1px solid #eee; }
.rank-card .tabs { display:flex; border-bottom:1px solid #eee; margin-bottom:10px; }
.rank-card .tabs span {
  padding:6px 16px; cursor:pointer; font-size:14px; color:#666; border-bottom:2px solid transparent;
}
.rank-card .tabs span.active { color:#c00; border-bottom-color:#c00; font-weight:bold; }
.rank-list li { display:flex; align-items:center; padding:8px 0; border-bottom:1px dashed #eee; }
.rank-list li:last-child { border-bottom:0; }
.rank-list .num {
  width:22px; height:22px; line-height:22px; text-align:center; background:#eee; color:#666;
  font-size:12px; margin-right:10px; border-radius:3px; flex-shrink:0;
}
.rank-list li:nth-child(1) .num { background:#c00; color:#fff; }
.rank-list li:nth-child(2) .num { background:#f60; color:#fff; }
.rank-list li:nth-child(3) .num { background:#f90; color:#fff; }
.rank-list .txt { flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.rank-list .hot { color:#c00; font-size:12px; }

/* ---------- 三栏 ---------- */
.three-col { display:flex; gap:16px; }
.three-col .rank-col { flex:1; min-width:0; }

/* ---------- 两栏 ---------- */
.two-col { display:flex; gap:20px; align-items:flex-start; }
.two-col .main { flex:1; min-width:0; }
.two-col .side { width:320px; flex-shrink:0; position:sticky; top:12px; }

/* ---------- 文章列表 ---------- */
.post-list { list-style:none; }
.post-list li { background:#fff; padding:12px 14px; margin-bottom:10px; border:1px solid #eee; display:flex; gap:14px; }
.post-list .thumb { width:160px; height:100px; object-fit:cover; border-radius:3px; flex-shrink:0; }
.post-list .body { flex:1; min-width:0; }
.post-list h3 { font-size:16px; line-height:1.5; margin-bottom:6px; }
.post-list h3 a:hover { color:#c00; }
.post-list .desc {
  font-size:13px; color:#777; line-height:1.65; overflow:hidden;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.post-list .meta { font-size:12px; color:#999; margin-top:8px; }
.post-list .meta span { margin-right:14px; }

/* ---------- 侧边小列表 ---------- */
.side-list-card { background:#fff; border:1px solid #eee; border-radius:4px; padding:8px 12px; }
.side-list { list-style:none; }
.side-list li { padding:8px 0; border-bottom:1px dashed #f0f0f0; }
.side-list li:last-child { border-bottom:0; }
.side-list a { color:#555; font-size:13px; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-list a:hover { color:#c00; }

/* ---------- 分区卡片 ---------- */
.cat-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.cat-grid-5 { grid-template-columns:repeat(5,minmax(0,1fr)); }
.cat-item { display:block; border:1px solid #eee; border-radius:4px; overflow:hidden; background:#fff; text-decoration:none; transition:border-color .2s,box-shadow .2s; }
.cat-item:hover { border-color:#c00; box-shadow:0 2px 8px rgba(204,0,0,.12); }
.cat-item img { width:100%; height:auto; aspect-ratio:8/3; object-fit:cover; display:block; }
.cat-item h4 { font-size:14px; color:#333; padding:8px 10px 2px; text-align:center; }
.cat-item p { font-size:12px; color:#c00; text-align:center; padding:0 10px 8px; }

/* ---------- 友情链接 ---------- */
.links { background:#fff; border:1px solid #eee; border-radius:4px; padding:12px; display:flex; flex-wrap:wrap; gap:8px; }
.links a { font-size:12px; color:#666; padding:3px 8px; background:#f8f8f8; border-radius:3px; }
.links a:hover { background:#c00; color:#fff; }

/* ---------- 分页 ---------- */
.pagination { text-align:center; margin:20px 0; }
.pagination a {
  display:inline-block; padding:6px 14px; background:#fff; border:1px solid #ddd; margin:0 3px; color:#666;
}
.pagination a.on, .pagination a:hover { background:#c00; border-color:#c00; color:#fff; }

/* ---------- 文章页 ---------- */
.article { background:#fff; padding:24px; }
.article .cate { color:#c00; font-size:13px; }
.article h1 { font-size:24px; line-height:1.5; margin:8px 0 14px; color:#222; }
.article .info { font-size:12px; color:#999; padding-bottom:14px; border-bottom:1px solid #eee; margin-bottom:20px; }
.article .info span { margin-right:16px; }
.article .summary {
  background:#fafafa; border-left:3px solid #c00; padding:12px 16px; color:#555;
  font-size:14px; margin-bottom:20px;
}
.article p { font-size:15px; line-height:2; margin-bottom:16px; text-indent:2em; }
.article h2.sub {
  font-size:18px; color:#c00; margin:26px 0 12px; padding-left:10px; border-left:4px solid #c00;
}
.article .tags { margin-top:24px; padding-top:14px; border-top:1px solid #eee; }
.article .tags a {
  display:inline-block; background:#f2f2f2; color:#666; padding:3px 12px; margin:0 6px 6px 0; font-size:13px;
}
.article .tags a:hover { background:#c00; color:#fff; }
.article .rel { margin-top:26px; background:#fff; border:1px solid #eee; padding:16px 20px; }
.article .rel h2 { font-size:17px; color:#c00; margin-bottom:10px; }
.article .rel ul { margin-top:8px; }
.article .rel li { padding:7px 0; border-bottom:1px dashed #eee; }
.article .rel li:before { content:"·"; color:#c00; font-weight:bold; margin-right:8px; }
.article .nav-back { margin-top:22px; }
.article .nav-back a { color:#c00; }

/* ---------- 搜索页 ---------- */
.search-box { background:#fff; padding:24px; border:1px solid #eee; text-align:center; margin-bottom:20px; }
.search-box input { width:320px; height:38px; border:1px solid #c00; padding:0 12px; outline:none; }
.search-box button { width:80px; height:38px; background:#c00; color:#fff; border:0; cursor:pointer; }
.search-results li { background:#fff; padding:14px; margin-bottom:10px; border:1px solid #eee; list-style:none; }
.search-results h3 { font-size:16px; margin-bottom:6px; }
.search-results .kw { color:#c00; font-weight:bold; }

/* ---------- 404 ---------- */
.notfound { background:#fff; padding:60px 24px; text-align:center; }
.notfound h1 { font-size:72px; color:#c00; }
.notfound p { font-size:16px; color:#666; margin:10px 0 20px; }

/* ---------- 页脚 ---------- */
.footer { background:#1a1a1a; color:#aaa; padding:26px 0; margin-top:30px; font-size:13px; }
.footer .container { text-align:center; }
.footer .foot-nav a { color:#aaa; margin:0 8px; }
.footer .foot-nav a:hover { color:#fff; }
.footer .copy { margin-top:12px; color:#666; font-size:12px; }
.footer .seo { margin-top:14px; color:#555; font-size:12px; line-height:2; }

/* ---------- 响应式 ---------- */
@media (max-width:1200px){
  .container { width:100%; padding:0 16px; }
  .recommend .focus { width:47%; }
  .rec-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cat-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .cat-grid-5 { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:1024px){
  .rec-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rec-card img { width:130px; height:96px; }
  .cat-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .cat-grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:768px){
  .container { width:100%; padding:0 12px; }
  .header-main { flex-direction:column; gap:14px; }
  .header-search input { width:180px; }
  .recommend { flex-direction:column; }
  .recommend .focus { width:100%; }
  .rec-list { grid-template-columns:1fr; }
  .two-col { flex-direction:column; }
  .two-col .side { width:100%; position:static; }
  .cat-grid, .cat-grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .post-list .thumb { width:132px; height:86px; }
  .post-list .thumb img { width:100%; height:100%; object-fit:cover; }
  .rec-grid { grid-template-columns:1fr; }
  .rec-card img { width:118px; height:88px; }
  .nav ul { flex-wrap:wrap; }
  .nav li a { padding:10px 11px; font-size:13.5px; }
  .article h1 { font-size:20px; }
}

@media (max-width:560px){
  .three-col { flex-direction:column; gap:16px; }
}
@media (max-width:480px){
  .nav li a { padding:9px 9px; font-size:13px; }
  .rec-card img { width:100px; height:76px; }
  .rec-card h3 { font-size:14px; }
  .post-list .thumb { width:104px; height:72px; }
  .post-list li { gap:10px; padding:10px; }
  .post-list h3 { font-size:15px; }
  .header-search input { width:150px; }
}
