:root {
  --card-bg: #f5f5f5;
  --card-shadow: 6px 6px 16px rgba(0, 0, 0, 0.06),
                  -6px -6px 16px rgba(255, 255, 255, 0.9);
  --text-color: #333;
  --link-color: #6a5af9;
  --highlight-color: #ff6ad5;
  --motion-fast: 0.16s;
  --motion-normal: 0.2s;
}

@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #1e1e2f;
    --card-shadow: 6px 6px 16px rgba(0,0,0,0.5),
                   -6px -6px 16px rgba(255,255,255,0.05);
    --text-color: #cdd6f4;
    --link-color: #a89ef8;
    --highlight-color: #ff6ad5;
  }
}

body {
  margin: 0;
  font-family: "Helvetica", "Arial", sans-serif;
  color: var(--text-color);
  background: url("./assets/bg.webp") no-repeat center center fixed;
  background-size: cover;
  padding-top: 70px;
}

.article-layout {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(320px, 360px);
  gap: 28px;
  padding: 30px 20px;
}

/* 给文章主区域加半透明背景 */
.article-main {
  background: rgba(255, 255, 255, 0.85); /* 半透明白色 */
  border-radius: 16px;
  padding: 28px 36px;
  border: 1px solid rgba(106, 90, 249, 0.08);
  box-shadow: 6px 6px 16px rgba(0,0,0,0.06), -6px -6px 16px rgba(0,0,0,0.05); /* 去掉泛白 */
  flex: 1;
  backdrop-filter: blur(12px);
}

.article-main > .article-title,
.article-main > .article-meta,
.article-main > .article-cover,
.article-main > .article-actions,
.article-main > .article-feedback,
.article-main > .article-series-inline,
.article-main > .markdown-body {
  width: min(100%, 84ch);
  margin-left: auto;
  margin-right: auto;
}

.article-main > .article-cover {
  width: min(100%, 88ch);
}

.article-title {
  font-size: 2rem;
  margin-bottom: 10px;
  text-align: center;
}

.article-meta {
  color: #888;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
  justify-content: center;
}

.article-cover {
  width: 100%;
  border-radius: 12px;
  margin: 20px 0 24px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px;
  margin: 0 0 24px;
}

.article-feedback {
  margin: -10px 0 18px;
  min-height: 1.4em;
  color: #7c7c92;
  font-size: 0.92em;
  text-align: left;
}

.article-feedback[data-tone="success"] {
  color: #1f9d54;
}

.article-feedback[data-tone="error"] {
  color: #d14343;
}

.article-series-inline {
  margin: 4px auto 26px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(106, 90, 249, 0.12);
  background: linear-gradient(180deg, rgba(106, 90, 249, 0.08), rgba(106, 90, 249, 0.03));
  box-shadow: 0 12px 28px rgba(106, 90, 249, 0.08);
}

.article-series-inline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.article-series-inline-head h2 {
  margin: 0;
  font-size: 1rem;
  color: #3c3559;
}

.article-series-inline-head p {
  margin: 0;
  color: #7b7495;
  font-size: 0.84rem;
  white-space: nowrap;
}

.article-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(106, 90, 249, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(106, 90, 249, 0.12), rgba(106, 90, 249, 0.05));
  color: #6a5af9;
  font-size: 0.92em;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  box-shadow: 0 8px 20px rgba(106, 90, 249, 0.12);
}

.article-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(106, 90, 249, 0.16);
}

.article-action-btn:active {
  transform: translateY(0) scale(0.98);
}

.article-action-btn:disabled {
  cursor: default;
}

.article-action-btn[data-state="liked"] {
  background: linear-gradient(135deg, #ff6ad5, #ff8f82);
  border-color: transparent;
  color: #fff;
}

.article-action-btn[data-state="working"] {
  opacity: 0.78;
}

.article-action-btn-secondary {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text-color);
  border-color: rgba(106, 90, 249, 0.12);
  box-shadow: none;
}

.article-action-btn-secondary[data-state="read"] {
  border-color: rgba(50, 126, 196, 0.32);
  background: rgba(50, 126, 196, 0.12);
  color: #2f6eb2;
}

.article-action-btn-secondary[data-state="commented"] {
  border-color: rgba(36, 149, 96, 0.34);
  background: rgba(36, 149, 96, 0.14);
  color: #1f915e;
}

.article-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
}

.article-action-count {
  min-width: 1.8em;
  padding: 0.18em 0.56em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.86em;
}

.article-comments {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-comments-layout {
  max-width: 1300px;
  margin: 22px auto 40px;
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(320px, 360px);
  gap: 28px;
  padding: 0 20px;
  scroll-margin-top: calc(var(--site-nav-height, 60px) + 18px);
}

.article-comments-shell {
  grid-column: 1 / 2;
  background: rgba(246, 248, 255, 0.92);
  border-radius: 16px;
  padding: 26px 36px 30px;
  border: 1px solid rgba(106, 90, 249, 0.08);
  border-top-width: 2px;
  border-top-color: rgba(106, 90, 249, 0.18);
  box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.06), -6px -6px 16px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(12px);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.comments-header h2 {
  margin: 0;
  font-size: 1.35em;
}

.comments-caption {
  margin: 6px 0 0;
  color: #7c7c92;
  font-size: 0.94em;
}

.comments-total {
  min-width: 54px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(106, 90, 249, 0.08);
  color: #6a5af9;
  text-align: center;
  font-weight: 700;
}

.comment-form {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(106, 90, 249, 0.12);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 28px rgba(106, 90, 249, 0.07);
}

.comment-form[hidden],
.comment-reply-banner[hidden],
.comments-empty[hidden] {
  display: none;
}

.comment-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-input,
.comment-textarea {
  width: 100%;
  border: 1px solid rgba(106, 90, 249, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-color);
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.comment-input {
  padding: 12px 14px;
}

.comment-textarea {
  min-height: 130px;
  padding: 14px;
  resize: vertical;
  line-height: 1.7;
}

.comment-input:focus,
.comment-textarea:focus {
  outline: none;
  border-color: rgba(106, 90, 249, 0.42);
  box-shadow: 0 0 0 4px rgba(106, 90, 249, 0.1);
}

.comment-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(106, 90, 249, 0.08);
  color: #6a5af9;
  font-size: 0.92em;
}

.comment-reply-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.comment-reply-cancel {
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(106, 90, 249, 0.08);
  color: inherit;
  cursor: pointer;
  font-weight: 600;
}

.comment-reply-return {
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #4c3de0;
  cursor: pointer;
  font-weight: 600;
}

.comment-card.is-reply-origin-focus {
  border-color: rgba(80, 133, 255, 0.58);
  box-shadow:
    0 28px 44px rgba(64, 95, 201, 0.22),
    0 0 0 4px rgba(158, 194, 255, 0.22);
}

.comment-helper {
  margin: 2px 0 10px;
  color: #7c7c92;
  font-size: 0.86em;
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
}

.comment-optin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #7c7c92;
  font-size: 0.88em;
  flex: 1 1 100%;
}

.comment-optin input {
  width: 14px;
  height: 14px;
}

.comment-feedback {
  margin: 0;
  min-height: 1.4em;
  color: #7c7c92;
  font-size: 0.92em;
}

.comment-feedback[data-tone="success"] {
  color: #1f9d54;
}

.comment-feedback[data-tone="error"] {
  color: #d14343;
}

.comment-submit-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6a5af9, #ff6ad5);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
  box-shadow: 0 12px 22px rgba(106, 90, 249, 0.22);
}

.comment-submit-btn:hover {
  transform: translateY(-1px);
}

.comment-submit-btn:disabled {
  opacity: 0.72;
  cursor: progress;
}

.comments-empty {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(106, 90, 249, 0.04);
  color: #7c7c92;
  text-align: center;
}

.comments-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.comments-pagination {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.comments-pagination[hidden] {
  display: none;
}

.comments-page-btn {
  border: 1px solid rgba(106, 90, 249, 0.2);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-color);
  padding: 6px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.86em;
  cursor: pointer;
}

.comments-page-btn:disabled {
  opacity: 0.56;
  cursor: default;
}

.comments-page-meta {
  color: #8b88a7;
  font-size: 0.84em;
}

.comment-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(106, 90, 249, 0.12);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 28px rgba(106, 90, 249, 0.06);
  scroll-margin-top: calc(var(--site-nav-height, 60px) + 18px);
}

.comment-card.is-focused {
  border-color: rgba(52, 129, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(240, 247, 255, 0.98), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.92);
  transform: translateY(-2px);
  box-shadow:
    0 20px 34px rgba(49, 103, 185, 0.2),
    0 0 0 5px rgba(137, 186, 255, 0.26);
}

.comment-focus-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f6dff, #57a1ff);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 18px rgba(47, 109, 255, 0.24);
}

.comment-card.is-reply {
  background: rgba(106, 90, 249, 0.04);
}

.comment-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6a5af9, #ff6ad5);
}

.comment-meta {
  min-width: 0;
}

.comment-author {
  font-weight: 700;
}

.comment-date {
  margin-top: 3px;
  color: #8b88a7;
  font-size: 0.82em;
}

.comment-interaction-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.comment-interaction-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.comment-interaction-badge.is-reply {
  background: rgba(106, 90, 249, 0.12);
  color: #5e49c7;
}

.comment-interaction-badge.is-like {
  background: rgba(255, 106, 213, 0.14);
  color: #c8439f;
}

.comment-interaction-badge.is-notice {
  background: rgba(32, 152, 97, 0.14);
  color: #1b8f5d;
}

.comment-body {
  color: var(--text-color);
}

.comment-reply-target {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(106, 90, 249, 0.08);
  color: #6a5af9;
  font-size: 0.82em;
}

.comment-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.comment-action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #666;
  cursor: pointer;
  font: inherit;
  font-size: 0.86em;
  font-weight: 600;
  transition: transform var(--motion-fast) ease, background var(--motion-fast) ease, color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.comment-action-button:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.14);
}

.comment-action-button:disabled {
  cursor: default;
}

.comment-action-button[data-state="liked"] {
  background: #6a5af9;
  border-color: #6a5af9;
  color: #fff;
}

.comment-action-button-secondary {
  color: var(--text-color);
}

.comment-children {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid rgba(106, 90, 249, 0.12);
}

.article-sidebar {
  background: none; /* 去掉大框背景 */
  padding: 0;       /* 去掉整体内边距，让卡片自己撑开 */
  display: grid;
  gap: 20px;
  align-self: start;
}


.sidebar-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(106, 90, 249, 0.08);
  box-shadow: 6px 6px 16px rgba(0,0,0,0.06), -6px -6px 16px rgba(0,0,0,0.05);
  backdrop-filter: blur(12px);
}

.sidebar-section[hidden] {
  display: none;
}

.sidebar-card h3 {
  font-size: 1.1em;
  margin: 0 0 14px 0;
  color: var(--text-color);
  font-weight: 700;
  border-bottom: 2px solid rgba(106, 90, 249, 0.2);
  padding-bottom: 8px;
}

.sidebar-card p {
  margin: 10px 0;
  font-size: 0.95em;
  line-height: 1.6;
}

/* 统计卡片 */
.stats-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.stat-item {
  text-align: center;
  padding: 14px 10px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  transition: transform var(--motion-normal) ease, box-shadow var(--motion-normal) ease, border-color var(--motion-normal) ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  border-color: rgba(106, 90, 249, 0.24);
  box-shadow: 0 8px 20px rgba(106, 90, 249, 0.12);
}

.stat-item .stat-number {
  font-size: 1.45em;
  font-weight: 700;
  color: #6a5af9;
  display: block;
}

.stat-item .stat-label {
  font-size: 0.78em;
  color: #888;
  margin-top: 4px;
}

/* 相关文章卡片 */
.related-article {
  display: block;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(106, 90, 249, 0.05), rgba(106, 90, 249, 0.02));
  border: 1px solid rgba(106, 90, 249, 0.1);
  border-left: 3px solid #6a5af9;
  border-radius: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.related-article:hover {
  background: rgba(106, 90, 249, 0.1);
  transform: translateX(-6px);
  border-color: rgba(106, 90, 249, 0.22);
  box-shadow: 0 10px 24px rgba(106, 90, 249, 0.14);
}

.related-article-title {
  font-size: 0.9em;
  font-weight: 600;
  color: #6a5af9;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-article-meta {
  font-size: 0.75em;
  color: #999;
}

.series-nav-list {
  display: grid;
  gap: 10px;
}

.series-entry {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(106, 90, 249, 0.12);
  background: linear-gradient(180deg, rgba(106, 90, 249, 0.06), rgba(106, 90, 249, 0.02));
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.series-entry:hover {
  transform: translateX(-4px);
  border-color: rgba(106, 90, 249, 0.22);
  box-shadow: 0 10px 22px rgba(106, 90, 249, 0.12);
}

.series-entry.is-current {
  border-color: rgba(106, 90, 249, 0.24);
  background: linear-gradient(180deg, rgba(106, 90, 249, 0.14), rgba(106, 90, 249, 0.06));
  box-shadow: 0 10px 22px rgba(106, 90, 249, 0.12);
}

.series-entry-title {
  display: block;
  font-size: 0.88em;
  font-weight: 600;
  color: #6a5af9;
  line-height: 1.45;
}

.series-entry-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.74em;
  color: #8f8ca6;
}

/* 分享按钮 */
.share-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.share-btn {
  padding: 10px 8px;
  border: 1px solid rgba(106, 90, 249, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(106, 90, 249, 0.12), rgba(106, 90, 249, 0.05));
  color: #6a5af9;
  text-decoration: none;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  text-align: center;
  box-shadow: 0 6px 16px rgba(106, 90, 249, 0.1);
}

.share-btn:hover {
  background: #6a5af9;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(106, 90, 249, 0.22);
}

.share-btn:active {
  transform: translateY(0) scale(0.98);
}

.share-btn[data-state="success"] {
  background: #27c93f;
  border-color: #27c93f;
  color: #fff;
}

.share-btn[data-state="active"] {
  background: #ff6ad5;
  border-color: #ff6ad5;
  color: #fff;
}

.back-home {
  text-decoration: none;
  font-size: 15px;
  color: var(--text-color);
}

/* TOC 样式 */
#toc { font-size: 14px; line-height: 1.6; }
.toc-list { list-style: none; padding-left: 0; margin: 0; }
.toc-item.level-h1 { margin-left: 0; }
.toc-item.level-h2 { margin-left: 12px; }
.toc-item.level-h3 { margin-left: 24px; }

.toc-item a {
  text-decoration: none;
  color: var(--text-color);
  padding: 4px 0;
  display: block;
  transition: 0.2s;
}

.toc-item a:hover { color: var(--link-color); }
.toc-item a.active { color: var(--highlight-color); font-weight: bold; }

/* 标签列表容器 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;           /* 标签间距 */
  margin-top: 6px;
}

/* 单个标签样式 */
.tag-list .tag {
  display: inline-flex;          /* 使用 flex 方便垂直居中 */
  align-items: center;           /* 垂直居中内容 */
  justify-content: center;       /* 水平居中内容 */
  font-size: 12px;
  line-height: 1;                /* 统一行高，避免中文英文差异 */
  padding: 4px 10px;             /* 上下左右内边距 */
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-color);
  white-space: nowrap;           /* 防止中文自动换行 */
  transition: transform 0.2s, box-shadow 0.2s; /* 悬停动画 */
  cursor: default;
}

/* 标签悬停效果 */
.tag-list .tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 响应式：小屏幕自动换行 */
@media (max-width: 600px) {
  .tag-list {
    gap: 6px;
  }
  .tag-list .tag {
    font-size: 11px;
    padding: 3px 8px;
  }
}


/* 阅读进度条 */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, #6a5af9, #ff6ad5);
  z-index: 9999;
  transition: width 0.15s linear;
}

.toc a {
  transition: color 0.3s, background 0.3s;
}

.toc a.active {
  color: #ff4a4a;
  font-weight: bold;
}

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 320px);
    gap: 20px;
  }
  .article-comments-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 320px);
    gap: 20px;
  }
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { width: 100%; }
  .article-comments-layout {
    grid-template-columns: 1fr;
  }
  .article-comments-shell {
    grid-column: 1 / 2;
    padding: 22px;
  }
  .stats-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
  }
  .stat-item {
    padding: 10px 6px;
  }
  .stat-item .stat-number {
    font-size: 1.05em;
  }
  .stat-item .stat-label {
    font-size: 0.72em;
  }
  .comments-header,
  .comment-form-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .comment-form-row {
    flex-direction: column;
  }
  .comment-reply-actions {
    width: 100%;
    margin-left: 0;
  }
  .comment-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .share-buttons {
    gap: 8px;
  }
  .share-btn {
    padding: 9px 6px;
    font-size: 0.76em;
  }
  .share-modal-actions {
    grid-template-columns: 1fr;
  }
  .article-main {
    padding: 20px 18px;
  }
  .article-comments-shell {
    padding: 18px;
  }
  .article-actions {
    flex-direction: column;
  }
  .article-action-btn {
    width: 100%;
    justify-content: center;
  }
  .comment-card.is-reply {
    margin-left: 10px !important;
  }
  .comment-children {
    padding-left: 10px;
  }
  .comment-form {
    padding: 16px;
  }
}

.share-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 20, 34, 0.6);
  backdrop-filter: blur(6px);
  z-index: 9999;
}

.share-modal-panel {
  width: min(92vw, 380px);
  padding: 22px;
  border-radius: 20px;
  text-align: center;
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(106, 90, 249, 0.12);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

.share-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(106, 90, 249, 0.12);
  color: #5d4fd1;
  font-size: 0.74rem;
  font-weight: 700;
}

.share-modal-title {
  margin: 0;
  color: #45397f;
  font-size: 1.06rem;
  line-height: 1.5;
}

.share-modal-image-wrap {
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(106, 90, 249, 0.14), rgba(255, 255, 255, 0.92));
}

.share-modal-image {
  width: 220px;
  height: 220px;
  display: block;
  border-radius: 14px;
  background: #fff;
}

.share-modal-text {
  margin: 0;
  color: #666;
}

.share-modal-link {
  margin: 0;
  font-size: 0.76rem;
  color: #867fb1;
  word-break: break-all;
}

.share-modal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.share-modal-btn {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(106, 90, 249, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #5d4fd1;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.share-modal-btn-secondary {
  background: rgba(106, 90, 249, 0.08);
}

.share-modal-close {
  border-color: transparent;
  background: #6a5af9;
  color: #fff;
}

/* Markdown 渲染内容通用样式 */
.markdown-body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.82;
  font-size: 16px;
  color: var(--text-color, #333);
  max-width: 84ch;
  margin-left: auto;
  margin-right: auto;
}

/* 标题样式 */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-color);
}

/* H1：渐变底线 */
.markdown-body h1 {
  font-size: 1.85em;
  padding-bottom: 0.35em;
  position: relative;
}
.markdown-body h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, #6a5af9, #ff6ad5, transparent);
  border-radius: 2px;
}

/* H2：左侧色条 */
.markdown-body h2 {
  font-size: 1.45em;
  padding: 6px 14px;
  border-left: 4px solid #6a5af9;
  background: rgba(106, 90, 249, 0.04);
  border-radius: 0 8px 8px 0;
}

/* H3：细竖线 */
.markdown-body h3 {
  font-size: 1.2em;
  padding-left: 10px;
  position: relative;
}
.markdown-body h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1em;
  background: linear-gradient(180deg, #6a5af9, #ff6ad5);
  border-radius: 2px;
}

.markdown-body h4 {
  font-size: 1.05em;
  color: #6a5af9;
}

.markdown-body h5 {
  font-size: 0.95em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.markdown-body h6 {
  font-size: 0.9em;
  color: #aaa;
}

/* 段落 */
.markdown-body p {
  margin: 0.9em 0;
}

/* 列表 */
.markdown-body ul,
.markdown-body ol {
  margin: 0.8em 0 0.8em 1.5em;
  padding-left: 0.4em;
}

.markdown-body li {
  margin: 0.3em 0;
  line-height: 1.75;
}

/* 表格 */
.markdown-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5em 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.markdown-body th {
  background: linear-gradient(135deg, #6a5af9 0%, #9b8fff 100%);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.92em;
  letter-spacing: 0.02em;
  border: none;
}

.markdown-body td {
  padding: 9px 14px;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.93em;
}

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

.markdown-body tbody tr:nth-child(even) td {
  background: rgba(106, 90, 249, 0.03);
}

.markdown-body tbody tr:hover td {
  background: rgba(106, 90, 249, 0.07);
  transition: background 0.15s;
}

/* 引用 */
.markdown-body blockquote {
  border-left: 4px solid #6a5af9;
  background: rgba(106, 90, 249, 0.05);
  padding: 14px 22px 14px 20px;
  margin: 1.5em 0;
  border-radius: 0 10px 10px 0;
  color: #666;
  font-style: italic;
  position: relative;
}

.markdown-body blockquote::before {
  content: "\201C";
  position: absolute;
  top: -4px;
  left: 10px;
  font-size: 3em;
  color: #6a5af9;
  opacity: 0.15;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.markdown-body blockquote p {
  margin: 0.3em 0;
}

/* 代码块 */
.markdown-body pre {
  position: relative;
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  padding-top: 32px;
  overflow-x: auto;
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  font-size: 14px;
  color: #333;
  transition: box-shadow 0.3s ease;
}

/* 顶栏由 JS 注入的 .code-dots-bar 处理，::before 停用以避免双层渲染 */
.markdown-body pre::before {
  content: none;
}

/* 代码块顶部圆点 */
.markdown-body pre .code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.markdown-body pre .code-dots span:nth-child(1) { background: #ff5f56; }
.markdown-body pre .code-dots span:nth-child(2) { background: #ffbd2e; }
.markdown-body pre .code-dots span:nth-child(3) { background: #27c93f; }

/* 悬停动画 */
.markdown-body pre:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.markdown-body pre:hover .code-dots span {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 代码内容 */
.markdown-body pre code {
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.6;
}

/* 行内代码 */
.markdown-body code:not(pre code) {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  padding: 0.15em 0.5em;
  border-radius: 5px;
  background: rgba(106, 90, 249, 0.08);
  color: #6a5af9;
  border: 1px solid rgba(106, 90, 249, 0.18);
  white-space: nowrap;
}

 /* 代码块顶部栏容器 */
.markdown-body pre .code-dots-bar {
  display: flex;
  justify-content: space-between; /* 左右两端对齐 */
  align-items: center;
  height: 24px;
  padding: 0 10px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #e0e0e0;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-sizing: border-box;
}

.markdown-body pre .code-dots {
  display: flex;
  gap: 6px; /* 圆点间距 */
}

.markdown-body pre .code-left-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.markdown-body pre .copy-btn {
  background: none;
  border: none;
  color: #333;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.7;
  transition: 0.2s;
  user-select: none;
}

.markdown-body pre:hover .copy-btn {
  opacity: 1;
}

.markdown-body pre .copy-btn.copied {
  color: #27c93f; /* 绿色 */
}




/* 语言标签 */
.markdown-body pre .lang-label {
  font-size: 11px;
  color: #777;
  padding: 1px 7px;
  line-height: 1.2;
  margin-left: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.6);
  font-family: 'SFMono-Regular', Consolas, monospace;
  user-select: none;
  letter-spacing: 0.03em;
}


/* 图片、视频、iframe */
.markdown-body img,
.markdown-body video,
.markdown-body iframe {
  max-width: 100%;
  display: block;
  margin: 1.5em auto;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.markdown-body img {
  cursor: zoom-in;
}

.markdown-body img.article-zoomable {
  position: relative;
}

.markdown-body img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.article-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 12, 24, 0.72);
  backdrop-filter: blur(10px);
}

.article-image-lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(1100px, 100%);
  max-height: 100%;
  padding: 18px 18px 14px;
  border-radius: 22px;
  background: rgba(245, 248, 255, 0.96);
  border: 1px solid rgba(106, 90, 249, 0.14);
  box-shadow: 0 24px 60px rgba(10, 18, 42, 0.26);
}

.article-image-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.68);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.article-image-lightbox-figure {
  margin: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.article-image-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: min(78vh, 920px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(18, 28, 56, 0.18);
  cursor: zoom-out;
}

.article-image-lightbox-caption {
  max-width: min(760px, 100%);
  margin: 0;
  color: #5a6586;
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
}

/* 高亮文字 */
.markdown-body mark,
.markdown-body .highlight {
  background: linear-gradient(120deg, #fff3a7 0%, #ffe566 100%);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: #444;
}

/* 链接 */
.markdown-body a {
  color: #6a5af9;
  text-decoration: none;
  border-bottom: 1px dotted rgba(106, 90, 249, 0.4);
  transition: color 0.2s, border-color 0.2s;
}

.markdown-body a:hover {
  color: #ff6ad5;
  border-bottom: 1px solid #ff6ad5;
}

/* 分割线 */
.markdown-body hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #6a5af9 30%, #ff6ad5 70%, transparent 100%);
  margin: 2.5em 0;
  border-radius: 2px;
}


/* === 深色模式补充 === */
@media (prefers-color-scheme: dark) {
  body { color-scheme: dark; }

  .article-main {
    background: rgba(16, 16, 30, 0.92);
  }

  .article-comments-shell {
    background: rgba(11, 11, 23, 0.94);
    border-color: rgba(168, 158, 248, 0.14);
    border-top-color: rgba(168, 158, 248, 0.22);
  }

  .article-action-btn {
    border-color: rgba(168, 158, 248, 0.24);
    background: rgba(106, 90, 249, 0.14);
    color: #cdd6f4;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  }

  .article-action-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #cdd6f4;
    border-color: rgba(255, 255, 255, 0.08);
  }

  .article-action-count {
    background: rgba(255, 255, 255, 0.12);
  }

  .article-action-btn[data-state="liked"] {
    color: #fff;
  }

  .article-meta { color: #9ba6c3; }

  .article-comments {
    border-top-color: rgba(168, 158, 248, 0.16);
  }

  .comments-caption,
  .comment-feedback,
  .comment-date,
  .comments-empty {
    color: #9ba6c3;
  }

  .comments-total {
    background: rgba(106, 90, 249, 0.18);
    color: #cdd6f4;
  }

  .comment-form {
    background: rgba(21, 23, 37, 0.92);
    border-color: rgba(168, 158, 248, 0.14);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  }

  .comment-input,
  .comment-textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(168, 158, 248, 0.14);
    color: #cdd6f4;
  }
  .comment-action-button {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #8b8fa8;
  }

  .comment-reply-banner,
  .comment-reply-target,
  .comments-empty {
    background: rgba(106, 90, 249, 0.12);
    color: #cdd6f4;
  }

  .comment-submit-btn {
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
  }

  .comment-card {
    background: rgba(21, 23, 37, 0.88);
    border-color: rgba(168, 158, 248, 0.14);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
  }

  .comment-card.is-reply {
    background: rgba(106, 90, 249, 0.08);
  }

  .comment-children {
    border-left-color: rgba(168, 158, 248, 0.16);
  }

  .comment-action-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
  }

  .comment-action-button[data-state="liked"] {
    color: #fff;
  }

  .sidebar-card {
    background: rgba(25, 25, 42, 0.92);
  }

  .sidebar-card h3 {
    border-bottom-color: rgba(168, 158, 248, 0.2);
    color: #cdd6f4;
  }

  .sidebar-card p strong { color: #a89ef8; }

  /* 统计卡片 */
  .stat-item {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  .stat-item .stat-number {
    color: #a89ef8;
  }

  .stat-item .stat-label {
    color: #999;
  }

  /* 相关文章 */
  .related-article {
    background: rgba(106, 90, 249, 0.06) !important;
    border-left-color: #7260d8;
  }

  .related-article:hover {
    background: rgba(106, 90, 249, 0.12) !important;
    border-color: rgba(168, 158, 248, 0.26);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  }

  .related-article-title {
    color: #a89ef8;
  }

  .related-article-meta {
    color: #888;
  }

  /* 分享按钮 */
  .share-btn {
    border-color: rgba(106, 90, 249, 0.3) !important;
    background: rgba(106, 90, 249, 0.1) !important;
    color: #a89ef8 !important;
  }

  .share-btn:hover {
    background: #6a5af9 !important;
    color: #fff !important;
  }

  .share-btn[data-state="success"] {
    background: #27c93f !important;
    border-color: #27c93f !important;
    color: #fff !important;
  }

  .share-btn[data-state="active"] {
    background: #ff6ad5 !important;
    border-color: #ff6ad5 !important;
    color: #fff !important;
  }

  .share-modal-panel {
    background: rgba(22, 24, 38, 0.96);
    border-color: rgba(168, 158, 248, 0.18);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  }

  .share-modal-badge {
    background: rgba(168, 158, 248, 0.16);
    color: #d0d7f4;
  }

  .share-modal-title {
    color: #f1f4ff;
  }

  .share-modal-image-wrap {
    background: radial-gradient(circle at top, rgba(168, 158, 248, 0.18), rgba(32, 35, 56, 0.92));
  }

  .share-modal-image {
    background: #fff;
  }

  .share-modal-text {
    color: #aeb7d0;
  }

  .share-modal-link {
    color: #99a4c7;
  }

  .share-modal-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(168, 158, 248, 0.2);
    color: #d5dbf5;
  }

  .share-modal-close {
    background: #7260d8;
  }

  /* 行内代码 */
  .markdown-body code:not(pre code) {
    background: rgba(106, 90, 249, 0.18);
    color: #a89ef8;
    border-color: rgba(106, 90, 249, 0.3);
  }

  /* H2 左侧背景 */
  .markdown-body h2 {
    background: rgba(106, 90, 249, 0.09);
  }

  .markdown-body h4 { color: #a89ef8; }

  .markdown-body h5,
  .markdown-body h6 { color: #8b949e; }

  /* 引用块 */
  .markdown-body blockquote {
    color: #999;
    background: rgba(106, 90, 249, 0.07);
  }

  /* 表格 */
  .markdown-body th {
    background: linear-gradient(135deg, #4a3ab9, #7260d8);
  }

  .markdown-body td {
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }

  .markdown-body tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
  }

  .markdown-body tbody tr:hover td {
    background: rgba(106, 90, 249, 0.1);
  }

  /* 代码块 */
  .markdown-body pre {
    background-color: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
  }

  .markdown-body pre .code-dots-bar {
    background-color: #161b22;
  }

  .markdown-body pre .copy-btn {
    color: #9da5b4;
  }

  .markdown-body pre .lang-label {
    background: rgba(255, 255, 255, 0.1);
    color: #8b949e;
  }

  /* 高亮文字深色下保持可读 */
  .markdown-body mark,
  .markdown-body .highlight {
    color: #222;
  }

  /* 链接 */
  .markdown-body a {
    color: #a89ef8;
    border-bottom-color: rgba(168, 158, 248, 0.4);
  }

  .markdown-body a:hover {
    color: #ff81e0;
    border-bottom-color: #ff81e0;
  }
}

/* === 手动深色模式（🌓 切换按鈕）=== */
body.dark-mode {
  --card-bg: #1e1e2f;
  --card-shadow: 6px 6px 16px rgba(0,0,0,0.5),
                 -6px -6px 16px rgba(255,255,255,0.05);
  --text-color: #cdd6f4;
  --link-color: #a89ef8;
  --highlight-color: #ff6ad5;
  color-scheme: dark;

  & .article-main { background: rgba(16, 16, 30, 0.92); }

  & .article-meta { color: #9ba6c3; }

  & .article-comments-shell {
    background: rgba(11, 11, 23, 0.94);
    border-color: rgba(168, 158, 248, 0.14);
    border-top-color: rgba(168, 158, 248, 0.22);
  }

  & .article-action-btn {
    border-color: rgba(168, 158, 248, 0.24);
    background: rgba(106, 90, 249, 0.14);
    color: #cdd6f4;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  }

  & .article-action-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #cdd6f4;
    border-color: rgba(255, 255, 255, 0.08);
  }

  & .article-action-count { background: rgba(255, 255, 255, 0.12); }
  & .article-action-btn[data-state="liked"] { color: #fff; }
  & .article-comments { border-top-color: rgba(168, 158, 248, 0.16); }

  & .comments-caption,
  & .comment-feedback,
  & .comment-date,
  & .comments-empty { color: #9ba6c3; }

  & .comments-total {
    background: rgba(106, 90, 249, 0.18);
    color: #cdd6f4;
  }

  & .comment-form {
    background: rgba(21, 23, 37, 0.92);
    border-color: rgba(168, 158, 248, 0.14);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  }

  & .comment-input,
  & .comment-textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(168, 158, 248, 0.14);
    color: #cdd6f4;
  }

  & .comment-action-button {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #8b8fa8;
  }

  & .comment-action-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
  }

  & .comment-action-button[data-state="liked"] { color: #fff; }

  & .comment-reply-banner,
  & .comment-reply-target {
    background: rgba(106, 90, 249, 0.12);
    color: #cdd6f4;
  }

  & .comment-submit-btn { box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28); }

  & .comment-card {
    background: rgba(21, 23, 37, 0.88);
    border-color: rgba(168, 158, 248, 0.14);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
  }

  & .comment-card.is-focused {
    border-color: rgba(120, 174, 255, 0.5);
    background:
      linear-gradient(180deg, rgba(23, 35, 54, 0.98), rgba(18, 24, 40, 0.94)),
      rgba(21, 23, 37, 0.96);
    box-shadow:
      0 22px 34px rgba(4, 12, 24, 0.4),
      0 0 0 5px rgba(62, 112, 196, 0.28);
  }

  & .comment-focus-badge {
    background: linear-gradient(135deg, #4b86ff, #77b4ff);
    color: #081120;
    box-shadow: 0 12px 18px rgba(52, 103, 186, 0.28);
  }

  & .comment-card.is-reply { background: rgba(106, 90, 249, 0.08); }
  & .comment-children { border-left-color: rgba(168, 158, 248, 0.16); }

  & .sidebar-card { background: rgba(25, 25, 42, 0.92); }

  & .sidebar-card h3 {
    border-bottom-color: rgba(168, 158, 248, 0.2);
    color: #cdd6f4;
  }

  & .sidebar-card p strong { color: #a89ef8; }

  & .stat-item {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  & .stat-item .stat-number { color: #a89ef8; }
  & .stat-item .stat-label { color: #999; }

  & .related-article {
    background: rgba(106, 90, 249, 0.06) !important;
    border-left-color: #7260d8;
  }

  & .related-article:hover {
    background: rgba(106, 90, 249, 0.12) !important;
    border-color: rgba(168, 158, 248, 0.26);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  }

  & .related-article-title { color: #a89ef8; }
  & .related-article-meta { color: #888; }

  & .share-btn {
    border-color: rgba(106, 90, 249, 0.3) !important;
    background: rgba(106, 90, 249, 0.1) !important;
    color: #a89ef8 !important;
  }

  & .share-btn:hover {
    background: #6a5af9 !important;
    color: #fff !important;
  }

  & .share-btn[data-state="success"] {
    background: #27c93f !important;
    border-color: #27c93f !important;
    color: #fff !important;
  }

  & .share-btn[data-state="active"] {
    background: #ff6ad5 !important;
    border-color: #ff6ad5 !important;
    color: #fff !important;
  }

  & .share-modal-panel {
    background: rgba(22, 24, 38, 0.96);
    border-color: rgba(168, 158, 248, 0.18);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  }

  & .share-modal-badge {
    background: rgba(168, 158, 248, 0.16);
    color: #d0d7f4;
  }

  & .share-modal-title {
    color: #f1f4ff;
  }

  & .share-modal-image-wrap {
    background: radial-gradient(circle at top, rgba(168, 158, 248, 0.18), rgba(32, 35, 56, 0.92));
  }

  & .share-modal-image { background: #fff; }
  & .share-modal-text { color: #aeb7d0; }
  & .share-modal-link { color: #99a4c7; }
  & .share-modal-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(168, 158, 248, 0.2);
    color: #d5dbf5;
  }
  & .share-modal-close { background: #7260d8; }

  & .markdown-body code:not(pre code) {
    background: rgba(106, 90, 249, 0.18);
    color: #a89ef8;
    border-color: rgba(106, 90, 249, 0.3);
  }

  & .markdown-body h2 { background: rgba(106, 90, 249, 0.09); }
  & .markdown-body h4 { color: #a89ef8; }

  & .markdown-body h5,
  & .markdown-body h6 { color: #8b949e; }

  & .markdown-body blockquote {
    color: #999;
    background: rgba(106, 90, 249, 0.07);
  }

  & .markdown-body th { background: linear-gradient(135deg, #4a3ab9, #7260d8); }
  & .markdown-body td { border-bottom-color: rgba(255, 255, 255, 0.06); }
  & .markdown-body tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.03); }
  & .markdown-body tbody tr:hover td { background: rgba(106, 90, 249, 0.1); }

  & .markdown-body pre {
    background-color: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
  }

  & .markdown-body pre .code-dots-bar { background-color: #161b22; }
  & .markdown-body pre .copy-btn { color: #9da5b4; }

  & .markdown-body pre .lang-label {
    background: rgba(255, 255, 255, 0.1);
    color: #8b949e;
  }

  & .markdown-body mark,
  & .markdown-body .highlight { color: #222; }

  & .markdown-body a {
    color: #a89ef8;
    border-bottom-color: rgba(168, 158, 248, 0.4);
  }

  & .markdown-body a:hover {
    color: #ff81e0;
    border-bottom-color: #ff81e0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
