# Reading progress
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 4000;
  pointer-events: none;
  transition: transform 0.1s linear;
  background-image: linear-gradient(90deg, #2e90f0, #5ac8ff);
  box-shadow: 0 0 12px rgba(46, 144, 240, 0.45);
  opacity: 0.95;
  will-change: transform;
}

#toc-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1f3b57;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  visibility: hidden;
  z-index: 1100;
  cursor: pointer;
}

#toc-fab.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

#toc-fab:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  color: #0f305e;
}

#toc-fab.active {
  background: linear-gradient(135deg, #2e90f0 0%, #5ac8ff 100%);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 767px) {
  #toc-fab {
    right: 1rem;
    bottom: 4.5rem;
  }
}

[data-user-color-scheme='dark'] #toc-fab {
  background: rgba(12, 18, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eaf3ff;
}

[data-user-color-scheme='dark'] #toc-fab:hover {
  color: #ffffff;
}

[data-user-color-scheme='dark'] #toc-fab.active {
  background: linear-gradient(135deg, #2e90f0 0%, #5ac8ff 100%);
  color: #fff;
}

/* ========== 目录浮动面板 ========== */
.toc-float-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 10rem;
  width: 260px;
  max-height: 50vh;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  overflow: hidden;
}

.toc-float-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.toc-float-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(46, 144, 240, 0.06);
}

.toc-float-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-color, #1f3b57);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.toc-float-panel-title i {
  color: var(--accent, #2e90f0);
}

.toc-float-panel-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sec-text-color, #718096);
  transition: all 0.2s ease;
}

.toc-float-panel-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-color, #1f3b57);
}

.toc-float-panel-body {
  padding: 0.75rem 0;
  max-height: calc(50vh - 50px);
  overflow-y: auto;
}

.toc-float-panel-body ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.toc-float-panel-body li {
  margin: 0 !important;
  padding: 0 !important;
}

.toc-float-panel-body a {
  display: block;
  padding: 0.45rem 1rem;
  margin: 0.1rem 0.5rem;
  font-size: 0.82rem;
  color: var(--sec-text-color, #718096);
  text-decoration: none !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-float-panel-body a:hover {
  background: rgba(46, 144, 240, 0.1);
  color: var(--accent, #2e90f0);
}

.toc-float-panel-body a.active {
  background: rgba(46, 144, 240, 0.15);
  color: var(--accent, #2e90f0);
  font-weight: 600;
}

.toc-float-panel-body .toc-child {
  padding-left: 1rem !important;
}

@media (max-width: 767px) {
  .toc-float-panel {
    right: 1rem;
    bottom: 8.5rem;
    width: 240px;
    max-height: 45vh;
  }
}

[data-user-color-scheme='dark'] .toc-float-panel-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.markdown-body pre code {
  position: relative;
  display: block;
}

.markdown-body pre code::before {
  content: attr(class);
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: #f5f8ff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
}

[data-user-color-scheme='dark'] .markdown-body pre code::before {
  background: rgba(255, 255, 255, 0.18);
  color: #eaf3ff;
}

/* ========== 鼠标跟随光效 ========== */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(circle, rgba(46, 144, 240, 0.12) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

.cursor-glow.active {
  opacity: 1;
}

[data-user-color-scheme='dark'] .cursor-glow {
  background: radial-gradient(circle, rgba(90, 200, 255, 0.1) 0%, transparent 70%);
}

/* ========== 页面过渡动画 ========== */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8eef7 0%, #f5f8ff 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
}

.page-transition.hidden {
  opacity: 0;
  visibility: hidden;
}

[data-user-color-scheme='dark'] .page-transition {
  background: linear-gradient(140deg, #0b1220 0%, #0f172a 55%, #0b1220 100%);
}

.page-transition-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(46, 144, 240, 0.2);
  border-top-color: #2e90f0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========== 打赏按钮美化 ========== */
.reward-float-btn {
  position: fixed;
  left: 1.25rem;
  bottom: 5.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2e90f0 0%, #5ac8ff 100%);
  border: none;
  box-shadow: 0 8px 24px rgba(46, 144, 240, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  z-index: 1100;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reward-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(46, 144, 240, 0.45);
}

.reward-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.reward-modal.show {
  opacity: 1;
  visibility: visible;
}

.reward-modal-content {
  background: var(--glass-bg-strong, #fff);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.reward-modal.show .reward-modal-content {
  transform: scale(1);
}

.reward-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-color, #1f3b57);
}

.reward-qrcodes {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.reward-qrcode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.reward-qrcode-item img {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  border: 2px solid var(--glass-border);
}

.reward-qrcode-item span {
  font-size: 0.85rem;
  color: var(--sec-text-color, #718096);
}

.reward-modal-close {
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
  background: rgba(46, 144, 240, 0.12);
  border: 1px solid rgba(46, 144, 240, 0.3);
  border-radius: 999px;
  color: var(--accent, #2e90f0);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.reward-modal-close:hover {
  background: rgba(46, 144, 240, 0.22);
}

@media (max-width: 767px) {
  .reward-float-btn {
    left: 1rem;
    bottom: 4.5rem;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
}

/* ========== 导航栏搜索美化 ========== */
#search-button {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(46, 144, 240, 0.1);
  border: 1px solid rgba(46, 144, 240, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--accent, #2e90f0);
}

#search-button:hover {
  background: rgba(46, 144, 240, 0.2);
  border-color: rgba(46, 144, 240, 0.4);
  transform: scale(1.05);
}

#search-button i {
  font-size: 1rem;
}

#search-modal {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#search-modal .modal-content {
  background: var(--glass-bg-strong, rgba(255, 255, 255, 0.95)) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2) !important;
  overflow: hidden;
}

#search-modal .modal-header {
  border-bottom: 1px solid var(--glass-border) !important;
  padding: 1rem 1.5rem !important;
}

#search-modal .modal-title {
  font-weight: 700 !important;
  color: var(--text-color, #1f3b57) !important;
}

#search-modal .modal-body {
  padding: 0 !important;
}

#search-modal input {
  border: none !important;
  border-bottom: 2px solid var(--glass-border) !important;
  border-radius: 0 !important;
  padding: 1rem 1.5rem !important;
  font-size: 1rem !important;
  background: transparent !important;
  transition: border-color 0.2s ease !important;
}

#search-modal input:focus {
  border-bottom-color: var(--accent, #2e90f0) !important;
  box-shadow: none !important;
}

#search-modal input::placeholder {
  color: var(--sec-text-color, #718096) !important;
}

#search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem 0 !important;
}

#search-results li {
  list-style: none !important;
  padding: 0.8rem 1.5rem !important;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.2s ease;
}

#search-results li:hover {
  background: rgba(46, 144, 240, 0.08);
}

#search-results li a {
  color: var(--text-color, #1f3b57) !important;
  text-decoration: none !important;
  font-weight: 500;
}

#search-results li a:hover {
  color: var(--accent, #2e90f0) !important;
}

[data-user-color-scheme='dark'] #search-button {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #5ac8ff;
}

[data-user-color-scheme='dark'] #search-button:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

[data-user-color-scheme='dark'] #search-modal .modal-content {
  background: rgba(18, 28, 45, 0.95) !important;
}

/* ========== 首页头像卡片 ========== */
.home-avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.08);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-avatar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(24, 39, 75, 0.18);
}

.home-avatar-card .avatar-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(46, 144, 240, 0.35);
  box-shadow: 0 10px 30px rgba(24, 39, 75, 0.2);
  margin-bottom: 1rem;
}

.home-avatar-card .avatar-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color, #1f3b57);
  margin-bottom: 0.5rem;
}

.home-avatar-card .contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--sec-text-color, #718096);
}

.home-avatar-card .contact-info a {
  color: var(--accent, #2e90f0);
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-avatar-card .contact-info a:hover {
  color: #1a6bc9;
}

.home-avatar-card .social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.home-avatar-card .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(46, 144, 240, 0.12);
  border: 1px solid rgba(46, 144, 240, 0.3);
  color: var(--accent, #2e90f0);
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.home-avatar-card .social-links a:hover {
  background: rgba(46, 144, 240, 0.25);
  border-color: rgba(46, 144, 240, 0.5);
  transform: translateY(-2px);
}

[data-user-color-scheme='dark'] .home-avatar-card .social-links a {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #5ac8ff;
}

[data-user-color-scheme='dark'] .home-avatar-card .social-links a:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.home-avatar-card .divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #2e90f0, #5ac8ff);
  border-radius: 1px;
  margin: 1rem 0;
}

/* ========== 侧边目录悬浮 ========== */
.sidebar-toc {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  max-height: 60vh;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
  padding: 1rem;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-toc.visible {
  opacity: 1;
  visibility: visible;
}

.sidebar-toc-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-color, #1f3b57);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-toc-title i {
  color: var(--accent, #2e90f0);
}

.sidebar-toc-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sidebar-toc-list li {
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar-toc-list a {
  display: block;
  padding: 0.4rem 0.6rem;
  margin: 0.15rem 0;
  font-size: 0.8rem;
  color: var(--sec-text-color, #718096);
  text-decoration: none !important;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-toc-list a:hover {
  background: rgba(46, 144, 240, 0.1);
  color: var(--accent, #2e90f0);
}

.sidebar-toc-list a.active {
  background: rgba(46, 144, 240, 0.15);
  color: var(--accent, #2e90f0);
  font-weight: 600;
}

.sidebar-toc-list .toc-child {
  padding-left: 0.8rem !important;
}

@media (max-width: 1400px) {
  .sidebar-toc {
    display: none !important;
  }
}

/* ========== 文章推荐浮动 ========== */
.article-recommend-float {
  position: fixed;
  right: -380px;
  bottom: 8rem;
  width: 340px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.05);
  z-index: 1000;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.article-recommend-float.show {
  right: 1.5rem;
}

.article-recommend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(46, 144, 240, 0.06);
}

.article-recommend-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-color, #1f3b57);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-recommend-title i {
  color: var(--accent, #2e90f0);
}

.article-recommend-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sec-text-color, #718096);
  transition: all 0.2s ease;
}

.article-recommend-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-color, #1f3b57);
}

.article-recommend-list {
  padding: 0.75rem;
  max-height: 280px;
  overflow-y: auto;
}

.article-recommend-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.6rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  transition: background 0.2s ease;
  text-decoration: none !important;
}

.article-recommend-item:last-child {
  margin-bottom: 0;
}

.article-recommend-item:hover {
  background: rgba(46, 144, 240, 0.08);
}

.article-recommend-img {
  width: 60px;
  height: 45px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.article-recommend-info {
  flex: 1;
  min-width: 0;
}

.article-recommend-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-color, #1f3b57);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-recommend-date {
  font-size: 0.72rem;
  color: var(--sec-text-color, #718096);
  margin-top: 0.25rem;
}

@media (max-width: 767px) {
  .article-recommend-float {
    width: 280px;
    right: -320px;
    bottom: 6rem;
  }

  .article-recommend-float.show {
    right: 1rem;
  }

  .article-recommend-img {
    width: 50px;
    height: 38px;
  }
}

[data-user-color-scheme='dark'] .article-recommend-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ========== 渐变色标题 ========== */
.index-header a {
  background: linear-gradient(135deg, #2e90f0 0%, #5ac8ff 50%, #2e90f0 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.4s ease;
}

.index-header a:hover {
  background-position: right center;
}

.markdown-body h1,
.markdown-body h2 {
  background: linear-gradient(135deg, #2e90f0 0%, #5ac8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-user-color-scheme='dark'] .index-header a,
[data-user-color-scheme='dark'] .markdown-body h1,
[data-user-color-scheme='dark'] .markdown-body h2 {
  background: linear-gradient(135deg, #5ac8ff 0%, #a0e9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ========== Hover脉冲动画 ========== */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 144, 240, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(46, 144, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 144, 240, 0); }
}

.index-card:hover {
  animation: pulse 0.6s ease-out;
}

.home-avatar-card:hover {
  animation: pulse 0.6s ease-out;
}

.home-avatar-card .social-links a:hover {
  animation: pulse 0.5s ease-out;
}

.navbar .nav-link:hover {
  position: relative;
}

.navbar .nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, #2e90f0, #5ac8ff);
  border-radius: 1px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { width: 0; opacity: 0; }
  to { width: 20px; opacity: 1; }
}

/* ========== 图片懒加载优化 ========== */
img[data-src] {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: scale(0.98);
}

img[data-src].loaded {
  opacity: 1;
  transform: scale(1);
}

.index-img img {
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease;
}

.markdown-body img {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.3s ease;
  transform: scale(0.98);
  border-radius: 10px;
}

.markdown-body img.loaded {
  opacity: 1;
  transform: scale(1);
}

/* ========== 动画性能优化 ========== */
.cursor-glow {
  will-change: left, top, opacity;
}

.page-transition {
  will-change: opacity, visibility;
}

.sidebar-toc {
  will-change: opacity, transform;
}

.article-recommend-float {
  will-change: right;
}

.index-card {
  will-change: transform, box-shadow;
  transform: translateZ(0);
}

.home-avatar-card {
  will-change: transform, box-shadow;
  transform: translateZ(0);
}

.reward-float-btn {
  will-change: transform;
}

/* 减少动画层级提升 */
.navbar,
footer,
#toc-fab {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 暗色模式脉冲动画调整 */
[data-user-color-scheme='dark'] .index-card:hover,
[data-user-color-scheme='dark'] .home-avatar-card:hover {
  animation: pulse-dark 0.6s ease-out;
}

@keyframes pulse-dark {
  0% { box-shadow: 0 0 0 0 rgba(90, 200, 255, 0.3); }
  70% { box-shadow: 0 0 0 10px rgba(90, 200, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(90, 200, 255, 0); }
}

/* 尊重用户减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .cursor-glow {
    display: none !important;
  }
}

/* ========== 留言板页面 ========== */
.guestbook-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.guestbook-header {
  text-align: center;
  margin-bottom: 2rem;
}

.guestbook-header h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2e90f0 0%, #5ac8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.guestbook-header p {
  color: var(--sec-text-color, #718096);
  font-size: 0.95rem;
}

.guestbook-rules {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
}

.guestbook-rules h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color, #1f3b57);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.guestbook-rules h3 i {
  color: var(--accent, #2e90f0);
}

.guestbook-rules ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--sec-text-color, #718096);
  line-height: 1.8;
}


