@tailwind base;
@tailwind components;
@tailwind utilities;

/* 在文件顶部添加 */
html.loading-wallpaper {
  background: none !important;
}

html.loading-wallpaper body,
html.loading-wallpaper main {
  opacity: 0;
  z-index: 2;
}

body,
main {
  opacity: 1;
  transition: opacity 0.3s ease-out;
  will-change: background-image;
  background-color: transparent !important;
}

/* 修改现有的背景渐变类，增加特异性 */
html:not(.loading-wallpaper)[class*="gradient-background"] {
  transition: background 0.3s ease-out;
  z-index: 1;
}

/* 确保主容器的背景样式优先级 */
main.flex-1 {
  background-color: transparent !important;
  z-index: 1;
}

/* 侧边栏 logo 和标题样式 */
#sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    align-items: center;
    margin: 1rem auto 3rem 0.5rem;
    gap: 0.5rem; /* 调整 logo 和文字之间的间距 */
}

#logo-image {
    width: 40px;
    height: 40px;
}
#logo-title {
    font-size: 26px;
    /* 调整字体大小 */
    font-weight: bold;
    color: #333;
    /* 调整文字颜色 */
}
/* 确保原有的侧边栏内容样式不受影响 */
#categories-list {
    /* 保留原有的类别列表样式 */
}

/* 其他原有的样式 */
/* ... */

.folder-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
}

.breadcrumb-item {
  cursor: pointer;
  color: #717882;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
  background-color: #f4f4f5;
}

.breadcrumb-item:hover {
  background-color: #eeeeee;
  color: #10b981;
}

.breadcrumb-separator {
  margin: 0 5px;
  color: #999;
}

.breadcrumb-item:last-child {
  color: #717882;
  font-weight: bold;
  cursor: default;
  background-color: #ffffff;

}

.breadcrumb-item:last-child:hover {
  background-color: transparent;
}

#categories-list li {
  user-select: none;
}

#categories-list li.sortable-ghost {
  opacity: 0.5;
  background-color: #f0f0f0;
}

#categories-list li.sortable-chosen {
  background-color: #e0e0e0;
}



/* 暗色模式样式 */
[data-theme="dark"] {
  color-scheme: dark;
}

/* 暗黑模式下的背景渐变类 */
[data-theme="dark"] html[class*="gradient-background"] {
  background: transparent !important;
}

/* 暗黑模式下的背景样式优先级顺序 */
[data-theme="dark"] body:not(.has-wallpaper) {
  background-color: #1c1c1c;
}

[data-theme="dark"] body:not(.has-wallpaper)[class*="gradient-background"] {
  background-color: #1c1c1c !important;
}

[data-theme="dark"] body.has-wallpaper {
  background-color: transparent !important;
  background-image: var(--wallpaper-image) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

/* 暗黑模式下的壁纸容器样式 */
[data-theme="dark"] .wallpaper-option {
  border: 2px solid #404040;
  background-color: #242424;
}

[data-theme="dark"] body {
  background-color: #1c1c1c;
}
[data-theme="dark"] .bg-gray-50 text-center p-4 border-t border-gray-200 mt-4 {
  background-color: transparent;
}



[data-theme="dark"] .custom-width {
  background-color: #1c1c1c;
  border-color: #404040;
}

[data-theme="dark"] #logo-title {
  border-color: #ffffff;
  color: #ffffff;
}
[data-theme="dark"] aside ul li {
  color: #ffffff;
}
[data-theme="dark"] aside ul li:hover {
  color: #242424;
}
[data-theme="dark"] .bookmark-folder.card-title:hover {
  color: #ffffff;
}

[data-theme="dark"] .bookmark-folder:hover {
  background-color: #ffffff;
  color: #242424;
}
[data-theme="dark"] .bookmark-card,
[data-theme="dark"] .bookmark-folder {
  background-color: #404040;
  border-color: #ffffff;
  color: #ffffff;
}

[data-theme="dark"] .bookmark-card:hover {
  color: #242424;
}
[data-theme="dark"] .card-title:hover {
  color: #242424;
}


[data-theme="dark"] .search-input ,
[data-theme="dark"] .search-form,
[data-theme="dark"] .search-suggestions{
  background-color: #404040;
  color: #ffffff;
}
[data-theme="dark"] .bookmarks-container {
  background-color: #242424;
  color: #e0e0e0;
}
[data-theme="dark"]  .breadcrumb-item {
  background-color: #404040;
  color: #ffffff;
}
[data-theme="dark"] .breadcrumb-item:last-child {
  color: #ffffff;
  background-color: #242424;
}
[data-theme="dark"] #welcome-message {
  color: #ffffff;
}
[data-theme="dark"] .custom-hr {
  border-top: 1px solid #373737;
}
[data-theme="dark"] .search-suggestions-wrapper {
  background-color: #404040;
}
[data-theme="dark"] .search-suggestions li {
  color: #ffffff;
}
[data-theme="dark"] .tab {
  color: #ffffff;
  background-color: #7a7a7a;
}
[data-theme="dark"] #tabs-container {
  background-color: #404040;
}
[data-theme="dark"] .search-suggestions li {
  color: #ffffff;
}
[data-theme="dark"] .search-suggestions li:hover {
  color: #242424;
}
[data-theme="dark"] .suggestion-icon path {
  fill: #e0e0e0;
}
[data-theme="dark"] li:hover .suggestion-icon path {
  fill: #242424;
}
[data-theme="dark"] .links-icons {
  background-color: #404040;
}
[data-theme="dark"] .links-icons a {
  color: #ffffff;
}
[data-theme="dark"] .links-icons a:hover {
  color: #242424;
}
[data-theme="dark"] .settings-icon {
  background-color: #404040;
}
[data-theme="dark"] .settings-icon a {
  color: #ffffff;
}
[data-theme="dark"] .settings-icon a:hover {
  color: #242424;
}
[data-theme="dark"] .quick-link-item {
  background-color: #404040;
}
[data-theme="dark"] #toggle-sidebar {
  background-color: #404040;
  border-color: #404040;
}
[data-theme="dark"] #toggle-sidebar:hover {
  background-color: #404040;
  border-color: #404040;
  color: #ffffff;
}
[data-theme="dark"] .custom-context-menu {
  background-color: #404040;
  border-color: #404040;
  color: #ffffff;
}
[data-theme="dark"] .custom-context-menu-divider {
  background-color: #373737;
}
[data-theme="dark"] .custom-context-menu-item {
  color: #ffffff;
}
[data-theme="dark"] .custom-context-menu-item:hover {
  background-color: #ffffff;
  color: #242424;
}
[data-theme="dark"] #confirm-dialog p,
#edit-dialog p,
#edit-category-dialog p{
  color: #ffffff;
}
[data-theme="dark"] #confirm-dialog .modal-content,
[data-theme="dark"] #edit-dialog .modal-content,
[data-theme="dark"] #edit-category-dialog .modal-content {
  background-color: #242424;
  color: #ffffff;
  border-color: #242424;
}
[data-theme="dark"] #edit-dialog input[type="text"],
[data-theme="dark"] #edit-dialog input[type="url"],
[data-theme="dark"] #edit-category-dialog input[type="text"] {
  background-color: #404040;
  color: #ffffff;
  border-color: #404040;
}
[data-theme="dark"] .close-button {
  color: #ffffff;
}
[data-theme="dark"] .close-category-button {
  color: #ffffff;
}
[data-theme="dark"] .close-button:hover {
  color: #ffffff;
}
[data-theme="dark"] .close-category-button:hover {
  color: #ffffff;
}
[data-theme="dark"] .settings-modal-content {
  background-color: #242424;
  border-color: #242424;
  color: #ffffff;
}
[data-theme="dark"] .settings-modal-title {
  color: #ffffff;
}
[data-theme="dark"] .settings-tab-button {
  color: #ffffff;
}
[data-theme="dark"] .settings-modal-subtitle {
  color: #ffffff;
}


.welcome-guide {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.welcome-content {
  background: white;
  border-radius: 8px;
  padding: 24px;
  max-width: 600px;
  width: 90%;
}

.welcome-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
}

.folder-selector {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-tips {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: white;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.wallpaper-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 10px 0;
  /* margin-bottom: 16px; */
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.wallpaper-option {
    border: 2px solid #242424;
    width: 70px;
    height: 70px;
    background-size: cover;
    cursor: pointer;
    transition: border-color 0.3s;
    flex: 0 0 auto;
    border-radius: 8px;
}

.wallpaper-option:hover {
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wallpaper-option.active {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

/* 暗色模式适配 */
[data-theme="dark"] .wallpaper-option {
  border-color: #404040;
}

[data-theme="dark"] .wallpaper-option:hover {
  border-color: #10b981;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .wallpaper-option.active {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.wallpaper-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
}

body, main {
    transition: none;
}

main {
    min-height: 100vh;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    will-change: background-image;
}

.page-loading {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.page-loaded {
    opacity: 1;
}

.wallpaper-actions {  
    margin-top: 12px;
    gap: 12px;
    align-items: center;
}

.wallpaper-actions button,
.wallpaper-actions label {
  height: 40px;
  width: 180px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #374151;
}

.wallpaper-actions button:hover,
.wallpaper-actions label:hover {
  background-color: #e5e7eb;
  color: #10b981;
}

.wallpaper-actions .material-icons {
  font-size: 18px;
  margin-right: 4px;
}

/* 暗色模式适配 */
[data-theme="dark"] .wallpaper-actions button,
[data-theme="dark"] .wallpaper-actions label {
  background-color: #404040;
  border-color: #4b5563;
  color: #ffffff;
}

[data-theme="dark"] .wallpaper-actions button:hover,
[data-theme="dark"] .wallpaper-actions label:hover {
  background-color: #4b5563;
}

.settings-background-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.settings-bg-option {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  background-size: 200% 200%;
  background-position: center;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.settings-bg-option.active {
  border-color: #10b981;
}


.upload-wallpaper-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-wallpaper-label:hover {
  background-color: #e5e7eb;
}

#upload-wallpaper {
  display: none;
}

/* Material Icons 字体声明 */


.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 18px;  /* 统一图标大小 */
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 暗黑模式下的背景渐变类 */
[data-theme="dark"] html[class*="gradient-background"] {
  background: transparent !important;  /* 移除 html 的背景，让 body 的背景显示 */
}

/* 暗黑模式下确保 body 背景色优先级 */
[data-theme="dark"] body {
  background-color: #1c1c1c !important;
}

/* 当有壁纸时，移除暗色背景 */
[data-theme="dark"] body.has-wallpaper {
  background-color: transparent !important;
}

/* 暗黑模式下的壁纸容器样式 */
[data-theme="dark"] .wallpaper-option {
  border: 2px solid #404040;
  background-color: #242424;
}

/* 暗黑模式下的背景颜色选项样式 */
[data-theme="dark"] .settings-bg-option {
  opacity: 0.8;  /* 降低亮色背景的不透明度 */
}

[data-theme="dark"] .settings-bg-option.active {
  border-color: #10b981;
    opacity: 1;
}

[data-theme="dark"] .bookmark-folder:hover,
[data-theme="dark"] .bookmark-folder:hover .card-title {
  background-color: #404040;
  color: #ffffff !important;
}

.wallpaper-options::-webkit-scrollbar {
    width: 8px;
}

.wallpaper-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.wallpaper-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.wallpaper-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

[data-theme="dark"] .wallpaper-options::-webkit-scrollbar-track {
    background: #2d2d2d;
}

[data-theme="dark"] .wallpaper-options::-webkit-scrollbar-thumb {
    background: #666;
}

[data-theme="dark"] .wallpaper-options::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* 设置区域小标题样式 */
.settings-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 12px;
    margin-top: 12px;
}

/* 暗色模式适配 */
[data-theme="dark"] .settings-section-title {
    color: #e5e7eb;
}

/* 修改标识样式 */
.uploaded-wallpaper-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(55, 65, 81, 0.85);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

/* 暗色模式适配 */
[data-theme="dark"] .uploaded-wallpaper-badge {
    background-color: rgba(229, 231, 235, 0.85);
    color: #1f2937;
}

/* 确保壁纸选项可以正确显示标识 */
.wallpaper-option {
    position: relative;
    overflow: visible;
}

[data-theme="dark"] .about-description {
  color: #e5e7eb;
  /* 使用较亮的颜色以提高在暗色背景下的可读性 */
}
/* 暗色模式适配 */
[data-theme="dark"] .about-link {
  background-color: #2d2d2d;
  color: #e5e7eb;
  border: 1px solid #4b5563;
}

[data-theme="dark"] .about-link:hover {
  background-color: #404040;
  color: #10b981;
}
[data-theme="dark"] .settings-sidebar {
  background-color: #1c1c1c;
  box-shadow: -1px 0 5px rgba(0, 0, 0, 0.05); /* 减轻阴影 */
  border-left: 1px solid #404040; /* 添加左边框 */
}
/* 暗色模式适配 */
[data-theme="dark"] .official-website a {
  color: #e5e7eb;
}

[data-theme="dark"] .official-website a span {
  color: #60a5fa;
}

[data-theme="dark"] .official-website a:hover {
  color: #60a5fa;
}
/* 添加到您的 styles.css 文件中 */
[data-theme="dark"] #theme-toggle-btn {
  background: #404040;
  border-color: #404040;
  padding: 8px;
  /* 添加内边距 */
  border-radius: 8px;
  /* 添加圆角 */
  transition: background-color 0.2s;
  /* 添加过渡效果 */
}

[data-theme="dark"] #theme-toggle-btn:hover {
  background-color: #404040;
  /* hover 时的背景色 */
}

/* 确保图标在 hover 时颜色变化 */
[data-theme="dark"] #theme-toggle-btn:hover svg {
  fill: #242424;
  /* hover 时图标颜色变深 */
}
/* 暗色模式下的样式 */
[data-theme="dark"] #theme-toggle-btn svg {
  fill: #ffffff;
  /* 暗色模式下的默认颜色 */
}

[data-theme="dark"] #theme-toggle-btn:hover svg {
  fill: #1c1c1c;
  /* 暗色模式下 hover 时的颜色 */
}
.bookmark-cleanup-actions {
  margin-top: 20px;
}

.primary-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.primary-button:hover {
  background-color: #10b981;
}

.primary-button .material-icons {
  font-size: 20px;
}

/* 系统主题自动切换相关样式 */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    background-color: #1c1c1c;
  }

  html[data-theme="auto"] body {
    background-color: #1c1c1c;
    color: #ffffff;
  }

  html[data-theme="auto"] .custom-width {
    background-color: #1c1c1c;
    border-color: #404040;
  }

  /* 继承现有的暗色模式样式 */
  html[data-theme="auto"] .search-input,
  html[data-theme="auto"] .search-form,
  html[data-theme="auto"] .search-suggestions {
    background-color: #404040;
    color: #ffffff;
  }

  html[data-theme="auto"] .bookmarks-container {
    background-color: #242424;
    color: #e0e0e0;
  }

  /* 继承其他暗色模式样式 */
  html[data-theme="auto"] [class*="dark-mode-style"] {
    /* 应用对应的暗色模式样式 */
  }
}

@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    background-color: #ffffff;
  }

  html[data-theme="auto"] body {
    background-color: #ffffff;
    color: #333333;
  }

  /* 继承其他亮色模式样式 */
  html[data-theme="auto"] [class*="light-mode-style"] {
    /* 应用对应的亮色模式样式 */
  }
}

/* 布局设置页面样式 */
.layout-settings-container {
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.layout-settings-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 1rem;
}

.layout-settings-description {
  font-size: 0.875rem;
  color: #4a5568;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.bookmark-width-settings {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.width-slider-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.width-value-display {
  font-size: 0.875rem;
  font-weight: 500;
  color: #4a5568;
  padding: 0.25rem 0.75rem;
  background: #e2e8f0;
  border-radius: 4px;
  min-width: 60px;
  text-align: right;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #10b981;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1);
}

.width-preview {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: right;
  margin-top: 0.5rem;
}

#width-preview-count {
  font-weight: 600;
  color: #10b981;
}

/* 暗色模式适配 */
[data-theme="dark"] .layout-settings-container {
  background: #1f2937;
}

[data-theme="dark"] .layout-settings-title {
  color: #e5e7eb;
}

[data-theme="dark"] .layout-settings-description {
  color: #9ca3af;
}

[data-theme="dark"] .bookmark-width-settings {
  background: #374151;
}

[data-theme="dark"] .width-slider {
  background: #374151;
}

[data-theme="dark"] .width-value-display {
  color: #e5e7eb;
  background: #4b5563;
}

[data-theme="dark"] input[type="range"] {
  background: #ffffff;
}

[data-theme="dark"] .width-preview {
  color: #9ca3af;
}

/* 暗色模式适配 */
[data-theme="dark"] .floating-width-settings {
  background: #1f2937;
  color: #e5e7eb;
}

/* 当显示浮动卡片时移除模糊效果 */
.settings-modal-content.no-blur {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* 设置模态框的基础样式 */
.settings-modal {
  display: none;
  position: fixed;
  z-index: 1002;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* transition: all 0.3s ease; */
}

/* 当滑块被拖动时，移除模糊效果 */
.settings-modal.no-blur {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-color: transparent;
  transition: all 0.3s ease;
}

/* 当显示浮动卡片时的样式 */
.settings-modal-content.no-blur {
  background-color: transparent !important;
  transition: all 0.3s ease;
}

/* 当显示浮动卡片时，其他内容的样式 */
.settings-modal-content.no-blur > *:not(#floating-width-settings) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* 搜索引擎对话框暗色模式样式 */
[data-theme="dark"] .modal .modal-content {
  background-color: #242424;
  border-color: #404040;
  color: #e5e7eb;
}

[data-theme="dark"] .search-engines-title {
  color: #e5e7eb;
}

[data-theme="dark"] .category-title {
  color: #e5e7eb;
}

[data-theme="dark"] .search-engine-item {
  background-color: #333333;
}

[data-theme="dark"] .search-engine-item:hover {
  background-color: #404040;
}

[data-theme="dark"] .search-engine-name {
  color: #e5e7eb;
}

[data-theme="dark"] .custom-engine-form {
  background-color: #333333;
}

[data-theme="dark"] .custom-input {
  background-color: #242424;
  border-color: #404040;
  color: #e5e7eb;
}

[data-theme="dark"] .custom-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .custom-input::placeholder {
  color: #9ca3af;
}

[data-theme="dark"] .settings-modal-close {
  color: #e5e7eb;
}

[data-theme="dark"] .settings-modal-close:hover {
  color: #ffffff;
}

/* 暗色模式下的滚动条样式 */
[data-theme="dark"] .modal .modal-content::-webkit-scrollbar-track {
  background: #333333;
}

[data-theme="dark"] .modal .modal-content::-webkit-scrollbar-thumb {
  background-color: #4a4a4a;
  border: 2px solid #333333;
}

/* 暗色模式下的加载动画样式 */
[data-theme="dark"] .icon-loading-spinner {
  border-color: #404040;
  border-top-color: #10b981;
}

/* 暗色模式下的复选框样式 */
[data-theme="dark"] .custom-checkbox input:checked + .checkmark {
  background-color: #10b981;
  border-color: #10b981;
}

[data-theme="dark"] .custom-checkbox .checkmark {
  border-color: #404040;
  background-color: #242424;
}

[data-theme="dark"] .custom-checkbox:hover input ~ .checkmark {
  background-color: #333333;
}

/* 暗色模式下的删除按钮样式 */
[data-theme="dark"] .delete-custom-engine {
  color: #e5e7eb;
}

[data-theme="dark"] .delete-custom-engine:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
}

/* 关闭按钮暗色模式样式 */
[data-theme="dark"] .close-button.settings-modal-close {
  color: #9ca3af;  /* 默认颜色 */
  background-color: #242424;  /* 与模态框背景色相同 */
}

[data-theme="dark"] .close-button.settings-modal-close:hover {
  color: #e5e7eb;  /* 悬停时颜色变亮 */
}

[data-theme="dark"] .close-button.settings-modal-close:focus {
  color: #e5e7eb;
  outline: none;
}

/* 确保暗色模式下关闭按钮的背景色与模态框一致 */
[data-theme="dark"] .modal .close-button.settings-modal-close {
  background-color: #242424;
  border-color: #404040;
}

/* 搜索引擎下拉框暗色模式样式 */
[data-theme="dark"] .search-engine-dropdown {
  background-color: #242424;
  border-color: #404040;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .search-engine-option {
  color: #e5e7eb;
}

[data-theme="dark"] .search-engine-option:hover {
  background-color: #333333;
}

[data-theme="dark"] .search-engine-option-content {
  color: #e5e7eb;
}

[data-theme="dark"] .search-engine-option-label {
  color: #e5e7eb;
}

/* 添加搜索引擎按钮的暗色模式 */
[data-theme="dark"] .add-engine {
  color: #9ca3af;
  border-color: #404040;
  background-color: #333333;
}

[data-theme="dark"] .add-engine:hover {
  background-color: #404040;
  border-color: #10b981;
  color: #e5e7eb;
}

/* 下拉框分隔线暗色模式 */
[data-theme="dark"] .search-engine-dropdown .divider {
  border-color: #404040;
}

/* 下拉框图标暗色模式 */
[data-theme="dark"] .search-engine-option-icon {
  background-color: #ffffff;
  padding: 2px;
  border-radius: 4px;
}

/* 确保图标在暗色模式下有更好的可见度 */
[data-theme="dark"] .material-icons {
  color: #e5e7eb;
}

/* 全局滚动条样式 */
.global-range-slider {
  position: fixed;
  display: none;
  opacity: 0;
  z-index: 1003;
  background-color: rgba(254, 254, 254, 0.9);
  padding: 0px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  /* transition: opacity 0.3s ease; */
}

.global-range-slider.visible {
  opacity: 1;
}

/* 暗色模式下的全局滚动条样式 */
[data-theme="dark"] .global-range-slider {
  background-color: #242424;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.2);
}

/* 全局滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5);
  border-radius: 12px;
  border: none;
  transition: background-color 0.2s;
  min-height: 60px;  /* 设置滚动条滑块的最小高度 */
  max-height: 120px; /* 设置滚动条滑块的最大高度 */
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(156, 163, 175, 0.8);
}

/* Firefox 全局滚动条样式 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

/* 暗色模式全局滚动条样式 */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background-color: rgba(229, 231, 235, 0.2);
  min-height: 60px;
  max-height: 120px; /* 确保暗色模式下也有相同的最大高度 */
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(229, 231, 235, 0.3);
}

[data-theme="dark"] * {
  scrollbar-color: rgba(229, 231, 235, 0.2) transparent;
}


/* 主题设置区域样式 */
.theme-setting-section {
    margin-bottom: 20px;
}

/* 主题选择下拉菜单样式 */
.theme-select {
    width: 140px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none; /* 移除默认的下拉箭头 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center; /* 调整箭头位置 */
    background-size: 16px; /* 调整箭头大小 */
}

.theme-select:hover {
    border-color: #10b981;
}

.theme-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* 暗色模式下的箭头颜色 */
[data-theme="dark"] .theme-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23E5E7EB'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-color: #404040;
    border-color: #4b5563;
    color: #e5e7eb;
}

/* 暗色模式适配 */
[data-theme="dark"] .settings-section-title {
    color: #e5e7eb;
}

[data-theme="dark"] .theme-select {
    background-color: #404040;
    border-color: #4b5563;
    color: #e5e7eb;
}

[data-theme="dark"] .theme-select:hover {
    border-color: #10b981;
}

[data-theme="dark"] .theme-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
/* 修改默认文件夹切换区域样式 */
.default-folders-tabs {
  position: fixed;
  top: 40%;  /* 垂直居中 */
  transform: translateY(-50%);  /* 垂直居中偏移 */
  left: 16rem;  /* 与侧边栏宽度对应 */
  padding: 8px 2px;  /* 调整内边距 */
  display: none; /* 默认隐藏 */
  flex-direction: column;  /* 改为垂直布局 */
  justify-content: center;
  z-index: 10;
  transition: left 0.3s ease;  /* 修改过渡效果 */
  background: rgba(255, 255, 255, 0.9);  /* 添加半透明背景 */
  border-radius: 0 12px 12px 0;  /* 右侧圆角 */
  box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.06),
    0 2px 4px -2px rgb(0 0 0 / 0.06);  /* 添加阴影 */
}

/* 显示类 */
.default-folders-tabs.show {
  display: flex;
}

/* 当侧边栏收起时调整位置 */
body .default-folders-tabs.sidebar-collapsed {
  left: 0;
  border-radius: 0px 12px 12px 0px;
    /* 右侧圆角 */
}
/* 当侧边栏收起时调整位置 */
body .default-folders-tabs.sidebar-expanded {
  display: none;
  /* 右侧圆角 */
}

/* 优化 tabs-container 样式 */
.tabs-container {
  display: flex;
  flex-direction: column;  /* 改为垂直布局 */
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
}

/* 暗色模式适配 tabs-container */
[data-theme="dark"] .default-folders-tabs {
  background: rgba(28, 28, 28, 0.9);
}

/* 点状分页符样式 */
.folder-tab {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #e5e7eb;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  will-change: transform;
}

/* 文件夹名称提示基础样式 */
.folder-tab::after {
  content: attr(data-name);
  position: absolute;
  left: 100%;  /* 改为显示在右侧 */
  top: 50%;  /* 垂直居中 */
  transform: translateY(-50%);  /* 垂直居中偏移 */
  padding: 4px 8px;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-left: 8px;  /* 添加左边距 */
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  background-color: rgba(0, 0, 0, 0.8);
}

/* 响应式布局调整 */
@media (max-width: 1024px) {
  .default-folders-tabs {
    display: none !important;  /* 在小屏幕上隐藏 */
  }
}

/* 暗色模式适配 */
[data-theme="dark"] .folder-tab {
  background-color: #4b5563;
}

[data-theme="dark"] .folder-tab:hover {
  background-color: #6b7280;
}

[data-theme="dark"] .folder-tab.active {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); /* 暗色模式下调整光晕效果 */
}

/* 添加界面元素设置区域的样式 */
.interface-elements-settings {
  margin-top: 1rem;
  max-height: 520px; /* 设置最大高度 */
  overflow-y: auto; /* 添加竖向滚动条 */
  padding-right: 12px; /* 为滚动条预留空间 */
}

/* 自定义滚动条样式 */
.interface-elements-settings::-webkit-scrollbar {
  width: 8px;
}

.interface-elements-settings::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.interface-elements-settings::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.interface-elements-settings::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 暗色模式适配 */
[data-theme="dark"] .interface-elements-settings::-webkit-scrollbar-track {
  background: #2d2d2d;
}

[data-theme="dark"] .interface-elements-settings::-webkit-scrollbar-thumb {
  background: #4a4a4a;
}

[data-theme="dark"] .interface-elements-settings::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

/* 保持其他样式不变 */
.interface-elements-settings .setting-option {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.interface-elements-settings .setting-option:hover {
  background-color: #f0f0f0;
}

/* 暗色模式适配 */
[data-theme="dark"] .interface-elements-settings .setting-option {
  background-color: #2d2d2d;
}

[data-theme="dark"] .interface-elements-settings .setting-option:hover {
  background-color: #363636;
}

/* 搜索设置面板样式 */
.search-suggestions-settings {
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 1rem;
}

.search-suggestions-settings .setting-option {
  margin-bottom: 1rem;
}

.search-suggestions-settings .setting-option:last-child {
  margin-bottom: 0;
}

/* 暗色模式适配 */
[data-theme="dark"] .search-suggestions-settings {
  background: #2d2d2d;
}



[data-theme="dark"] .search-suggestions-settings .setting-option:hover {
  background-color: #404040;
}

/* 修改设置侧边栏样式，使其不使用遮罩 */
.settings-sidebar {
  position: fixed;
  top: 0;
  right: -600px;
  /* 增加初始位置宽度 */
  width: 600px;
  /* 增加到600px以适应长文本 */
  max-width: 90%;
  /* 确保在较小屏幕上不会太宽 */
  height: 100%;
  background-color: #ffffff;
  box-shadow: -1px 0 5px rgba(0, 0, 0, 0.05);
  z-index: 1003;
  overflow-y: auto;
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 添加平板设备的断点 */
@media (max-width: 1024px) {
  .settings-sidebar {
    width: 80%;
    max-width: 600px;
    right: -80%;
  }
}

/* 保持移动设备的设置 */
@media (max-width: 768px) {
  .settings-sidebar {
    width: 100%;
    right: -100%;
  }
}
.settings-sidebar.open {
  right: 0;
}

/* 移除遮罩层样式 */
.settings-overlay {
  display: none !important; /* 完全禁用遮罩层 */
}

.settings-sidebar-content {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.settings-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eeeeee;
}

.settings-sidebar-close {
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
}

.settings-sidebar-close:hover {
  color: #000;
}

.settings-sidebar .settings-layout {
  display: flex;
  flex-direction: row;
  height: calc(100% - 60px);
  overflow: hidden;
}

.settings-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
  padding-right: 20px;
  border-right: 1px solid #eeeeee;
  width: 160px;
  flex-shrink: 0;
  overflow-y: auto;
}

.settings-sidebar .settings-content {
  flex: 1;
  overflow-y: auto;
  margin : 0px 0px 0px 20px;

}

/* 响应式设计 */
@media (max-width: 768px) {
  .settings-sidebar {
    width: 100%;
    right: -100%;
  }
}

/* 设置选项卡按钮样式 */
.settings-tab-button {
  text-align: left;
  padding: 10px 15px;
  border-radius: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #1a202c;
  transition: all 0.2s ease;
  font-weight: 500;
}

.settings-tab-button:hover {
  background-color: #f3f4f6;
  color: #10b981;
}

.settings-tab-button.active {
  background-color: #10b981;
  color: #ffffff;
  font-weight: 500;
}

/* 暗色模式适配 */
[data-theme="dark"] .settings-sidebar-nav {
  border-right-color: #333333;
}

[data-theme="dark"] .settings-tab-button {
  color: #ffffff;
}

[data-theme="dark"] .settings-tab-button:hover {
  background-color: #374151;
  color: #10b981;
}

[data-theme="dark"] .settings-tab-button.active {
  background-color: #10b981;
  color: #ffffff;
}
[data-theme="dark"] .settings-sidebar-header {
  border-bottom: 1px solid #404040;
}
[data-theme="dark"] .settings-sidebar-close:hover {
  color: #ffffff;
}
/* 响应式设计 - 在小屏幕上切换回上下结构 */
@media (max-width: 768px) {
  .settings-sidebar .settings-layout {
    flex-direction: column;
  }
  
  .settings-sidebar-nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eeeeee;
    padding-right: 0;
    padding-bottom: 15px;
    margin-bottom: 15px;
  }
  
  .settings-sidebar .settings-content {
    padding-left: 0;
  }
  
  [data-theme="dark"] .settings-sidebar-nav {
    border-bottom-color: #333333;
  }
}



#container-width-settings {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}
#floating-width-settings {
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 新增书签卡片高度设置样式 */
#card-height-settings {
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] #card-height-settings {
  background-color: #2d2d2d;
  color: #e5e7eb;
}

/* 暗色模式适配 */
[data-theme="dark"] #container-width-settings {
  background: #2d2d2d;
}
[data-theme="dark"] #floating-width-settings {
  background: #2d2d2d;
}
.settings-tab-content p {
  font-size: 14px;
  margin-bottom: 1rem;
}

/* 赞赏页面样式 */
.donate-description {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 24px;
}

.donate-options {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.donate-option {
  flex: 1;
  min-width: 200px;
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donate-option-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 16px;
  text-align: center;
}

.donate-qrcode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donate-qrcode {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.donate-qrcode-text {
  margin-top: 10px;
  text-align: center;
  color: #666;
}

.donate-list-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.donate-list-button {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background-color: #e8e8e8;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s ease;
  justify-content: center;
  min-width: 140px;
  font-size: 14px;
}

.donate-list-button:hover {
  background-color: #e5e7eb;
  color: #10b981;
  transform: none;
}

[data-theme="dark"] .donate-list-button {
  background-color: #2d2d2d;
  color: #e5e7eb;
  border: 1px solid #4b5563;
}

[data-theme="dark"] .donate-list-button:hover {
  background-color: #404040;
  color: #10b981;
}

/* 保留原有的donate-list-link样式用于兼容性 */
.donate-list-link {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: #4285f4;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1005; /* 确保链接的z-index高于侧边栏 */
}

.donate-list-link:hover {
  text-decoration: underline;
  color: #2b579a;
}

[data-theme="dark"] .donate-list-link {
  color: #8ab4f8;
}

[data-theme="dark"] .donate-list-link:hover {
  color: #aecbfa;
}

.donate-paypal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.donate-paypal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: #0070ba;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.donate-paypal-button:hover {
  background-color: #005ea6;
}

.donate-thank-you {
  font-size: 16px;
  font-weight: 600;
  color: #10b981;
  text-align: center;
  margin-top: 16px;
}

/* 暗色模式适配 */
[data-theme="dark"] .donate-description {
  color: #e5e7eb;
}

[data-theme="dark"] .donate-option {
  background-color: #2d2d2d;
}

[data-theme="dark"] .donate-option-title {
  color: #e5e7eb;
}

[data-theme="dark"] .donate-qrcode-text {
  color: #9ca3af;
}

[data-theme="dark"] .donate-thank-you {
  color: #10b981;
}

/* 优化悬停和激活状态的动画 */
.folder-tab:hover {
  transform: scale(1.2);
  background-color: #d1d5db;
}

/* 加强激活状态的显示效果 */
.folder-tab.active {
  width: 10px;
  height: 10px;
  background-color: #10b981;
  transform: scale(1.2);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); /* 添加光晕效果 */
}

/* 悬停时的提示样式 */
.folder-tab:hover::after {
  opacity: 1;
}

/* 切换时的临时提示样式 */
.folder-tab.active.switching::after {
  opacity: 1;
  background-color: rgba(16, 185, 129, 0.9);
  animation: fadeOutAfterDelay 1.5s ease forwards;
}

/* 调整淡出动画时间比例 */
@keyframes fadeOutAfterDelay {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

/* 移除之前的重复样式 */
.folder-tab.active::after {
  opacity: 0;
}

/* 切换时的动画效果 */
.folder-tab.switching {
  animation: pulse 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1.2); }
}

/* 快捷键设置样式 */
.shortcuts-settings-container {
  margin-top: 1.5rem;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shortcut-item:hover {
  background-color: #f8f9fa;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.shortcut-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shortcut-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a202c;
}

.shortcut-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  color: #64748b;
}

.shortcut-value-label {
  color: #94a3b8;
  font-size: 12px;
}

.shortcut-value-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.shortcut-arrow {
  color: #94a3b8;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.shortcut-item:hover .shortcut-arrow {
  transform: translateX(2px);
  color: #10b981;
}

/* 暗色模式适配 */
[data-theme="dark"] .shortcut-item {
  background-color: #1f2937;
  border-color: #374151;
}

[data-theme="dark"] .shortcut-item:hover {
  background-color: #2d3748;
  border-color: #10b981;
}

[data-theme="dark"] .shortcut-name {
  color: #e5e7eb;
}

[data-theme="dark"] .shortcut-value {
  color: #9ca3af;
}

[data-theme="dark"] .shortcut-arrow {
  color: #64748b;
}

[data-theme="dark"] .shortcut-item:hover .shortcut-arrow {
  color: #10b981;
}

/* 必应壁纸样式 */
.bing-wallpapers-section {
    margin-bottom: 16px;
    max-width: 800px;
    padding-right: 10px;
}

.bing-wallpapers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
    aspect-ratio: 16/9;
}

.bing-wallpaper-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    aspect-ratio: 16/9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bing-wallpaper-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bing-wallpaper-item:hover .bing-wallpaper-info {
    opacity: 1;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.bing-wallpaper-thumbnail {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.2s ease;
}

.bing-wallpaper-item:hover .bing-wallpaper-thumbnail {
    transform: scale(1.05);
}

.bing-wallpaper-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.bing-wallpaper-title {
    font-size: 11px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.bing-wallpaper-date {
    font-size: 10px;
    opacity: 0.8;
}

/* 暗黑模式样式 */
[data-theme="dark"] .bing-wallpapers-title,
[data-theme="dark"] .wallpaper-preset-title {
    color: var(--text-color-dark);
}

[data-theme="dark"] .bing-wallpaper-item {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .bing-wallpaper-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 必应壁纸的激活状态样式 */
.bing-wallpaper-item.active {
    border: 2px solid var(--primary-color, #10b981);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 暗黑模式下的激活状态样式 */
[data-theme="dark"] .bing-wallpaper-item.active {
    border-color: var(--primary-color, #10b981);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}