/* ==================== 基础重置 ==================== */
*,*::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:34px 0 70px;}

/* 兜底：任何直接位于 .main 下的板块都给基础间距 */
.main > .section{margin-top:26px;}
/* 面包屑之后的第一个板块：26px（无论后面还有几个板块） */
.main > .breadcrumb + .section{margin-top:26px;}
/* 板块与板块之间：52px */
.main > .section + .section{margin-top:52px;}

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

/* ==================== 面包屑 ==================== */
.breadcrumb{padding-top:4px;}
.breadcrumb ol{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  font-size:13.5px;
  color:#98a1b6;
}
.breadcrumb li{display:flex;align-items:center;gap:8px;min-width:0;}
.breadcrumb li + li::before{
  content:"/";
  color:#c9d1e0;
  font-size:12px;
}
.breadcrumb a{
  color:#5b657a;
  transition:color .2s ease;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.breadcrumb a:hover{color:#4f46e5;}
.breadcrumb li[aria-current]{
  color:#2a3245;
  font-weight:600;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* ==================== 栏目分类（颜色循环） ==================== */
.cat-chips{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}
.cat-chip{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:58px;
  padding:12px 16px;
  border-radius:16px;
  font-size:14.5px;
  font-weight:600;
  line-height:1.4;
  text-align:center;
  color:var(--c1);
  background:#fff;
  border:1px solid #e8ecf4;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:break-word;
  transition:transform .28s ease,box-shadow .28s ease,background .28s ease,color .28s ease,border-color .28s ease;
}
.cat-chip::after{
  content:"";
  position:absolute;
  left:-26px;bottom:-34px;
  width:76px;height:76px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--c1),var(--c2));
  opacity:.10;
  transition:opacity .3s ease;
}
.cat-chip:hover{
  transform:translateY(-3px);
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,var(--c1),var(--c2));
  box-shadow:0 18px 32px -20px var(--c1);
}
.cat-chip:hover::after{opacity:0;}

/* 十种预设颜色，超过 10 个自动从头循环 */
.cat-chip:nth-child(10n+1){--c1:#4f46e5;--c2:#06b6d4;}
.cat-chip:nth-child(10n+2){--c1:#db2777;--c2:#f59e0b;}
.cat-chip:nth-child(10n+3){--c1:#059669;--c2:#84cc16;}
.cat-chip:nth-child(10n+4){--c1:#7c3aed;--c2:#2563eb;}
.cat-chip:nth-child(10n+5){--c1:#dc2626;--c2:#f97316;}
.cat-chip:nth-child(10n+6){--c1:#0891b2;--c2:#22d3ee;}
.cat-chip:nth-child(10n+7){--c1:#b45309;--c2:#eab308;}
.cat-chip:nth-child(10n+8){--c1:#be185d;--c2:#a855f7;}
.cat-chip:nth-child(10n+9){--c1:#15803d;--c2:#2dd4bf;}
.cat-chip:nth-child(10n+10){--c1:#334155;--c2:#64748b;}

/* ==================== 两列布局 ==================== */
.layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 332px;
  gap:36px;
  align-items:start;
}

/* ==================== 左侧：文章列表 ==================== */
.post-list{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.post-card{
  display:flex;
  gap:18px;
  padding:16px;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:18px;
  transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease;
}
.post-card:hover{
  transform:translateY(-3px);
  border-color:rgba(99,102,241,.32);
  box-shadow:0 22px 40px -28px rgba(79,70,229,.9);
}
.post-thumb{
  flex:0 0 208px;
  width:208px;
  aspect-ratio:16/10;
  border-radius:13px;
  overflow:hidden;
  background:#eef1f7;
}
.post-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .55s cubic-bezier(.22,.61,.36,1);
}
.post-card:hover .post-thumb img{transform:scale(1.07);}

.post-body{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
}
.post-title{
  font-size:16.5px;
  line-height:1.55;
  font-weight:700;
  letter-spacing:-.2px;
}
.post-title a{
  display:inline;
  color:#222a3d;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  transition:color .2s ease;
}
.post-card:hover .post-title a{color:#4f46e5;}

.post-desc{
  margin:9px 0 0;
  font-size:13.8px;
  line-height:1.72;
  color:#6b7488;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-meta{
  margin-top:auto;
  padding-top:12px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 18px;
  font-size:12.5px;
  color:#98a1b6;
}
.post-meta .meta-item{display:inline-flex;align-items:center;gap:6px;}
.post-meta .meta-item::before{
  content:"";
  width:6px;height:6px;
  border-radius:50%;
  background:linear-gradient(135deg,#6366f1,#06b6d4);
  flex:0 0 auto;
}

/* ==================== 翻页 ==================== */
.pagination{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:32px;
}
.page-btn{
  min-width:42px;
  height:42px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  font-size:14px;
  font-weight:600;
  color:#4a5468;
  background:#fff;
  border:1px solid #e8ecf4;
  transition:transform .24s ease,color .24s ease,background .24s ease,box-shadow .24s ease,border-color .24s ease;
}
.page-btn:hover{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#6366f1,#06b6d4);
  box-shadow:0 14px 26px -18px rgba(79,70,229,.95);
  transform:translateY(-2px);
}
.page-btn.is-active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#6366f1,#06b6d4);
  box-shadow:0 14px 26px -18px rgba(79,70,229,.95);
}
.page-btn.is-disabled{
  opacity:.42;
  pointer-events:none;
  color:#98a1b6;
}
.page-dots{
  padding:0 4px;
  color:#b3bcce;
  font-weight:700;
}

/* ==================== 右侧：面板 ==================== */
.layout-side{
  display:flex;
  flex-direction:column;
  gap:24px;
  min-width:0;
}
.panel{
  --a1:#4f46e5;
  --a2:#06b6d4;
  position:relative;
  padding:24px 24px 16px;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:20px;
  overflow:hidden;
}
.panel::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;
  height:4px;
  background:linear-gradient(90deg,var(--a1),var(--a2));
}
.panel .section-head{margin-bottom:14px;}
.panel .section-title{font-size:18px;padding-left:15px;}
.panel .section-title::before{
  width:5px;height:18px;
  margin-top:-9px;
  background:linear-gradient(180deg,var(--a1),var(--a2));
}
.panel .section-sub{font-size:11px;letter-spacing:1.2px;}

.panel--new{--a1:#06b6d4;--a2:#3b82f6;}
.panel--hot{--a1:#f43f5e;--a2:#f97316;}
.panel--rec{--a1:#4f46e5;--a2:#8b5cf6;}
.panel--like{--a1:#ec4899;--a2:#a855f7;}

/* 榜单列表：序号在 CSS 中生成，与标题行高对齐 */
.rank-list{counter-reset:rank;}
.rank-list li{
  display:flex;
  align-items:flex-start;
  gap:12px;
  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;
  display:flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  font-variant-numeric:tabular-nums;
  color:#7a839a;
  background:#f0f2f8;
  transition:color .25s ease,background .25s ease;
}
.rank-list li:nth-child(-n+3)::before{
  color:#fff;
  background:linear-gradient(135deg,var(--a1),var(--a2));
}
.rank-list a{
  flex:1 1 auto;
  min-width:0;
  font-size:14.5px;
  line-height:1.65;
  color:#2f3749;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  transition:color .2s ease;
}
.rank-list a:hover{color:var(--a1);}

/* ==================== 页脚 ==================== */
.site-footer{
  position:relative;
  margin-top:16px;
  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){
  .cat-chips{grid-template-columns:repeat(4,minmax(0,1fr));}
}

@media (max-width:980px){
  .layout{grid-template-columns:minmax(0,1fr);gap:34px;}
  .layout-side{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
  }
}

@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;}

  /* 栏目分类：移动端每行 2 个 */
  .cat-chips{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width:720px){
  .layout-side{grid-template-columns:minmax(0,1fr);}
}

@media (max-width:620px){
  .container{padding:0 16px;}
  .main{padding:26px 0 50px;}
  /* 移动端间距同步缩小，保持增删板块后依然一致 */
  .main > .section{margin-top:20px;}
  .main > .breadcrumb + .section{margin-top:20px;}
  .main > .section + .section{margin-top:40px;}

  .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;}

  .cat-chips{gap:10px;}
  .cat-chip{min-height:52px;padding:10px 12px;font-size:13.5px;border-radius:14px;}

  /* 文章卡片改为上下结构，避免移动端变形 */
  .post-card{flex-direction:column;gap:13px;padding:14px;border-radius:16px;}
  .post-thumb{
    flex:0 0 auto;
    width:100%;
    aspect-ratio:16/9;
    border-radius:12px;
  }
  .post-title{font-size:16px;}
  .post-desc{font-size:13.5px;}
  .post-meta{padding-top:10px;gap:6px 14px;}

  .pagination{gap:6px;margin-top:24px;}
  .page-btn{min-width:38px;height:38px;padding:0 11px;font-size:13.5px;border-radius:11px;}

  .panel{padding:20px 18px 12px;border-radius:18px;}
  .panel .section-title{font-size:17px;}
  .rank-list a{font-size:14px;}

  .footer-inner{flex-direction:column;gap:20px;}
  .site-footer{padding:40px 0 26px;}
}