    /* Loading splash screen */
    #splashScreen {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 1000;
      transition: opacity 0.4s;
    }
    #splashScreen .loader {
      width: 3rem;
      height: 3rem;
      border: 4px solid rgba(0, 0, 0, 0.2);
      border-top-color: #3b82f6;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }
    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }
    /* 自定义主题色卡 */

    :root {
      --primary: 79, 70, 229;
      --secondary: 139, 92, 246;
      --accent: 236, 72, 153;
      --surface: 241, 245, 249;
      --on-surface: 15, 23, 42;
      --card: 255, 255, 255;
      --border: 229, 231, 235;
    }

    .dark {
      --primary: 129, 140, 248;
      --secondary: 167, 139, 250;
      --accent: 244, 114, 182;
      --surface: 15, 23, 42;
      --on-surface: 241, 245, 249;
      --card: 30, 41, 59;
      --border: 55, 65, 81;
    }

    /* Masonry 布局 */

    .masonry {
      display: flex;
      gap: 1rem;
    }

    .masonry-column {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .masonry-item .card-content {
      background-color: rgb(var(--card));
      color: rgb(var(--on-surface));
    }

    .masonry-item .card-content h2 {
      color: rgb(var(--on-surface));
    }

    .masonry-item .card-content p {
      color: rgb(var(--on-surface)/0.8);
      text-align: justify;
      white-space: pre-line;
    }

    .masonry-item {
      break-inside: avoid;
      margin-bottom: 1rem;
      border-radius: 1rem;
      overflow: hidden;
      width: 100%;
    }

    .bookmark-list li::marker {
      content: '';
    }

    .sidebar-link {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0.5rem;
      border-radius: 0.375rem;
      color: #6b7280;
      transition: background-color 0.2s, color 0.2s;
    }

    .sidebar-link:hover {
      background-color: #f1f5f9;
      color: #111827;
    }

    nav.mobile #homeBtn {
      display: none;
    }

    nav.mobile {
      top: auto;
      bottom: 0;
      left: 0;
      height: 72px;
      width: 100%;
      flex-direction: row;
      border-right: none;
      border-top: 1px solid #e5e7eb;
    }

    /* 禁用加载时的侧边栏点击穿透 */
    body:not(.loaded) nav {
      pointer-events: none;
    }

    nav.mobile .sidebar-link {
      flex: 1;
      margin-top: 5px;
    }

    nav.mobile .sidebar-items {
      flex-direction: row;
      width: 100%;
    }

    nav.mobile .sidebar-items>* {
      margin: 0;
      flex: 1;
      --tw-space-y-reverse: 0;
      margin-top: 0;
      margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
    }

    nav.mobile #moreBtn #addBtn #idealBtn {
      margin-top: 0;
    }

    nav.mobile .space-y-6> :not([hidden])~ :not([hidden]) {
      margin-top: 0;
    }

    body.mobile #content {
      margin-left: 0;
      margin-bottom: 72px;
    }

    .notify-dot {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 0.5rem;
      height: 0.5rem;
      background-color: #ef4444;
      border-radius: 9999px;
    }

    nav.mobile .notify-dot {
      right: 2rem;
    }

    /* 图片放大查看弹窗 */

    #imageModal {
      background-color: rgba(0, 0, 0, 0.8);
    }

    #imageModal img {
      max-width: 90vw;
      max-height: 90vh;
      transform: scale(0.9);
      opacity: 0;
      transition: transform 0.2s, opacity 0.2s;
    }

    #imageModal.show img {
      animation: modalZoom 0.2s forwards;
    }

    #settingsPanel>div {
      transform: scale(0.9);
      opacity: 0;
      transition: transform 0.2s, opacity 0.2s;
    }

    #settingsPanel.show>div {
      animation: modalZoom 0.2s forwards;
    }

    @keyframes modalZoom {
      from {
        transform: scale(0.9);
        opacity: 0;
      }
      to {
        transform: scale(1);
        opacity: 1;
      }
    }

    /* 侧边栏适配深色模式 */

    nav {
      background-color: rgb(var(--card));
      border-color: rgb(var(--border));
    }

    .sidebar-link {
      color: rgb(var(--on-surface)/0.7);
    }

    .sidebar-link:hover {
      background-color: rgb(var(--primary)/0.1);
      color: rgb(var(--primary));
    }

    /* 文字卡片适配深色模式 */

    .masonry-item {
      background-color: rgb(var(--card));
      color: rgb(var(--on-surface));
      width: 100%;
    }

    .masonry-item h2 {
      color: rgb(var(--on-surface));
    }

    .masonry-item p {
      color: rgb(var(--on-surface)/0.8);
      white-space: pre-line;
    }

    .masonry-item a {
      color: rgb(var(--on-surface)/0.6);
    }

    .masonry-item a:hover {
      color: rgb(var(--primary));
    }

    /* 图片弹窗适配深色模式 */

    #imageModal {
      background-color: rgba(0, 0, 0, 0.9);
    }

    /* 设置面板适配深色模式 */

    #settingsPanel>div {
      background-color: rgb(var(--card));
      color: rgb(var(--on-surface));
    }

    #settingsPanel label {
      color: rgb(var(--on-surface)/0.9);
    }

    #settingsPanel input {
      background-color: rgb(var(--surface));
      color: rgb(var(--on-surface));
      border-color: rgb(var(--border));
    }

    /* 全局选择框适配深色模式 */
    select {
      background-color: rgb(var(--surface));
      color: rgb(var(--on-surface));
      border-color: rgb(var(--border));
    }
    select option {
      background-color: rgb(var(--card));
      color: rgb(var(--on-surface));
    }

    /* 加载按钮适配深色模式 */

    #loadMore {
      background-color: rgb(var(--surface));
      color: rgb(var(--on-surface));
    }

    #loadMore:hover {
      background-color: rgb(var(--primary));
      color: white;
    }

    /* 隐藏滚动条的容器 */
    .no-scrollbar {
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .no-scrollbar::-webkit-scrollbar {
      display: none;
    }

/* 取消 gist 编辑框获得焦点时的边框高亮 */
    #gistEditTextarea:focus {
      outline: none;
      box-shadow: none;
    }

/* Settings tabs */
#settingsTabs input[type="radio"] {
  display: none;
}
#settingsTabs .tab-labels label {
  flex: 1;
  text-align: center;
  padding: 0.25rem 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
#tabSettings:checked ~ .tab-labels label[for="tabSettings"],
#tabAbout:checked ~ .tab-labels label[for="tabAbout"],
#tabLogs:checked ~ .tab-labels label[for="tabLogs"] {
  border-color: rgb(var(--primary));
  color: rgb(var(--primary));
}
#settingsTabs .tab-content {
  display: none;
  margin-top: 0.5rem;
}
#tabSettings:checked ~ #tabSettingsContent,
#tabAbout:checked ~ #tabAboutContent,
#tabLogs:checked ~ #tabLogsContent {
  display: block;
}

/* About page animations */
.about-message {
  margin-top: 0.5rem;
  animation: fadeInUp 0.6s ease;
}

.about-links a {
  transition: transform 0.3s;
}

.about-links a:hover {
  transform: scale(1.1) rotate(5deg);
}

#moreBtn {
  transition: transform 0.3s;
}

#moreBtn:hover svg {
  animation: spin 0.6s linear;
}

@keyframes fadeInUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#searchInput:focus {
  outline: none; /* 移除默认的浏览器 outline */
  border-color: rgb(var(--primary)); /* 使用 CSS 变量 --primary 作为边框颜色 */
  box-shadow: 0 0 0 1px rgb(var(--primary)); /* 可选：添加轻微发光效果 */
}

/* Search button */
.search-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.search-btn {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  transition: background-color 0.3s;
}

.search-input {
  width: 0;
  opacity: 0;
  padding: 0;
  margin-left: 0;
  transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin-left 0.3s ease;
}

.search-wrapper.active .search-input {
  width: 160px;
  opacity: 1;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  border-color: rgb(var(--primary));
}
