:root {
  --zxx-void: #f3f7fb;
  --zxx-surface: rgba(255, 255, 255, 0.82);
  --zxx-surface-solid: #ffffff;
  --zxx-ink: #10233d;
  --zxx-muted: #52667f;
  --zxx-primary: #126ef8;
  --zxx-signal: #04b7d7;
  --zxx-violet: #7557f5;
  --zxx-line: rgba(29, 84, 142, 0.18);
  --zxx-grid: rgba(20, 105, 177, 0.06);
  --zxx-glow: 0 0 0 1px rgba(17, 111, 248, 0.05), 0 18px 46px rgba(15, 57, 108, 0.12);
  --zxx-glow-hover: 0 0 0 1px rgba(55, 208, 255, 0.5), 0 24px 58px rgba(15, 82, 156, 0.22), 0 0 28px rgba(55, 208, 255, 0.14);
  --zxx-corner: 10px;
  --zxx-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Noto Sans Mono CJK SC", monospace;
}

[data-theme="light"] {
  --global-bg: var(--zxx-void);
  --anzhiyu-background: var(--zxx-void);
  --anzhiyu-card-bg: var(--zxx-surface);
  --anzhiyu-card-border: #d9e5f1;
  --anzhiyu-fontcolor: var(--zxx-ink);
  --font-color: var(--zxx-ink);
  --text-highlight-color: var(--zxx-ink);
  --anzhiyu-secondtext: var(--zxx-muted);
  --anzhiyu-secondbg: #eaf2fa;
  --anzhiyu-ahoverbg: #e8f5ff;
  --anzhiyu-theme: var(--zxx-primary);
  --anzhiyu-theme-deep: #0755c9;
  --anzhiyu-theme-op: rgba(18, 110, 248, 0.13);
  --anzhiyu-theme-op-deep: rgba(7, 85, 201, 0.9);
  --anzhiyu-meta-theme-color: var(--zxx-void);
  --anzhiyu-card-btn-bg: #e9f3ff;
  --anzhiyu-post-blockquote-bg: #eff8ff;
  --card-bg: var(--zxx-surface-solid);
}

[data-theme="dark"] {
  --zxx-void: #060a13;
  --zxx-surface: rgba(12, 21, 37, 0.86);
  --zxx-surface-solid: #0c1525;
  --zxx-ink: #e8f4ff;
  --zxx-muted: #9db2cb;
  --zxx-primary: #70d8ff;
  --zxx-signal: #48f3ce;
  --zxx-violet: #a995ff;
  --zxx-line: rgba(105, 196, 255, 0.2);
  --zxx-grid: rgba(100, 203, 255, 0.07);
  --zxx-glow: 0 0 0 1px rgba(116, 213, 255, 0.08), 0 22px 56px rgba(0, 0, 0, 0.34);
  --zxx-glow-hover: 0 0 0 1px rgba(72, 243, 206, 0.56), 0 22px 62px rgba(3, 161, 225, 0.19), 0 0 32px rgba(72, 243, 206, 0.14);
  --global-bg: var(--zxx-void);
  --anzhiyu-background: var(--zxx-void);
  --anzhiyu-card-bg: var(--zxx-surface);
  --anzhiyu-card-border: #233850;
  --anzhiyu-fontcolor: var(--zxx-ink);
  --font-color: var(--zxx-ink);
  --text-highlight-color: var(--zxx-ink);
  --anzhiyu-secondtext: var(--zxx-muted);
  --anzhiyu-secondbg: #111f34;
  --anzhiyu-ahoverbg: #152a44;
  --anzhiyu-theme: var(--zxx-primary);
  --anzhiyu-theme-deep: #c5f2ff;
  --anzhiyu-theme-op: rgba(112, 216, 255, 0.15);
  --anzhiyu-theme-op-deep: rgba(197, 242, 255, 0.9);
  --anzhiyu-meta-theme-color: var(--zxx-void);
  --anzhiyu-card-btn-bg: #132640;
  --anzhiyu-post-blockquote-bg: #0d1d31;
  --card-bg: var(--zxx-surface-solid);
}

html {
  background: var(--zxx-void);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.8;
}

#web_bg {
  background-color: var(--zxx-void);
  background-image:
    linear-gradient(var(--zxx-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--zxx-grid) 1px, transparent 1px),
    radial-gradient(circle at 80% -10%, rgba(47, 167, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 5% 20%, rgba(117, 87, 245, 0.14), transparent 28rem);
  background-position: center;
  background-size: 30px 30px, 30px 30px, auto, auto;
}

#page-header #nav {
  border-bottom: 1px solid transparent;
  padding-right: clamp(1rem, 2vw, 2rem);
  padding-left: clamp(1rem, 2vw, 2rem);
  transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

#page-header.nav-fixed #nav,
#page-header.not-top-img #nav {
  border-bottom-color: var(--zxx-line);
  background: color-mix(in srgb, var(--zxx-void) 88%, transparent);
  box-shadow: 0 10px 30px rgba(2, 16, 35, 0.12);
  backdrop-filter: blur(18px) saturate(135%);
}

#site-name .title {
  color: var(--anzhiyu-fontcolor);
  font-family: var(--zxx-mono);
  font-size: 0.93rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

#site-name .title::before {
  color: var(--zxx-signal);
  content: "// ";
}

#site-name .title::after {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.5rem;
  border-radius: 50%;
  background: var(--zxx-signal);
  box-shadow: 0 0 12px var(--zxx-signal);
  content: "";
  vertical-align: middle;
}

#menus .menus_item > a,
#nav-right .nav-button > a {
  border-radius: 6px;
  font-family: var(--zxx-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

#menus .menus_item > a:hover,
#nav-right .nav-button > a:hover {
  background: var(--anzhiyu-theme-op);
  box-shadow: inset 0 -1px 0 var(--zxx-primary);
  color: var(--zxx-primary);
}

#menus .menus_item .menus_item_child {
  overflow: hidden;
  border: 1px solid var(--zxx-line);
  border-radius: var(--zxx-corner);
  background: color-mix(in srgb, var(--zxx-surface-solid) 93%, transparent);
  box-shadow: var(--zxx-glow);
  backdrop-filter: blur(18px);
}

#menus .menus_item .menus_item_child::before {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--zxx-signal), var(--zxx-violet), transparent);
  content: "";
}

#content-inner {
  padding-top: clamp(1.75rem, 3.2vw, 3rem);
}

#recent-posts .recent-post-item,
#aside-content .card-widget,
#post,
#page {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--zxx-line);
  border-radius: var(--zxx-corner);
  background: linear-gradient(135deg, color-mix(in srgb, var(--zxx-surface) 95%, transparent), color-mix(in srgb, var(--zxx-surface-solid) 84%, transparent));
  box-shadow: var(--zxx-glow);
}

#recent-posts .recent-post-item::before,
#aside-content .card-widget::before,
#post::before,
#page::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 3.2rem;
  height: 2px;
  background: linear-gradient(90deg, var(--zxx-signal), transparent);
  content: "";
}

#recent-posts .recent-post-item {
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

#recent-posts .recent-post-item:hover {
  border-color: color-mix(in srgb, var(--zxx-signal) 60%, var(--zxx-line));
  box-shadow: var(--zxx-glow-hover);
  transform: translateY(-3px);
}

#content-inner #recent-posts > .recent-post-item {
  height: auto;
  min-height: 16rem;
}

#content-inner #recent-posts > .recent-post-item > .recent-post-info {
  display: flex;
  min-height: 16rem;
  height: auto;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.72rem;
  padding: clamp(1.35rem, 2.2vw, 2rem);
}

#recent-posts .article-title,
#article-container h1,
#article-container h2,
#article-container h3,
.page-title {
  color: var(--anzhiyu-fontcolor);
  font-weight: 760;
  letter-spacing: -0.025em;
}

#recent-posts .article-title {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.35;
}

#recent-posts .recent-post-item .recent-post-info .content {
  display: -webkit-box !important;
  overflow: hidden;
  height: auto !important;
  min-height: 3.6rem;
  margin-top: 0.8rem;
  color: var(--anzhiyu-secondtext);
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#content-inner #recent-posts > .recent-post-item > .recent-post-info > .recent-post-info-top {
  width: auto;
  padding: 0;
}

#content-inner #recent-posts > .recent-post-item > .recent-post-info > .article-title {
  order: 1;
}

#content-inner #recent-posts > .recent-post-item > .recent-post-info > .content {
  order: 2;
  min-height: 0;
  margin-top: 0;
}

#content-inner #recent-posts > .recent-post-item > .recent-post-info > .article-meta-wrap {
  position: static;
  width: auto;
  margin-top: auto;
  padding: 0;
}

#article-container {
  font-size: 1.04rem;
  line-height: 1.9;
}

#article-container h2 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2.7rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--zxx-line);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

#article-container h2::before {
  color: var(--zxx-signal);
  content: ">_";
  font-family: var(--zxx-mono);
  font-size: 0.75em;
}

#article-container a {
  color: var(--zxx-primary);
  font-weight: 650;
  text-decoration-color: color-mix(in srgb, var(--zxx-primary) 44%, transparent);
  text-underline-offset: 0.2em;
}

#article-container blockquote {
  border-left: 2px solid var(--zxx-signal);
  border-radius: 0 8px 8px 0;
  background: var(--anzhiyu-post-blockquote-bg);
}

#article-container code,
#article-container pre,
.article-meta-wrap,
.post-meta,
#aside-content .webinfo {
  font-family: var(--zxx-mono);
}

#aside-content .card-widget {
  padding: 1.15rem;
}

#aside-content .card-info {
  background: linear-gradient(145deg, color-mix(in srgb, var(--zxx-violet) 15%, var(--zxx-surface-solid)), var(--zxx-surface-solid) 62%);
}

#aside-content .author-info__name {
  font-family: var(--zxx-mono);
  letter-spacing: 0.04em;
}

#aside-content .author-info__description,
#aside-content .author-info__desc,
.article-meta-wrap,
.post-meta,
#aside-content .webinfo {
  color: var(--anzhiyu-secondtext);
}

#footer {
  margin-top: 4rem;
}

#footer #footer-bar {
  border-top: 1px solid var(--zxx-line);
  background: color-mix(in srgb, var(--zxx-void) 88%, transparent);
}

#rightside button {
  border: 1px solid var(--zxx-line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--zxx-surface-solid) 90%, transparent);
  box-shadow: var(--zxx-glow);
}

@media screen and (max-width: 768px) {
  #content-inner {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  #recent-posts .recent-post-item,
  #aside-content .card-widget,
  #post,
  #page {
    border-radius: 8px;
  }

  #site-name .title {
    font-size: 0.78rem;
  }

}

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