/* 哇胖子 - 门户式全站样式（响应式，移动优先） */
:root{
  --brand:#e2683a;            /* 主色：暖橙（降饱和） */
  --brand-dark:#c44f22;
  --accent:#2f6fb0;           /* 链接蓝（降亮） */
  --bg:#e4e7ea;               /* 页面底色：灰调 */
  --card:#f3f5f6;             /* 卡片：灰白 */
  --surface:#eceef0;          /* 面板：浅灰 */
  --text:#2a333d;
  --muted:#656f79;
  --line:#d6dbdf;
  --radius:10px;
  --shadow:0 1px 3px rgba(16,24,40,.09),0 6px 18px rgba(16,24,40,.07);
  --shadow-hover:0 10px 26px rgba(16,24,40,.16);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--text);line-height:1.7;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  font-size:16px;
}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto}
.container{max-width:1180px;margin:0 auto;padding:0 16px}

/* ---------------- 首页站点简介导语 ---------------- */
.site-intro{background:linear-gradient(135deg,#eaedf0,#f3f4f5);border:1px solid #d9dee2;border-radius:var(--radius);padding:18px 20px;margin-bottom:22px}
.site-intro h1{font-size:21px;margin:0 0 8px;color:var(--text)}
.site-intro p{margin:0;color:#5d6a76;font-size:14px;line-height:1.75}

/* ---------------- 顶部细条 ---------------- */
.topbar{background:#22303f;color:#aab8c8;font-size:13px}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;height:36px}
.topbar-hi{color:#d6e0ec}
.topbar-links a{color:#aab8c8;margin-left:16px}
.topbar-links a:hover{color:#fff;text-decoration:none}

/* ---------------- 头部 ---------------- */
.site-header{background:#f1f3f5;border-bottom:1px solid var(--line);box-shadow:0 1px 0 rgba(16,24,40,.03)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none}
.brand:hover{text-decoration:none}
.logo-img{height:44px;width:44px;object-fit:contain;border-radius:10px;display:block;background:#eef0f2}
.brand-tx{display:flex;flex-direction:column;line-height:1.25}
.brand-name{font-weight:800;font-size:24px;color:var(--brand);letter-spacing:.5px}
.brand-slogan{font-size:12px;color:var(--muted)}
.search-box{display:flex;flex:0 1 400px}
.search-box input{
  flex:1;padding:10px 14px;border:2px solid var(--brand);border-right:none;
  border-radius:8px 0 0 8px;font-size:14px;outline:none;background:#f4f6f7
}
.search-box button{
  padding:0 22px;border:none;background:var(--brand);color:#fff;
  border-radius:0 8px 8px 0;cursor:pointer;font-size:14px;font-weight:600
}
.search-box button:hover{background:var(--brand-dark)}

/* ---------------- 导航 ---------------- */
.main-nav{background:linear-gradient(180deg,#c9532a,#b8481f);box-shadow:var(--shadow);position:relative;z-index:40}
.main-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap}
.main-nav a{display:block;padding:13px 22px;color:#fff;font-size:15px;font-weight:500}
.main-nav>div>ul>li{background:var(--navc,transparent)}
.main-nav>div>ul>li>a{transition:filter .18s ease}
.main-nav>div>ul>li>a:hover{filter:brightness(.86);text-decoration:none}
.main-nav .active>a{background:rgba(0,0,0,.2);font-weight:700}

/* ---------------- 主体与两栏布局 ---------------- */
.main-content{padding:22px 16px 44px}
.breadcrumb{font-size:13px;color:var(--muted);margin-bottom:16px}
.breadcrumb a{color:var(--muted)}
.section-title{font-size:20px;font-weight:700;margin:0 0 16px;padding-left:12px;border-left:4px solid var(--brand)}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
.layout-main{min-width:0}
.layout-side{display:flex;flex-direction:column;gap:18px;position:sticky;top:14px}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;margin-bottom:20px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px}

/* ---------------- 首页焦点区 ---------------- */
.hero-row{display:grid;grid-template-columns:1.55fr 1fr;gap:20px;margin-bottom:22px}
.hero-feature{position:relative;display:block;border-radius:var(--radius);overflow:hidden;min-height:320px;color:#fff;box-shadow:var(--shadow)}
.hero-feature:hover{text-decoration:none}
.hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.hero-mask{position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,20,32,.08) 20%,rgba(8,20,32,.88) 100%)}
.hero-text{position:relative;z-index:1;padding:24px;display:flex;flex-direction:column;justify-content:flex-end;min-height:320px}
.hero-text h1,.hero-text h2.hero-h{font-size:26px;line-height:1.35;margin:10px 0 8px;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.4)}
.hero-text p{margin:0;color:#e6eef6;font-size:14px}
.chip{display:inline-block;align-self:flex-start;font-size:12px;padding:3px 12px;border-radius:20px;background:var(--tc,var(--brand));color:#fff}
.headline-panel{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px 18px;display:flex;flex-direction:column}
.panel-head{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid var(--line);padding-bottom:10px;margin-bottom:6px}
.panel-head h2{font-size:17px;margin:0;padding-left:10px;border-left:4px solid var(--brand)}
.more{font-size:13px;color:var(--muted)}
.more:hover{color:var(--brand);text-decoration:none}
.headline-list{list-style:none;margin:0;padding:0;counter-reset:h}
.headline-list li{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px dashed #e2e6ea;font-size:14px}
.headline-list li:last-child{border-bottom:0}
.headline-list a{color:var(--text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.headline-list a:hover{color:var(--brand);text-decoration:none}
.rank{flex:0 0 20px;height:20px;line-height:20px;text-align:center;border-radius:4px;background:#e2e6ea;color:#8b97a3;font-size:12px;font-weight:700}
.rank.top{background:var(--brand);color:#fff}
.hm-cat{flex:0 0 auto;font-style:normal;font-size:11px;color:#fff;background:var(--tc,var(--brand));border-radius:3px;padding:1px 6px}

/* ---------------- 栏目模块 ---------------- */
.module{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:22px;overflow:hidden}
.module-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line);border-top:3px solid var(--tc,var(--brand))}
.module-head h2{margin:0;font-size:18px;padding-left:10px;border-left:4px solid var(--tc,var(--brand))}
.module-head h2 a{color:var(--text)}
.module-head h2 a:hover{color:var(--tc,var(--brand));text-decoration:none}
.module-body{display:grid;grid-template-columns:1.15fr 1fr;gap:18px;padding:18px}
.mod-lead{display:flex;gap:14px;color:var(--text)}
.mod-lead:hover{text-decoration:none}
.mod-lead img{flex:0 0 150px;width:150px;height:104px;object-fit:cover;border-radius:8px;display:block}
.mod-lead-tx h3{margin:0 0 6px;font-size:17px;line-height:1.45}
.mod-lead:hover h3{color:var(--brand)}
.mod-lead-tx p{margin:0;font-size:13px;color:#5b6b7f}
.mod-list{list-style:none;margin:0;padding:0}
.mod-list li{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed #e2e6ea;font-size:14px}
.mod-list li:last-child{border-bottom:0}
.mod-list a{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.mod-list a:hover{color:var(--brand);text-decoration:none}
.mod-list time{flex:0 0 auto;color:#9aa7b6;font-size:12px}

/* ---------------- 侧栏 ---------------- */
.aside-card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}
.aside-title{font-size:16px;margin:0 0 12px;padding-left:10px;border-left:4px solid var(--brand)}
.tag-cloud{display:flex;flex-wrap:wrap;gap:8px}
.tag-cloud .tag{background:#e7eaed;color:#46586c}
.tag-cloud .tag:hover{background:var(--brand);color:#fff;text-decoration:none}
.rank-list{list-style:none;margin:0;padding:0}
.rank-list li{display:flex;align-items:flex-start;gap:8px;padding:7px 0;border-bottom:1px dashed #e2e6ea;font-size:14px}
.rank-list li:last-child{border-bottom:0}
.rank-list a{color:var(--text);flex:1;min-width:0}
.rank-list a:hover{color:var(--brand);text-decoration:none}
.rnum{flex:0 0 20px;height:20px;line-height:20px;text-align:center;border-radius:4px;background:#e2e6ea;color:#8b97a3;font-size:12px;font-weight:700}
.rnum.top{background:var(--brand);color:#fff}
.side-cats{list-style:none;margin:0;padding:0}
.side-cats li{display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-bottom:1px dashed #e2e6ea;font-size:14px}
.side-cats li:last-child{border-bottom:0}
.side-cats a{color:var(--text);display:flex;align-items:center;gap:8px}
.side-cats a:hover{color:var(--brand);text-decoration:none}
.side-cats i{width:8px;height:8px;border-radius:50%;background:var(--tc,var(--brand));display:inline-block}
.side-cats span{color:#9aa7b6;font-size:12px}
.about-card p{margin:0;font-size:13px;color:#5b6b7f}

/* ---------------- 栏目横幅 ---------------- */
.cat-banner{position:relative;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);margin-bottom:20px}
.cat-banner .cat-cover{width:100%;max-height:200px;object-fit:cover;display:block}
.cat-banner-tx{padding:18px 20px;border-top:3px solid var(--tc,var(--brand))}
.cat-banner-tx h1{margin:0 0 6px;font-size:24px}
.cat-banner-tx p{margin:0;color:#5b6b7f;font-size:14px}

/* ---------------- 卡片网格 ---------------- */
.grid-list{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.post-card h3{margin:0 0 8px;font-size:17px;line-height:1.5}
.post-card h3 a{color:var(--text)}
.post-card h3 a:hover{color:var(--brand);text-decoration:none}
.post-meta{font-size:13px;color:var(--muted);margin-bottom:8px}
.post-summary{font-size:14px;color:#43536b;margin:0 0 10px}
.post-cover{width:100%;height:158px;object-fit:cover;border-radius:8px;margin-bottom:12px;display:block}
.post-card-sm h3{font-size:15px}
.post-card-sm .post-summary{margin-bottom:0}

/* ---------------- 文章页 ---------------- */
.article-card{padding:26px}
.article-head{margin-bottom:14px}
.article-head .chip{background:var(--tc,var(--brand))}
.article-head h1{font-size:27px;margin:10px 0 10px;line-height:1.4}
.article-cover{width:100%;max-height:360px;object-fit:cover;border-radius:var(--radius);margin:6px 0 18px;display:block}
.article-body{font-size:16px;line-height:1.9;color:#2b3a4f}
.article-body h2{font-size:20px;margin:28px 0 12px;padding-left:10px;border-left:4px solid var(--brand)}
.article-body h3{font-size:17px;margin:22px 0 10px}
.article-body p{margin:0 0 16px}
.article-body ul,.article-body ol{padding-left:22px;margin:0 0 16px}
.article-body li{margin-bottom:6px}

/* 表格 */
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{padding:10px 8px;border-bottom:1px solid var(--line);text-align:left}
th{background:#e6e9ec;color:#33455c;font-weight:700}
tbody tr:hover{background:#eef0f2}

/* 标签 */
.tags{margin:16px 0 0}
.tag{display:inline-block;font-size:13px;background:#e6ebf1;color:var(--accent);padding:3px 10px;border-radius:20px;margin:0 8px 8px 0}
.tag:hover{text-decoration:none;background:var(--brand);color:#fff}
.tag.active{background:var(--brand);color:#fff}

/* ---------------- 页脚 ---------------- */
.site-footer{background:#22303f;color:#c6d2e0;margin-top:26px;padding:34px 16px 20px;font-size:14px}
.footer-cols{display:grid;grid-template-columns:2.2fr 1fr 1fr;gap:28px}
.footer-col h3{color:#fff;font-size:16px;margin:0 0 12px}
.footer-col ul{list-style:none;margin:0;padding:0}
.footer-col li{margin-bottom:8px}
.footer-col a{color:#c6d2e0}
.footer-col a:hover{color:#fff}
.footer-about p{margin:0;color:#a7b6c6;font-size:13px}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:24px;padding-top:16px;color:#93a4b8;font-size:13px}
.footer-bottom p{margin:4px 0}

/* ---------------- FAQ 折叠块 ---------------- */
.faq-item{border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;margin-bottom:10px;background:var(--card)}
.faq-item summary{cursor:pointer;font-weight:700;outline:none}
.faq-item[open] summary{margin-bottom:2px}
.faq-a{margin-top:8px;color:#44546a;line-height:1.75}

/* ---------------- 一级/二级导航（分组下拉） ---------------- */
.main-nav li.has-sub{position:relative}
.main-nav .caret{margin-left:6px;font-size:11px;opacity:.85}
.main-nav .sub-nav{display:none;position:absolute;top:100%;left:0;min-width:150px;background:#f2f4f5;box-shadow:0 10px 24px rgba(16,24,40,.14);border-radius:0 0 var(--radius) var(--radius);padding:6px 0;z-index:60;list-style:none;margin:0}
.main-nav li.has-sub:hover>.sub-nav,
.main-nav li.has-sub:focus-within>.sub-nav{display:block}
.main-nav .sub-nav li{display:block}
.main-nav .sub-nav a{display:block;padding:9px 18px;color:var(--text);font-size:14px;white-space:nowrap;font-weight:400}
.main-nav .sub-nav a:hover{background:#e7ebee;color:var(--navc,var(--brand));text-decoration:none}
.main-nav .sub-nav .active a{background:#e1e6ea;color:var(--navc,var(--brand));font-weight:700}

/* ---------------- 表格横向滚动 ---------------- */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.table-wrap table{min-width:520px}

/* ---------------- 留言（评论） ---------------- */
.comments{margin-top:20px}
.comments .comment-list{margin-bottom:16px}
.comment-item{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid #e2e6ea}
.comment-item:last-child{border-bottom:0}
.comment-avatar{flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-size:15px}
.comment-head{display:flex;gap:10px;align-items:baseline;margin-bottom:3px}
.comment-name{font-weight:700;color:var(--text)}
.comment-head time{color:#98a2b3;font-size:12px}
.comment-text{color:#475467;font-size:14px;line-height:1.7}
.comment-empty{color:#98a2b3}
.comment-form{display:flex;flex-direction:column;gap:8px;max-width:520px}
.comment-form input[type=text],.comment-form textarea{border:1px solid #d7dee8;border-radius:8px;padding:9px 12px;font-size:14px;font-family:inherit;width:100%;box-sizing:border-box}
.comment-form .btn{align-self:flex-start;background:var(--brand);color:#fff;border:0;border-radius:8px;padding:9px 22px;font-size:14px;cursor:pointer}
.comment-form .btn:hover{filter:brightness(.92)}
.comment-form .hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.comment-note{color:#98a2b3;font-size:12px;margin-top:8px}

/* ---------------- 兼容性增强 ---------------- */
a,button,input,select,textarea{-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font-family:inherit;font-size:inherit}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.article-body img{height:auto}
.post-card h3,.article-head h1,.headline-list a{overflow-wrap:break-word;word-wrap:break-word}

/* ---------------- 响应式 ---------------- */
@media (max-width:1024px){
  .layout{grid-template-columns:minmax(0,1fr) 290px;gap:18px}
  .hero-row{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  .layout{grid-template-columns:1fr}
  .layout-side{position:static}
  .footer-cols{grid-template-columns:1fr 1fr;gap:18px}
}
@media (max-width:760px){
  .header-inner{flex-wrap:wrap;gap:10px}
  .search-box{flex:1 1 100%}
  .main-nav ul{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}
  .main-nav a{padding:12px 15px;white-space:nowrap;font-size:14px}
  .main-content{padding:16px 12px 34px}
  .hero-row{grid-template-columns:1fr}
  .hero-feature,.hero-text{min-height:230px}
  .hero-text h1,.hero-text h2.hero-h{font-size:20px}
  .module-body{grid-template-columns:1fr}
  .article-head h1{font-size:21px}
  .article-card{padding:18px}
  .footer-cols{grid-template-columns:1fr;gap:16px}
  .grid,.grid-list{grid-template-columns:1fr}
  .card{padding:16px}
  .section-title{font-size:18px}
}
@media (max-width:480px){
  body{font-size:15px}
  .brand-name{font-size:20px}
  .brand-slogan,.topbar-hi{font-size:11px}
  .topbar{display:none}
  .article-head h1{font-size:19px}
  .article-body{font-size:15px;line-height:1.8}
  .mod-lead{flex-direction:column}
  .mod-lead img{flex:none;width:100%;height:150px}
  table{font-size:13px}
  th,td{padding:8px 6px}
}
