/* ======================================================================
   Hexo Butterfly 蓝白主题美化 — custom.css
   配色：蓝白淡色系  |  Millennium 自定义光标  |  毛玻璃卡片  |  动效
   ====================================================================== */

/* 字体资源改为运行时按需注入，避免 @import 阻塞首屏 */

/* ── 0. CSS 变量 ────────────────────────────────────────────────── */
:root {
  --blue-primary:     #49B1F5;
  --blue-deep:        #2196F3;
  --blue-light:       #A8D8EA;
  --blue-lighter:     #E3F2FD;
  --blue-accent:      #5DADE2;
  --blue-soft:        #87CEEB;
  --blue-pale:        #f0f8ff;
  --blue-sky:         #89CFF0;
  --card-bg:          rgba(255, 255, 255, 0.82);
  --card-bg-hover:    rgba(255, 255, 255, 0.95);
  --shadow-card:      0 8px 32px rgba(73, 177, 245, 0.12);
  --shadow-card-hover:0 14px 44px rgba(73, 177, 245, 0.22);
  --border-card:      1px solid rgba(73, 177, 245, 0.12);
  --radius:           16px;
  --radius-sm:        10px;
  --radius-lg:        20px;
  --trans:            transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                      box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                      background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                      color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                      border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-bounce:     transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                      box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                      background 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ── 1. 自定义光标（Millennium 系列） ─────────────────────────── */
@media (min-width: 769px) and (pointer: fine) {
  *,
  *::before,
  *::after {
    cursor: url('https://api.gqzsldy.com/cur/millennium_base.png'), auto !important;
  }

  a,
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  [role="button"],
  .btn,
  summary,
  label[for],
  .card-widget,
  .recent-post-item,
  .flink-item,
  #rightside > div > button,
  #rightside > div > a,
  .pagination .page-number,
  .search-dialog .search-close-button,
  nav a,
  #nav a,
  #nav .toggle-menu,
  .menus_items a {
    cursor: url('https://api.gqzsldy.com/cur/millennium_link.png'), pointer !important;
  }

  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="tel"],
  input[type="number"],
  textarea,
  [contenteditable="true"] {
    cursor: url('https://api.gqzsldy.com/cur/millennium_text.png'), text !important;
  }

  [draggable="true"],
  .CodeMirror-gutter,
  .aplayer-bar-wrap {
    cursor: url('https://api.gqzsldy.com/cur/millennium_move.png'), move !important;
  }

  [disabled],
  .disabled,
  .btn[disabled] {
    cursor: url('https://api.gqzsldy.com/cur/millennium_block.png'), not-allowed !important;
  }

  [title],
  abbr,
  .tooltip {
    cursor: url('https://api.gqzsldy.com/cur/millennium_help_rio.png'), help !important;
  }

  .col-resize { cursor: url('https://api.gqzsldy.com/cur/millennium_EW.png'), col-resize !important; }
  .row-resize { cursor: url('https://api.gqzsldy.com/cur/millennium_NS.png'), row-resize !important; }
  .nwse-resize { cursor: url('https://api.gqzsldy.com/cur/millennium_diag1.png'), nwse-resize !important; }
  .nesw-resize { cursor: url('https://api.gqzsldy.com/cur/millennium_diag2.png'), nesw-resize !important; }

  .loading,
  html.is-loading * {
    cursor: url('https://api.gqzsldy.com/cur/millennium_loading_v1.png'), wait !important;
  }

  /* 备选交互（alt 键 + 拖拽、可选元素） */
  [aria-haspopup],
  select,
  option {
    cursor: url('https://api.gqzsldy.com/cur/millennium_alternative.png'), auto !important;
  }

  /* 区域选择（图片/画布框选） */
  [contenteditable],
  [spellcheck],
  canvas,
  img[usemap],
  .selection-area {
    cursor: url('https://api.gqzsldy.com/cur/millennium_areaselect.png'), crosshair !important;
  }

  /* 绘制/精确操作（pen 图标） */
  .pen,
  [data-cursor="pen"],
  .code-mermaid,
  .mermaid svg {
    cursor: url('https://api.gqzsldy.com/cur/millennium_pen.png'), crosshair !important;
  }

  /* 背景区域 — 页面空白/不可交互的装饰区 */
  .top-img,
  #footer,
  #footer-wrap,
  .sidebar,
  .layout,
  #content-outer {
    cursor: url('https://api.gqzsldy.com/cur/millennium_background_aris.png'), auto !important;
  }
}


/* ── 2. 全局基础 ─────────────────────────────────────────────── */
body {
  background: none !important;
  background-color: transparent !important;
}

html {
  background: none !important;
  background-color: #E3F2FD !important;
  scroll-behavior: smooth;
}

/* 固定背景层 — JS 创建 #bg-fixed */
#bg-fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -1 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  pointer-events: none !important;
}

/* 中间容器全部透明（毛玻璃生效的关键） */
#web_bg,
#body-wrap,
#content-inner,
#main,
#recent-posts,
#aside-content,
.layout {
  background: transparent !important;
  background-color: transparent !important;
}

/* 文字选中颜色 */
::selection {
  background: rgba(73, 177, 245, 0.25);
  color: #2c3e50;
}

::-moz-selection {
  background: rgba(73, 177, 245, 0.25);
  color: #2c3e50;
}


/* ── 3. 自定义滚动条 ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(73, 177, 245, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue-sky), var(--blue-primary));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--blue-primary), var(--blue-deep));
}


/* ── 4. 导航栏 ───────────────────────────────────────────────── */
#nav {
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: var(--trans) !important;
}

#nav.fixed {
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 2px 20px rgba(73, 177, 245, 0.1);
}

#nav a:hover {
  color: var(--blue-primary) !important;
}

#site-name {
  text-shadow: none;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue-primary), #667eea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menus_items .menus_item a {
  position: relative;
  transition: var(--trans);
}

.menus_items .menus_item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-sky));
  transition: width 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.menus_items .menus_item a:hover::after {
  width: 80%;
}


/* ── 5. 顶部 Banner ─────────────────────────────────────────── */
#page-header,
#page-header.full_page,
#page-header.not-home-page {
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#page-header::before,
#page-header::after {
  display: none !important;
  background: none !important;
}

#page-header > .mask {
  display: none !important;
  opacity: 0 !important;
}

#page-header #site-info {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

#page-header #site-title {
  font-weight: 700;
  letter-spacing: 2px;
}

#page-header #site-subtitle {
  font-weight: 400;
  letter-spacing: 1px;
  opacity: 0.92;
}

#scroll-down i {
  animation: scroll-down-bounce 2.5s ease-in-out infinite;
}

@keyframes scroll-down-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: 0.4; }
}


/* ── 6. 卡片通用样式（毛玻璃） ───────────────────────────────── */

/* 文章列表卡片 */
#recent-posts > .recent-post-item {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: var(--radius) !important;
  border: var(--border-card) !important;
  box-shadow: var(--shadow-card) !important;
  transition: var(--trans) !important;
}

#recent-posts > .recent-post-item:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: var(--shadow-card-hover) !important;
  transform: translateY(-4px);
}

/* 侧边栏卡片 */
.card-widget {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: var(--radius) !important;
  border: var(--border-card) !important;
  box-shadow: var(--shadow-card) !important;
  transition: var(--trans) !important;
}

.card-widget:hover {
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: var(--shadow-card-hover) !important;
}

/* 文章页、归档页、普通页面 */
#post,
#page,
#archive,
.layout_post > div:first-child,
.layout_page > div:first-child,
.flink .card-widget,
#article-container,
.tag-cloud-list,
.category-lists {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-radius: var(--radius) !important;
  border: var(--border-card) !important;
  box-shadow: var(--shadow-card) !important;
  transition: var(--trans) !important;
}


/* ── 7. 首页文章卡片 ─────────────────────────────────────────── */
#recent-posts > .recent-post-item {
  margin-bottom: 20px !important;
  overflow: hidden;
}

.recent-post-item .post_cover img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
}

.recent-post-item:hover .post_cover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

.recent-post-item .post_cover {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.recent-post-info {
  padding: 16px 20px !important;
}

.recent-post-info .article-title {
  font-weight: 700;
  transition: color 0.3s ease;
  line-height: 1.5;
}

.recent-post-info .article-title:hover {
  color: var(--blue-primary) !important;
}

.recent-post-info .article-meta-wrap {
  color: var(--blue-light) !important;
}

.recent-post-info .article-meta-wrap i {
  color: var(--blue-primary);
}


/* ── 8. 文章页 ───────────────────────────────────────────────── */
#post {
  padding: 30px 40px !important;
}

#article-container {
  font-size: 15px;
  line-height: 1.85;
  color: #444;
}

#article-container h1,
#article-container h2,
#article-container h3,
#article-container h4,
#article-container h5,
#article-container h6 {
  position: relative;
  padding-left: 16px;
  border-left: 4px solid var(--blue-primary);
  transition: var(--trans);
}

#article-container h1:hover,
#article-container h2:hover,
#article-container h3:hover {
  border-left-color: var(--blue-deep);
  background: linear-gradient(90deg, rgba(73,177,245,0.06), transparent);
  border-radius: 0 8px 8px 0;
}

#article-container a:not(.btn-beautify):not(.fancybox):not([class]) {
  color: var(--blue-primary);
  text-decoration: none;
  border-bottom: 1px dashed rgba(73, 177, 245, 0.4);
  transition: var(--trans);
  padding-bottom: 1px;
}

#article-container a:not(.btn-beautify):not(.fancybox):not([class]):hover {
  color: var(--blue-deep);
  border-bottom-style: solid;
  border-bottom-color: var(--blue-deep);
}

#article-container blockquote {
  background: linear-gradient(135deg, rgba(73,177,245,0.06), rgba(137,207,240,0.08));
  border-left: 4px solid var(--blue-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 20px 0;
  position: relative;
}

#article-container blockquote::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 50px;
  color: rgba(73, 177, 245, 0.2);
  font-family: Georgia, serif;
  line-height: 1;
}

#article-container figure.highlight {
  border-radius: var(--radius-sm) !important;
  border: var(--border-card) !important;
  box-shadow: 0 4px 16px rgba(73, 177, 245, 0.08);
  overflow: hidden;
}

#article-container code:not([class]) {
  background: rgba(73, 177, 245, 0.1);
  color: #3498DB;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

#article-container img {
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

#article-container img:hover {
  box-shadow: 0 8px 28px rgba(73, 177, 245, 0.18);
  transform: scale(1.01);
}

#article-container table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(73, 177, 245, 0.08);
  width: 100%;
}

#article-container table thead {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-accent));
  color: #fff;
}

#article-container table thead th {
  border: none;
  padding: 12px 16px;
  font-weight: 600;
}

#article-container table tbody tr {
  transition: background 0.2s;
}

#article-container table tbody tr:nth-child(2n) {
  background: rgba(73, 177, 245, 0.04);
}

#article-container table tbody tr:hover {
  background: rgba(73, 177, 245, 0.1);
}

#article-container table td {
  padding: 10px 16px;
  border-color: rgba(73, 177, 245, 0.1);
}

.post-copyright {
  background: linear-gradient(135deg, rgba(73,177,245,0.06), rgba(137,207,240,0.1)) !important;
  border-left: 4px solid var(--blue-primary) !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
  padding: 18px 24px !important;
  position: relative;
  overflow: hidden;
}

.post-copyright::before {
  content: '\f1f9';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: rgba(73, 177, 245, 0.08);
}


/* ── 9. 侧边栏 ──────────────────────────────────────────────── */
.card-widget {
  margin-bottom: 16px !important;
  overflow: hidden;
}

.item-headline {
  font-weight: 700;
  position: relative;
  padding-bottom: 8px;
}

.item-headline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-sky));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.card-widget:hover .item-headline::after {
  width: 80px;
}

.card-info .author-info__name {
  font-weight: 700;
  font-size: 1.15em;
  background: linear-gradient(135deg, var(--blue-primary), #667eea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-info .avatar-img {
  border: 3px solid rgba(73, 177, 245, 0.3) !important;
  box-shadow: 0 4px 16px rgba(73, 177, 245, 0.2);
  transition: transform 0.6s ease !important;
}

#aside-content .card-author img.avatar-img,
.avatar-img {
  animation: none !important;
  transition: transform 0.6s ease !important;
}

#aside-content .card-author img.avatar-img:hover,
.avatar-img:hover {
  transform: rotate(360deg) !important;
}

.card-info .button--animated {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-accent)) !important;
  border-radius: 20px !important;
  border: none !important;
  color: #fff !important;
  transition: var(--trans-bounce) !important;
  box-shadow: 0 4px 12px rgba(73, 177, 245, 0.3);
}

.card-info .button--animated:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(73, 177, 245, 0.45) !important;
}

.card-announcement .item-content {
  font-size: 14px;
  line-height: 1.8;
}

.card-tag-cloud a {
  border-radius: 14px !important;
  padding: 4px 12px !important;
  margin: 3px !important;
  transition: var(--trans-bounce) !important;
  border: 1px solid rgba(73, 177, 245, 0.15) !important;
  background: rgba(73, 177, 245, 0.04) !important;
}

.card-tag-cloud a:hover {
  background: var(--blue-primary) !important;
  color: #fff !important;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(73, 177, 245, 0.3);
}

.card-categories .card-category-list-item {
  padding: 8px 0;
  transition: var(--trans);
  border-radius: 6px;
}

.card-categories .card-category-list-item:hover {
  padding-left: 8px;
  background: rgba(73, 177, 245, 0.06);
}

.card-recent-post .aside-list-item {
  padding: 8px;
  border-radius: 8px;
  transition: var(--trans);
}

.card-recent-post .aside-list-item:hover {
  background: rgba(73, 177, 245, 0.06);
  transform: translateX(4px);
}

.card-recent-post .aside-list-item .thumbnail img {
  border-radius: 6px;
  transition: transform 0.35s ease;
}

.card-recent-post .aside-list-item:hover .thumbnail img {
  transform: scale(1.05);
}

.card-archives ul.card-archive-list > .card-archive-list-item {
  padding: 6px 10px;
  border-radius: 6px;
  transition: var(--trans);
}

.card-archives ul.card-archive-list > .card-archive-list-item:hover {
  background: rgba(73, 177, 245, 0.06);
}

.card-webinfo .webinfo-item {
  padding: 4px 0;
}

.card-webinfo .webinfo-item .webinfo-item-text {
  color: #7A8B9A;
}


/* ── 10. 页脚 ─────────────────────────────────────────────────── */
#footer {
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-top: 1px solid rgba(73, 177, 245, 0.1);
  transition: var(--trans);
}

#footer #footer-wrap {
  color: #607D8B;
}

#footer a {
  color: var(--blue-primary) !important;
  transition: color 0.2s ease;
}

#footer a:hover {
  color: var(--blue-deep) !important;
}


/* ── 11. 分页按钮 ─────────────────────────────────────────────── */
#pagination .page-number,
#pagination .extend {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-radius: 10px !important;
  border: var(--border-card) !important;
  box-shadow: 0 2px 8px rgba(73, 177, 245, 0.08);
  transition: var(--trans-bounce) !important;
  margin: 0 4px;
}

#pagination .page-number:hover,
#pagination .extend:hover {
  background: var(--blue-primary) !important;
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(73, 177, 245, 0.3) !important;
}

#pagination .page-number.current {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-accent)) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(73, 177, 245, 0.3);
}


/* ── 12. 搜索弹窗 ────────────────────────────────────────────── */
.search-dialog {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--radius-lg) !important;
  border: var(--border-card) !important;
  box-shadow: 0 20px 60px rgba(73, 177, 245, 0.15) !important;
}

.search-dialog .search-input {
  border-radius: 20px !important;
  border: 2px solid rgba(73, 177, 245, 0.2) !important;
  padding: 10px 20px;
  transition: var(--trans);
}

.search-dialog .search-input:focus {
  border-color: var(--blue-primary) !important;
  box-shadow: 0 0 0 3px rgba(73, 177, 245, 0.15);
}


/* ── 13. 目录 TOC ─────────────────────────────────────────────── */
#card-toc .toc-content .toc-link {
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: var(--trans);
  border-radius: 0 6px 6px 0;
}

#card-toc .toc-content .toc-link:hover {
  background: rgba(73, 177, 245, 0.06);
  color: var(--blue-primary);
}

#card-toc .toc-content .toc-link.active {
  border-left-color: var(--blue-primary);
  background: rgba(73, 177, 245, 0.1);
  color: var(--blue-primary);
  font-weight: 600;
}


/* ── 14. 右下角按钮 ──────────────────────────────────────────── */
#rightside > div > button,
#rightside > div > a {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-accent)) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(73, 177, 245, 0.3) !important;
  transition: var(--trans-bounce) !important;
  border: none !important;
  color: #fff !important;
}

#rightside > div > button:hover,
#rightside > div > a:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(73, 177, 245, 0.4) !important;
}


/* ── 15. 友链 ─────────────────────────────────────────────────── */
.flink .flink-list .flink-list-item {
  border-radius: var(--radius) !important;
  border: var(--border-card) !important;
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--trans-bounce) !important;
  overflow: hidden;
}

.flink .flink-list .flink-list-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-card-hover) !important;
  background: var(--card-bg-hover) !important;
}

.flink .flink-list .flink-list-item .flink-item-icon img {
  border-radius: 50%;
  border: 2px solid rgba(73, 177, 245, 0.2);
  transition: transform 0.6s ease;
}

.flink .flink-list .flink-list-item:hover .flink-item-icon img {
  transform: rotate(360deg);
}


/* ── 16. 归档 / 标签 / 分类页 ────────────────────────────────── */
.article-sort {
  margin-left: 10px;
}

.article-sort-item {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: var(--border-card);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 10px;
  transition: var(--trans);
}

.article-sort-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-card);
  background: var(--card-bg-hover);
}

.article-sort-item::before {
  background: var(--blue-primary) !important;
  box-shadow: 0 0 6px rgba(73, 177, 245, 0.4);
}

.article-sort-item-title {
  transition: color 0.2s;
}

.article-sort-item:hover .article-sort-item-title {
  color: var(--blue-primary);
}


/* ── 17. Note 标签 ────────────────────────────────────────────── */
.note {
  border-radius: var(--radius-sm) !important;
  padding: 16px 20px !important;
  backdrop-filter: blur(8px);
  border: var(--border-card) !important;
}

.note.blue,
.note.info {
  background: rgba(73, 177, 245, 0.08) !important;
  border-left: 4px solid var(--blue-primary) !important;
}


/* ── 18. 相关文章 ─────────────────────────────────────────────── */
.relatedPosts > .relatedPosts-list > div {
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
  backdrop-filter: blur(8px);
  border: var(--border-card);
  transition: var(--trans-bounce) !important;
}

.relatedPosts > .relatedPosts-list > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.relatedPosts > .relatedPosts-list > div img {
  transition: transform 0.5s ease;
}

.relatedPosts > .relatedPosts-list > div:hover img {
  transform: scale(1.08);
}


/* ── 19. 入场动画 ─────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#recent-posts > .recent-post-item,
.card-widget {
  animation: fadeInUp 0.6s ease-out both;
}

#recent-posts > .recent-post-item:nth-child(1) { animation-delay: 0.05s; }
#recent-posts > .recent-post-item:nth-child(2) { animation-delay: 0.10s; }
#recent-posts > .recent-post-item:nth-child(3) { animation-delay: 0.15s; }
#recent-posts > .recent-post-item:nth-child(4) { animation-delay: 0.20s; }
#recent-posts > .recent-post-item:nth-child(5) { animation-delay: 0.25s; }
#recent-posts > .recent-post-item:nth-child(6) { animation-delay: 0.30s; }
#recent-posts > .recent-post-item:nth-child(7) { animation-delay: 0.35s; }
#recent-posts > .recent-post-item:nth-child(8) { animation-delay: 0.40s; }
#recent-posts > .recent-post-item:nth-child(9) { animation-delay: 0.45s; }
#recent-posts > .recent-post-item:nth-child(10) { animation-delay: 0.50s; }

.aside-content .card-widget:nth-child(1) { animation-delay: 0.10s; }
.aside-content .card-widget:nth-child(2) { animation-delay: 0.18s; }
.aside-content .card-widget:nth-child(3) { animation-delay: 0.26s; }
.aside-content .card-widget:nth-child(4) { animation-delay: 0.34s; }
.aside-content .card-widget:nth-child(5) { animation-delay: 0.42s; }


/* ── 20. 深色模式 ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --card-bg:          rgba(22, 27, 34, 0.82);
  --card-bg-hover:    rgba(22, 27, 34, 0.95);
  --shadow-card:      0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-card-hover:0 14px 44px rgba(0, 0, 0, 0.4);
  --border-card:      1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] html {
  background-color: #0d1117 !important;
}

/* 深色卡片 */
[data-theme="dark"] #recent-posts > .recent-post-item,
[data-theme="dark"] .card-widget {
  background: rgba(22, 27, 34, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

[data-theme="dark"] #post,
[data-theme="dark"] #page,
[data-theme="dark"] #archive,
[data-theme="dark"] .layout_post > div:first-child,
[data-theme="dark"] .layout_page > div:first-child,
[data-theme="dark"] #article-container,
[data-theme="dark"] .tag-cloud-list,
[data-theme="dark"] .category-lists {
  background: rgba(22, 27, 34, 0.82) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

/* 深色导航 */
[data-theme="dark"] #nav.fixed {
  background: rgba(22, 27, 34, 0.78) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* 深色页脚 */
[data-theme="dark"] #footer {
  background: rgba(22, 27, 34, 0.45) !important;
  border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] #footer #footer-wrap {
  color: #8b949e;
}

/* 深色文章内容 */
[data-theme="dark"] #article-container {
  color: #c9d1d9;
}

[data-theme="dark"] #article-container code:not([class]) {
  background: rgba(73, 177, 245, 0.15);
  color: #58a6ff;
}

[data-theme="dark"] #article-container blockquote {
  background: linear-gradient(135deg, rgba(73,177,245,0.08), rgba(30,40,55,0.3));
}

/* 深色分页 */
[data-theme="dark"] #pagination .page-number,
[data-theme="dark"] #pagination .extend {
  background: rgba(22, 27, 34, 0.75) !important;
}

/* 深色搜索 */
[data-theme="dark"] .search-dialog {
  background: rgba(22, 27, 34, 0.95) !important;
}

/* 深色归档 */
[data-theme="dark"] .article-sort-item {
  background: rgba(22, 27, 34, 0.75);
}

/* 深色友链 */
[data-theme="dark"] .flink .flink-list .flink-list-item {
  background: rgba(22, 27, 34, 0.75) !important;
}

/* 深色选中 */
[data-theme="dark"] ::selection {
  background: rgba(73, 177, 245, 0.35);
  color: #e6edf3;
}

/* 深色侧边栏文字 */
[data-theme="dark"] .card-webinfo .webinfo-item .webinfo-item-text {
  color: #8b949e;
}


/* ── 21. AI 摘要小组件 ──────────────────────────────────────── */
.ai-summary-widget {
  background: linear-gradient(135deg, rgba(73,177,245,0.07), rgba(137,207,240,0.06));
  border: 1px solid rgba(73, 177, 245, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease-out both;
}

.ai-summary-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--blue-primary), var(--blue-accent));
  border-radius: 0 2px 2px 0;
}

/* 深色模式 */
[data-theme="dark"] .ai-summary-widget {
  background: linear-gradient(135deg, rgba(73,177,245,0.1), rgba(30,40,55,0.4));
  border-color: rgba(73, 177, 245, 0.15);
}

.ai-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ai-summary-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--blue-primary);
}

.ai-summary-icon {
  flex-shrink: 0;
}

.ai-summary-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-summary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid rgba(73, 177, 245, 0.3);
  border-radius: 16px;
  background: transparent;
  color: var(--blue-primary);
  cursor: pointer;
  transition: var(--trans-bounce);
  white-space: nowrap;
}

.ai-summary-btn:hover {
  background: var(--blue-primary);
  color: #fff;
  border-color: var(--blue-primary);
  box-shadow: 0 4px 12px rgba(73, 177, 245, 0.25);
}

.ai-summary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-summary-btn svg {
  vertical-align: middle;
}

.ai-summary-btn svg.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ai-summary-body {
  font-size: 14px;
  line-height: 1.75;
  color: #555;
}

[data-theme="dark"] .ai-summary-body {
  color: #c9d1d9;
}

.ai-summary-text {
  margin: 0;
  padding: 0;
}

.ai-summary-empty {
  opacity: 0.6;
  font-style: italic;
}

.ai-summary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(73, 177, 245, 0.1);
  font-size: 11px;
  color: #999;
}

.ai-summary-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(73, 177, 245, 0.1);
  border-radius: 10px;
  color: var(--blue-primary);
}

.ai-summary-time {
  opacity: 0.6;
}

/* 加载动画 */
.ai-summary-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.ai-summary-streaming .ai-summary-loading-dots::after {
  content: '...';
  display: inline-block;
  width: 1.6em;
  overflow: hidden;
  vertical-align: bottom;
  animation: aiSummaryDots 1.2s steps(4, end) infinite;
}

.ai-summary-typing {
  position: relative;
}

.ai-summary-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: var(--blue-primary);
  border-radius: 2px;
  animation: aiSummaryCursorBlink 0.9s steps(1, end) infinite;
}

@keyframes aiSummaryDots {
  from { width: 0; }
  to { width: 1.6em; }
}

@keyframes aiSummaryCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.ai-summary-loading-text {
  font-size: 13px;
  color: #999;
}

/* ── 22. 移动端适配 ───────────────────────────────────────────── */
@media screen and (max-width: 768px) {

  /* ★ 侧边栏改为右侧滑出面板 */
  #aside-content {
    position: fixed !important;
    right: -300px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 1002;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    padding: 70px 15px 20px;
    display: block !important;
  }

  /* 打开状态 — JS 添加 class */
  #aside-content.toc-open {
    right: 0 !important;
  }

  /* 遮罩层 */
  #toc-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1001;
  }

  #toc-mask.show {
    display: block;
  }

  /* 深色模式 */
  [data-theme="dark"] #aside-content {
    background: rgba(22, 27, 34, 0.95) !important;
  }

  /* 文章页 */
  #post {
    padding: 20px 16px !important;
    width: 100% !important;
  }

  /* 标题左边距缩小 */
  #article-container h1,
  #article-container h2,
  #article-container h3,
  #article-container h4,
  #article-container h5,
  #article-container h6 {
    padding-left: 10px;
  }

  /* 卡片圆角缩小 */
  #recent-posts > .recent-post-item,
  .card-widget,
  #post,
  #page,
  #archive {
    border-radius: var(--radius-sm) !important;
  }

  /* 表格横向滚动 */
  #article-container .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 右下角按钮 */
  #rightside {
    bottom: 15px;
    right: 10px;
  }
}

@media screen and (max-width: 480px) {
  #post {
    padding: 15px 12px !important;
  }

  .recent-post-info {
    padding: 12px 14px !important;
  }

  #article-container {
    font-size: 14px;
    line-height: 1.75;
  }
}

/* ============================================
   文章区加宽 + 布局优化
   ============================================ */

/* 整体容器加宽 */
#content-inner {
  max-width: 1400px !important;
}

/* 文章区占比加大，侧边栏保持 */
.layout > div:first-child {
  width: 78% !important;
}

#aside-content {
  width: 22% !important;
}

/* 文章内容内边距调整 */
.layout > div:first-child:not(.nc) {
  padding: 50px 45px !important;
}

/* 首页卡片展示区域也加宽 */
@media screen and (min-width: 1200px) {
  .layout {
    max-width: 1400px !important;
  }
}
