/* ============ 基础与变量 ============ */
:root{
  --ink:#141628;
  --ink-2:#3a3f55;
  --muted:#767c92;
  --line:rgba(20,22,40,.08);
  --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-list{--accent:linear-gradient(180deg,#6d5efc,#a78bfa);}
.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);}

/* ============ 面包屑 ============ */
.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;}

/* ============ 栏目分类 ============ */
.cat-nav{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}
.cat-card{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:14px 16px;
  border-radius:14px;
  font-size:14.5px;
  font-weight:700;
  color:var(--c1,#5b4bf0);
  background:#fff;
  border:1px solid var(--line);
  box-shadow:0 14px 26px -24px rgba(28,24,80,.9);
  transition:transform .25s,box-shadow .25s,background .25s;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.cat-card::before{
  content:"";
  flex:0 0 auto;
  width:9px;height:9px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--c1,#6d5efc),var(--c2,#a78bfa));
}
.cat-card:hover{
  transform:translateY(-2px);
  box-shadow:0 20px 30px -22px rgba(28,24,80,.85);
  background:linear-gradient(180deg,#fff,#fbfbff);
}
/* 十个颜色循环，超出后从头开始 */
.cat-card:nth-child(10n+1){--c1:#6d5efc;--c2:#a78bfa;}
.cat-card:nth-child(10n+2){--c1:#12c2e9;--c2:#5fe3ff;}
.cat-card:nth-child(10n+3){--c1:#ff5f9e;--c2:#ff9ec4;}
.cat-card:nth-child(10n+4){--c1:#f7971e;--c2:#ffd200;}
.cat-card:nth-child(10n+5){--c1:#16a085;--c2:#57d9b0;}
.cat-card:nth-child(10n+6){--c1:#e74c3c;--c2:#ff8a76;}
.cat-card:nth-child(10n+7){--c1:#8e44ad;--c2:#c48ce0;}
.cat-card:nth-child(10n+8){--c1:#2d98da;--c2:#7ac7f5;}
.cat-card:nth-child(10n+9){--c1:#2ecc71;--c2:#8ff0b5;}
.cat-card:nth-child(10n+10){--c1:#e67e22;--c2:#ffbe76;}

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

/* ============ 主列表文章 ============ */
.post-list{
  display:flex;
  flex-direction:column;
}
.post{
  display:grid;
  grid-template-columns:172px minmax(0,1fr);
  gap:18px;
  padding:20px 0;
  border-bottom:1px dashed var(--line);
}
.post:first-child{padding-top:6px;}
.post:last-child{border-bottom:0;padding-bottom:6px;}
.post-thumb{
  display:block;
  width:100%;
  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);
}
.post-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .5s cubic-bezier(.2,.7,.3,1);
}
.post:hover .post-thumb img{transform:scale(1.06);}
.post-body{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.post-title{
  margin:0;
  font-size:17px;
  font-weight:700;
  line-height:1.55;
  letter-spacing:.2px;
}
.post-title a{
  color:var(--ink);
  overflow-wrap:anywhere;
  word-break:break-word;
  transition:color .22s;
}
.post:hover .post-title a{color:#5b4bf0;}
.post-excerpt{
  margin:9px 0 0;
  font-size:13.5px;
  line-height:1.78;
  color:var(--muted);
  overflow-wrap:anywhere;
  word-break:break-word;
}
.post-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 18px;
  margin-top:auto;
  padding-top:12px;
  font-size:12.5px;
  font-weight:600;
  color:var(--muted);
}
.pm-item{
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}
.pm-item::before{
  content:"";
  flex:0 0 auto;
  width:13px;height:13px;
  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;
}

/* ============ 分页 ============ */
.pagination{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid var(--line);
}
.page-btn,.page-num,.page-dots{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 13px;
  border-radius:11px;
  font-size:14px;
  font-weight:600;
  color:var(--ink-2);
  background:#fff;
  border:1px solid var(--line);
  white-space:nowrap;
  transition:background .22s,color .22s,border-color .22s,transform .22s,box-shadow .22s;
}
.page-btn:hover,.page-num:hover{
  color:#5b4bf0;
  border-color:rgba(109,94,252,.42);
  transform:translateY(-1px);
}
.page-num.active{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(120deg,#6d5efc,#12c2e9);
  box-shadow:0 12px 22px -14px rgba(109,94,252,.95);
}
.page-dots{
  border-color:transparent;
  background:transparent;
  color:var(--muted);
  min-width:auto;
  padding:0 2px;
  letter-spacing:2px;
}

/* ============ 侧栏通用列表 ============ */
.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:1px;
  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:2px;
  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){
  .cat-nav{grid-template-columns:repeat(4,minmax(0,1fr));}
  .post{grid-template-columns:152px minmax(0,1fr);gap:16px;}
}

@media (max-width:960px){
  .list-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:820px){
  .cat-nav{grid-template-columns:repeat(3,minmax(0,1fr));}
}

@media (max-width:640px){
  main{padding:18px 14px 0;}
  .section{margin-bottom:26px;}
  .panel{padding:20px 18px 16px;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;}

  /* 栏目分类：移动端每行 2 个 */
  .cat-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;}
  .cat-card{padding:12px 13px;font-size:13.5px;border-radius:12px;gap:8px;}
  .cat-card::before{width:8px;height:8px;}

  /* 文章卡片改为上下结构 */
  .post{
    grid-template-columns:minmax(0,1fr);
    gap:12px;
    padding:16px 0;
  }
  .post-thumb{aspect-ratio:16 / 9;border-radius:12px;}
  .post-title{font-size:16px;}
  .post-excerpt{font-size:13px;line-height:1.75;margin-top:8px;}
  .post-meta{padding-top:10px;}

  /* 侧栏回到单列 */
  .col-side{grid-template-columns:minmax(0,1fr);gap:18px;}

  /* 分页更紧凑 */
  .pagination{gap:6px;margin-top:18px;padding-top:16px;}
  .page-btn,.page-num{
    min-width:34px;
    height:34px;
    padding:0 10px;
    font-size:13px;
    border-radius:10px;
  }

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

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

@media (max-width:400px){
  .cat-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  .cat-card{padding:11px 11px;font-size:13px;}
}