/* ===== Firefly-liu的博客 · 全站样式 ===== */

:root {
  --bg: #faf9f7;
  --card-bg: #ffffff;
  --text: #33302c;
  --text-light: #6f6a63;
  --accent: #4d8a3a;
  --accent-soft: #e8f4dd;
  --border: #e9e4dd;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.10);
  --firefly-green: 163, 232, 121;
  --theme-tint: 255, 218, 231; /* 主页主题色（淡粉）：改这里，顶部遮罩、欢迎区、文章卡片一起变 */
  --night: 0.55;                  /* 背景暗化程度：0 = 不变暗，1 = 全黑 */
  --night-content: calc(var(--night) / 2); /* 前景卡片暗化程度：自动为背景的一半 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #0a0c16;
}

body {
  font-family: var(--font-sans);
  background: var(--bg) url("../images/desktop/d-1.jpg") center / cover fixed no-repeat;
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* 整页从下方滑入 */
.page-up {
  animation: pageUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}

@keyframes pageUp {
  from {
    transform: translateY(100vh);
  }
  to {
    transform: translateY(0);
  }
}

/* 背景暗化层：在内容下方，只压暗背景图 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 22, var(--night));
  pointer-events: none;
  z-index: 0;
}

/* 前景暗化层：盖住卡片和文字，程度为背景的一半 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 22, var(--night-content));
  pointer-events: none;
  z-index: 45;
}

::selection {
  background: rgba(var(--firefly-green), 0.45);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(77, 138, 58, 0.35);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(77, 138, 58, 0.55);
}

h1,
h2,
h3 {
  letter-spacing: 0.02em;
  font-weight: 700;
}

a:focus-visible,
.back-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  animation: headerFadeIn 0.35s ease 0.45s backwards;
}

/* 标题栏背景在整页滑入快结束时淡入 */
@keyframes headerFadeIn {
  from {
    background-color: transparent;
    border-bottom-color: transparent;
  }
}

.home .site-header {
  background: rgba(var(--theme-tint), 0.7);
}

.article-page .site-header {
  background: rgba(var(--firefly-green), 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 64px;
}

.clock {
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: none;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(163, 232, 121, 0.45);
  transition: color 0.2s;
}

.firefly-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  animation: logoPulse 3s ease-in-out infinite alternate;
}

@keyframes logoPulse {
  from {
    filter: drop-shadow(0 0 3px rgba(163, 232, 121, 0.5));
  }
  to {
    filter: drop-shadow(0 0 10px rgba(163, 232, 121, 0.95));
  }
}

.site-title:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 15px;
  position: relative;
  transition: color 0.2s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

/* ---------- Hero ---------- */

/* ---------- 搜索首屏 ---------- */

.search-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 70px;
}

.search-hero-inner {
  max-width: 720px;
  width: 100%;
  animation: fadeUp 0.7s ease backwards;
}

.search-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: block;
  animation: logoPulse 3s ease-in-out infinite alternate;
}

.search-brand {
  font-size: 44px;
  line-height: 1.25;
  color: #f2ffe9;
  margin-bottom: 10px;
  animation: textGlow 3.2s ease-in-out infinite alternate;
}

.search-sub {
  color: #c6d8be;
  font-size: 17px;
}

.search-form {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 560px;
  margin: 32px auto 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 14px 22px;
  border: 1px solid rgba(200, 255, 154, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-sans);
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.search-input:focus {
  border-color: rgba(77, 138, 58, 0.7);
  box-shadow: 0 0 0 3px rgba(163, 232, 121, 0.25);
}

.search-btn {
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(163, 232, 121, 0.4);
}

/* 快捷方式 */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.quick-link {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(200, 255, 154, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #d9e8d2;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.quick-link:hover {
  background: rgba(77, 138, 58, 0.75);
  border-color: rgba(200, 255, 154, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(163, 232, 121, 0.35);
}

/* 下滑提示 */
.scroll-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  text-align: center;
  color: rgba(200, 255, 154, 0.7);
  font-size: 14px;
  letter-spacing: 2px;
  animation: bounceDown 2s ease-in-out infinite;
}

.scroll-arrow {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}

@keyframes bounceDown {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* ---------- 区块切换标签 ---------- */

.tabs-bar {
  position: sticky;
  top: 64px;
  z-index: 9;
  border-top: 1px dashed rgba(200, 255, 154, 0.22);
  background: rgba(16, 22, 16, 0.4);
  backdrop-filter: blur(4px);
}

.tabs {
  display: flex;
  gap: 22px;
  padding: 10px 24px;
}

.tab {
  padding: 4px 2px;
  border: none;
  border-bottom: 1px dashed transparent;
  background: transparent;
  color: rgba(214, 232, 208, 0.5);
  font-size: 13px;
  letter-spacing: 1px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
  color: #eaffd6;
}

.tab.active {
  color: #eaffd6;
  border-bottom-color: rgba(200, 255, 154, 0.7);
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
  animation: fadeUp 0.45s ease backwards;
}

/* ---------- Post list ---------- */

.post-list {
  counter-reset: post;
  padding-bottom: 72px;
}

.section-title {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.post-card {
  position: relative;
  overflow: hidden;
  counter-increment: post;
  background: rgb(var(--theme-tint));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  margin-bottom: 20px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  animation: fadeUp 0.55s ease backwards;
  /* 调试用：改这三个值调整左下角图片的位置和滑动距离 */
  --img-x: -105px;  /* 图片 X 位置：负值往左，正值往右 */
  --img-y: 0px;     /* 图片 Y 位置：负值往上，正值往下 */
  --slide-left: 70px; /* 悬停后平移的距离：负值往左，正值往右 */
}

.post-card::before {
  content: "0" counter(post);
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: rgba(77, 138, 58, 0.16);
  z-index: 0;
  pointer-events: none;
}

.post-card:nth-of-type(2) {
  animation-delay: 0.08s;
}

.post-card:nth-of-type(3) {
  animation-delay: 0.16s;
}

.post-card:nth-of-type(4) {
  animation-delay: 0.24s;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(163, 232, 121, 0.35);
  background: rgb(var(--firefly-green));
}

.card-img {
  position: absolute;
  left: 0;
  bottom: 0;
  max-height: 80px;
  width: auto;
  transform: translate(var(--img-x), var(--img-y));
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: transform 1s ease, opacity 1s ease;
}

.post-card:hover .card-img {
  transform: translate(calc(var(--img-x) + var(--slide-left)), var(--img-y));
  opacity: 1;
}

.post-card time {
  display: inline-block;
  font-size: 12.5px;
  color: var(--accent);
  background: rgba(77, 138, 58, 0.10);
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.post-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.post-card h3 a {
  color: var(--text);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: color 0.2s, background-size 0.3s ease;
}

.post-card h3 a:hover {
  color: var(--accent);
  background-size: 100% 2px;
}

.post-card p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 14px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid rgba(77, 138, 58, 0.35);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.read-more:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 14px rgba(163, 232, 121, 0.5);
}

.read-more-icon {
  display: none;
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: -3px;
}

.read-more:hover .arrow {
  display: none;
}

.read-more:hover .read-more-icon {
  display: inline-block;
}

/* ---------- 置顶自我介绍卡片 ---------- */

.pinned-card {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: rgb(var(--theme-tint));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  margin-bottom: 20px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  animation: fadeUp 0.6s ease backwards;
}

.pinned-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(163, 232, 121, 0.35);
  background: rgb(var(--firefly-green));
}

.pinned-inner {
  display: flex;
  align-items: center;
  gap: 22px;
}

.pinned-avatar {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 0 16px rgba(163, 232, 121, 0.45);
}

.pinned-text {
  min-width: 0;
}

.pinned-badge {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: rgba(77, 138, 58, 0.16);
  z-index: 1;
}

.pinned-card h2 {
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--text);
}

.pinned-card p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 12px;
  max-width: 520px;
}

/* ---------- Article page ---------- */

.article {
  margin-top: 48px;
  margin-bottom: 72px;
  padding: 36px 40px;
  background: rgba(var(--firefly-green), 0.7);
  border-radius: 18px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.5s ease backwards;
}

.article-header {
  margin-bottom: 32px;
}

.article-header time {
  display: inline-block;
  font-size: 13px;
  color: #3d6b2e;
  background: rgba(255, 255, 255, 0.55);
  padding: 3px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.article-header h1 {
  font-size: 30px;
  line-height: 1.35;
  animation: textGlow 3.2s ease-in-out infinite alternate;
}

.article-body {
  font-size: 16.5px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin: 10px 0;
}

.article-body h2 {
  font-size: 22px;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 18px;
  margin: 28px 0 12px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 24px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body blockquote {
  margin: 28px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 0 10px 10px 0;
}

.article-body blockquote p {
  margin: 0;
  color: var(--text);
}

.article-body pre {
  background: #2d2a26;
  color: #f3ede6;
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
}

.article-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.article-body p code {
  background: rgba(77, 138, 58, 0.12);
  color: #3d6b2e;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-body strong {
  font-weight: 700;
}

.article-body a {
  color: var(--accent);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  border: 1px solid rgba(77, 138, 58, 0.4);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(77, 138, 58, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(77, 138, 58, 0.4);
  background: var(--accent);
  color: #fff;
}

.link-card {
  border: 1px dashed rgba(77, 138, 58, 0.45);
  border-radius: 12px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.5);
}

.emote-img {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 auto 18px;
  box-shadow: 0 0 18px rgba(163, 232, 121, 0.35);
}

/* ============================================================
   阅读增强组件（目录 / 代码块 / 终端 / 表格 / 时间线 / 标签 / 项目卡片）
   ============================================================ */

/* 文章元信息：标签 + 字数 */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  color: #3d6b2e;
}

.meta-tag {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(77, 138, 58, 0.25);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.meta-dot {
  opacity: 0.5;
}

/* 来源标注：区分「前届交接日志」与「本人实践」 */
.src-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 3px;
  white-space: nowrap;
}

.src-badge.src-prev {
  color: #7c6743;
  background: rgba(219, 196, 156, 0.4);
  border: 1px dashed rgba(150, 120, 70, 0.45);
}

.src-badge.src-mine {
  color: #2f6b25;
  background: rgba(163, 232, 121, 0.4);
  border: 1px solid rgba(77, 138, 58, 0.35);
}

/* 来源说明表 */
.src-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 6px 0 0;
}

.src-table th,
.src-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(77, 138, 58, 0.16);
  text-align: left;
  vertical-align: top;
}

.src-table th {
  background: rgba(77, 138, 58, 0.12);
  font-weight: 600;
  white-space: nowrap;
}

.src-table tbody tr:last-child td {
  border-bottom: none;
}

/* 标题锚点偏移，避免被吸顶导航盖住 */
.article-body h2,
.article-body h3 {
  scroll-margin-top: 96px;
}

/* ---------- 文章目录 ---------- */

.toc {
  margin: 0 0 32px;
  border: 1px dashed rgba(77, 138, 58, 0.45);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #3d6b2e;
  user-select: none;
  list-style: none;
}

.toc-head::-webkit-details-marker {
  display: none;
}

.toc-head::after {
  content: "▾";
  font-size: 13px;
  transition: transform 0.25s ease;
}

.toc[open] .toc-head::after {
  transform: rotate(180deg);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 4px 20px 16px;
}

.toc-item {
  margin: 0;
}

.toc-link {
  display: block;
  padding: 4px 0 4px 14px;
  border-left: 2px solid transparent;
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.6;
  transition: color 0.2s, border-color 0.2s, padding-left 0.2s;
}

.toc-link:hover {
  color: var(--accent);
  border-left-color: rgba(77, 138, 58, 0.35);
}

.toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.toc-level-3 .toc-link {
  padding-left: 32px;
  font-size: 13.5px;
}

/* ---------- 代码块（带标题栏与复制按钮） ---------- */

.code-block {
  margin: 0 0 22px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  background: #2d2a26;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-lang {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(207, 255, 158, 0.75);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.code-copy {
  border: 1px solid rgba(207, 255, 158, 0.35);
  background: transparent;
  color: rgba(207, 255, 158, 0.85);
  font-size: 12px;
  font-family: var(--font-sans);
  padding: 3px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.code-copy:hover {
  background: rgba(207, 255, 158, 0.16);
}

.code-copy.done {
  background: rgba(207, 255, 158, 0.85);
  color: #2d2a26;
  border-color: transparent;
}

.code-block pre {
  margin: 0;
  padding: 16px 18px;
  border-radius: 0;
  background: transparent;
  font-size: 13.5px;
  line-height: 1.75;
}

/* ---------- 终端窗口（命令输出 / 报错） ---------- */

.terminal {
  margin: 0 0 22px;
  border-radius: 12px;
  overflow: hidden;
  background: #171a1f;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: #23272e;
}

.terminal-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }

.terminal-bar span {
  margin-left: 8px;
  font-size: 12px;
  color: #8b949e;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.terminal-body {
  padding: 14px 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.8;
  color: #c9d1d9;
  overflow-x: auto;
  white-space: pre;
}

.terminal-body .t-prompt { color: #7ee787; }
.terminal-body .t-err { color: #ff7b72; }
.terminal-body .t-warn { color: #e3b341; }
.terminal-body .t-dim { color: #6e7681; }

/* ---------- 表格 ---------- */

.article-body .table-wrap {
  overflow-x: auto;
  margin: 0 0 22px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  overflow: hidden;
}

.article-body th,
.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(77, 138, 58, 0.16);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: rgba(77, 138, 58, 0.12);
  font-weight: 600;
  white-space: nowrap;
}

.article-body tbody tr:last-child td {
  border-bottom: none;
}

.article-body tbody tr:hover {
  background: rgba(255, 255, 255, 0.55);
}

/* ---------- 时间线 ---------- */

.timeline {
  position: relative;
  margin: 0 0 26px;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    rgba(77, 138, 58, 0.55),
    rgba(163, 232, 121, 0.25)
  );
}

.tl-item {
  position: relative;
  padding-bottom: 22px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cfff9e;
  box-shadow: 0 0 0 3px rgba(163, 232, 121, 0.25),
    0 0 10px rgba(163, 232, 121, 0.8);
}

.tl-date {
  display: inline-block;
  font-size: 12.5px;
  color: #3d6b2e;
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.tl-body h3 {
  margin: 4px 0 6px;
  font-size: 17px;
}

.tl-body p {
  margin-bottom: 8px;
  font-size: 15.5px;
}

.tl-body ul {
  margin-bottom: 8px;
}

/* ---------- 提示框 ---------- */

.callout {
  position: relative;
  margin: 0 0 22px;
  padding: 16px 20px 16px 22px;
  border-radius: 0 12px 12px 0;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.55);
  font-size: 15.5px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout .callout-title {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: #3d6b2e;
  font-size: 15px;
}

.callout.info { border-left-color: #4d8a3a; }
.callout.warn { border-left-color: #d98a1f; background: rgba(255, 246, 229, 0.7); }
.callout.warn .callout-title { color: #9a6314; }
.callout.danger { border-left-color: #c0503f; background: rgba(255, 240, 238, 0.7); }
.callout.danger .callout-title { color: #a13f30; }
.callout.tip { border-left-color: #3f8fc0; background: rgba(238, 248, 255, 0.7); }
.callout.tip .callout-title { color: #2d6b93; }

/* ---------- 上一篇 / 下一篇 ---------- */

.post-nav {
  display: flex;
  gap: 14px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px dashed rgba(77, 138, 58, 0.4);
  flex-wrap: wrap;
}

.post-nav a {
  flex: 1 1 240px;
  display: block;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(77, 138, 58, 0.25);
  background: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.post-nav a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 20px rgba(77, 138, 58, 0.2);
}

.post-nav .nav-label {
  display: block;
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.post-nav .nav-title {
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.5;
}

.post-nav .nav-next {
  text-align: right;
}

.post-nav .nav-empty {
  flex: 1 1 240px;
}

/* ---------- 标签 ---------- */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  text-decoration: none;
  color: #3d6b2e;
  background: rgba(77, 138, 58, 0.12);
  border: 1px solid rgba(77, 138, 58, 0.2);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.tag:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.tag-btn {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(77, 138, 58, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #d9e8d2;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tag-btn:hover {
  border-color: rgba(200, 255, 154, 0.65);
  color: #eaffd6;
}

.tag-btn.active {
  background: rgba(77, 138, 58, 0.85);
  border-color: rgba(200, 255, 154, 0.7);
  color: #fff;
}

.post-card.hide {
  display: none;
}

.post-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.post-card .card-tags span {
  font-size: 11.5px;
  padding: 1px 10px;
  border-radius: 999px;
  color: #3d6b2e;
  background: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

/* ---------- 项目卡片 ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 0 0 30px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(77, 138, 58, 0.2);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(163, 232, 121, 0.35);
}

.project-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.project-card p {
  font-size: 14.5px;
  color: var(--text-light);
  margin-bottom: 14px;
  flex: 1;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-badge {
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 6px;
  background: rgba(77, 138, 58, 0.14);
  color: #3d6b2e;
  font-family: "SFMono-Regular", Consolas, monospace;
}

/* 数据条 */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 0 0 30px;
}

.stat {
  text-align: center;
  padding: 18px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(77, 138, 58, 0.18);
}

.stat b {
  display: block;
  font-size: 26px;
  color: var(--accent);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 12.5px;
  color: var(--text-light);
}

/* ---------- 表情包网格 ---------- */

.emote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 14px;
  margin: 0 0 26px;
}

.emote-item {
  text-align: center;
}

.emote-item img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 0 14px rgba(163, 232, 121, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: zoom-in;
}

.emote-item img:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 22px rgba(163, 232, 121, 0.5);
}

.emote-item span {
  display: block;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--text-light);
}

/* ---------- 行内按键 ---------- */

kbd {
  display: inline-block;
  padding: 1px 7px;
  font-size: 12.5px;
  font-family: "SFMono-Regular", Consolas, monospace;
  color: #3d2f24;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-bottom-width: 2px;
  border-radius: 5px;
}

/* ---------- 文章底部装饰 ---------- */

.article-deco {
  display: block;
  width: 150px;
  max-width: 40%;
  margin: 34px 0 0 auto;
  opacity: 0.85;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(163, 232, 121, 0.45));
}

/* ---------- 专题页头图 ---------- */

.topic-hero {
  position: relative;
  margin-bottom: 30px;
  padding: 30px 32px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(45, 92, 40, 0.82),
    rgba(24, 52, 30, 0.88)
  );
  color: #eaffd6;
  overflow: hidden;
}

.topic-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(163, 232, 121, 0.35), transparent 68%);
}

.topic-hero h1 {
  font-size: 30px;
  margin-bottom: 10px;
  animation: textGlow 3.2s ease-in-out infinite alternate;
}

.topic-hero p {
  font-size: 15.5px;
  color: #cfe8c2;
  margin: 0;
  max-width: 620px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--text-light);
  font-size: 14px;
  text-align: center;
}

/* ---------- Back to top ---------- */

.back-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(77, 138, 58, 0.85);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background 0.2s;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: rgba(77, 138, 58, 1);
}

/* ---------- 特效：萤火虫 & 点击光点 ---------- */

.fireflies {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 46; /* 在夜晚暗化层之上，保持发光 */
}

.firefly {
  position: absolute;
  border-radius: 50%;
  background: #cfff9e;
  box-shadow: 0 0 6px 2px rgba(163, 232, 121, 0.6),
    0 0 16px 6px rgba(163, 232, 121, 0.28);
  opacity: 0;
  animation-name: fireflyFloat;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  will-change: transform, opacity;
}

@keyframes fireflyFloat {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.8);
  }
  15% {
    opacity: 0.9;
    transform: translate(var(--dx1), var(--dy1));
  }
  50% {
    opacity: 1;
    transform: translate(var(--dx1), var(--dy1)) scale(1.2);
  }
  80% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx2), var(--dy2)) scale(0.85);
  }
}

/* 星空粒子背景（画布） */
.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* 点击爆发：粒子 + 圆环 */
.fx-burst {
  position: fixed;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 100;
}

.fx-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 2px solid rgba(200, 255, 154, 0.9);
  box-shadow: 0 0 12px rgba(163, 232, 121, 0.8),
    inset 0 0 8px rgba(163, 232, 121, 0.6);
  animation: fxRing 0.7s ease-out forwards;
}

.fx-particle {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  opacity: 0;
  animation: fxParticle 0.8s ease-out forwards;
}

@keyframes fxRing {
  0% {
    transform: scale(0.2);
    opacity: 1;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes fxParticle {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  70% {
    opacity: 0.9;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.2);
    opacity: 0;
  }
}

/* 鼠标拖尾 */
.trail-dot {
  position: fixed;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: rgba(200, 255, 154, 0.9);
  box-shadow: 0 0 8px 2px rgba(163, 232, 121, 0.55);
  pointer-events: none;
  z-index: 60;
  will-change: transform;
}

/* 页面切换动画 */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(circle at center, rgba(28, 44, 24, 0.96), rgba(7, 9, 15, 0.98));
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.page-transition.done {
  opacity: 0;
}

/* 文字发光（萤火虫绿） */
@keyframes textGlow {
  from {
    text-shadow: 0 0 6px rgba(163, 232, 121, 0.3);
  }
  to {
    text-shadow: 0 0 16px rgba(163, 232, 121, 0.7),
      0 0 36px rgba(163, 232, 121, 0.35);
  }
}

/* 流星划过 */
.meteor {
  position: fixed;
  width: 130px;
  height: 2px;
  background: linear-gradient(90deg, rgba(200, 255, 154, 0.95), rgba(255, 255, 255, 0));
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  z-index: 46;
  animation-name: meteorFly;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}

@keyframes meteorFly {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(-35deg);
  }
  4% {
    opacity: 1;
  }
  16% {
    opacity: 0;
    transform: translate(-340px, 190px) rotate(-35deg);
  }
  100% {
    opacity: 0;
    transform: translate(-340px, 190px) rotate(-35deg);
  }
}

/* 阅读进度条 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, rgba(163, 232, 121, 0.7), #cfff9e);
  box-shadow: 0 0 10px rgba(163, 232, 121, 0.7);
  z-index: 1000;
  pointer-events: none;
}

/* 图片灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(5, 8, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
  animation: lbIn 0.25s ease;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(163, 232, 121, 0.25);
}

.lightbox.out {
  opacity: 0;
  transition: opacity 0.25s;
}

@keyframes lbIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 回到顶部脉冲光效 */
.back-top::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(163, 232, 121, 0.45);
  opacity: 0;
  animation: backTopPulse 2s ease-out infinite;
}

.back-top.show::after {
  opacity: 1;
}

@keyframes backTopPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

/* 电脑端两侧装饰 */
.side-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  pointer-events: none;
  user-select: none;
  writing-mode: vertical-rl;
  font-size: 15px;
  letter-spacing: 8px;
  color: rgba(200, 255, 154, 0.45);
  text-shadow: 0 0 12px rgba(163, 232, 121, 0.3);
  opacity: 0.85;
}

.side-rail.left {
  left: 42px;
}

.side-rail.right {
  right: 42px;
  font-size: 13px;
  letter-spacing: 4px;
  max-height: 70vh;
}

/* ---------- Responsive ---------- */

@media (min-width: 1024px) {
  .container {
    max-width: 860px;
  }
}

@media (max-width: 1199px) {
  .side-rail {
    display: none;
  }
}

@media (max-width: 720px) {
  /* 窄屏下顶部太挤，隐藏实时时钟，并收紧导航间距 */
  .clock {
    display: none;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 14px;
  }

  .site-title {
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  .pinned-card {
    padding: 24px 22px;
  }

  .pinned-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .pinned-avatar {
    width: 52px;
    height: 52px;
  }

  .clock {
    font-size: 11px;
  }

  .search-hero {
    padding: 80px 18px 60px;
  }

  .search-brand {
    font-size: 28px;
  }

  .search-form {
    flex-direction: column;
    gap: 10px;
  }

  .search-btn {
    padding: 12px 0;
  }

  .post-card {
    padding: 22px 20px;
  }

  .article {
    padding: 26px 22px;
  }

  .article-header h1 {
    font-size: 24px;
  }

  .site-nav {
    gap: 16px;
  }

  .back-top {
    right: 16px;
    bottom: 20px;
  }

  .topic-hero {
    padding: 24px 22px;
  }

  .topic-hero h1 {
    font-size: 23px;
  }

  .article-body table {
    font-size: 13.5px;
  }

  .article-body th,
  .article-body td {
    padding: 8px 10px;
  }

  .post-nav a,
  .post-nav .nav-empty {
    flex: 1 1 100%;
  }

  .post-nav .nav-next {
    text-align: left;
  }

  .emote-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }

  .emote-item img {
    width: 82px;
    height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


/* 回到顶部按钮（由 js/site-extra.js 注入） */
.back-to-top{position:fixed;right:22px;bottom:26px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(38,58,44,.55);color:#cfff9e;font-size:20px;line-height:1;cursor:pointer;opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .25s,transform .25s,visibility .25s;z-index:90;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.back-to-top.show{opacity:1;visibility:visible;transform:none}
.back-to-top:hover{background:rgba(38,58,44,.82)}
@media (max-width:600px){.back-to-top{right:14px;bottom:18px;width:40px;height:40px;font-size:18px}}
