/* ============ 基础与变量 ============ */
:root{
  --ink:#141628;
  --ink-2:#3a3f55;
  --muted:#767c92;
  --line:rgba(20,22,40,.08);
  --brand1:#6d5efc;
  --brand2:#12c2e9;
  --brand3:#ff5f9e;
  --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);}

/* ============ 头部导航 ============ */
.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;
}
.logo span{font-weight:400;opacity:.85;}

.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:34px 20px 0;
}
.section{margin-bottom:46px;}
.panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px 30px 22px;
  box-shadow:var(--shadow);
}
.section-head{
  display:flex;
  align-items:baseline;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.section-title{
  position:relative;
  margin:0;
  padding-left:15px;
  font-size:22px;
  font-weight:800;
  letter-spacing:.6px;
}
.section-title::before{
  content:"";
  position:absolute;
  left:0;top:50%;
  transform:translateY(-50%);
  width:5px;height:21px;
  border-radius:4px;
  background:var(--accent,linear-gradient(180deg,#6d5efc,#ff5f9e));
}
.section-sub{
  font-size:13px;
  color:var(--muted);
  letter-spacing:.3px;
}
.sec-latest{--accent:linear-gradient(180deg,#6d5efc,#a78bfa);}
.sec-like{--accent:linear-gradient(180deg,#ff5f9e,#ffb36b);}
.sec-cats{--accent:linear-gradient(180deg,#12c2e9,#6d5efc);}
.sec-gallery{--accent:linear-gradient(180deg,#16a085,#12c2e9);}
.sec-hot{--accent:linear-gradient(180deg,#ff6b3d,#ff5f9e);}
.sec-rec{--accent:linear-gradient(180deg,#8e44ad,#6d5efc);}

/* ============ 通用列表 ============ */
.num-list{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:nl;
}
.num-list > li{
  counter-increment:nl;
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 2px;
  min-width:0;
  border-bottom:1px dashed var(--line);
  transition:background .25s;
}
.num-list > li:last-child{border-bottom:0;}
.num-list > li::before{
  content:counter(nl);
  flex:0 0 auto;
  min-width:28px;
  height:24px;
  padding:0 5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;
  font-weight:800;
  letter-spacing:-.5px;
  background:linear-gradient(135deg,#ece9ff,#e2f6ff);
  color:#5b4bf0;
  transition:transform .25s,background .25s,color .25s;
}
.num-list > li > a{
  flex:1 1 auto;
  min-width:0;
  font-size:15px;
  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.06);}
.num-list > li:hover > a{color:#5b4bf0;}

/* 阅读量：ico 图标 + 数字（图标写在 CSS 中） */
.meta{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:12.5px;
  font-weight:600;
  color:var(--muted);
  white-space:nowrap;
  letter-spacing:.2px;
}
.meta .read{
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.meta .read::before{
  content:"";
  display:inline-block;
  width:14px;
  height:14px;
  flex:0 0 auto;
  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;
}

/* 最新文章 */
.list-latest{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0 26px;
}
.list-latest > li:nth-child(-n+3)::before{
  background:linear-gradient(135deg,#6d5efc,#ff5f9e);
  color:#fff;
  box-shadow:0 8px 16px -10px rgba(109,94,252,.95);
}

/* 猜你喜欢 */
.list-like{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 26px;
}
.list-like > li::before{
  background:linear-gradient(135deg,#ffe9f3,#e8f7ff);
  color:#e0509b;
}
.list-like > li:hover > a{color:#e0509b;}

/* ============ 四个栏目 ============ */
.cats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}
.cat{
  position:relative;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:24px 24px 14px;
  box-shadow:var(--shadow);
}
.cat::before{
  content:"";
  position:absolute;
  left:0;right:0;top:0;
  height:4px;
  background:linear-gradient(90deg,var(--c1),var(--c2));
}
.cat-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}
.cat-name{
  margin:0;
  font-size:17px;
  font-weight:800;
  letter-spacing:.5px;
  color:var(--c1);
}
.cat-count{
  margin-left:auto;
  font-size:12px;
  font-weight:600;
  color:var(--c1);
  background:rgba(20,22,40,.045);
  border-radius:999px;
  padding:2px 10px;
}
.cat-list > li::before{
  background:#f2f3fb;
  color:var(--c1);
}
.cat-list > li:hover > a{color:var(--c1);}
/* 预设十种栏目颜色（按顺序循环） */
.cat:nth-child(1){--c1:#6d5efc;--c2:#a78bfa;}
.cat:nth-child(2){--c1:#12c2e9;--c2:#5fe3ff;}
.cat:nth-child(3){--c1:#ff5f9e;--c2:#ff9ec4;}
.cat:nth-child(4){--c1:#f7971e;--c2:#ffd200;}
.cat:nth-child(5){--c1:#16a085;--c2:#57d9b0;}
.cat:nth-child(6){--c1:#e74c3c;--c2:#ff8a76;}
.cat:nth-child(7){--c1:#8e44ad;--c2:#c48ce0;}
.cat:nth-child(8){--c1:#2d98da;--c2:#7ac7f5;}
.cat:nth-child(9){--c1:#2ecc71;--c2:#8ff0b5;}
.cat:nth-child(10){--c1:#e67e22;--c2:#ffbe76;}

/* ============ 图文精选 ============ */
.gallery{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:20px;
}
.g-item{display:block;min-width:0;}
.g-thumb{
  position:relative;
  aspect-ratio:4 / 3;
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(135deg,#eceef8,#e4f2ff);
  box-shadow:0 16px 28px -24px rgba(28,24,80,.9);
}
.g-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .55s cubic-bezier(.2,.7,.3,1);
}
.g-item:hover .g-thumb img{transform:scale(1.07);}
.g-title{
  margin:11px 2px 0;
  font-size:14px;
  font-weight:600;
  line-height:1.55;
  color:var(--ink-2);
  overflow-wrap:anywhere;
  word-break:break-word;
  transition:color .22s;
}
.g-item:hover .g-title{color:#5b4bf0;}

/* ============ 热门 + 推荐（等宽等高，统一推荐列表样式） ============ */
.bottom-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
  align-items:stretch;
}
.bottom-grid > .panel{
  display:flex;
  flex-direction:column;
  height:100%;
}
.hot-list,
.rec-list{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:0;
}
.hot-list > li::before{
  content:"🔥";
  font-family:inherit;
  font-size:13px;
  background:linear-gradient(135deg,#ffe8d1,#ffd9e0);
  color:#ff6b3d;
}
.hot-list > li:hover > a{color:#ff6b3d;}
.hot-list .meta{color:#ff8b5e;}
.rec-list > li::before{
  content:"★";
  font-size:12px;
  background:linear-gradient(135deg,#e6fbf2,#e8f1ff);
  color:#12b886;
}
.rec-list > li:hover > a{color:#12b886;}
.rec-list .meta{color:#12b886;}

/* ============ 底部 ============ */
.site-footer{
  margin-top:70px;
  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){
  .list-latest{grid-template-columns:repeat(2,minmax(0,1fr));}
  .gallery{grid-template-columns:repeat(4,minmax(0,1fr));}
}

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

  .cats{grid-template-columns:minmax(0,1fr);}
  .bottom-grid{grid-template-columns:minmax(0,1fr);}
}

@media (max-width:820px){
  .gallery{grid-template-columns:repeat(3,minmax(0,1fr));}
}

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

  .list-latest,
  .list-like,
  .hot-list,
  .rec-list{grid-template-columns:minmax(0,1fr);}

  .num-list > li{padding:10px 0;gap:10px;}
  .num-list > li > a{font-size:14.5px;}

  .gallery{grid-template-columns:minmax(0,1fr);gap:18px;}
  .g-thumb{aspect-ratio:16 / 9;border-radius:12px;}

  /* 移动端热门与推荐不显示阅读量 */
  .meta{display:none;}

  .cat{padding:20px 18px 10px;}
  .cat-name{font-size:16px;}

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