src/assets/css/dark-theme-unified.css
/* 性能优化的暗色主题文件 */

/* 基础暗色主题设置 */
[data-theme="dark"] {
  color-scheme: dark;
  --text-color: #ffffff;
  --text-color-secondary: rgba(255, 255, 255, 0.85);
  --text-color-tertiary: rgba(255, 255, 255, 0.65);
}

/* 优化的文本颜色修复 - 减少通配符使用 */
[data-theme="dark"] {
  color: rgba(255, 255, 255, 0.87);
}

/* 针对性的元素选择器，避免通配符 */
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div:not(.btn):not([class*="btn-"]),
[data-theme="dark"] label,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] li,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: hsl(var(--bc));
}

/* 特殊元素保持原色 - 减少重复选择器 */
[data-theme="dark"] .btn,
[data-theme="dark"] .iconify,
[data-theme="dark"] [class*="btn-"] {
  color: initial;
}

/* 表单元素优化 */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: hsl(var(--b1));
  color: hsl(var(--bc));
  border-color: hsl(var(--b3));
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: hsl(var(--bc) / 0.5);
}

/* 组件特定样式 */
[data-theme="dark"] .settings-drawer-container {
  color: hsl(var(--bc));
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-content {
  color: hsl(var(--bc));
}

/* 链接样式 */
[data-theme="dark"] a:not(.btn) {
  color: hsl(var(--p));
}

[data-theme="dark"] a:not(.btn):hover {
  color: hsl(var(--p) / 0.8);
}

/* 保持按钮颜色 */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-accent,
[data-theme="dark"] .btn-success,
[data-theme="dark"] .btn-warning,
[data-theme="dark"] .btn-error,
[data-theme="dark"] .btn-info {
  color: initial;
}

/* 响应式媒体查询下的额外修复 */
@media (prefers-color-scheme: dark) {
  [data-theme="dark"] input,
  [data-theme="dark"] textarea,
  [data-theme="dark"] select {
    -webkit-appearance: none;
    appearance: none;
    background-color: hsl(var(--b1)) !important;
    color: hsl(var(--bc)) !important;
  }
}
