/* ==================== 基础重置 ==================== */
*,*::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;}
.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;
}

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

/* ==================== 文章卡片 ==================== */
.article{
  padding:28px 28px 34px;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:22px;
}

/* 文章头部：缩略图左，标题与元信息右 */
.post-head{
  display:flex;
  gap:22px;
  align-items:flex-start;
}
.post-head-thumb{
  flex:0 0 300px;
  width:300px;
  aspect-ratio:16/10;
  border-radius:16px;
  overflow:hidden;
  background:#eef1f7;
}
.post-head-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.post-head-body{
  flex:1 1 auto;
  min-width:0;
}
.post-head .post-title{
  font-size:25px;
  line-height:1.42;
  letter-spacing:-.5px;
  color:#1b2233;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
}
.post-head .post-meta{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:14px;
  font-size:13px;
  color:#98a1b6;
}
.post-head .post-meta span{
  display:flex;
  align-items:center;
  gap:8px;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-head .post-meta span::before{
  content:"";
  flex:0 0 auto;
  width:7px;height:7px;
  border-radius:50%;
  background:linear-gradient(135deg,#6366f1,#06b6d4);
}
.post-head .post-meta span:nth-child(2)::before{
  background:linear-gradient(135deg,#ec4899,#f59e0b);
}

/* ==================== 正文内容 ==================== */
.post-content{
  margin-top:26px;
  padding-top:24px;
  border-top:1px solid #eef1f7;
  font-size:15.5px;
  line-height:1.9;
  color:#333c50;
}
.post-content p{
  margin:0 0 18px;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-content h2{
  position:relative;
  margin:34px 0 14px;
  padding-left:15px;
  font-size:21px;
  line-height:1.45;
  color:#1b2233;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-content h2::before{
  content:"";
  position:absolute;
  left:0;top:50%;
  width:5px;height:19px;
  margin-top:-9.5px;
  border-radius:3px;
  background:linear-gradient(180deg,#6366f1,#06b6d4);
}
.post-content h3{
  margin:26px 0 12px;
  font-size:17.5px;
  line-height:1.5;
  color:#2a3245;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-content strong{
  font-weight:700;
  color:#151b28;
}
.post-content ul{
  list-style:disc;
  margin:0 0 18px;
  padding-left:24px;
}
.post-content ul li{
  list-style:disc;
  margin:7px 0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-content ol{
  list-style:decimal;
  margin:0 0 18px;
  padding-left:24px;
}
.post-content ol li{
  list-style:decimal;
  margin:7px 0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-content img{
  width:100%;
  height:auto;
  margin:22px 0;
  border-radius:14px;
  border:1px solid #e8ecf4;
}

/* 正文表格：外边框完整包裹 + 单元格线条清晰 */
.post-content table{
  width:100%;
  max-width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  margin:24px 0;
  font-size:14px;
  line-height:1.7;
  border:2px solid #8fa3c4;
}
.post-content thead th{
  background:#eef3fd;
  color:#1f2a44;
  font-weight:700;
}
.post-content th,
.post-content td{
  border:1px solid #8fa3c4;
  padding:11px 13px;
  text-align:left;
  vertical-align:top;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-content tbody tr:nth-child(even) td{
  background:#fafbfe;
}

/* ==================== 上一篇 / 下一篇 ==================== */
.post-nav{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:26px;
}
.post-nav-item{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  padding:16px 18px;
  background:#fff;
  border:1px solid #e8ecf4;
  border-radius:16px;
  transition:transform .28s ease,box-shadow .28s ease,border-color .28s ease;
}
.post-nav-item:hover{
  transform:translateY(-3px);
  border-color:rgba(99,102,241,.34);
  box-shadow:0 20px 36px -26px rgba(79,70,229,.95);
}
.post-nav-label{
  font-size:12px;
  letter-spacing:1.6px;
  text-transform:uppercase;
  color:#98a1b6;
}
.post-nav-title{
  font-size:14.5px;
  line-height:1.6;
  font-weight:600;
  color:#2a3245;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  transition:color .2s ease;
}
.post-nav-item:hover .post-nav-title{color:#4f46e5;}
.post-nav-next{text-align:right;}

/* ======================================================
   相关文章：整体用线条包裹，形成独立的边框区域
   ====================================================== */
.related{margin-top:52px;}
.related-list{
  counter-reset:rel;
  column-count:2;
  column-gap:36px;
  padding:18px 26px;
  border:2px solid #8fa3c4;          /* 外边框：完整包裹列表 */
  border-radius:14px;
  background:#fbfcff;
}
.related-list li{
  break-inside:avoid;
  display:flex;
  align-items:flex-start;
  gap:11px;
  min-width:0;
  padding:11px 0;
  border-bottom:1px dashed #dbe3f0;
}
.related-list li:last-child{border-bottom:0;}
.related-list li::before{
  counter-increment:rel;
  content:counter(rel,decimal-leading-zero);
  flex:0 0 auto;
  padding-top:1px;
  font-size:12px;
  font-weight:800;
  line-height:1.65;
  font-variant-numeric:tabular-nums;
  color:#4f46e5;
  opacity:.85;
}
.related-body{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.related-body a{
  font-size:14.5px;
  line-height:1.65;
  color:#2f3749;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
  transition:color .2s ease;
}
.related-body a:hover{color:#4f46e5;}
.related-date{
  font-size:12.5px;
  color:#98a1b6;
}

/* ==================== 右侧：面板 ==================== */
.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){
  .post-head-thumb{flex:0 0 250px;width:250px;}
  .post-head .post-title{font-size:23px;}
}

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

@media (max-width:760px){
  .layout-side{grid-template-columns:minmax(0,1fr);}
  /* 相关文章移动端单列，边框继续包裹 */
  .related-list{
    column-count:1;
    padding:14px 18px;
    border-width:2px;
  }
}

@media (max-width:620px){
  .container{padding:0 16px;}
  .main{padding:24px 0 50px;}
  .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;}

  .article{padding:18px 16px 24px;border-radius:18px;}

  /* 文章头部保持“图左文右”，缩小缩略图避免变形 */
  .post-head{gap:14px;}
  .post-head-thumb{
    flex:0 0 116px;
    width:116px;
    aspect-ratio:16/11;
    border-radius:12px;
  }
  .post-head .post-title{font-size:17.5px;line-height:1.5;letter-spacing:-.2px;}
  .post-head .post-meta{margin-top:8px;gap:4px;font-size:12px;}
  .post-head .post-meta span{gap:6px;}
  .post-head .post-meta span::before{width:6px;height:6px;}

  .post-content{margin-top:20px;padding-top:18px;font-size:15px;line-height:1.85;}
  .post-content h2{font-size:18px;margin:26px 0 12px;padding-left:13px;}
  .post-content h2::before{width:4px;height:16px;margin-top:-8px;}
  .post-content h3{font-size:16px;margin:20px 0 10px;}
  .post-content img{margin:16px 0;border-radius:12px;}
  .post-content ul,.post-content ol{padding-left:20px;}

  /* 表格窄屏下收紧内边距，边框保持完整，内容自动换行 */
  .post-content table{
    font-size:12.5px;
    line-height:1.65;
    margin:18px 0;
    border-width:2px;
  }
  .post-content th,
  .post-content td{
    padding:8px 9px;
    border-width:1px;
  }

  .post-nav{grid-template-columns:minmax(0,1fr);gap:12px;margin-top:22px;}
  .post-nav-item{padding:14px 15px;border-radius:14px;}
  .post-nav-next{text-align:left;}

  /* 相关文章窄屏继续收紧内边距，外边框完整 */
  .related{margin-top:40px;}
  .related-list{
    column-count:1;
    padding:12px 14px;
    border-radius:12px;
  }
  .related-body a{font-size:14px;}

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