/* ==================== 基础重置 ==================== */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  font-size:15px;
  line-height:1.65;
  color:#1e2434;
  background-color:#f5f7fb;
  background-image:
    radial-gradient(720px 380px at 8% -6%, rgba(99,102,241,.20), transparent 70%),
    radial-gradient(620px 340px at 92% -4%, rgba(6,182,212,.18), transparent 70%),
    radial-gradient(520px 300px at 50% -12%, rgba(236,72,153,.10), transparent 72%);
  background-repeat:no-repeat;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;border:0;}
ul,ol{margin:0;padding:0;list-style:none;}
h1,h2,h3,h4{margin:0;font-weight:700;}
button{font-family:inherit;}

.container{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
}

/* ==================== 顶部导航 ==================== */
.site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.86);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid #e8ecf4;
}
.nav-wrap{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:68px;
}
.logo{
  display:inline-flex;
  align-items:center;
  font-size:20px;
  font-weight:800;
  letter-spacing:.4px;
  white-space:nowrap;
}
.logo span{
  background:linear-gradient(120deg,#4f46e5 0%,#7c3aed 40%,#06b6d4 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.logo::before{
  content:"";
  width:10px;height:10px;
  margin-right:9px;
  border-radius:50%;
  background:linear-gradient(135deg,#6366f1,#06b6d4);
  box-shadow:0 0 0 4px rgba(99,102,241,.14);
  flex:0 0 auto;
}
.nav ul{display:flex;align-items:center;gap:4px;}
.nav a{
  display:block;
  padding:8px 15px;
  border-radius:999px;
  font-size:14.5px;
  font-weight:500;
  color:#4a5468;
  transition:color .25s ease,background .25s ease,box-shadow .25s ease;
}
.nav a.active,.nav a:hover{
  color:#fff;
  background:linear-gradient(135deg,#6366f1,#06b6d4);
  box-shadow:0 8px 18px -10px rgba(79,70,229,.9);
}
.nav-toggle{
  display:none;
  width:42px;height:42px;
  padding:0;
  border:1px solid #e8ecf4;
  border-radius:13px;
  background:#fff;
  cursor:pointer;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  transition:box-shadow .25s ease;
}
.nav-toggle:active{box-shadow:0 0 0 4px rgba(99,102,241,.14);}
.nav-toggle span{
  display:block;
  width:18px;height:2px;
  border-radius:2px;
  background:#2b3346;
  transition:transform .3s ease,opacity .3s ease;
}
.nav-toggle.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.nav-toggle.is-open span:nth-child(2){opacity:0;}
.nav-toggle.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ==================== 主体容器 ==================== */
.main{padding:46px 0 70px;}
.section + .section{margin-top:64px;}

/* ==================== 板块标题 ==================== */
.section-head{
  display:flex;
  align-items:baseline;
  gap:14px;
  margin-bottom:24px;
  flex-wrap:wrap;
}
.section-title{
  position:relative;
  padding-left:17px;
  font-size:23px;
  letter-spacing:-.4px;
  line-height:1.3;
}
.section-title::before{
  content:"";
  position:absolute;
  left:0;top:50%;
  width:6px;height:22px;
  margin-top:-11px;
  border-radius:3px;
  background:linear-gradient(180deg,#6366f1,#06b6d4);
}
.section-sub{
  font-size:12px;
  letter-spacing:1.6px;
  text-transform:uppercase;
  color:#98a1b6;
}

/* ==================== 最新文章列表（30篇） ==================== */
.latest-list{
  counter-reset:latest;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px 20px;
}
.latest-list li{
  display:flex;
  align-items:flex-start;
  gap:12px;
  min-width:0;
  padding:12px 15px;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:14px;
  transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease;
}
.latest-list li:hover{
  transform:translateY(-3px);
  border-color:rgba(99,102,241,.35);
  box-shadow:0 16px 32px -20px rgba(79,70,229,.85);
}
.latest-list li::before{
  counter-increment:latest;
  content:counter(latest);
  flex:0 0 auto;
  width:26px;height:26px;
  margin-top:1px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  font-size:12px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  color:#4f46e5;
  background:linear-gradient(135deg,#eef1ff,#e4f5fb);
}
.latest-list li:nth-child(-n+3)::before{
  color:#fff;
  background:linear-gradient(135deg,#6366f1,#06b6d4);
}
.latest-list a{
  flex:1 1 auto;
  min-width:0;
  font-size:14.5px;
  line-height:1.55;
  color:#2a3245;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  transition:color .2s ease;
}
.latest-list li:hover a{color:#4f46e5;}

/* ==================== 图文精选（10篇 / PC一行5） ==================== */
.gallery{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:20px;
}
.gallery-item{
  display:block;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:18px;
  overflow:hidden;
  transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease;
}
.gallery-item:hover{
  transform:translateY(-5px);
  border-color:rgba(6,182,212,.35);
  box-shadow:0 22px 40px -26px rgba(6,182,212,.95);
}
.gallery-thumb{
  position:relative;
  aspect-ratio:16/10;
  overflow:hidden;
  background:#eef1f7;
}
.gallery-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .55s cubic-bezier(.22,.61,.36,1);
}
.gallery-item:hover .gallery-thumb img{transform:scale(1.07);}
.gallery-item h3{
  padding:13px 15px 15px;
  font-size:14px;
  font-weight:600;
  line-height:1.55;
  color:#2a3245;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
}

/* ==================== 四栏目列表（PC一行两个） ==================== */
.cat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}
.cat-card{
  position:relative;
  padding:26px 26px 18px;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:20px;
  overflow:hidden;
  transition:box-shadow .3s ease,transform .3s ease;
}
.cat-card::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;
  height:4px;
  background:linear-gradient(90deg,var(--c1),var(--c2));
}
.cat-card:hover{
  transform:translateY(-3px);
  box-shadow:0 26px 46px -32px rgba(30,36,52,.6);
}
.cat-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
  font-size:17px;
  color:var(--c1);
}
.cat-title::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:linear-gradient(90deg,var(--c1),transparent);
  opacity:.28;
}
.cat-list{counter-reset:cat;}
.cat-list li{
  display:flex;
  align-items:flex-start;
  gap:11px;
  padding:9px 0;
  border-bottom:1px dashed #edf0f7;
}
.cat-list li:last-child{border-bottom:0;}
.cat-list li::before{
  counter-increment:cat;
  content:counter(cat,decimal-leading-zero);
  flex:0 0 auto;
  min-width:22px;
  padding-top:1px;
  font-size:12px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  color:var(--c1);
  opacity:.85;
}
.cat-list a{
  flex:1 1 auto;
  min-width:0;
  font-size:14.5px;
  line-height:1.6;
  color:#2f3749;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  transition:color .2s ease;
}
.cat-list a:hover{color:var(--c2);}

/* 预设十种栏目配色（按顺序自动分配，方便以后扩展） */
.cat-card:nth-child(1){--c1:#4f46e5;--c2:#06b6d4;}
.cat-card:nth-child(2){--c1:#db2777;--c2:#f59e0b;}
.cat-card:nth-child(3){--c1:#059669;--c2:#84cc16;}
.cat-card:nth-child(4){--c1:#7c3aed;--c2:#2563eb;}
.cat-card:nth-child(5){--c1:#dc2626;--c2:#f97316;}
.cat-card:nth-child(6){--c1:#0891b2;--c2:#22d3ee;}
.cat-card:nth-child(7){--c1:#b45309;--c2:#eab308;}
.cat-card:nth-child(8){--c1:#be185d;--c2:#a855f7;}
.cat-card:nth-child(9){--c1:#15803d;--c2:#2dd4bf;}
.cat-card:nth-child(10){--c1:#334155;--c2:#64748b;}

/* ==================== 猜你喜欢（30篇） ==================== */
.like-list{
  counter-reset:like;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 20px;
}
.like-list li{
  display:flex;
  align-items:flex-start;
  gap:14px;
  min-width:0;
  padding:14px 18px;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:16px;
  transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease;
}
.like-list li:hover{
  transform:translateY(-3px);
  border-color:rgba(139,92,246,.35);
  box-shadow:0 18px 34px -24px rgba(139,92,246,.95);
}
.like-list li::before{
  counter-increment:like;
  content:counter(like);
  flex:0 0 auto;
  width:30px;height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  font-size:13px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  color:#fff;
  background:linear-gradient(135deg,#8b5cf6,#ec4899);
  box-shadow:0 8px 16px -10px rgba(139,92,246,.95);
}
.like-list li:nth-child(3n+2)::before{background:linear-gradient(135deg,#06b6d4,#3b82f6);}
.like-list li:nth-child(3n)::before{background:linear-gradient(135deg,#f59e0b,#ef4444);}
.like-list a{
  flex:1 1 auto;
  min-width:0;
  padding-top:2px;
  font-size:14.5px;
  line-height:1.6;
  color:#2a3245;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  transition:color .2s ease;
}
.like-list li:hover a{color:#7c3aed;}

/* ==================== 热门 / 推荐（左右对称双栏） ==================== */
.dual-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}
.panel{
  padding:26px 26px 18px;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:20px;
  position:relative;
  overflow:hidden;
}
.panel::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;
  height:4px;
}
.panel--hot::before{background:linear-gradient(90deg,#f43f5e,#f97316,#facc15);}
.panel--rec::before{background:linear-gradient(90deg,#4f46e5,#06b6d4,#22d3ee);}

.rank-list{counter-reset:rank;}
.rank-list li{
  display:flex;
  align-items:flex-start;
  gap:13px;
  padding:11px 0;
  border-bottom:1px dashed #edf0f7;
}
.rank-list li:last-child{border-bottom:0;}
.rank-list li::before{
  counter-increment:rank;
  content:counter(rank);
  flex:0 0 auto;
  width:24px;height:24px;
  margin-top:2px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  color:#7a839a;
  background:#f0f2f8;
  transition:background .25s ease,color .25s ease;
}
.panel--hot .rank-list li:nth-child(-n+3)::before{
  color:#fff;
  background:linear-gradient(135deg,#f43f5e,#f97316);
}
.panel--rec .rank-list li:nth-child(-n+3)::before{
  color:#fff;
  background:linear-gradient(135deg,#4f46e5,#06b6d4);
}
.rank-body{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.rank-body a{
  font-size:14.5px;
  line-height:1.6;
  color:#2f3749;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  transition:color .2s ease;
}
.panel--hot .rank-body a:hover{color:#e11d48;}
.panel--rec .rank-body a:hover{color:#4f46e5;}
.meta{
  font-size:12.5px;
  color:#98a1b6;
  letter-spacing:.2px;
}

/* ==================== 页脚 ==================== */
.site-footer{
  position:relative;
  margin-top:20px;
  padding:52px 0 30px;
  color:#b6bfd4;
  background:linear-gradient(135deg,#161b2b 0%,#212a45 52%,#0f1422 100%);
}
.site-footer::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background:linear-gradient(90deg,#6366f1,#06b6d4,#ec4899,#f59e0b);
}
.footer-inner{
  display:flex;
  flex-wrap:wrap;
  gap:28px;
  align-items:flex-start;
  justify-content:space-between;
}
.footer-brand{max-width:360px;}
.footer-logo{
  display:inline-block;
  margin-bottom:10px;
  font-size:19px;
  font-weight:800;
  color:#fff;
  letter-spacing:.4px;
  transition:opacity .25s ease;
}
.footer-logo:hover{opacity:.8;}
.footer-brand p{margin:0;font-size:14px;line-height:1.75;color:#8c96ad;}
.footer-links{display:flex;flex-wrap:wrap;gap:10px 24px;}
.footer-links a{
  font-size:14px;
  color:#a7b1c7;
  transition:color .25s ease;
}
.footer-links a:hover{color:#fff;}
.copyright{
  width:100%;
  margin:26px 0 0;
  padding-top:20px;
  border-top:1px solid rgba(255,255,255,.09);
  font-size:13.5px;
  color:#7f8aa3;
}
.copyright a{
  color:#9fb0ff;
  font-weight:600;
  border-bottom:1px solid rgba(159,176,255,.45);
  transition:color .25s ease,border-color .25s ease;
}
.copyright a:hover{color:#fff;border-color:#fff;}

/* ==================== 响应式 ==================== */
@media (max-width:1080px){
  .latest-list{grid-template-columns:repeat(2,minmax(0,1fr));}
  .gallery{grid-template-columns:repeat(3,minmax(0,1fr));}
}

@media (max-width:900px){
  /* 导航折叠 */
  .nav-toggle{display:flex;}
  .nav{
    position:absolute;
    top:100%;left:0;right:0;
    max-height:0;
    overflow:hidden;
    background:#fff;
    border-bottom:1px solid #e8ecf4;
    box-shadow:0 26px 40px -30px rgba(30,36,52,.6);
    transition:max-height .38s cubic-bezier(.22,.61,.36,1);
  }
  .nav.is-open{max-height:520px;}
  .nav ul{
    flex-direction:column;
    align-items:stretch;
    gap:2px;
    padding:10px 20px 18px;
  }
  .nav a{padding:12px 14px;border-radius:12px;}

  /* 布局单列 */
  .cat-grid{grid-template-columns:1fr;}
  .dual-grid{grid-template-columns:1fr;}
  .like-list{grid-template-columns:1fr;}
  .gallery{grid-template-columns:repeat(2,minmax(0,1fr));}

  /* 移动端隐藏热门/推荐的时间、阅读量 */
  .panel--hot .meta,
  .panel--rec .meta{display:none;}
}

@media (max-width:620px){
  .container{padding:0 16px;}
  .main{padding:32px 0 50px;}
  .section + .section{margin-top:46px;}
  .section-head{gap:6px;margin-bottom:18px;}
  .section-title{font-size:19px;}
  .section-title::before{height:18px;margin-top:-9px;}
  .section-sub{font-size:11px;letter-spacing:1.2px;}

  .latest-list{grid-template-columns:1fr;gap:10px;}
  .like-list{gap:10px;}
  .gallery{grid-template-columns:1fr;gap:16px;}
  .gallery-thumb{aspect-ratio:16/9;}
  .cat-card{padding:22px 18px 14px;}
  .panel{padding:22px 18px 14px;}
  .footer-inner{flex-direction:column;gap:20px;}
  .site-footer{padding:40px 0 26px;}
}