@charset "UTF-8";
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Default: Frappe (dark) */
:root {
  /* Catppuccin Frappe Palette (https://catppuccin.com) */
  /* Frappe Base & Surface Colors */
  --ctp-base: #303446;
  --ctp-mantle: #292c3c;
  --ctp-crust: #232634;
  --ctp-surface0: #414559;
  --ctp-surface1: #51576d;
  --ctp-surface2: #626880;
  /* Frappe Text Colors */
  --ctp-text: #c6d0f5;
  --ctp-subtext0: #b8c0e0;
  --ctp-subtext1: #a5adcb;
  /* Frappe Overlay Colors */
  --ctp-overlay0: #6e738d;
  --ctp-overlay1: #737994;
  --ctp-overlay2: #838ba7;
  /* Frappe Accent Colors */
  --ctp-rosewater: #f2d5cf;
  --ctp-flamingo: #eebebe;
  --ctp-pink: #f4b8e4;
  --ctp-mauve: #ca9ee6;
  --ctp-red: #e78284;
  --ctp-maroon: #ea999c;
  --ctp-peach: #ef9f76;
  --ctp-yellow: #e5c890;
  --ctp-green: #a6d189;
  --ctp-teal: #81c8be;
  --ctp-sky: #99d1db;
  --ctp-sapphire: #85c1dc;
  --ctp-blue: #8caaee;
  --ctp-lavender: #babbf1;
  --black-main: var(--ctp-text);
  --white-main: var(--ctp-base);
  --body-bg: var(--ctp-mantle);
  --bg-image: url(/image/b-1.jpg);
  --code-block-background: var(--ctp-surface0);
  --primary-color: var(--ctp-mauve);
  --primary-color-p: color-mix(in srgb, var(--ctp-mauve), white 25%);
  --highlight-color: #949cbb;
  /* 有意脱离 Catppuccin 色板的自定义高亮色 */
  --secondary-color: var(--ctp-overlay2);
  --text: var(--ctp-text);
  --text1: var(--ctp-subtext0);
  --text2: var(--ctp-subtext1);
  --table-th: var(--ctp-overlay1);
  --table-2n: var(--ctp-overlay0);
  --hover-light: var(--primary-color);
  --hover-light2: var(--primary-color-p);
  --aero-grad: linear-gradient(to bottom,
      color-mix(in srgb, var(--secondary-color), white 60%) 0%,
      var(--secondary-color) 50%,
      color-mix(in srgb, var(--secondary-color), black 10%) 51%,
      var(--secondary-color) 100%);
  /* Graph variables (Catppuccin Frappe) */
  --graph-node: var(--ctp-sky);
  --graph-tag: var(--ctp-green);
  --graph-highlight: var(--ctp-yellow);
  --graph-visited: var(--ctp-overlay1);
  --graph-link: var(--ctp-sky);
  --graph-text: var(--ctp-text);
  --graph-tag-stroke: var(--ctp-surface1);
  /* Graph UI text variables */
  --graph-overlay-text: #fff;
  /* 全局图谱标题/关闭按钮文字 */
  --graph-wikilink-broken-text: var(--ctp-red);
  /* 断裂维基链接文字 */
  --graph-wikilink-broken-border: var(--ctp-red);
  /* 断裂维基链接边框 */
  --graph-widget-title-light: var(--ctp-overlay1);
  /* 亮主题侧边栏标题文字 */
  /* Highlight.js syntax highlighting variables (Catppuccin Frappe) */
  --hl-background: var(--ctp-base);
  /* 代码块背景 */
  --hl-text: var(--ctp-text);
  /* 普通文本 */
  --hl-comment: var(--ctp-overlay1);
  /* 注释 italic */
  --hl-keyword: var(--ctp-mauve);
  /* 关键字 */
  --hl-string: var(--ctp-green);
  /* 字符串 */
  --hl-function: var(--ctp-blue);
  /* 函数/标题 */
  --hl-number: var(--ctp-peach);
  /* 数字 */
  --hl-class: var(--ctp-yellow);
  /* 类名 */
  --hl-attribute: var(--ctp-red);
  /* 属性 */
  --hl-tag: var(--ctp-red);
  /* 标签 */
  --hl-operator: var(--ctp-teal);
  /* 运算符 */
  --hl-param: var(--ctp-red);
  /* 参数 */
  --hl-regexp: var(--ctp-green);
  /* 正则 */
  --hl-gutter-text: var(--ctp-surface2);
  /* 行号文字 */
  --hl-gutter-border: var(--ctp-surface1);
  /* 行号边框 */
  /* Shadow variables */
  --text-shadow: 0 0 4px var(--white-main),
    0 0 8px var(--white-main),
    0 0 12px var(--white-main),
    0 0 16px var(--white-main),
    0 0 20px var(--white-main),
    0 0 24px var(--white-main);
  --card-shadow: 0 0 0 0.5px var(--black-main),
    0 0 0 1.5px var(--white-main);
  --button-shadow: inset 0 0 0 1px var(--white-main),
    0 0 0 0.5px var(--black-main),
    3px 3px 10px rgba(from var(--black-main) r g b / 0.6);
  --button-active-shadow: inset 0 5px 5px rgba(from var(--black-main) r g b / 0.4);
  --image-shadow: 0 2px 10px rgba(from var(--black-main) r g b / 0.15);
  --sidebar-shadow: 2px 0 8px rgba(from var(--ctp-crust) r g b / 0.5);
  --music-inset-shadow: inset 0 3px 5px rgba(from var(--black-main) r g b / 0.5);
  /* Content colors */
  --blockquote-border: var(--ctp-surface1);
  --blockquote-bg: var(--ctp-surface0);
  --blockquote-color: var(--text2);
  --table-border: var(--ctp-surface1);
  --error-color: var(--ctp-red);
  --mermaid-bg: var(--white-main);
  --inline-code-bg: rgba(from var(--primary-color) r g b / 0.08);
  --del-color: var(--text2);
  --footnotes-border: var(--ctp-surface1);
  --header-link-border: var(--ctp-surface1);
  /* Callout type colors (Catppuccin Frappe) */
  --callout-note: var(--ctp-blue);
  --callout-tip: var(--ctp-green);
  --callout-warning: var(--ctp-peach);
  --callout-danger: var(--ctp-red);
  --callout-info: var(--ctp-sky);
  --callout-question: var(--ctp-mauve);
  --callout-example: var(--ctp-pink);
  --callout-quote: var(--ctp-subtext1);
  --callout-todo: var(--ctp-sapphire);
  --callout-important: var(--ctp-yellow);
  --callout-summary: var(--ctp-rosewater);
  --callout-abstract: var(--ctp-teal);
  /* Overlay & mask variables */
  --overlay-backdrop: rgba(from var(--ctp-crust) r g b / 0.5);
  --sidebar-mask-bg: rgba(from var(--ctp-crust) r g b / 0.6);
  --graph-container-shadow: 0 8px 32px rgba(from var(--ctp-crust) r g b / 0.5);
  --graph-close-hover-bg: rgba(from var(--ctp-text) r g b / 0.2);
  --wikilink-broken-bg: rgba(from var(--ctp-red) r g b / 0.08);
}

/* System light preference (when no data-theme override on html) */
@media (prefers-color-scheme: light) {
  :root {
    /* Catppuccin Latte Palette (https://catppuccin.com) */
    /* Latte Base & Surface Colors */
    --ctp-base: #eff1f5;
    --ctp-mantle: #e6e9ef;
    --ctp-crust: #dce0e8;
    --ctp-surface0: #ccd0da;
    --ctp-surface1: #bcc0cc;
    --ctp-surface2: #acb0be;
    /* Latte Text Colors */
    --ctp-text: #4c4f69;
    --ctp-subtext0: #6c6f85;
    --ctp-subtext1: #5c5f77;
    /* Latte Overlay Colors */
    --ctp-overlay0: #9ca0b0;
    --ctp-overlay1: #8c8fa1;
    --ctp-overlay2: #7c7f93;
    /* Latte Accent Colors */
    --ctp-rosewater: #dc8a78;
    --ctp-flamingo: #dd7878;
    --ctp-pink: #ea76cb;
    --ctp-mauve: #8839ef;
    --ctp-red: #d20f39;
    --ctp-maroon: #e64553;
    --ctp-peach: #fe640b;
    --ctp-yellow: #df8e1d;
    --ctp-green: #40a02b;
    --ctp-teal: #179299;
    --ctp-sky: #04a5e5;
    --ctp-sapphire: #209fb5;
    --ctp-blue: #1e66f5;
    --ctp-lavender: #7287fd;
    --black-main: var(--ctp-base);
    --white-main: var(--ctp-text);
  }
}
/* Manual theme overrides (always wins via source order after @media) */
[data-theme=light] {
  /* Catppuccin Latte Palette (https://catppuccin.com) */
  /* Latte Base & Surface Colors */
  --ctp-base: #eff1f5;
  --ctp-mantle: #e6e9ef;
  --ctp-crust: #dce0e8;
  --ctp-surface0: #ccd0da;
  --ctp-surface1: #bcc0cc;
  --ctp-surface2: #acb0be;
  /* Latte Text Colors */
  --ctp-text: #4c4f69;
  --ctp-subtext0: #6c6f85;
  --ctp-subtext1: #5c5f77;
  /* Latte Overlay Colors */
  --ctp-overlay0: #9ca0b0;
  --ctp-overlay1: #8c8fa1;
  --ctp-overlay2: #7c7f93;
  /* Latte Accent Colors */
  --ctp-rosewater: #dc8a78;
  --ctp-flamingo: #dd7878;
  --ctp-pink: #ea76cb;
  --ctp-mauve: #8839ef;
  --ctp-red: #d20f39;
  --ctp-maroon: #e64553;
  --ctp-peach: #fe640b;
  --ctp-yellow: #df8e1d;
  --ctp-green: #40a02b;
  --ctp-teal: #179299;
  --ctp-sky: #04a5e5;
  --ctp-sapphire: #209fb5;
  --ctp-blue: #1e66f5;
  --ctp-lavender: #7287fd;
  --black-main: var(--ctp-base);
  --white-main: var(--ctp-text);
}

[data-theme=dark] {
  /* Catppuccin Frappe Palette (https://catppuccin.com) */
  /* Frappe Base & Surface Colors */
  --ctp-base: #303446;
  --ctp-mantle: #292c3c;
  --ctp-crust: #232634;
  --ctp-surface0: #414559;
  --ctp-surface1: #51576d;
  --ctp-surface2: #626880;
  /* Frappe Text Colors */
  --ctp-text: #c6d0f5;
  --ctp-subtext0: #b8c0e0;
  --ctp-subtext1: #a5adcb;
  /* Frappe Overlay Colors */
  --ctp-overlay0: #6e738d;
  --ctp-overlay1: #737994;
  --ctp-overlay2: #838ba7;
  /* Frappe Accent Colors */
  --ctp-rosewater: #f2d5cf;
  --ctp-flamingo: #eebebe;
  --ctp-pink: #f4b8e4;
  --ctp-mauve: #ca9ee6;
  --ctp-red: #e78284;
  --ctp-maroon: #ea999c;
  --ctp-peach: #ef9f76;
  --ctp-yellow: #e5c890;
  --ctp-green: #a6d189;
  --ctp-teal: #81c8be;
  --ctp-sky: #99d1db;
  --ctp-sapphire: #85c1dc;
  --ctp-blue: #8caaee;
  --ctp-lavender: #babbf1;
  --black-main: var(--ctp-text);
  --white-main: var(--ctp-base);
}

.hljs {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  color: var(--hl-text);
  background: var(--hl-background);
}

.hljs-comment,
.hljs-quote {
  color: var(--hl-comment);
  font-style: italic;
}

.hljs-doctag,
.hljs-keyword,
.hljs-formula {
  color: var(--hl-keyword);
}

.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
  color: var(--hl-tag);
}

.hljs-literal {
  color: var(--hl-function);
}

.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
  color: var(--hl-string);
}

.hljs-built_in,
.hljs-class .hljs-title {
  color: var(--hl-class);
}

.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
  color: var(--hl-number);
}

.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
  color: var(--hl-function);
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: bold;
}

.hljs-link {
  text-decoration: underline;
}

.post-content .highlight .gutter {
  color: var(--hl-gutter-text);
  text-align: right;
  border-right: 1px solid var(--hl-gutter-border);
  width: 2em;
  padding: 0 0.25em;
}

body {
  font-family: "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--black-main);
  margin: 0 auto;
  background-color: var(--body-bg);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: brightness(0.6) blur(3px);
  background-image: var(--bg-image);
  background-size: cover;
  background-attachment: fixed;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1161px;
  margin: auto;
  padding: 0 20px;
}

.card {
  background: rgba(from var(--primary-color) r g b/0.3);
  box-sizing: border-box;
  box-shadow: 0 0 0 0.5px var(--black-main), 0 0 0 1.5px var(--white-main);
  backdrop-filter: blur(2px);
}

.card::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: brightness(1.2);
  background-image: url(/image/reflection.png);
  background-size: cover;
  background-attachment: fixed;
}

.button-bar {
  background: var(--aero-grad);
  box-shadow: var(--button-shadow);
  box-sizing: border-box;
  overflow: visible;
}

.button,
.page-number::before,
.extend::before {
  display: block;
  position: relative;
  border: none;
  outline: none;
  cursor: pointer;
  background: var(--aero-grad);
  box-shadow: var(--button-shadow);
  box-sizing: border-box;
}

.button::after,
.page-number::after,
.extend::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--hover-light2) 0%, color-mix(in srgb, var(--hover-light2), black 20%) 51%, var(--hover-light2) 50%, var(--hover-light2) 80%);
  box-shadow: inset 0 0 0 2px var(--highlight-color), 0 0 3px var(--highlight-color);
  transition: all 0.2s;
  opacity: 0;
}

.button:hover::after,
.page-number:not(.current):hover::after,
.extend:hover::after {
  opacity: 0.5;
  box-shadow: 0 0 3px 6px var(--hover-light) inset;
}

.button:active::after,
.button.active,
.page-number:not(.current):active:after,
.extend:active::after {
  opacity: 1;
  box-shadow: var(--button-active-shadow);
}

.main-layout {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr);
  gap: 20px;
}

.mobile-menu-btn,
.sidebar-mask {
  display: none;
}

.widget {
  width: 100%;
  margin-top: 20px;
  border-radius: 3px;
}

.page-nav {
  margin-top: 30px;
  justify-content: right;
}

.page-number,
.extend {
  position: relative;
  z-index: 1;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  text-decoration: none;
  color: var(--black-main);
  margin: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-number::before,
.extend::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.page-number::after,
.extend::after {
  position: absolute;
  z-index: -1;
  border-radius: inherit;
}

.current {
  top: 1px;
}

.current::before {
  box-shadow: var(--button-active-shadow), 0 0 0 0.5px var(--black-main);
}

.page-nav .space {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 5px;
  color: var(--black-main);
}

.tag-none-link {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.tag-none-link:hover {
  border-bottom-color: var(--primary-color);
}

.header {
  position: sticky;
  top: 0;
  z-index: 3;
}

header {
  width: 100%;
  height: 80px;
  padding-right: 60px;
  border-radius: 0 0 0 15px;
  overflow: hidden;
  position: relative;
  top: 0;
}

.blog-title {
  position: relative;
  text-align: right;
  /* font-style: italic; */
  font-size: 20px;
  text-shadow: var(--text-shadow);
}

nav {
  position: relative;
  border-top: none;
  border-radius: 15px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  margin-left: 360px;
  top: -15px;
  left: 12px;
}

.nav-links {
  list-style: none;
  padding: 0;
  display: flex;
  box-sizing: border-box;
  height: 100%;
}

.nav-links li {
  display: flex;
  box-sizing: border-box;
  height: 100%;
}

.nav-links li a {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  gap: 8px;
  font-size: 14px;
  line-height: 12px;
  text-decoration: none;
  padding: 0 20px;
  color: var(--black-main);
  box-shadow: inset 0 0 0 1px var(--white-main);
  border-right: 1px solid var(--black-main);
  text-shadow: 0 1px 0 var(--white-main);
}

.nav-text {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon {
  width: 24px;
}

.link-home {
  border-left: 1px solid var(--header-link-border);
}

.theme-icon {
  font-size: 16px;
  line-height: 1;
  transition: transform 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

/* ─── Nav overflow dropdown ─────────────────────── */
.nav-more {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-more .nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: max-content;
  list-style: none;
  padding: 4px 0;
  margin: 0;
  background: var(--aero-grad);
  box-shadow: var(--button-shadow);
  border-radius: 0 0 8px 8px;
}
.nav-more .nav-dropdown li {
  display: block;
  height: auto;
}
.nav-more .nav-dropdown li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  white-space: nowrap;
  border: none;
  text-decoration: none;
  color: var(--black-main);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: none;
  border-radius: 0;
}
.nav-more .nav-dropdown li a:hover {
  background: rgba(from var(--primary-color) r g b/0.12);
}
.nav-more .nav-dropdown li a.active {
  background: rgba(from var(--primary-color) r g b/0.25);
}
.nav-more .nav-dropdown li a .icon {
  width: 24px;
}
.nav-more.open .nav-dropdown {
  display: block;
}

.dropdown-label {
  display: block;
  padding: 6px 16px;
  font-size: 12px;
  color: var(--text2);
  text-align: center;
  border-bottom: 1px solid rgba(from var(--black-main) r g b/0.15);
  margin: 0 8px 4px;
}

.post-list {
  margin-top: 20px;
}

.post-item {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border-radius: 3px;
  position: relative;
  margin-bottom: 20px;
}

.post-cover {
  width: 40%;
  flex-shrink: 0;
  padding: 10px 0;
}

.post-cover img {
  width: 100%;
  box-shadow: var(--card-shadow);
}

.post-info {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.post-full {
  margin-top: 20px;
  padding: 10px;
  border-radius: 3px;
  position: relative;
  margin-bottom: 20px;
}

.post-title {
  position: relative;
  font-size: 24px;
  text-shadow: var(--text-shadow);
}

.post-meta {
  position: relative;
  text-shadow: var(--text-shadow);
  padding: 5px 0;
}

.post-excerpt {
  position: relative;
  padding: 10px;
  background-color: var(--white-main);
  box-shadow: var(--card-shadow);
}

.post-content {
  position: relative;
  padding: 10px;
  background-color: var(--white-main);
  box-shadow: var(--card-shadow);
}

.rm-link {
  position: relative;
  width: 120px;
  height: 30px;
  display: flex;
  align-self: flex-end;
  margin-top: auto;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  margin-bottom: -15px;
  text-decoration: none;
  color: var(--black-main);
  text-shadow: 0 1px 0 var(--white-main);
  transition: all 0.2s;
  overflow: hidden;
}

.rm-link::after {
  border-radius: inherit;
}

.rm-link:active {
  top: 1px;
}

.read-more {
  position: relative;
  z-index: 2;
}

.article-title {
  display: block;
  padding: 20px 0;
  font-size: 30px;
}

.avatar-widget {
  position: sticky;
  z-index: 4;
  top: -5px;
  background: none;
  border: none;
  box-shadow: none;
  width: 20%;
}

.avatar-bg {
  background: var(--aero-grad);
  backdrop-filter: blur(3px);
  margin-top: -30px;
  margin-left: -10px;
  box-sizing: border-box;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--white-main), 0 0 0 1.5px var(--black-main), 3px 3px 10px rgba(from var(--black-main) r g b/0.6);
}

.profile-img {
  width: 110px;
  box-sizing: border-box;
  position: relative;
  top: 5px;
  left: 5px;
  border-radius: 50%;
  border: 1px solid var(--white-main);
}

.profile-link {
  position: relative;
  display: inline-flex;
  height: 40px;
  width: 40px;
  padding: 8px;
  margin: 6px;
  border-radius: 20px;
}

.profile-icon {
  position: relative;
  width: 100%;
  z-index: 2;
}

.profile-link::after {
  border-radius: 20px;
}

.profile-link:active {
  top: 1px;
}

.profile {
  padding-top: 10px;
  padding-left: 100px;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  font-size: larger;
}

.about {
  margin-top: 10px;
  padding: 10px;
}

.profile-widget {
  position: relative;
  margin-top: -90px;
  text-shadow: var(--text-shadow);
  text-align: center;
}

.music-widget {
  position: sticky;
  top: 140px;
  background: var(--black-main);
  box-sizing: border-box;
  box-shadow: inset 0 0 30px color-mix(in srgb, var(--primary-color), white 50%), 0 0 0 0.5px var(--black-main), 3px 3px 10px rgba(from var(--white-main) r g b/0.6);
  border-radius: 20% 80% 20% 80%/50% 30% 50% 40%;
  padding: 15px;
}

.music-widget::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(from var(--black-main) r g b/0.8) 0%, rgba(from var(--white-main) r g b/0.1) 100%);
  border-radius: 20% 80% 20% 80%/50% 30% 50% 30%;
  pointer-events: none;
}

.player-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.album-art {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  margin-left: 20px;
  margin-bottom: 10px;
  position: relative;
  background-size: cover;
  background-position: center;
}

.song-info {
  width: 100%;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  min-width: 0;
}

.info-bg {
  background-color: var(--primary-color);
  box-shadow: var(--music-inset-shadow), var(--card-shadow);
  border-radius: 3px;
}

.title-bar {
  flex: 1;
  width: 0;
  min-width: 0;
  overflow: hidden;
  margin-left: 10px;
  border-radius: 10px;
}

.song-title {
  font-size: 14px;
  color: var(--white-main);
  text-shadow: 0 3px 3px var(--black-main);
  display: inline-block;
  white-space: nowrap;
  animation: marquee 8s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  20% {
    transform: translateX(0%);
  }
  80% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(-100%);
  }
}
.progress-container {
  width: 90%;
  height: 6px;
  border-radius: 3px;
  margin-bottom: 12px;
  margin-left: 16px;
  box-shadow: inset 0 2px 3px rgba(from var(--black-main) r g b/0.5), var(--card-shadow);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to bottom, var(--secondary-color) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.controls {
  position: relative;
  margin-left: -60px;
  margin-bottom: -20px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.ctrl-btn {
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.1s;
  overflow: hidden;
}

.ctrl-btn span {
  position: relative;
  z-index: 2;
}

.play-btn {
  width: 50px;
  height: 50px;
  border-radius: 70% 30% 70% 30%/70% 30% 70% 30%;
  font-size: 18px;
  overflow: hidden;
}

.play-btn span {
  position: relative;
  z-index: 2;
}

.ctrl-btn:active {
  top: 1px;
}

.play-btn:active {
  top: 1px;
}

.ctrl-btn::after {
  border-radius: inherit;
}

.play-btn::after {
  border-radius: inherit;
}

.year-group {
  padding: 10px;
  border-radius: 3px;
  margin: 20px 0;
}

.year-header {
  font-size: 24px;
  text-shadow: var(--text-shadow);
  padding: 10px 0;
}

.archive-list {
  padding: 10px;
  background-color: var(--white-main);
  box-shadow: var(--card-shadow);
  position: relative;
}

.archive-item {
  padding: 5px 0;
  width: 100%;
}

.archive-title {
  margin-left: 5px;
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.archive-title:hover {
  border-bottom-color: var(--primary-color);
}

footer {
  position: relative;
  border-radius: 15px 15px 0 0;
  margin-bottom: 0;
  height: 80px;
  display: flex;
}

.copyright {
  width: 100%;
  align-items: center;
  text-align: center;
  text-shadow: var(--text-shadow);
}

.footer-rss {
  position: absolute;
  right: 20px;
  bottom: 28px;
}
.footer-rss a {
  color: var(--text);
  font-size: 22px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.footer-rss a:hover {
  opacity: 1;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: 700;
  line-height: 1.3;
}

.post-content p {
  margin-bottom: 1.5em;
  text-align: left;
}

.post-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.post-content a:hover {
  border-bottom-color: var(--primary-color);
}

.post-content strong {
  font-weight: 700;
  color: var(--text);
}

.post-content em {
  font-style: italic;
}

.post-content del {
  color: var(--del-color);
  text-decoration: line-through;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5em;
  padding-left: 2em;
}

.post-content li {
  margin-bottom: 0.5em;
  line-height: 1.8;
}

.post-content li ul,
.post-content li ol {
  margin-top: 0.5em;
  margin-bottom: 0;
}

.post-content blockquote {
  margin: 0 0 1.5em 0;
  padding: 10px 20px;
  border-left: 4px solid var(--blockquote-border);
  background-color: var(--blockquote-bg);
  color: var(--blockquote-color);
}

.post-content blockquote p {
  margin: 0;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  box-shadow: var(--image-shadow);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  display: block;
  overflow-x: auto;
}

.post-content th,
.post-content td {
  border: 1px solid var(--table-border);
  padding: 6px 13px;
}

.post-content th {
  background-color: var(--table-th);
  font-weight: 700;
}

.post-content tr:nth-child(2n) {
  background-color: var(--table-2n);
}

.post-content :not(pre) > code {
  background-color: var(--inline-code-bg);
  color: var(--primary-color);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 85%;
}

.post-content pre,
.post-content .highlight {
  background-color: var(--hl-background);
  padding: 5px;
  margin: 0;
  border-radius: 3px;
  overflow-x: auto;
  line-height: 1.45;
  font-family: Consolas, monospace;
  font-size: 14px;
}

.post-content .highlight table {
  margin: 0;
  border: none;
  display: table;
}

.post-content .highlight td,
.post-content .highlight th {
  border: none;
  padding: 0;
}

.markdown-body .mjx-chtml {
  outline: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.post-content figure.highlight * {
  background-color: var(--code-block-background);
}

.post-content figure.highlight {
  background-color: var(--code-block-background);
}

/* Footnotes */
.post-content .footnotes {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid var(--footnotes-border);
  font-size: 0.875em;
  color: var(--secondary-color);
  width: 100%;
  box-sizing: border-box;
}

.post-content .footnotes ol {
  padding-left: 1.5em;
}

.post-content .footnote-ref {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
}

.post-content .footnote-backref {
  text-decoration: none;
  font-size: 0.75em;
  margin-left: 0.25em;
}

.post-content .footnote-backref:hover {
  text-decoration: underline;
}

/* Highlight (==text==) */
.post-content mark {
  background-color: rgba(from var(--primary-color) r g b/0.3);
  color: var(--black-main);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

/* Mermaid diagrams */
.post-content .mermaid {
  text-align: center;
  margin: 1.5em 0;
  overflow-x: auto;
  background-color: var(--mermaid-bg);
  padding: 1em;
  border-radius: 8px;
}

/* Embed styles (for ![[...]] transclusion) */
.wikilink-embed {
  margin: 1em 0;
  border: 1px solid var(--white-main);
  border-left: 3px solid var(--primary-color);
  border-radius: 6px;
  overflow: hidden;
}

.wikilink-embed-header {
  padding: 6px 12px;
  background-color: rgba(from var(--primary-color) r g b/0.1);
  font-size: 0.9em;
  border-bottom: 1px solid var(--white-main);
}

.wikilink-embed-header a {
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wikilink-embed-header a:hover {
  text-decoration: underline;
}

.wikilink-embed-body {
  padding: 12px;
  font-size: 0.95em;
}

.wikilink-embed-body p:last-child {
  margin-bottom: 0;
}

.embed-broken,
.embed-error {
  color: var(--error-color);
  border: 1px dashed var(--error-color);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.embed-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
  border-radius: 6px;
}

/* Inline embed (used inside lists to avoid HTML structure issues) */
.embed-inline {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-color);
  padding: 0 2px;
}

.embed-inline:hover {
  border-bottom-style: solid;
}

@media screen and (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }
  .main-layout {
    display: block;
  }
  header {
    border-radius: 0;
  }
  nav {
    margin-left: 0;
    left: 0;
  }
  .nav-links li a {
    padding: 0 10px;
  }
  .mobile-menu-btn {
    position: fixed;
    top: 100px;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 0 15px 15px 0;
    overflow: hidden;
    margin: 10px 0;
  }
  .mobile-menu-btn::after {
    border-radius: inherit;
  }
  .menu-icon {
    z-index: 12;
  }
  aside {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-image: var(--bg-image);
    background-size: cover;
    z-index: 100;
    padding: 20px;
    overflow-y: auto;
    box-shadow: var(--sidebar-shadow);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }
  aside.open {
    transform: translateX(0);
  }
  .sidebar-mask {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--sidebar-mask-bg);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }
  .sidebar-mask.open {
    opacity: 1;
    visibility: visible;
  }
  .post-item {
    flex-direction: column;
    gap: 0;
  }
  .post-cover {
    width: 100%;
  }
  .theme-toggle .nav-text span:last-child {
    display: none;
  }
  .theme-toggle .nav-text {
    gap: 0;
  }
}
.folder-tree-page, .category-cloud-page, .tag-cloud-page {
  position: relative;
  padding: 10px;
  background-color: var(--white-main);
  box-shadow: var(--card-shadow);
}

.category-cloud-page .category-cloud .category-list-link, #global-graph-overlay .global-graph-header .global-graph-close {
  background: var(--aero-grad);
  box-shadow: var(--button-shadow);
}

.graph-widget {
  margin-top: 10px;
}
.graph-widget .graph-title {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-shadow: var(--text-shadow);
}
.graph-widget .graph-title .graph-global-btn {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.graph-widget .graph-title .graph-global-btn:hover {
  opacity: 1;
}
.graph-widget .graph-container {
  width: 100%;
  height: 280px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(from var(--primary-color) r g b/0.15);
  box-shadow: inset 0 0 20px rgba(from var(--primary-color) r g b/0.3), 0 0 0 1px var(--white-main), 0 0 0 1.5px var(--black-main);
  backdrop-filter: blur(2px);
}
.graph-widget .graph-container canvas {
  display: block;
}
.graph-widget .graph-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--highlight-color);
  font-size: 12px;
  user-select: none;
}

#global-graph-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: var(--overlay-backdrop);
  backdrop-filter: blur(9px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: graph-fade-in 0.3s ease;
}
#global-graph-overlay .global-graph-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: transparent;
  z-index: 10;
}
#global-graph-overlay .global-graph-header .global-graph-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--graph-overlay-text);
}
#global-graph-overlay .global-graph-header .global-graph-close {
  width: 32px;
  height: 32px;
  border: none;
  color: var(--graph-overlay-text);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#global-graph-overlay .global-graph-header .global-graph-close:hover {
  background: var(--graph-close-hover-bg);
}
#global-graph-overlay .global-graph-container {
  width: 85vw;
  height: 80vh;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(from var(--primary-color) r g b/0.2);
  box-shadow: inset 0 0 30px rgba(from var(--primary-color) r g b/0.4), 0 0 0 1px var(--white-main), 0 0 0 1.5px var(--black-main), var(--graph-container-shadow);
  backdrop-filter: blur(4px);
}
#global-graph-overlay .global-graph-container canvas {
  display: block;
}

.wikilink-broken {
  color: var(--graph-wikilink-broken-text);
  background: var(--wikilink-broken-bg);
  border: 1px dashed var(--graph-wikilink-broken-border);
  border-radius: 3px;
  padding: 0 2px;
  font-size: 0.9em;
  cursor: help;
}

@keyframes graph-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.tag-cloud-page {
  padding: 20px;
}
.tag-cloud-page .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 0;
  line-height: 1.6;
}
.tag-cloud-page .tag-cloud a {
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
  display: inline-block;
}
.tag-cloud-page .tag-cloud a:hover {
  transform: scale(1.15);
  filter: brightness(1.15);
}
.tag-cloud-page .tag-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--secondary-color);
  font-size: 14px;
}

.tag-page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: rgba(from var(--primary-color) r g b/0.15);
  border-radius: 3px;
  box-shadow: inset 0 0 15px rgba(from var(--primary-color) r g b/0.3), 0 0 0 1px var(--white-main), 0 0 0 1.5px var(--black-main);
  backdrop-filter: blur(2px);
}

.tag-page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--black-main);
  text-shadow: 0 0 10px var(--white-main), 0 0 10px var(--white-main), 0 0 10px var(--white-main);
}

.tag-post-count {
  font-size: 12px;
  color: var(--secondary-color);
}

.tag-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--secondary-color);
  font-size: 14px;
}

.tag-cloud-widget {
  margin-top: 10px;
}
.tag-cloud-widget .tag-cloud-title {
  text-shadow: var(--text-shadow);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  color: var(--text);
}
.tag-cloud-widget .tag-cloud-content {
  padding: 8px 12px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}
.tag-cloud-widget .tag-cloud-content a {
  text-decoration: none;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 15px;
  background: rgba(from var(--primary-color) r g b/0.2);
  box-shadow: inset 0 0 0 1px var(--white-main), 0 0 0 0.5px var(--black-main), 1px 1px 4px rgba(from var(--black-main) r g b/0.3);
  transition: all 0.2s ease;
  color: var(--black-main);
  font-size: 12px;
}
.tag-cloud-widget .tag-cloud-content a:hover {
  background: rgba(from var(--primary-color) r g b/0.35);
  box-shadow: inset 0 0 0 1px var(--white-main), 0 0 0 0.5px var(--black-main), 2px 2px 8px rgba(from var(--black-main) r g b/0.5);
  transform: translateY(-1px);
}

.category-cloud-page {
  padding: 20px;
}
.category-cloud-page .category-cloud ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-cloud-page .category-cloud .category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
}
.category-cloud-page .category-cloud .category-list-item {
  display: block;
}
.category-cloud-page .category-cloud .category-list-link {
  display: inline-block;
  text-decoration: none;
  padding: 4px 14px;
  border-radius: 5px;
  transition: all 0.2s ease;
  color: var(--black-main);
  font-size: 14px;
}
.category-cloud-page .category-cloud .category-list-link:hover {
  box-shadow: inset 0 0 0 1px var(--white-main), 0 0 0 0.5px var(--black-main), 2px 2px 8px rgba(from var(--black-main) r g b/0.5);
  transform: translateY(-1px);
}
.category-cloud-page .category-cloud .category-list-child {
  margin-left: 24px;
  margin-top: 6px;
  border-left: 2px solid rgba(from var(--primary-color) r g b/0.3);
  padding-left: 12px;
}
.category-cloud-page .category-cloud .category-list-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: var(--secondary-color);
}
.category-cloud-page .category-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--secondary-color);
  font-size: 14px;
}

.category-page-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: rgba(from var(--primary-color) r g b/0.15);
  border-radius: 3px;
  box-shadow: inset 0 0 15px rgba(from var(--primary-color) r g b/0.3), 0 0 0 1px var(--white-main), 0 0 0 1.5px var(--black-main);
  backdrop-filter: blur(2px);
}

.category-page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--black-main);
  text-shadow: 0 0 10px var(--white-main), 0 0 10px var(--white-main), 0 0 10px var(--white-main);
}

.category-post-count {
  font-size: 12px;
  color: var(--secondary-color);
}

.category-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--secondary-color);
  font-size: 14px;
}

.category-widget {
  margin-top: 10px;
}
.category-widget .category-widget-title {
  text-shadow: var(--text-shadow);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  color: var(--text);
}
.category-widget .category-widget-content {
  padding: 4px 12px 12px;
}
.category-widget .category-widget-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-widget .category-widget-content .category-widget-list-item {
  padding: 4px 0;
}
.category-widget .category-widget-content .category-widget-list-link {
  text-decoration: none;
  color: var(--black-main);
  font-size: 13px;
  transition: color 0.2s ease;
  display: inline-block;
  padding: 2px 0;
}
.category-widget .category-widget-content .category-widget-list-link:hover {
  color: var(--primary-color);
}
.category-widget .category-widget-content .category-widget-list-count {
  font-size: 11px;
  color: var(--secondary-color);
  margin-left: 4px;
}
.category-widget .category-widget-content .category-widget-list-child {
  margin-left: 16px;
  border-left: 1px solid rgba(from var(--primary-color) r g b/0.2);
  padding-left: 10px;
}

.directory-group {
  margin-bottom: 20px;
}

.directory-group-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: rgba(from var(--primary-color) r g b/0.12);
  border-radius: 3px;
  box-shadow: inset 0 0 10px rgba(from var(--primary-color) r g b/0.2), 0 0 0 1px var(--white-main), 0 0 0 1.5px var(--black-main);
  backdrop-filter: blur(2px);
}

.directory-group-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--black-main);
  text-shadow: 0 0 8px var(--white-main), 0 0 8px var(--white-main);
}

.directory-group-count {
  font-size: 11px;
  color: var(--secondary-color);
}

.directory-group-separator {
  height: 1px;
  margin: 8px 0 20px;
  background: linear-gradient(to right, transparent, rgba(from var(--primary-color) r g b/0.3), transparent);
}

/* Callout Styles */
.callout {
  margin: 1em 0;
  padding: 0;
  border-radius: 8px;
  border-left: 4px solid;
  overflow: hidden;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.95em;
}

.callout-content {
  padding: 8px 12px 12px;
}

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

.callout-content > :first-child {
  margin-top: 0;
}

/* Callout icons using Remix Icon (ri-) */
.callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3em;
  height: 1.3em;
  font-size: 1.1em;
}

/* Callout type colors */
.callout-note {
  border-left-color: var(--callout-note);
  background-color: rgba(from var(--callout-note) r g b/0.04);
}

.callout-note .callout-title {
  background-color: rgba(from var(--callout-note) r g b/0.15);
  color: var(--callout-note);
}

.callout-tip {
  border-left-color: var(--callout-tip);
  background-color: rgba(from var(--callout-tip) r g b/0.04);
}

.callout-tip .callout-title {
  background-color: rgba(from var(--callout-tip) r g b/0.15);
  color: var(--callout-tip);
}

.callout-warning {
  border-left-color: var(--callout-warning);
  background-color: rgba(from var(--callout-warning) r g b/0.04);
}

.callout-warning .callout-title {
  background-color: rgba(from var(--callout-warning) r g b/0.15);
  color: var(--callout-warning);
}

.callout-danger {
  border-left-color: var(--callout-danger);
  background-color: rgba(from var(--callout-danger) r g b/0.04);
}

.callout-danger .callout-title {
  background-color: rgba(from var(--callout-danger) r g b/0.15);
  color: var(--callout-danger);
}

.callout-info {
  border-left-color: var(--callout-info);
  background-color: rgba(from var(--callout-info) r g b/0.04);
}

.callout-info .callout-title {
  background-color: rgba(from var(--callout-info) r g b/0.15);
  color: var(--callout-info);
}

.callout-question {
  border-left-color: var(--callout-question);
  background-color: rgba(from var(--callout-question) r g b/0.04);
}

.callout-question .callout-title {
  background-color: rgba(from var(--callout-question) r g b/0.15);
  color: var(--callout-question);
}

.callout-example {
  border-left-color: var(--callout-example);
  background-color: rgba(from var(--callout-example) r g b/0.04);
}

.callout-example .callout-title {
  background-color: rgba(from var(--callout-example) r g b/0.15);
  color: var(--callout-example);
}

.callout-quote {
  border-left-color: var(--callout-quote);
  background-color: rgba(from var(--callout-quote) r g b/0.04);
}

.callout-quote .callout-title {
  background-color: rgba(from var(--callout-quote) r g b/0.15);
  color: var(--callout-quote);
}

.callout-todo {
  border-left-color: var(--callout-todo);
  background-color: rgba(from var(--callout-todo) r g b/0.04);
}

.callout-todo .callout-title {
  background-color: rgba(from var(--callout-todo) r g b/0.15);
  color: var(--callout-todo);
}

.callout-important {
  border-left-color: var(--callout-important);
  background-color: rgba(from var(--callout-important) r g b/0.04);
}

.callout-important .callout-title {
  background-color: rgba(from var(--callout-important) r g b/0.15);
  color: var(--callout-important);
}

.callout-summary {
  border-left-color: var(--callout-summary);
  background-color: rgba(from var(--callout-summary) r g b/0.04);
}

.callout-summary .callout-title {
  background-color: rgba(from var(--callout-summary) r g b/0.15);
  color: var(--callout-summary);
}

.callout-abstract {
  border-left-color: var(--callout-abstract);
  background-color: rgba(from var(--callout-abstract) r g b/0.04);
}

.callout-abstract .callout-title {
  background-color: rgba(from var(--callout-abstract) r g b/0.15);
  color: var(--callout-abstract);
}

/* Folder Tree Styles */
.folder-tree-page {
  padding: 10px 0;
}

.folder-summary {
  padding: 0 10px 12px;
  font-size: 0.9em;
  color: var(--text1);
  border-bottom: 1px solid rgba(from var(--black-main) r g b/0.15);
  margin-bottom: 8px;
}

.folder-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.folder-node {
  list-style: none;
}

.folder-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  user-select: none;
}

.folder-toggle:hover {
  background-color: rgba(from var(--primary-color) r g b/0.1);
}

.folder-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 0.75em;
  color: var(--text1);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.folder-name {
  font-size: 0.95em;
  font-weight: 600;
  color: var(--black-main);
}

.folder-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.75em;
  font-weight: 600;
  border-radius: 10px;
  background-color: rgba(from var(--primary-color) r g b/0.15);
  color: var(--text1);
  margin-left: auto;
}

.folder-children {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.folder-children.expanded {
  max-height: none;
}

.folder-children.collapsed {
  max-height: 0;
}

.folder-leaf {
  list-style: none;
  position: relative;
}

.folder-post-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.folder-post-link:hover {
  background-color: rgba(from var(--primary-color) r g b/0.08);
}

.folder-post-link::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  flex-shrink: 0;
}

.folder-post-title {
  font-size: 0.9em;
  color: var(--black-main);
  flex: 1;
}

.folder-post-link:hover .folder-post-title {
  color: var(--primary-color);
}

.folder-post-date {
  font-size: 0.8em;
  color: var(--text1);
  flex-shrink: 0;
}

.folder-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--secondary-color);
  font-size: 0.95em;
}

/* Dark theme adjustments */
[data-theme=dark] .folder-toggle:hover {
  background-color: rgba(from var(--primary-color) r g b/0.15);
}

[data-theme=dark] .folder-post-link:hover {
  background-color: rgba(from var(--primary-color) r g b/0.12);
}

/* ─── Search Widget (Sidebar) ────────────────────────── */
.search-widget {
  padding: 0;
  margin-top: 20px;
  transition: box-shadow 0.3s ease;
}
.search-widget .search-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--black-main);
  font-size: 0.875rem;
  font-family: inherit;
  transition: color 0.2s ease;
  text-shadow: var(--text-shadow);
}
.search-widget .search-trigger:hover {
  color: var(--hover-light);
}
.search-widget .search-trigger .ri-search-line {
  font-size: 1rem;
  flex-shrink: 0;
}
.search-widget .search-trigger span:not(.ri-search-line) {
  flex: 1;
  text-align: left;
}
.search-widget .search-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--ctp-overlay0);
  border-radius: 3px;
  font-size: 0.7rem;
  font-family: inherit;
  color: var(--ctp-subtext0);
  background: var(--ctp-surface0);
  line-height: 1.2;
  margin-left: auto;
  flex-shrink: 0;
  text-shadow: none;
}

/* ─── Search Overlay ──────────────────────────────────── */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--overlay-backdrop);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.search-overlay .search-panel {
  display: flex;
  flex-direction: column;
  width: min(90vw, 960px);
  max-height: min(80vh, 700px);
  margin: 10vh auto 0;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  background: rgba(from var(--primary-color) r g b/0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 20px rgba(from var(--primary-color) r g b/0.3), 0 0 0 1px var(--white-main), 0 0 0 1.5px var(--black-main), 0 8px 32px rgba(from var(--ctp-crust) r g b/0.5);
  /* Aero reflection highlight (same as .card::before) */
}
.search-overlay .search-panel::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: brightness(1.2);
  background-image: url(/image/reflection.png);
  background-size: cover;
  background-attachment: fixed;
}

/* ─── Search Header (Input) ───────────────────────────── */
.search-main {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--aero-grad);
  gap: 0.75rem;
}
.search-main .search-input {
  flex: 1;
  border: none;
  border-radius: 3px;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--ctp-surface0);
  color: var(--black-main);
  outline: none;
  box-shadow: var(--button-shadow);
  box-sizing: border-box;
  transition: background 0.2s ease;
  position: relative;
  z-index: 1;
}
.search-main .search-input::placeholder {
  color: var(--ctp-overlay0);
}
.search-main .search-input:focus {
  background: var(--ctp-surface1);
}
.search-main .search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ctp-subtext0);
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
  z-index: 1;
}
.search-main .search-close:hover {
  background: var(--aero-grad);
  color: var(--black-main);
}

/* ─── Search Body (Results + Preview) ─────────────────── */
.search-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ─── Results List ────────────────────────────────────── */
.search-results {
  width: 320px;
  min-width: 280px;
  overflow-y: auto;
  box-shadow: 0 0 0 1px var(--white-main);
  position: relative;
}
.search-results .search-empty {
  padding: 2rem 1.25rem;
  color: var(--ctp-text);
  text-align: center;
  font-size: 0.875rem;
  text-shadow: var(--text-shadow);
}

.result-card {
  display: block;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 0.15s ease;
}
.result-card .result-title,
.result-card .result-excerpt {
  position: relative;
  z-index: 1;
}
.result-card {
  /* Aero hover/selected glow on ::after */
}
.result-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to top, var(--hover-light2) 0%, color-mix(in srgb, var(--hover-light2), black 20%) 51%, var(--hover-light2) 50%, var(--hover-light2) 80%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.result-card:hover::after, .result-card.selected::after {
  opacity: 0.5;
  box-shadow: 0 0 3px 6px var(--hover-light) inset;
}
.result-card:hover, .result-card.selected {
  background: rgba(from var(--primary-color) r g b/0.15);
}
.result-card .result-title {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--black-main);
  line-height: 1.3;
  text-shadow: var(--text-shadow);
}
.result-card .result-excerpt {
  margin: 0;
  font-size: 0.775rem;
  color: var(--ctp-subtext0);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Preview Panel ───────────────────────────────────── */
.preview-container {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 1.25rem;
  background: rgba(from var(--primary-color) r g b/0.15);
}
.preview-container .preview-empty,
.preview-container .preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: var(--ctp-text);
  font-size: 0.875rem;
  text-align: center;
  text-shadow: var(--text-shadow);
}
.preview-container .preview-loading::after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.5rem;
  border: 2px solid var(--ctp-surface1);
  border-top-color: var(--hover-light);
  border-radius: 50%;
  animation: search-spin 0.6s linear infinite;
}
.preview-container {
  /* Preview content styling */
}
.preview-container p {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ctp-subtext0);
}
.preview-container h1, .preview-container h2, .preview-container h3, .preview-container h4, .preview-container h5, .preview-container h6 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  color: var(--black-main);
  text-shadow: var(--text-shadow);
}
.preview-container ul, .preview-container ol {
  padding-left: 1.25rem;
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--ctp-subtext0);
  line-height: 1.6;
}
.preview-container pre, .preview-container code {
  font-size: 0.8rem;
}
.preview-container code {
  background: var(--ctp-surface0);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}
.preview-container pre {
  background: var(--ctp-mantle);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  overflow-x: auto;
  margin: 0 0 0.75rem;
}
.preview-container blockquote {
  border-left: 3px solid var(--ctp-surface1);
  padding-left: 0.75rem;
  margin: 0 0 0.75rem;
  color: var(--ctp-subtext0);
  font-size: 0.85rem;
}
.preview-container a {
  color: var(--hover-light);
  text-decoration: none;
}
.preview-container a:hover {
  text-decoration: underline;
}
.preview-container img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: var(--image-shadow);
}
.preview-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
}
.preview-container th, .preview-container td {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--ctp-surface1);
}

/* ─── Highlight ─────────────────────────────────────────── */
.highlight {
  background: color-mix(in srgb, var(--hover-light2), transparent 60%);
  color: var(--black-main);
  border-radius: 2px;
  padding: 0 1px;
  box-shadow: 0 0 3px var(--hover-light);
}

/* ─── Loading Animation ─────────────────────────────────── */
@keyframes search-spin {
  to {
    transform: rotate(360deg);
  }
}
/* ─── Mobile / Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .search-overlay .search-panel {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    /* Remove reflection on fullscreen */
  }
  .search-overlay .search-panel::before {
    display: none;
  }
  .search-body {
    flex-direction: column;
  }
  .search-results {
    width: 100%;
    min-width: unset;
    box-shadow: none;
    border-bottom: 0.5px solid var(--black-main);
    border-top: 1px solid var(--white-main);
    max-height: 40vh;
  }
  .preview-container {
    display: none;
  }
}