/* 晴空浅蓝：Butterfly 外观覆盖，不修改主题源码，便于后续升级 */
:root {
  --fresh-ink: #29455f;
  --fresh-muted: #6f8499;
  --fresh-mint: #5baeea;
  --fresh-mint-deep: #3189cb;
  --fresh-glass: rgba(252, 254, 255, 0.76);
  --fresh-line: rgba(255, 255, 255, 0.62);
  --card-bg: var(--fresh-glass);
  --font-color: var(--fresh-ink);
  --card-meta: var(--fresh-muted);
  --btn-bg: var(--fresh-mint);
  --btn-hover-color: var(--fresh-mint-deep);
  --scrollbar-color: var(--fresh-mint);
  --card-box-shadow: 0 12px 32px rgba(52, 112, 157, 0.13);
  --card-hover-box-shadow: 0 18px 40px rgba(52, 112, 157, 0.2);
}

body {
  background: #eaf6ff;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

/* 为背景增加一层淡奶白遮罩，令内容在风景上仍清晰易读 */
#web_bg::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232, 246, 255, 0.44), rgba(225, 240, 253, 0.24));
  content: "";
}

#nav {
  background: linear-gradient(100deg, rgba(46, 111, 161, 0.68), rgba(91, 174, 234, 0.48));
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 8px 28px rgba(34, 96, 145, 0.15);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
}

#page-header.not-top-img {
  background: transparent;
}

#page-header.not-top-img #page-site-info,
#page-header.not-top-img #post-info {
  text-shadow: 0 2px 12px rgba(25, 84, 130, 0.34);
}

#nav .site-name {
  letter-spacing: 0.08em;
}

#nav .site-icon {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(16, 72, 116, 0.2);
  object-fit: cover;
}

#nav .site-page::after {
  border-radius: 999px;
  background: #d8efff;
}

/* 页脚采用居中版权与简洁链接的双行布局 */
#footer {
  margin-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  background-image: linear-gradient(100deg, rgba(35, 102, 153, 0.9), rgba(72, 153, 211, 0.82)), url("/img/jiangnan-tech-mist.png");
  background-position: center 58%;
  background-size: cover;
  box-shadow: 0 -10px 32px rgba(40, 105, 153, 0.14);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

#footer .footer-other {
  padding: 24px 20px 22px;
  letter-spacing: 0.035em;
}

#footer .footer_custom_text {
  margin-top: 9px;
  color: rgba(239, 249, 255, 0.88);
  font-size: 0.9em;
}

#footer .footer-about {
  position: relative;
  padding: 2px 3px;
  color: rgba(244, 252, 255, 0.94);
  letter-spacing: 0.06em;
  transition: color 0.25s ease;
}

#footer .footer-about::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.86);
  content: "";
  transform: scaleX(0.45);
  transform-origin: center;
  transition: transform 0.25s ease;
}

#footer .footer-about:hover {
  color: #fff;
}

#footer .footer-about:hover::after {
  transform: scaleX(1);
}

#footer a:hover {
  color: #eff9ff;
}

/* 首页载入：浅蓝色双幕与旋转光环 */
#loading-box .loading-left-bg,
#loading-box .loading-right-bg { background: linear-gradient(135deg, #e8f6ff, #a9daf8); }
#loading-box .spinner-box .configure-border-1 { background: #5baeea; box-shadow: 0 0 22px rgba(91, 174, 234, 0.42); }
#loading-box .spinner-box .configure-border-2 { background: #b9e2fb; }
#loading-box .spinner-box .configure-core { background: #ecf8ff; }
#loading-box .spinner-box .loading-word { color: #3189cb; font-weight: 600; }

.layout > div:first-child:not(.nc),
#aside-content .card-widget,
#recent-posts .recent-post-item,
#pagination .page-number,
#pagination .extend {
  border: 1px solid var(--fresh-line);
  background: var(--fresh-glass);
  box-shadow: var(--card-box-shadow);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.layout > div:first-child:not(.nc),
#aside-content .card-widget,
#recent-posts .recent-post-item {
  border-radius: 18px;
}

#recent-posts .recent-post-item {
  overflow: hidden;
}

#recent-posts .recent-post-item:hover,
#aside-content .card-widget:hover,
.layout > div:first-child:not(.nc):hover {
  transform: translateY(-4px);
}

#aside-content .card-widget {
  padding: 22px 22px;
}

#aside-content .card-info {
  background: linear-gradient(145deg, rgba(226, 244, 255, 0.68), rgba(255, 255, 255, 0.42));
}

#aside-content .card-info .avatar-img {
  border: 3px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 18px rgba(61, 135, 189, 0.25);
}

#aside-content .item-headline,
#aside-content .card-info .author-info-name {
  color: var(--fresh-mint-deep);
}

#aside-content .aside-list-item:not(:last-child) {
  border-bottom-color: rgba(79, 150, 202, 0.2);
}

#recent-posts .recent-post-item .post_cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(34, 105, 161, 0.12), transparent 72%);
  content: "";
  pointer-events: none;
}

#recent-posts .recent-post-item .article-title,
#article-container a {
  color: var(--fresh-mint-deep);
}

/* 代码块：启用 Butterfly 的 macStyle 后，补齐更接近 macOS 的窗口质感 */
.container figure.highlight {
  overflow: hidden;
  border: 1px solid rgba(142, 197, 232, 0.34);
  border-radius: 12px;
  background: #fbfdfc;
  box-shadow: 0 12px 28px rgba(39, 102, 151, 0.2);
}

.container figure.highlight .highlight-tools {
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(55, 87, 77, 0.12);
  background: linear-gradient(180deg, #ffffff, #eef5f1);
  color: #647f95;
}

.container figure.highlight .highlight-tools .macStyle {
  padding: 4px 5px;
}

.container figure.highlight .highlight-tools .macStyle > * {
  width: 12px;
  height: 12px;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.14);
}

.container figure.highlight .highlight-tools .code-lang {
  color: #66819a;
  font-size: 0.82em;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.container figure.highlight .highlight-tools .copy-button,
.container figure.highlight .highlight-tools .expand,
.container figure.highlight .highlight-tools .fullpage-button {
  margin-left: 4px;
  padding: 6px;
  border-radius: 7px;
}

.container figure.highlight .highlight-tools .copy-button:hover,
.container figure.highlight .highlight-tools .expand:hover,
.container figure.highlight .highlight-tools .fullpage-button:hover {
  background: rgba(91, 174, 234, 0.14);
  color: var(--fresh-mint-deep);
}

.container figure.highlight pre {
  padding-top: 12px;
  padding-bottom: 12px;
}

.container figure.highlight table,
.container figure.highlight td.code,
.container figure.highlight td.code pre {
  background: #182733;
  color: #dcebf5;
}

.container figure.highlight td.code pre {
  padding: 16px 20px;
  font-size: 0.94em;
  line-height: 1.72;
}

.container figure.highlight td.code pre .comment { color: #86a7bd; }
.container figure.highlight td.code pre .string { color: #d8be82; }
.container figure.highlight td.code pre .number,
.container figure.highlight td.code pre .literal { color: #7fc3e8; }
.container figure.highlight td.code pre .attr,
.container figure.highlight td.code pre .section { color: #8ac4ef; }

.container figure.highlight .gutter {
  background: #10202c;
  color: rgba(188, 220, 242, 0.48);
}

/* 上一篇／下一篇：统一为低饱和青蓝色卡，而非默认黑色遮罩 */
#pagination.pagination-post {
  overflow: visible;
  background: transparent;
  gap: 14px;
}

#pagination.pagination-post .pagination-related {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 18px;
  background: linear-gradient(135deg, #4b9edb, #76c0ef);
  box-shadow: 0 12px 28px rgba(39, 105, 154, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#pagination.pagination-post .pagination-related + .pagination-related {
  background: linear-gradient(135deg, #568fca, #86c2eb);
}

#pagination.pagination-post .pagination-related:hover {
  box-shadow: 0 18px 35px rgba(39, 105, 154, 0.28);
  transform: translateY(-4px);
}

#pagination.pagination-post .pagination-related .cover { opacity: 0.18; }

#pagination.pagination-post .pagination-related .info-1 .info-item-1 {
  color: rgba(244, 255, 250, 0.74);
  letter-spacing: 0.08em;
}

#pagination.pagination-post .pagination-related .info-1 .info-item-2,
#pagination.pagination-post .pagination-related .info-2 .info-item-1 { color: #fff; }

/* 标签页使用固定柔和彩色体系，颜色不会随刷新跳变 */
#page .tag-cloud-list { padding: 10px; }

#page .tag-cloud-list a {
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(48, 92, 79, 0.14);
  color: #fff !important;
  font-weight: 600;
}

#page .tag-cloud-list a:nth-child(5n + 2) { background-color: #5d92bd !important; }
#page .tag-cloud-list a:nth-child(5n + 3) { background-color: #bd7b9c !important; }
#page .tag-cloud-list a:nth-child(5n + 4) { background-color: #c98b56 !important; }
#page .tag-cloud-list a:nth-child(5n + 5) { background-color: #7e91be !important; }
#page .tag-cloud-list a:hover { background-color: #347566 !important; }

.copy-notice,
.snackbar-container.snackbar-css {
  border: 1px solid rgba(221, 245, 235, 0.42) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 30px rgba(22, 55, 47, 0.22) !important;
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 404 与搜索等提示窗口：统一为带柔和边界的玻璃提示卡 */
.type-404 .error-content {
  border: 1px solid var(--fresh-line);
  border-radius: 22px;
  background: rgba(250, 255, 252, 0.78);
  box-shadow: 0 20px 50px rgba(35, 75, 64, 0.18);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}

.type-404 .page-title { display: none; }

.type-404 .error-content .error-img {
  background: linear-gradient(145deg, #d9eee4, #f4faf6);
}

.type-404 .error-content .error-img img {
  mix-blend-mode: multiply;
}

.type-404 .error-content .error-info {
  position: relative;
  padding: 36px;
  color: var(--fresh-ink);
}

.type-404 .error-content .error-info::before {
  display: block;
  margin-bottom: 14px;
  color: var(--fresh-mint);
  content: "◌  ERROR 404";
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.type-404 .error-content .error-info .error_title {
  margin: 0;
  color: var(--fresh-mint-deep);
  font-size: 7em;
  line-height: 1;
  letter-spacing: -0.06em;
}

.type-404 .error-content .error-info .error_subtitle {
  margin-top: 14px;
  color: var(--fresh-muted);
  font-size: 1.12em;
}

.search-dialog {
  border: 1px solid var(--fresh-line);
  border-radius: 18px;
  background: rgba(250, 255, 252, 0.84);
  box-shadow: 0 20px 55px rgba(32, 70, 59, 0.22);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.search-dialog .local-search-input input {
  border-color: rgba(90, 159, 144, 0.65);
  background: rgba(255, 255, 255, 0.55);
}

#article-container a:hover,
#recent-posts .recent-post-item .article-title:hover {
  color: #c8784e;
}

::selection {
  background: rgba(90, 159, 144, 0.3);
  color: var(--fresh-ink);
}

[data-theme="dark"] {
  --fresh-glass: rgba(29, 53, 49, 0.76);
  --fresh-line: rgba(176, 222, 207, 0.16);
  --font-color: #dcebe5;
  --card-meta: #a2bbb2;
}

[data-theme="dark"] #web_bg::after {
  background: rgba(9, 28, 25, 0.54);
}

[data-theme="dark"] .container figure.highlight {
  border-color: rgba(184, 221, 208, 0.12);
  background: #f7fbf9;
}

[data-theme="dark"] .container figure.highlight .highlight-tools {
  border-bottom-color: rgba(184, 221, 208, 0.1);
  background: linear-gradient(180deg, #ffffff, #eef5f1);
}

[data-theme="dark"] .type-404 .error-content,
[data-theme="dark"] .search-dialog {
  background: rgba(25, 48, 43, 0.86);
}

[data-theme="dark"] .type-404 .error-content .error-img {
  background: #d8eade;
}

@media screen and (max-width: 900px) {
  #nav { background: rgba(37, 76, 65, 0.38); }
  .layout > div:first-child:not(.nc) { border-radius: 14px; }
}

@media screen and (max-width: 768px) {
  #footer { margin-top: 20px; }
  .type-404 .error-content .error-info { padding: 24px; }
  .type-404 .error-content .error-info .error_title { font-size: 6em; }
  .search-dialog { border-radius: 0; }
}
