/* ═══ 藏星 KURA — 极库风格暗色主题 ═══
   对齐 i.kura.ren 极库设计语言:
   #080b11 底 / ZCOOL XiaoWei 标题 / 大留白 / 呼吸动效 / 小字宽间距 */
@font-face {
  font-family: "ZCOOL XiaoWei";
  src: url("/kura-assets/fonts/zcool-xiaowei-chinese-simplified-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}

:root {
  --bg: #080b11;
  --panel: #0d1117;
  --panel-2: #16213e;
  --text: #f5f6f8;
  --text-dim: rgba(245, 246, 248, 0.55);
  --accent: #58a6ff;
  --border: rgba(255, 255, 255, 0.1);
  --serif: "Zhi Mang Xing", "ZCOOL XiaoWei", "Songti SC", serif;
  --sans: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ═══ Hero 星图 ═══ */
.hero {
  position: relative;
  height: 100svh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  /* 浏览器降级兜底背景（无 WebGL/星图不渲染时显示） */
  background: linear-gradient(135deg, #0d1117 0%, #1a1a2e 50%, #16213e 100%);
  background-size: cover;
  background-position: center;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Bing 每日壁纸背景（极库渐变兜底） */
.hero-bg {
  position: absolute; inset: -3%;
  background: linear-gradient(135deg, #0d1117 0%, #1a1a2e 50%, #16213e 100%);
  background-size: cover; background-position: center;
  transform: scale(1.03);
  animation: bgBreathe 14s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(3,6,10,0.84), rgba(3,6,10,0.58) 38%, rgba(3,6,10,0.12) 74%),
              linear-gradient(0deg, rgba(5,8,13,0.86), transparent 45%);
}
@keyframes bgBreathe {
  from { transform: scale(1.03); }
  to { transform: scale(1.07); }
}
/* 极库式渐变遮罩（呼吸动画）——只留底部渐隐，不压暗星图 */
.hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(5,8,13,0.72), transparent 38%);
  animation: bgBreathe 14s ease-in-out infinite alternate;
}
@keyframes bgBreathe {
  from { opacity: 0.92; }
  to { opacity: 1; }
}

.hero-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 30px clamp(24px, 6vw, 88px);
  font-size: 10px; letter-spacing: 4px;
}
.brand { font-weight: 500; font-size: 12px; display: inline-flex; align-items: baseline; gap: 8px; }
.brand-pinyin { font-size: 9px; letter-spacing: 3px; color: rgba(255,255,255,0.35); font-weight: 300; }
.hero-nav-links { display: flex; gap: 28px; }
.hero-nav-links a {
  font-size: 10px; letter-spacing: 3px;
  color: rgba(255,255,255,0.55); transition: color 0.3s;
}
.hero-nav-links a:hover { color: #fff; }

/* 极库式海报布局（右上角，不挡星图） */
.hero-content {
  position: absolute; z-index: 3;
  left: clamp(24px, 5vw, 88px);
  top: clamp(80px, 11vh, 130px);
  right: auto;
  width: auto;
  text-align: left;
  opacity: 1;
}
@keyframes heroIn { from { transform: translateY(26px); } to { transform: none; } }

.hero-kicker {
  font-size: 9px; letter-spacing: 5px;
  color: rgba(255,255,255,0.5); margin-bottom: 24px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(44px, 6.5vw, 80px);
  font-weight: 400; line-height: 1.16; letter-spacing: 0.04em;
  text-shadow: 0 3px 28px rgba(0,0,0,0.32);
  opacity: 1;
}
.hero-sub {
  margin-top: 16px;
  font-family: "Zhi Mang Xing", var(--serif);
  font-size: clamp(16px, 2.4vw, 26px);
  letter-spacing: 0.2em; color: rgba(255,255,255,0.85);
  opacity: 1;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
}
@keyframes lineRise { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }

/* 极库式细边框按钮 */
.btn-glass {
  display: inline-block; margin-top: 44px;
  padding: 13px 30px;
  border: 1px solid rgba(255,255,255,0.36);
  color: #fff;
  font-size: 10px; letter-spacing: 3px;
  transition: all 0.25s;
  opacity: 0; animation: fadeIn 1s 1.1s forwards;
}
.btn-glass:hover {
  background: #fff; color: #090c12;
  box-shadow: 0 0 30px rgba(255,255,255,0.25);
}

.hero-scroll {
  position: absolute; z-index: 3;
  left: clamp(24px, 8vw, 124px); bottom: 30px;
  display: flex; align-items: center; gap: 13px;
  font-size: 9px; letter-spacing: 3px; color: rgba(255,255,255,0.7);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
.hero-scroll::after {
  content: ''; width: 46px; height: 1px;
  background: rgba(255,255,255,0.8);
}
/* 极库 scroll-link 同款（对齐 .hero-scroll） */
.scroll-link {
  position: absolute; z-index: 3;
  left: clamp(24px, 8vw, 124px); bottom: 30px;
  display: flex; align-items: center; gap: 13px;
  color: #fff; font-size: 9px; letter-spacing: 3px;
  opacity: 0; animation: fadeIn 0.9s 1s forwards;
}
.scroll-line { width: 46px; height: 1px; background: rgba(255,255,255,0.8); }
@keyframes scrollPulse { 0%,100% { opacity: 0.35; } 50% { opacity: 0.95; } }

/* ═══ 文章列表（极库暗色卡片） ═══ */
.posts {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0 70px;
  background: linear-gradient(180deg, #080b11, #0d1117);
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 0.08em;
  margin-bottom: 46px; color: var(--text);
}
.post-list { display: flex; flex-direction: column; gap: 20px; }
.post-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.post-card:hover {
  border-color: rgba(88, 166, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 44px rgba(0,0,0,0.5), 0 0 26px rgba(88,166,255,0.1);
}
.post-card-link { display: flex; }
.post-card-cover {
  flex: 0 0 190px; min-height: 140px;
  background-size: cover; background-position: center;
  background-color: var(--panel-2);
}
.post-card-body { padding: 22px 26px; flex: 1; }
.post-title {
  font-family: var(--serif); font-weight: 400;
  font-size: 20px; line-height: 1.45; margin-bottom: 10px;
  transition: color 0.3s;
}
.post-card:hover .post-title { color: var(--accent); }
.post-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 10px; }
.post-date { font-size: 11px; color: var(--text-dim); letter-spacing: 0.12em; }
.post-cat {
  font-size: 10px; padding: 2px 12px; border-radius: 999px;
  background: rgba(88,166,255,0.14); color: var(--accent);
  letter-spacing: 0.15em;
}
.post-tag { font-size: 11px; color: var(--accent); opacity: 0.7; }
.post-excerpt {
  font-size: 13.5px; color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ═══ 分页 ═══ */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 24px;
  margin-top: 54px;
}
.page-link {
  font-size: 11px; letter-spacing: 0.25em; color: var(--text-dim);
  padding: 10px 24px; border: 1px solid var(--border); border-radius: 999px;
  transition: all 0.3s;
}
.page-link:hover { color: #fff; border-color: var(--accent); }
.page-info { font-size: 11px; color: var(--text-dim); letter-spacing: 0.25em; }

/* ═══ 文章页 ═══ */
.simple-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(24px, 6vw, 88px);
  background: rgba(8,11,17,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  font-size: 10px; letter-spacing: 4px;
}
.simple-nav-links { display: flex; gap: 26px; }
.simple-nav-links a { font-size: 10px; letter-spacing: 3px; color: var(--text-dim); transition: color 0.3s; }
.simple-nav-links a:hover { color: #fff; }

.post-main {
  padding: clamp(60px, 9vw, 90px) 0 80px;
  background: linear-gradient(180deg, #080b11, #0d1117);
}
.post { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.post-header { margin-bottom: 42px; }
.post-heading {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 4.5vw, 42px); line-height: 1.4; letter-spacing: 0.03em;
  margin-bottom: 18px;
}
.post-meta-lg { margin-bottom: 0; }
.post-content {
  font-size: 16px; line-height: 2.05; color: rgba(245,246,248,0.88);
}
.post-content h1, .post-content h2, .post-content h3 {
  font-family: var(--sans); font-weight: 600;
  margin: 36px 0 16px; line-height: 1.4;
}
.post-content h2 { font-size: 26px; }
.post-content h3 { font-size: 21px; }
.post-content p { margin: 18px 0; }
.post-content img { max-width: 100%; border-radius: 10px; }
.post-content pre {
  background: #0a0e16; border: 1px solid var(--border);
  border-radius: 10px; padding: 18px; overflow-x: auto;
  font-size: 14px; line-height: 1.7;
}
.post-content code { font-size: 13px; }
.post-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 22px; margin: 22px 0;
  color: var(--text-dim); background: rgba(88,166,255,0.05);
  border-radius: 0 8px 8px 0;
}
.post-content a { color: var(--accent); border-bottom: 1px solid rgba(88,166,255,0.3); }

.post-pager {
  display: flex; justify-content: space-between; gap: 18px;
  margin-top: 60px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.pager-link { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pager-right { align-items: flex-end; text-align: right; }
.pager-label { font-size: 10px; letter-spacing: 0.25em; color: var(--text-dim); }
.pager-title { font-size: 15px; color: var(--text); transition: color 0.3s; }
.pager-link:hover .pager-title { color: var(--accent); }

.post-comments { margin-top: 60px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ═══ 页脚 ═══ */
.footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: rgba(245,246,248,0.35);
  font-size: 11px; letter-spacing: 0.15em;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; }

/* ═══ 归档/标签页 ═══ */
.archive-group { margin-bottom: 38px; }
.archive-year {
  font-family: var(--serif); font-weight: 400;
  font-size: 22px; letter-spacing: 0.1em; margin-bottom: 16px;
  color: rgba(245,246,248,0.85);
}
.archive-list { display: flex; flex-direction: column; }
.archive-item {
  display: flex; gap: 18px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.25s;
}
.archive-item:hover { padding-left: 8px; }
.archive-item:hover .archive-title { color: var(--accent); }
.archive-date { font-size: 11px; color: var(--text-dim); letter-spacing: 0.1em; flex-shrink: 0; }
.archive-title { font-size: 15px; color: var(--text); transition: color 0.25s; }

/* ═══ 友链 ═══ */
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.link-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px;
  transition: all 0.3s;
}
.link-card:hover { border-color: rgba(88,166,255,0.4); transform: translateY(-2px); }
.link-card-logo {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: var(--panel-2);
}
.link-card-name { font-size: 15px; font-weight: 400; margin-bottom: 4px; font-family: var(--serif); }
.link-card-desc { font-size: 12px; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ═══ 404 ═══ */
.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound-inner { text-align: center; width: 100%; }
.notfound-code { font-family: var(--serif); font-size: 110px; font-weight: 400; line-height: 1; }
.notfound-text { color: var(--text-dim); margin: 20px 0 34px; letter-spacing: 0.25em; }

/* ═══ 响应式 ═══ */
/* 竖屏手机专属（星图紧凑 + 标题贴角） */
@media (max-width: 700px) and (orientation: portrait) {
  .hero-content { left: 16px; top: 60px; right: auto; }
  .hero-title { font-size: clamp(26px, 7.5vw, 40px); }
  .hero-sub { font-size: clamp(12px, 3.4vw, 16px); letter-spacing: 0.12em; margin-top: 10px; }
  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(3,6,10,0.78), rgba(3,6,10,0.42) 40%, rgba(3,6,10,0.04) 78%),
      linear-gradient(0deg, rgba(5,8,13,0.92), transparent 45%);
  }
  .posts { padding: 40px 0 64px; }
  .section-title { font-size: 20px; margin-bottom: 22px; }
  .post-card-cover { height: 140px; }
  .post-card-body { padding: 14px 16px; }
  .post-title { font-size: 16px; }
  .post-excerpt { font-size: 12.5px; }
}

@media (max-width: 700px) {
  .hero-nav { padding: 20px 20px; }
  .hero-nav-links { gap: 16px; }
  .hero-content { right: 20px; left: auto; top: 68px; width: auto; text-align: right; }
  .hero-title { font-size: clamp(32px, 9vw, 48px); line-height: 1.2; }
  .hero-sub { font-size: clamp(13px, 3.8vw, 18px); letter-spacing: 0.15em; margin-top: 12px; }
  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(3,6,10,0.8), rgba(3,6,10,0.45) 40%, rgba(3,6,10,0.05) 78%),
      linear-gradient(0deg, rgba(5,8,13,0.92), transparent 45%);
  }
  .hero-scroll { left: 20px; bottom: 22px; }
  .posts { padding: 46px 0 70px; }
  .section-title { font-size: 22px; margin-bottom: 26px; }
  .post-card-link { flex-direction: column; border-radius: 10px; }
  .post-card-cover { flex: none; height: 150px; }
  .post-card-body { padding: 16px 18px; }
  .post-title { font-size: 17px; line-height: 1.5; }
  .post-meta { font-size: 11px; gap: 8px; flex-wrap: wrap; }
  .post-excerpt { font-size: 13px; line-height: 1.7; margin-top: 8px; }
  .pagination { gap: 12px; padding: 14px 0; }
  .page-link { padding: 8px 15px; font-size: 10px; letter-spacing: 2px; }
  .page-info { font-size: 11px; }
  .footer-inner { flex-direction: column; gap: 8px; font-size: 11px; }
  .simple-nav { padding: 16px 20px; }
  .simple-nav .brand { font-size: 13px; }
  .post { padding: 26px 20px 60px; }
  .post-heading { font-size: 24px; line-height: 1.45; }
  .post-meta-lg { font-size: 11px; }
  .post-content { font-size: 15px; line-height: 1.85; }
  .icp-float { font-size: 9px; bottom: 4px; }
}

/* ═══ 悬浮备案号（极库同款）═══ */
.icp-float {
  position: fixed; bottom: 6px; left: 0; right: 0;
  text-align: center; z-index: 100;
  font-size: 10px; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.15);
}
.icp-float a { color: inherit; }
