/* ==========================================================
   个人站公共样式 —— index.html / novels.html 共用
   无外部依赖，无外链字体
   ========================================================== */
:root{
  --bg:#080910;
  --bg-soft:#0e1018;
  --panel:rgba(255,255,255,.035);
  --panel-hover:rgba(255,255,255,.06);
  --line:rgba(255,255,255,.09);
  --txt:#e9ebf2;
  --muted:#8d93a8;
  --dim:#636a7e;
  --accent:#7c6cf5;
  --accent-2:#22d3a8;
  --accent-3:#f5a524;
  --radius:14px;
  --maxw:1080px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scroll-padding-top:80px}
body{
  background:var(--bg);
  color:var(--txt);
  font:16px/1.7 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.wrap{width:min(var(--maxw),92vw);margin:0 auto}

/* 背景光 */
.bg-glow{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.bg-glow i{position:absolute;border-radius:50%;filter:blur(100px);opacity:.42;display:block}
.bg-glow i:nth-child(1){width:560px;height:560px;background:#5b3bd6;top:-200px;left:-140px}
.bg-glow i:nth-child(2){width:480px;height:480px;background:#0f9e86;top:38%;right:-180px;opacity:.28}
.bg-glow i:nth-child(3){width:420px;height:420px;background:#c2410c;bottom:-200px;left:26%;opacity:.16}

/* ---------- 顶栏 ---------- */
header{
  position:sticky;top:0;z-index:60;
  background:rgba(8,9,16,.78);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}
.nav{display:flex;align-items:center;justify-content:space-between;height:64px}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:15px;letter-spacing:.02em}
.brand .avatar-mini{
  width:30px;height:30px;border-radius:50%;object-fit:cover;
  border:1px solid var(--line);background:var(--bg-soft);
}
.nav-links{display:flex;gap:28px;font-size:14px;color:var(--muted)}
.nav-links a{position:relative;transition:color .2s}
.nav-links a::after{
  content:"";position:absolute;left:0;right:100%;bottom:-6px;height:1.5px;
  background:var(--accent-2);transition:right .25s;
}
.nav-links a:hover{color:var(--txt)}
.nav-links a:hover::after{right:0}
.burger{display:none;background:none;border:0;color:var(--txt);font-size:20px;cursor:pointer;padding:6px}

main{position:relative;z-index:1}

/* ---------- Hero ---------- */
.hero{padding:clamp(56px,9vw,104px) 0 clamp(40px,6vw,72px)}
.hero-row{display:flex;align-items:center;gap:clamp(20px,4vw,40px);flex-wrap:wrap}
.avatar{
  width:clamp(84px,12vw,116px);height:clamp(84px,12vw,116px);border-radius:50%;
  object-fit:cover;border:1px solid var(--line);
  box-shadow:0 0 0 6px rgba(124,108,245,.09),0 18px 40px rgba(0,0,0,.5);
  background:var(--bg-soft);flex:none;
}
.hero-txt{flex:1;min-width:240px}
.hero h1{font-size:clamp(26px,4vw,42px);line-height:1.15;letter-spacing:-.02em;font-weight:780}
.hero .handle{color:var(--accent-2);font-size:14px;letter-spacing:.06em;font-weight:600;margin-bottom:8px;display:block}
.hero .bio{color:var(--muted);font-size:clamp(14.5px,1.6vw,16.5px);margin-top:12px;max-width:46ch}
.socials{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.chip{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 15px;border-radius:999px;font-size:13.5px;
  border:1px solid var(--line);background:var(--panel);
  transition:transform .16s,border-color .2s,background .2s;
}
.chip:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.24);background:var(--panel-hover)}

/* ---------- 区块 ---------- */
section{padding:clamp(44px,6vw,76px) 0}
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:26px;flex-wrap:wrap}
.sec-title{display:flex;align-items:center;gap:12px}
.sec-title .bar{width:3px;height:22px;border-radius:2px;background:linear-gradient(180deg,var(--accent),var(--accent-2))}
.sec-title h2{font-size:clamp(19px,2.4vw,26px);font-weight:730;letter-spacing:-.01em}
.sec-desc{color:var(--dim);font-size:13.5px;margin-top:4px;padding-left:15px}
.sec-more{font-size:13.5px;color:var(--muted);border-bottom:1px solid transparent;transition:.2s}
.sec-more:hover{color:var(--accent-2);border-color:var(--accent-2)}

/* 骨架 / 空态 */
.skeleton{
  height:132px;border-radius:var(--radius);border:1px solid var(--line);
  background:linear-gradient(100deg,var(--panel) 30%,rgba(255,255,255,.07) 50%,var(--panel) 70%);
  background-size:220% 100%;animation:sh 1.4s infinite;
}
@keyframes sh{0%{background-position:120% 0}100%{background-position:-40% 0}}
.empty{
  border:1px dashed var(--line);border-radius:var(--radius);
  padding:34px 20px;text-align:center;color:var(--dim);font-size:14px;
}

/* ---------- 游戏卡（Steam） ---------- */
.games{display:grid;grid-template-columns:repeat(auto-fill,minmax(276px,1fr));gap:16px}
.game{
  border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
  background:var(--panel);transition:transform .22s,border-color .22s,box-shadow .25s;
  display:flex;flex-direction:column;
}
.game:hover{transform:translateY(-4px);border-color:rgba(124,108,245,.5);box-shadow:0 18px 38px rgba(0,0,0,.5)}
.game .cover{
  aspect-ratio:460/215;width:100%;object-fit:cover;background:#151824;
  border-bottom:1px solid var(--line);
}
.game .cover.ph{
  display:grid;place-items:center;font-size:40px;font-weight:700;
  color:rgba(255,255,255,.16);
  background:linear-gradient(135deg,#1b2033 0%,#12141d 60%,#1a1526 100%);
}
.game .body{padding:15px 16px 17px;display:flex;flex-direction:column;gap:9px;flex:1}
.game h3{font-size:15.5px;font-weight:650;line-height:1.4}
.game .desc{color:var(--muted);font-size:13px;line-height:1.6;flex:1}
.game .meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--dim)}
.tag{
  padding:3px 9px;border-radius:6px;background:rgba(124,108,245,.14);
  color:#b9b0ff;border:1px solid rgba(124,108,245,.24);font-size:11.5px;
}
.tag.free{background:rgba(34,211,168,.13);color:#6ee7c4;border-color:rgba(34,211,168,.26)}
.tag.dev{background:rgba(245,165,36,.13);color:#f7c668;border-color:rgba(245,165,36,.26)}

/* ---------- 小说列表 ---------- */
.novels{display:grid;gap:14px}
.novel{
  display:grid;grid-template-columns:66px 1fr auto;gap:16px;align-items:center;
  padding:16px;border:1px solid var(--line);border-radius:var(--radius);
  background:var(--panel);transition:border-color .2s,background .2s,transform .2s;
}
.novel:hover{border-color:rgba(34,211,168,.4);background:var(--panel-hover);transform:translateX(3px)}
.novel .cover{
  width:66px;height:86px;border-radius:8px;object-fit:cover;background:#151824;
  border:1px solid var(--line);
}
.novel .t{font-size:16px;font-weight:650;margin-bottom:5px}
.novel .s{color:var(--muted);font-size:13px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.novel .meta{display:flex;gap:10px;margin-top:7px;font-size:12px;color:var(--dim);flex-wrap:wrap}
.novel .go{
  font-size:13px;color:var(--accent-2);white-space:nowrap;padding:8px 14px;
  border:1px solid rgba(34,211,168,.3);border-radius:8px;background:rgba(34,211,168,.08);
}
.novel .go:hover{background:rgba(34,211,168,.16)}

/* ---------- 说说时间线 ---------- */
.notes{position:relative;padding-left:26px}
.notes::before{content:"";position:absolute;left:7px;top:6px;bottom:6px;width:1px;background:var(--line)}
.note{position:relative;padding:0 0 22px 4px}
.note::before{
  content:"";position:absolute;left:-23px;top:8px;width:9px;height:9px;border-radius:50%;
  background:var(--bg);border:2px solid var(--accent);
}
.note:last-child{padding-bottom:0}
.note time{font-size:12px;color:var(--dim);letter-spacing:.03em}
.note .txt{margin-top:5px;font-size:14.5px;color:#d3d7e4;white-space:pre-wrap}
.note .txt a{color:var(--accent-2);border-bottom:1px dashed rgba(34,211,168,.4)}

/* ---------- GitHub 项目 ---------- */
.repos{display:grid;grid-template-columns:repeat(auto-fill,minmax(258px,1fr));gap:15px}
.repo{
  border:1px solid var(--line);border-radius:var(--radius);padding:18px;
  background:var(--panel);display:flex;flex-direction:column;gap:9px;
  transition:transform .2s,border-color .2s;
}
.repo:hover{transform:translateY(-3px);border-color:rgba(255,255,255,.24)}
.repo .name{font-size:14.5px;font-weight:650;display:flex;align-items:center;gap:8px;word-break:break-all}
.repo .name svg{flex:none;opacity:.6}
.repo .d{color:var(--muted);font-size:13px;line-height:1.6;flex:1;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.repo .foot{display:flex;align-items:center;gap:14px;font-size:12px;color:var(--dim)}
.repo .foot span{display:inline-flex;align-items:center;gap:4px}
.dot-lang{width:8px;height:8px;border-radius:50%;display:inline-block}

/* ---------- 页脚 ---------- */
footer{border-top:1px solid var(--line);padding:34px 0;margin-top:20px;color:var(--dim);font-size:13px}
.foot{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;align-items:center}
.foot a{color:var(--muted)}
.foot a:hover{color:var(--accent-2)}

/* ---------- 滚动揭示 ---------- */
.rv{opacity:0;transform:translateY(18px);transition:opacity .6s cubic-bezier(.2,.7,.3,1),transform .6s cubic-bezier(.2,.7,.3,1)}
.rv.in{opacity:1;transform:none}

@media (max-width:780px){
  .nav-links{
    display:none;position:absolute;top:64px;left:0;right:0;flex-direction:column;gap:0;
    background:#0b0d15;border-bottom:1px solid var(--line);padding:6px 0;
  }
  .nav-links.open{display:flex}
  .nav-links a{padding:13px 5vw}
  .burger{display:block}
  .novel{grid-template-columns:56px 1fr;gap:13px}
  .novel .cover{width:56px;height:74px}
  .novel .go{grid-column:2;justify-self:start;padding:6px 12px}
  .hero-row{gap:20px}
}
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
  .rv{opacity:1;transform:none}
  html{scroll-behavior:auto}
}
