:root {
  --u-accent: #2b5b84;
  --u-accent-soft: rgba(43, 91, 132, 0.1);
  --u-warm: #b87a3d;
  --u-warm-soft: rgba(184, 122, 61, 0.08);
  --u-text-main: #1e293b;
  --u-text-sub: #475569;
}

html[data-theme="dark"] {
  --u-accent: #6fa8dc;
  --u-accent-soft: rgba(111, 168, 220, 0.16);
  --u-warm: #d4a373;
  --u-warm-soft: rgba(212, 163, 115, 0.12);
  --u-text-main: #f1f5f9;
  --u-text-sub: #cbd5e1;
  --font-color: #f1f5f9 !important;
  --text-highlight-color: #ffffff !important;
}

::selection {
  background: var(--u-accent);
  color: #ffffff;
}

#web_bg::before,
#footer::before {
  display: none !important;
  content: none !important;
}

html[data-theme="dark"] img,
html[data-theme="dark"] .hl-label,
html[data-theme="dark"] .note {
  filter: none !important;
  opacity: 1 !important;
}

#web_bg {
  background: linear-gradient(135deg, #eef3f9 0%, #f7f9fc 50%, #f1f4f9 100%) !important;
  transition: none !important;
}

html[data-theme="dark"] #web_bg {
  background: linear-gradient(135deg, #161922 0%, #1d222e 50%, #181c26 100%) !important;
  transition: none !important;
}

#recent-posts > .recent-post-item,
#aside-content .card-widget,
div#post, div#page, div#archive, div#tag, div#category {
  background: rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

html[data-theme="dark"] #recent-posts > .recent-post-item,
html[data-theme="dark"] #aside-content .card-widget,
html[data-theme="dark"] div#post,
html[data-theme="dark"] div#page,
html[data-theme="dark"] div#archive,
html[data-theme="dark"] div#tag,
html[data-theme="dark"] div#category {
  background: rgba(36, 42, 56, 0.74) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22) !important;
}

#recent-posts > .recent-post-item:hover {
  transform: translateY(-2px);
  border-color: var(--u-accent) !important;
}

#nav {
  background: rgba(247, 249, 252, 0.78) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  box-shadow: none !important;
}

html[data-theme="dark"] #nav {
  background: rgba(24, 28, 38, 0.8) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#nav a, #nav .site-page, #nav #blog-info .site-name {
  color: var(--u-text-main) !important;
  text-shadow: none !important;
}

#nav .menus_item:hover > a, #nav a:hover {
  color: var(--u-accent) !important;
}

#page-header.full_page {
  height: 350px !important;
}

#page-header:not(.not-top-img):before {
  background: linear-gradient(
    to bottom,
    rgba(247, 249, 252, 0.15) 0%,
    rgba(247, 249, 252, 0.65) 75%,
    #f3f6fb 100%
  ) !important;
}

html[data-theme="dark"] #page-header:not(.not-top-img):before {
  background: linear-gradient(
    to bottom,
    rgba(22, 25, 34, 0.25) 0%,
    rgba(22, 25, 34, 0.75) 75%,
    #1a1e29 100%
  ) !important;
}

#page-header #site-title,
#page-header #subtitle {
  color: var(--u-text-main) !important;
  text-shadow: none !important;
}

#body-wrap #page .page-title,
#body-wrap #archive .article-sort-title,
#body-wrap #tag .tag-cloud-title,
#body-wrap #category .category-lists,
#recent-posts > .recent-post-item > .recent-post-info > .article-title,
#article-container,
#article-container p,
#article-container li,
#article-container h1,
#article-container h2,
#article-container h3,
#article-container blockquote,
#article-container blockquote p {
  color: var(--u-text-main) !important;
}

#body-wrap #page .page-title {
  text-align: center !important;
}

#article-container {
  line-height: 1.85;
}

#post-meta, #post-meta a,
.article-meta-wrap, .article-meta-wrap a,
.recent-post-info > .content,
.post-copyright, .post-copyright-info {
  color: var(--u-text-sub) !important;
}

#article-container a,
.post-copyright a,
#recent-posts > .recent-post-item > .recent-post-info > .article-title:hover {
  color: var(--u-accent) !important;
  text-decoration: none;
}

#article-container blockquote {
  background-color: var(--u-warm-soft) !important;
  border-left: 3px solid var(--u-warm) !important;
  border-radius: 6px;
}

.avatar-img img {
  transition: none !important;
  transform: none !important;
}

#article-container table {
  border-collapse: collapse !important;
  border: none !important;
  background: transparent !important;
}

#article-container table th {
  background: var(--u-accent-soft) !important;
  color: var(--u-text-main) !important;
  border-top: 2px solid var(--u-accent) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3) !important;
  border-left: none !important;
  border-right: none !important;
}

#article-container table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-left: none !important;
  border-right: none !important;
  color: var(--u-text-main) !important;
}

#pagination .page-number.current {
  background: var(--u-accent) !important;
  border-color: var(--u-accent) !important;
}

#pagination .page-number:not(.current):hover,
#pagination .extend:hover {
  background: var(--u-accent-soft) !important;
  color: var(--u-accent) !important;
}

html:not([data-theme="dark"]) {
  --hl-bg: #f1f5f9 !important;
  --hltools-bg: #e2e8f0 !important;
  --hlnumber-bg: #f1f5f9 !important;
  --hlnumber-color: #94a3b8 !important;
}

html:not([data-theme="dark"]) .highlight .code .keyword { color: #2b5b84 !important; }
html:not([data-theme="dark"]) .highlight .code .string  { color: #9a632c !important; }
html:not([data-theme="dark"]) .highlight .code .comment { color: #64748b !important; font-style: italic; }
html:not([data-theme="dark"]) .highlight .code .title,
html:not([data-theme="dark"]) .highlight .code .function { color: #0369a1 !important; }

html[data-theme="dark"] {
  --hl-bg: #13161f !important;
  --hltools-bg: #1b202c !important;
  --hlnumber-bg: #13161f !important;
  --hlnumber-color: #64748b !important;
}

html[data-theme="dark"] .highlight .code .keyword { color: #6fa8dc !important; }
html[data-theme="dark"] .highlight .code .string  { color: #d4a373 !important; }
html[data-theme="dark"] .highlight .code .comment { color: #71717a !important; font-style: italic; }
html[data-theme="dark"] .highlight .code .title,
html[data-theme="dark"] .highlight .code .function { color: #7dd3fc !important; }
html[data-theme="dark"] .highlight .code .number  { color: #c4b5fd !important; }

#footer {
  background: transparent !important;
}

#footer-wrap, #footer-wrap a, #runtime-badge {
  color: var(--u-text-sub) !important;
}

#runtime-badge {
  margin-top: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.4); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

#article-container strong,
#article-container b {
  font-weight: 700 !important;
  color: #0f172a !important;
  background: linear-gradient(transparent 60%, var(--u-accent-soft) 60%);
  padding: 0 3px;
  border-radius: 3px;
}

html[data-theme="dark"] #article-container strong,
html[data-theme="dark"] #article-container b {
  color: #ffffff !important;
  background: linear-gradient(transparent 60%, rgba(111, 168, 220, 0.28) 60%);
}

