/* ============================================================
   Miku's Log — Japanese ghost / horror aesthetic (日系灵异 · 清冷恐怖)
   深夜蓝黑底 · 月光青蓝 · 血色点缀 · 胶片颗粒 · 暗角 · 细月线框 · 大留白 · 明朝体
   ============================================================ */

:root {
  --bg: #0A0D13;
  --fg: #D9E0EA;
  --fg-soft: #B2BFD0;
  --muted-fg: #8291A8;
  --faint: #4A566E;
  --border: #1E2836;
  --border-soft: rgba(170, 190, 220, 0.07);
  --card: #0F141D;
  --card-raise: #121826;
  --muted-bg: #151C28;
  --accent: #A84A53;
  --accent-bright: #C4606A;
  --accent-deep: #7C343B;
  --moon: #9CBBDC;
  --moon-dim: #5C7695;
  --sans: 'Shippori Mincho', 'Noto Serif SC', 'Noto Serif JP', Georgia, 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 夜色 + 胶片颗粒 */
body {
  background: linear-gradient(180deg, #0C1019 0%, #0A0D13 42%, #080B10 100%);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 暗角 + 月光自顶而下 · 清冷灵异氛围 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  background:
    radial-gradient(ellipse at 50% -8%, rgba(156, 187, 220, 0.06), transparent 55%),
    radial-gradient(ellipse at 50% 40%, transparent 46%, rgba(3, 5, 9, 0.42) 84%, rgba(1, 2, 5, 0.65) 100%);
}

::selection { background: var(--accent); color: #0A0D13; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #273245; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #35435C; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

main { flex: 1; }

.label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

/* ====== 按钮 ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 2px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.btn-dark { background: var(--fg); color: var(--bg); }
.btn-dark:hover { background: var(--accent); color: #F4E9EA; }

.btn-ghost { color: var(--muted-fg); }
.btn-ghost:hover { color: var(--fg); }

.btn-sm { height: 32px; padding: 0 16px; font-size: 12px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 14px; }

.btn .arrow { font-family: var(--mono); font-weight: 400; transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(2px); }

/* ====== 顶栏 ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 13, 19, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--fg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border-radius: 2px;
}

.brand-name { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; color: var(--fg); }

.brand-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 13px;
}

.header-nav a {
  color: var(--muted-fg);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.header-nav a:hover { color: var(--fg); }

.header-cta { display: flex; align-items: center; gap: 14px; }

.header-sync {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.header-sync b { font-weight: 500; color: var(--accent-bright); }

/* ====== 首页 hero ====== */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }

/* 月光斜落 + 血色余晖沉底 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 26% 10%, rgba(156, 187, 220, 0.11), transparent 56%),
    radial-gradient(ellipse at 82% 96%, rgba(176, 84, 91, 0.07), transparent 52%),
    linear-gradient(180deg, rgba(156, 187, 220, 0.03), transparent 38%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 100px 24px 112px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 29, 0.72);
  border-radius: 2px;
  padding: 6px 13px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pulse-dot { position: relative; width: 6px; height: 6px; flex-shrink: 0; }

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.5;
  animation: hp-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(176, 84, 91, 0.55);
}

@keyframes hp-ping {
  0% { transform: scale(1); opacity: 0.5; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}

.hero-badge-text {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-fg);
}

.hero-title {
  margin-top: 40px;
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 0 32px rgba(156, 187, 220, 0.22);
}

.hero-title .accent { color: var(--accent-bright); text-shadow: 0 0 28px rgba(176, 84, 91, 0.35); }
.hero-title-muted { color: var(--muted-fg); font-weight: 400; }

.hero-lede {
  margin-top: 24px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--muted-fg);
}

/* 胶片数据卡片 · 夜里亮着的一块仪表 */
.pilot-card {
  margin-top: 46px;
  max-width: 560px;
  background: linear-gradient(180deg, #111724 0%, #0D121C 100%);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 22px;
  box-shadow:
    inset 0 1px 0 rgba(156, 187, 220, 0.07),
    0 24px 52px -32px rgba(0, 0, 0, 0.9),
    0 4px 18px -10px rgba(156, 187, 220, 0.06);
}

.pilot-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.pilot-desc { margin-top: 6px; font-size: 14px; color: var(--fg); }

.pilot-score { display: flex; align-items: baseline; gap: 5px; font-family: var(--mono); white-space: nowrap; }
.pilot-score b { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--accent-bright); text-shadow: 0 0 16px rgba(176, 84, 91, 0.4); }
.pilot-score span { font-size: 12.5px; color: var(--muted-fg); }

.hp-bar {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--muted-bg);
  overflow: hidden;
}

.hp-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 98.7%);
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(176, 84, 91, 0.55);
  animation: hp-fill 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hp-fill { from { width: 0%; } }

.pilot-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.pilot-foot-left { display: inline-flex; align-items: center; gap: 7px; }

.dot-green {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(176, 84, 91, 0.55);
  animation: hp-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes hp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.blink { animation: hp-blink 1.1s steps(1) infinite; }

@keyframes hp-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 42px; }

.hero-note {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted-fg);
}

/* ====== 列表页头 ====== */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 48px;
  padding: 68px 0 38px;
}

.page-title {
  margin-top: 14px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-shadow: 0 0 24px rgba(156, 187, 220, 0.16);
}

.page-lede { max-width: 340px; font-size: 14.5px; line-height: 1.8; color: var(--muted-fg); }

/* ====== 归档条目卡片 ====== */
.entries { display: flex; flex-direction: column; gap: 16px; }

.entry-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 22px 24px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.entry-card:hover {
  border-color: rgba(156, 187, 220, 0.38);
  background: var(--card-raise);
  box-shadow: 0 14px 34px -20px rgba(0, 0, 0, 0.85), 0 0 24px -12px rgba(156, 187, 220, 0.14);
}

.entry-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

.entry-arrow {
  font-family: var(--mono);
  color: var(--faint);
  transition: color 0.2s, transform 0.2s;
}

.entry-card:hover .entry-arrow { color: var(--accent-bright); transform: translateX(3px); }

.entry-name {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: var(--fg);
}

.entry-summary { margin-top: 8px; font-size: 14px; line-height: 1.8; color: var(--muted-fg); }

/* ====== 分页 ====== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 44px 0 10px;
  font-family: var(--mono);
  font-size: 12px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--card);
  color: var(--muted-fg);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.pagination a:hover { color: var(--fg); border-color: var(--accent); }

.pagination .current {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 2px;
  background: var(--fg);
  color: var(--bg);
}

.pagination .disabled { color: var(--faint); padding: 0 6px; }
.pagination .dot-sep { color: var(--faint); }

/* ====== 单篇 ====== */
.back-link {
  display: inline-block;
  margin-top: 38px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted-fg);
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent-bright); }

.post-head { max-width: 760px; padding: 22px 0 34px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }

.post-title {
  margin-top: 16px;
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-shadow: 0 0 24px rgba(156, 187, 220, 0.16);
}

.content { max-width: 760px; font-size: 17px; line-height: 2.0; color: var(--fg-soft); padding-bottom: 14px; }
.content p { margin-bottom: 22px; }

.content a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.content a:hover { color: var(--fg); }

.content h2 {
  font-size: 1.45em;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--fg);
  margin: 44px 0 16px;
}

.content h3 { font-size: 1.18em; font-weight: 600; color: var(--fg); margin: 34px 0 12px; }

.content ul, .content ol { margin: 24px 0; padding-left: 26px; }
.content li { margin: 8px 0; }
.content li::marker { color: var(--accent); }

.content blockquote {
  margin: 28px 0;
  padding: 14px 22px;
  border-left: 2px solid var(--accent);
  background: rgba(156, 187, 220, 0.035);
  color: var(--muted-fg);
  font-style: italic;
}

.content blockquote p { margin-bottom: 8px; }
.content blockquote p:last-child { margin-bottom: 0; }

.content code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--accent-bright);
}

.content pre {
  background: #0D121C;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 20px 22px;
  margin: 28px 0;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  box-shadow: inset 0 1px 0 rgba(156, 187, 220, 0.05);
}

.content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--fg-soft);
  font-size: inherit;
}

.content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin: 28px 0;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.9);
}

.content hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.content strong { font-weight: 600; color: var(--fg); }

.end-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 52px 0 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

/* ====== 页脚 ====== */
.site-footer { border-top: 1px solid var(--border); margin-top: 84px; }

.footer-inner { max-width: 1080px; margin: 0 auto; padding: 66px 24px 34px; }

.footer-grid { display: grid; gap: 48px; grid-template-columns: 1fr; }

.footer-desc { margin-top: 20px; max-width: 300px; font-size: 14px; line-height: 1.85; color: var(--muted-fg); }

.footer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  border: 1px solid var(--border);
  background: rgba(21, 28, 40, 0.6);
  border-radius: 2px;
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted-fg);
}

.footer-cols { display: grid; gap: 32px; grid-template-columns: repeat(2, 1fr); }

.footer-links { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 11px; font-size: 14px; }

.footer-links a { color: var(--fg-soft); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-bright); }

.footer-plain { color: var(--muted-fg); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 1px solid var(--border-soft);
  margin-top: 58px;
  padding-top: 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted-fg);
}

/* ====== 响应式 ====== */
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 5fr 7fr; }
}

@media (min-width: 560px) {
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .header-nav, .header-sync, .brand-status { display: none; }
  .hero-inner { padding: 58px 24px 76px; }
  .page-head { padding-top: 46px; }
}
