/* 方小果的BLOG · fxg theme */
:root {
  --bg: #f4f5fa;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #ffffff;
  --border: rgba(30, 30, 80, .09);
  --text: #20233a;
  --muted: #6d7292;
  --accent: #17171c;
  --accent2: #5b5b66;
  --grad: linear-gradient(135deg, #2a2a32, #0e0e12);
  --shadow: 0 8px 32px rgba(0, 0, 0, .08);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
[data-theme="dark"] {
  --bg: #0e1120;
  --card: rgba(24, 28, 52, .72);
  --card-solid: #161a30;
  --border: rgba(255, 255, 255, .09);
  --text: #eef0ff;
  --muted: #9aa0a8;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
  --accent: #f2f2f6;
  --accent2: #a9a9b4;
  --grad: linear-gradient(135deg, #3d3d47, #131318);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  transition: background .3s, color .3s;
}
/* 干净的浅色氛围背景：柔和色块，非星空 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 12% 8%, rgba(0, 0, 0, .05), transparent 70%),
    radial-gradient(700px 480px at 88% 18%, rgba(0, 0, 0, .04), transparent 70%),
    radial-gradient(800px 600px at 50% 110%, rgba(0, 0, 0, .05), transparent 70%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(700px 460px at 12% 6%, rgba(255, 255, 255, .05), transparent 70%),
    radial-gradient(700px 500px at 88% 20%, rgba(255, 255, 255, .035), transparent 70%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 96px 20px 40px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.muted { color: var(--muted); }

/* ---- 顶栏 ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; font-weight: 700; }
.brand-logo { width: 34px; height: 34px; border-radius: 11px; box-shadow: 0 4px 14px rgba(0, 0, 0, .28); }
.brand-name em { font-style: normal; font-size: 13px; color: var(--muted); font-family: var(--sans); font-weight: 500; margin-left: 2px; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-size: 15px; transition: .2s; }
.nav-links a:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.nav-links a.active { color: var(--accent); font-weight: 600; }
.nav-links a.active::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 2px auto 0; }
.nav-right { margin-left: auto; display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted); cursor: pointer; transition: .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
[data-theme="light"] .ic-moon { display: block; } [data-theme="light"] .ic-sun { display: none; }
[data-theme="dark"] .ic-sun { display: block; } [data-theme="dark"] .ic-moon { display: none; }

/* ---- 胶囊搜索 ---- */
.search-capsule {
  max-width: 620px; margin: 0 auto 18px;
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 13px 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.search-capsule svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-capsule input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.search-capsule input::placeholder { color: var(--muted); }

/* ---- 跑马灯 ---- */
.marquee { overflow: hidden; border-radius: 999px; margin-bottom: 20px; padding: 12px 0; }
.marquee-track { display: inline-flex; gap: 60px; white-space: nowrap; animation: scroll 22s linear infinite; padding-left: 30px; }
.marquee-track span { font-family: var(--serif); letter-spacing: 2px; color: var(--muted); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---- Hero 双卡 ---- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin-bottom: 20px; }
.profile { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.profile-top { display: flex; gap: 18px; align-items: center; }
.avatar { width: 84px; height: 84px; border-radius: 26px; border: 3px solid transparent; background: var(--grad) border-box; box-shadow: 0 6px 20px rgba(0, 0, 0, .28); }
.profile-name { font-family: var(--serif); font-size: 30px; margin-bottom: 6px; }
.profile-bio { color: var(--muted); font-size: 14px; }
.profile-bottom { display: flex; align-items: center; justify-content: space-between; }
.stats { display: flex; gap: 26px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 24px; font-family: var(--serif); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 12px; color: var(--muted); }
.socials { display: flex; gap: 10px; }
.nowcard { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 6px; position: relative; overflow: hidden; }
.nowcard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: var(--grad); opacity: .14; filter: blur(10px); }
.now-label { font-size: 12px; letter-spacing: 3px; color: var(--muted); }
.now-clock { font-family: var(--serif); font-size: 52px; font-weight: 700; line-height: 1.1; }
.now-date { color: var(--muted); font-size: 14px; }
.now-quote { margin-top: 10px; font-family: var(--serif); font-size: 15px; color: var(--accent); }

/* ---- Bento ---- */
.bento { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; }
.post-featured { position: relative; overflow: hidden; padding: 30px; min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; transition: transform .25s; }
.post-featured:hover { transform: translateY(-4px); }
.grad-0 { background: linear-gradient(135deg, #2e2e37, #0c0c10); }
.grad-1 { background: linear-gradient(135deg, #4b4b56, #17171c); }
.grad-2 { background: linear-gradient(135deg, #3a3a44, #0e0e12); }
.grad-3 { background: linear-gradient(135deg, #5c5c66, #1d1d23); }
.post-featured::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,8,30,.55), transparent 60%); }
.post-featured > * { position: relative; }
.pf-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pill { display: inline-block; font-size: 12px; padding: 5px 13px; border-radius: 999px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(6px); }
.pf-date { font-size: 13px; opacity: .85; }
.pf-title { font-family: var(--serif); font-size: 30px; line-height: 1.4; margin-bottom: 10px; }
.pf-desc { font-size: 14px; opacity: .88; line-height: 1.7; }
.pf-char { position: absolute !important; right: 18px; top: 8px; font-family: var(--serif); font-size: 120px; opacity: .16; line-height: 1; }
.bento-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-mini { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 150px; color: #fff; transition: transform .25s; position: relative; overflow: hidden; }
.post-mini:hover { transform: translateY(-4px); }
.post-mini h3 { font-family: var(--serif); font-size: 17px; line-height: 1.5; position: relative; }
.pm-date { font-size: 12px; opacity: .8; }
.tags-card, .about-card { padding: 22px; }
.card-label { font-size: 12px; letter-spacing: 3px; color: var(--muted); margin-bottom: 14px; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 13px; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); transition: .2s; }
.tag:hover { background: var(--grad); color: #fff; border-color: transparent; }
.about-card p { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.about-card .go { color: var(--accent); font-weight: 600; font-size: 14px; }
.no-result { text-align: center; color: var(--muted); padding: 30px; }

/* ---- 文章页 ---- */
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.article { overflow: hidden; }
.cover { height: 220px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cover-char { font-family: var(--serif); font-size: 130px; color: rgba(255,255,255,.30); }
.article-body { padding: 34px 38px 44px; }
.back { display: inline-block; font-size: 13px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; margin-bottom: 20px; transition: .2s; }
.back:hover { color: var(--accent); border-color: var(--accent); }
.article-title { font-family: var(--serif); font-size: 34px; line-height: 1.45; margin-bottom: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.meta .pill { background: color-mix(in srgb, var(--accent) 9%, transparent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }
.prose { line-height: 1.9; font-size: 16px; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--serif); margin: 1.6em 0 .7em; line-height: 1.5; }
.prose h2 { font-size: 24px; padding-left: 12px; border-left: 4px solid var(--accent); }
.prose p { margin: .9em 0; }
.prose a { color: var(--accent); border-bottom: 1px dashed var(--accent); }
.prose code { font-size: .88em; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); padding: 2px 8px; border-radius: 999px; }
.prose pre { background: #1b1f38; color: #dfe4ff; border-radius: 16px; padding: 20px; overflow-x: auto; margin: 1.2em 0; }
.prose pre code { background: none; color: inherit; padding: 0; border-radius: 0; }
.prose ul, .prose ol { margin: .9em 0 .9em 1.4em; }
.prose li { margin: .4em 0; }
.prose blockquote { border-left: 4px solid var(--accent2); background: color-mix(in srgb, var(--accent2) 10%, transparent); border-radius: 0 14px 14px 0; padding: 12px 18px; margin: 1.2em 0; color: var(--muted); }
.prose img { border-radius: 16px; }
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 84px; }
.side-profile { padding: 24px; text-align: center; }
.avatar-sm { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 10px; }
.side-profile b { font-family: var(--serif); font-size: 18px; }
.side-profile p { font-size: 13px; margin-top: 6px; }
.toc-card, .rec-card { padding: 22px; }
.toc-card nav ul { list-style: none; }
.toc-card nav li { margin: 7px 0; font-size: 14px; }
.toc-card nav a { color: var(--muted); transition: .2s; }
.toc-card nav a:hover { color: var(--accent); }
.toc-card nav ul ul { margin-left: 14px; }
.rec-item { display: block; padding: 10px 0; border-top: 1px dashed var(--border); }
.rec-item:first-of-type { border-top: 0; }
.rec-title { display: block; font-size: 14px; line-height: 1.6; }
.rec-item:hover .rec-title { color: var(--accent); }
.rec-date { font-size: 12px; color: var(--muted); }

/* ---- 列表页 ---- */
.page-head { padding: 34px; margin-bottom: 20px; }
.page-title { font-family: var(--serif); font-size: 30px; }
.list { display: flex; flex-direction: column; gap: 14px; }
.list-item { padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 18px; transition: transform .2s; }
.list-item:hover { transform: translateX(4px); }
.li-title { font-family: var(--serif); font-size: 19px; margin-bottom: 6px; }
.li-desc { font-size: 13px; color: var(--muted); }
.li-date { flex: none; font-size: 13px; color: var(--muted); }

/* ---- 底部状态栏 ---- */
.statusbar { padding: 0 20px 26px; }
.status-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 14px 26px; box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; color: var(--muted);
}
.status-left { display: flex; align-items: center; gap: 12px; }
.clock { font-family: var(--serif); font-size: 17px; color: var(--text); letter-spacing: 2px; }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.uptime b { color: var(--accent); }
.status-right { display: flex; align-items: center; gap: 8px; }
.badge { font-size: 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.copy { margin-left: 6px; }

@media (max-width: 860px) {
  .hero, .bento, .article-layout { grid-template-columns: 1fr; }
  .bento-side { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .article-body { padding: 24px 20px 34px; }
  .article-title { font-size: 26px; }
  .sidebar { position: static; }
  .status-inner { border-radius: 22px; }
}
@media (max-width: 560px) {
  .bento-side { grid-template-columns: 1fr; }
  .now-clock { font-size: 42px; }
}
