/* ============ 基础与变量 ============ */
:root{
  --ink:#141628;
  --ink-2:#3a3f55;
  --muted:#767c92;
  --line:rgba(20,22,40,.08);
  --line-strong:#d8dbea;
  --radius:22px;
  --shadow:0 26px 50px -42px rgba(28,24,80,.75);
}
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
body{
  margin:0;
  font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);
  line-height:1.6;
  background:
    radial-gradient(900px 520px at 6% -8%, rgba(109,94,252,.13), transparent 62%),
    radial-gradient(820px 520px at 100% 0%, rgba(255,95,158,.12), transparent 58%),
    radial-gradient(760px 620px at 50% 100%, rgba(18,194,233,.10), transparent 62%),
    #f7f8fd;
  min-height:100vh;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;}
::selection{background:rgba(109,94,252,.22);}

/* ============ 头部导航（同 index） ============ */
.site-header{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(255,255,255,.82);
  -webkit-backdrop-filter:blur(16px);
  backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:1200px;
  margin:0 auto;
  padding:0 20px;
  height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.logo{
  font-size:20px;
  font-weight:800;
  letter-spacing:1.2px;
  white-space:nowrap;
  background:linear-gradient(118deg,#6d5efc 0%,#ff5f9e 52%,#12c2e9 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.nav ul{
  display:flex;
  align-items:center;
  gap:6px;
  list-style:none;
  margin:0;
  padding:0;
}
.nav a{
  display:block;
  padding:8px 15px;
  border-radius:11px;
  font-size:15px;
  font-weight:500;
  color:var(--ink-2);
  transition:background .25s,color .25s,transform .25s;
  white-space:nowrap;
}
.nav a:hover{background:rgba(109,94,252,.10);color:#5b4bf0;transform:translateY(-1px);}
.nav a.active{
  color:#fff;
  background:linear-gradient(120deg,#6d5efc,#12c2e9);
  box-shadow:0 10px 20px -12px rgba(109,94,252,.95);
}
.nav-toggle{display:none;}
.nav-btn{display:none;}

/* ============ 主体容器 ============ */
main{
  max-width:1200px;
  margin:0 auto;
  padding:26px 20px 0;
}
.section{margin-bottom:34px;}
.panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:26px 28px 22px;
  box-shadow:var(--shadow);
}
.section-head{
  display:flex;
  align-items:baseline;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.section-title{
  position:relative;
  margin:0;
  padding-left:15px;
  font-size:21px;
  font-weight:800;
  letter-spacing:.6px;
}
.section-title::before{
  content:"";
  position:absolute;
  left:0;top:50%;
  transform:translateY(-50%);
  width:5px;height:20px;
  border-radius:4px;
  background:var(--accent,linear-gradient(180deg,#6d5efc,#ff5f9e));
}
.section-sub{
  font-size:13px;
  color:var(--muted);
  letter-spacing:.3px;
}
.sec-new{--accent:linear-gradient(180deg,#12c2e9,#6d5efc);}
.sec-hot{--accent:linear-gradient(180deg,#ff6b3d,#ff5f9e);}
.sec-rec{--accent:linear-gradient(180deg,#8e44ad,#6d5efc);}
.sec-like{--accent:linear-gradient(180deg,#ff5f9e,#ffb36b);}
.sec-related{--accent:linear-gradient(180deg,#16a085,#12c2e9);}

/* ============ 面包屑 ============ */
.breadcrumb{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0 0 22px;
  padding:11px 18px;
  font-size:13.5px;
  color:var(--muted);
  background:rgba(255,255,255,.78);
  border:1px solid var(--line);
  border-radius:14px;
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}
.breadcrumb a{
  color:var(--ink-2);
  font-weight:600;
  transition:color .22s;
}
.breadcrumb a:hover{color:#5b4bf0;}
.breadcrumb .sep{opacity:.42;}
.breadcrumb .current{color:#5b4bf0;font-weight:700;}

/* ============ 两列布局 ============ */
.article-layout{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);
  gap:24px;
  align-items:start;
}
.col-main{
  display:flex;
  flex-direction:column;
  gap:22px;
  min-width:0;
}
.col-side{
  display:flex;
  flex-direction:column;
  gap:22px;
  min-width:0;
}

/* ============ 文章头部 ============ */
.post-header{
  display:flex;
  align-items:flex-start;
  gap:20px;
  padding-bottom:22px;
  border-bottom:1px solid var(--line);
  margin-bottom:24px;
}
.post-thumb{
  flex:0 0 200px;
  width:200px;
  height:150px;
  aspect-ratio:4 / 3;
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(135deg,#eceef8,#e4f2ff);
  box-shadow:0 16px 26px -24px rgba(28,24,80,.9);
  display:block;
}
.post-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .5s cubic-bezier(.2,.7,.3,1);
}
.post-thumb:hover img{transform:scale(1.05);}
.post-head-body{
  flex:1 1 auto;
  min-width:0;
}
.post-title{
  margin:0;
  font-size:26px;
  font-weight:800;
  line-height:1.45;
  letter-spacing:.3px;
  color:var(--ink);
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 18px;
  margin-top:14px;
  font-size:13px;
  font-weight:600;
  color:var(--muted);
}
.pm-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
.pm-item::before{
  content:"";
  flex:0 0 auto;
  width:14px;
  height:14px;
  background-color:currentColor;
  -webkit-mask:var(--ico) center/contain no-repeat;
  mask:var(--ico) center/contain no-repeat;
}
.pm-date{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7zm12 8v10H5V10h14z'/%3E%3C/svg%3E");}
.pm-read{
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.5 5 2.4 9.2 1 12c1.4 2.8 5.5 7 11 7s9.6-4.2 11-7c-1.4-2.8-5.5-7-11-7zm0 11.5A4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 0 1 0 9zm0-2a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z'/%3E%3C/svg%3E");
  color:#6d5efc;
}

/* ============ 文章正文 ============ */
.post-content{
  font-size:15.5px;
  line-height:1.95;
  color:var(--ink-2);
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-content > *:first-child{margin-top:0;}
.post-content > *:last-child{margin-bottom:0;}
.post-content p{margin:0 0 18px;}
.post-content h2{
  position:relative;
  margin:34px 0 14px;
  padding-left:14px;
  font-size:20px;
  font-weight:800;
  line-height:1.5;
  color:var(--ink);
}
.post-content h2::before{
  content:"";
  position:absolute;
  left:0;
  top:.32em;
  width:4px;
  height:1em;
  border-radius:3px;
  background:linear-gradient(180deg,#6d5efc,#ff5f9e);
}
.post-content h3{
  margin:26px 0 12px;
  font-size:17px;
  font-weight:700;
  line-height:1.55;
  color:var(--ink);
}
.post-content strong{
  color:#5b4bf0;
  font-weight:700;
}
.post-content ul{
  margin:0 0 18px;
  padding-left:22px;
}
.post-content li{
  margin:7px 0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-content li::marker{
  color:#6d5efc;
  font-weight:800;
}
.post-content img{
  display:block;
  max-width:100%;
  height:auto;
  margin:20px 0;
  border-radius:14px;
  box-shadow:0 18px 30px -26px rgba(28,24,80,.9);
}

/* 表格：超出宽度直接换行，带边框 */
.post-content table{
  width:100%;
  border-collapse:collapse;
  margin:22px 0;
  font-size:14px;
  line-height:1.7;
  table-layout:fixed;
  border:1px solid var(--line-strong);
}
.post-content th,
.post-content td{
  border:1px solid var(--line-strong);
  padding:10px 12px;
  text-align:left;
  vertical-align:top;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
}
.post-content thead th{
  background:linear-gradient(135deg,#f1f0ff,#e8f6ff);
  font-weight:800;
  color:#3a3f55;
}
.post-content tbody tr:nth-child(even){
  background:#fafbff;
}

/* ============ 上一篇 / 下一篇 ============ */
.post-nav{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:30px;
  padding-top:24px;
  border-top:1px solid var(--line);
}
.pn-item{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:14px 16px;
  border-radius:14px;
  background:#fafbff;
  border:1px solid var(--line);
  min-width:0;
  transition:background .25s,border-color .25s,transform .25s,box-shadow .25s;
}
.pn-item:hover{
  background:#f4f3ff;
  border-color:rgba(109,94,252,.35);
  transform:translateY(-1px);
  box-shadow:0 16px 26px -24px rgba(28,24,80,.9);
}
.pn-label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.6px;
  color:#6d5efc;
}
.pn-title{
  font-size:14px;
  line-height:1.62;
  color:var(--ink-2);
  overflow-wrap:anywhere;
  word-break:break-word;
}
.pn-item.next .pn-label,
.pn-item.next .pn-title{
  text-align:right;
}

/* ============ 相关文章（一行一篇） ============ */
.related-list{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:rl;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:0;
}
.related-list > li{
  counter-increment:rl;
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:11px 0;
  min-width:0;
  border-bottom:1px dashed var(--line);
}
.related-list > li:last-child{border-bottom:0;padding-bottom:2px;}
.related-list > li:first-child{padding-top:2px;}
.related-list > li::before{
  content:counter(rl);
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:22px;
  padding:0 4px;
  margin-top:2px;
  border-radius:7px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:11.5px;
  font-weight:800;
  line-height:1;
  letter-spacing:-.4px;
  background:linear-gradient(135deg,#e5fbf4,#e6f6ff);
  color:#12a58a;
  transition:transform .25s;
}
.related-list > li > a{
  flex:1 1 auto;
  min-width:0;
  font-size:14.5px;
  line-height:1.62;
  color:var(--ink-2);
  overflow-wrap:anywhere;
  word-break:break-word;
  transition:color .22s;
}
.related-list > li:hover::before{transform:translateX(2px) scale(1.05);}
.related-list > li:hover > a{color:#12a58a;}
.rl-date{
  flex:0 0 auto;
  margin-top:3px;
  font-size:12px;
  font-weight:600;
  color:var(--muted);
  white-space:nowrap;
}

/* ============ 侧栏通用列表 ============ */
.num-list{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:nl;
}
.num-list > li{
  counter-increment:nl;
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 0;
  min-width:0;
  border-bottom:1px dashed var(--line);
}
.num-list > li:last-child{border-bottom:0;padding-bottom:2px;}
.num-list > li:first-child{padding-top:2px;}
.num-list > li::before{
  content:counter(nl);
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:22px;
  padding:0 4px;
  margin-top:2px;
  border-radius:7px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:11.5px;
  font-weight:800;
  line-height:1;
  letter-spacing:-.4px;
  background:linear-gradient(135deg,#ece9ff,#e2f6ff);
  color:#5b4bf0;
  transition:transform .25s;
}
.num-list > li > a{
  flex:1 1 auto;
  min-width:0;
  font-size:14.5px;
  line-height:1.62;
  color:var(--ink-2);
  overflow-wrap:anywhere;
  word-break:break-word;
  transition:color .22s;
}
.num-list > li:hover::before{transform:translateX(2px) scale(1.05);}

/* 侧栏阅读量 */
.side-meta{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-top:3px;
  font-size:12px;
  font-weight:600;
  color:var(--muted);
  white-space:nowrap;
}
.side-meta::before{
  content:"";
  flex:0 0 auto;
  width:13px;
  height:13px;
  background-color:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.5 5 2.4 9.2 1 12c1.4 2.8 5.5 7 11 7s9.6-4.2 11-7c-1.4-2.8-5.5-7-11-7zm0 11.5A4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 0 1 0 9zm0-2a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.5 5 2.4 9.2 1 12c1.4 2.8 5.5 7 11 7s9.6-4.2 11-7c-1.4-2.8-5.5-7-11-7zm0 11.5A4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 0 1 0 9zm0-2a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* 侧栏各板块强调色 */
.sec-new .num-list > li::before{background:linear-gradient(135deg,#e2f4ff,#e6fbff);color:#12a5c9;}
.sec-new .num-list > li:hover > a{color:#12a5c9;}
.sec-hot .num-list > li::before{content:"🔥";font-family:inherit;font-size:12px;background:linear-gradient(135deg,#ffe8d1,#ffd9e0);color:#ff6b3d;}
.sec-hot .num-list > li:hover > a{color:#ff6b3d;}
.sec-hot .side-meta{color:#ff8b5e;}
.sec-rec .num-list > li::before{content:"★";font-size:11.5px;background:linear-gradient(135deg,#e6fbf2,#e8f1ff);color:#12b886;}
.sec-rec .num-list > li:hover > a{color:#12b886;}
.sec-rec .side-meta{color:#12b886;}
.sec-like .num-list > li::before{background:linear-gradient(135deg,#ffe9f3,#e8f7ff);color:#e0509b;}
.sec-like .num-list > li:hover > a{color:#e0509b;}
.sec-like .side-meta{color:#e0509b;}

/* ============ 底部（同 index） ============ */
.site-footer{
  margin-top:64px;
  padding:52px 20px 26px;
  color:#c3c7de;
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(109,94,252,.35), transparent 65%),
    radial-gradient(620px 320px at 92% 10%, rgba(255,95,158,.22), transparent 62%),
    linear-gradient(160deg,#12132b 0%,#191a37 48%,#241a3c 100%);
}
.footer-inner{max-width:1200px;margin:0 auto;}
.footer-top{
  display:flex;
  flex-wrap:wrap;
  gap:28px;
  justify-content:space-between;
  align-items:flex-start;
  padding-bottom:28px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.footer-logo{
  display:inline-block;
  font-size:20px;
  font-weight:800;
  letter-spacing:1.2px;
  background:linear-gradient(118deg,#a99bff,#ff8fbd 55%,#5fe3ff);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.footer-brand p{
  margin:10px 0 0;
  max-width:520px;
  font-size:13.5px;
  line-height:1.85;
  color:#9aa0bd;
}
.footer-nav{
  display:flex;
  flex-wrap:wrap;
  gap:8px 22px;
  list-style:none;
  margin:4px 0 0;
  padding:0;
}
.footer-nav a{font-size:14px;color:#b9bed8;transition:color .22s;}
.footer-nav a:hover{color:#8fe6ff;}
.footer-bottom{
  display:flex;
  flex-wrap:wrap;
  gap:8px 20px;
  justify-content:space-between;
  align-items:center;
  padding-top:22px;
  font-size:13px;
  color:#8b90ad;
}
.footer-bottom p{margin:0;}
.footer-bottom a{
  color:#b7a8ff;
  font-weight:600;
  border-bottom:1px solid rgba(183,168,255,.45);
  transition:color .22s,border-color .22s;
}
.footer-bottom a:hover{color:#7de3ff;border-color:#7de3ff;}

/* ============ 响应式 ============ */
@media (max-width:1024px){
  .article-layout{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);}
  .post-thumb{flex:0 0 168px;width:168px;}
  .post-title{font-size:23px;}
}

@media (max-width:960px){
  .article-layout{grid-template-columns:minmax(0,1fr);}
  .col-side{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
    align-items:start;
  }
}

@media (max-width:860px){
  .nav-btn{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:5px;
    width:42px;
    height:42px;
    padding:0;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
    cursor:pointer;
    order:3;
    flex:0 0 auto;
  }
  .nav-btn span{
    display:block;
    width:18px;
    height:2px;
    border-radius:2px;
    background:#2a2e45;
    transition:transform .3s ease,opacity .25s ease;
  }
  #navToggle:checked ~ .nav-btn span:nth-child(1){transform:translateY(7px) rotate(45deg);}
  #navToggle:checked ~ .nav-btn span:nth-child(2){opacity:0;}
  #navToggle:checked ~ .nav-btn span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

  .nav{
    position:absolute;
    left:0;
    right:0;
    top:68px;
    background:rgba(255,255,255,.98);
    -webkit-backdrop-filter:blur(16px);
    backdrop-filter:blur(16px);
    border-bottom:1px solid var(--line);
    box-shadow:0 22px 34px -30px rgba(28,24,80,.9);
    max-height:0;
    overflow:hidden;
    transition:max-height .38s cubic-bezier(.4,.7,.3,1);
  }
  .nav ul{
    flex-direction:column;
    align-items:stretch;
    gap:2px;
    padding:10px 18px 18px;
  }
  .nav a{padding:12px 14px;font-size:16px;border-radius:12px;}
  #navToggle:checked ~ .nav{max-height:460px;}
}

@media (max-width:640px){
  main{padding:18px 14px 0;}
  .section{margin-bottom:26px;}
  .panel{padding:20px 18px 18px;border-radius:18px;}
  .section-title{font-size:19px;padding-left:13px;}
  .section-title::before{width:4px;height:18px;}
  .section-head{gap:10px;margin-bottom:14px;}

  .breadcrumb{padding:10px 14px;font-size:12.5px;margin-bottom:16px;border-radius:12px;}

  /* 文章头部：图片单独一行，标题等信息在下方 */
  .post-header{
    flex-direction:column;
    align-items:stretch;
    gap:14px;
    padding-bottom:16px;
    margin-bottom:18px;
  }
  .post-thumb{
    flex:0 0 auto;
    width:100%;
    height:auto;
    aspect-ratio:16 / 9;
    border-radius:14px;
  }
  .post-head-body{width:100%;}
  .post-title{font-size:17.5px;line-height:1.5;}
  .post-meta{margin-top:8px;font-size:12px;gap:6px 14px;}
  .pm-item::before{width:12px;height:12px;}

  /* 正文 */
  .post-content{font-size:14.5px;line-height:1.88;}
  .post-content p{margin-bottom:15px;}
  .post-content h2{font-size:17.5px;margin:26px 0 11px;padding-left:12px;}
  .post-content h2::before{width:3px;}
  .post-content h3{font-size:15.5px;margin:20px 0 9px;}
  .post-content ul{padding-left:19px;}
  .post-content table{font-size:12.5px;margin:18px 0;}
  .post-content th,
  .post-content td{padding:8px 9px;}

  /* 上下篇：单列 */
  .post-nav{
    grid-template-columns:minmax(0,1fr);
    gap:10px;
    margin-top:24px;
    padding-top:18px;
  }
  .pn-item{padding:12px 14px;}
  .pn-item.next .pn-label,
  .pn-item.next .pn-title{text-align:left;}
  .pn-title{font-size:13.5px;}

  /* 相关文章 */
  .related-list > li{padding:9px 0;gap:10px;}
  .related-list > li > a{font-size:14px;}
  .rl-date{font-size:11.5px;}

  /* 侧栏回到单列 */
  .col-side{grid-template-columns:minmax(0,1fr);gap:18px;}
  .num-list > li{padding:9px 0;}
  .num-list > li > a{font-size:14px;}

  .footer-top{flex-direction:column;gap:20px;}
  .footer-bottom{flex-direction:column;align-items:flex-start;gap:6px;}
}