/**
 * 主题变量定义
 * 用于覆盖 Bulma 默认样式和项目特定的硬编码颜色
 */

:root {
    /* ========================================
     自定义颜色变量 - 亮色模式 (默认)
     ======================================== */

    /* 背景色 */
    --theme-bg-primary: #ffffff;
    --theme-bg-secondary: #f5f5f5;
    --theme-bg-tertiary: #f8f9fa;
    --theme-bg-quaternary: #fafafa;
    --theme-bg-terminal: #1a1a1a;
    --theme-bg-card: #ffffff;
    --theme-bg-hover: #f5f5f5;

    /* 文字色 */
    --theme-text-primary: #363636;
    --theme-text-secondary: #666666;
    --theme-text-muted: #7a7a7a;
    --theme-text-light: #b5b5b5;
    --theme-text-white: #ffffff;

    /* 边框色 */
    --theme-border-light: #f0f0f0;
    --theme-border-normal: #dbdbdb;
    --theme-border-strong: #b5b5b5;

    /* 状态颜色 - 成功 */
    --theme-success-bg: #effaf5;
    --theme-success-bg-light: #d4edda;
    --theme-success-text: #257953;
    --theme-success-color: #48c78e;

    /* 状态颜色 - 危险 */
    --theme-danger-bg: #feecf0;
    --theme-danger-bg-light: #f8d7da;
    --theme-danger-text: #cc0f35;
    --theme-danger-color: #f14668;

    /* 状态颜色 - 信息 */
    --theme-info-bg: #eff5fb;
    --theme-info-text: #296fa8;
    --theme-info-color: #3e8ed0;

    /* 状态颜色 - 警告 */
    --theme-warning-bg: #fffaeb;
    --theme-warning-text: #946c00;
    --theme-warning-color: #ffe08a;

    /* 主色调 */
    --theme-primary: #485fc7;
    --theme-primary-light: #eff1fa;
    --theme-link: #3273dc;

    /* 阴影 */
    --theme-shadow: rgba(10, 10, 10, 0.1);
    --theme-shadow-strong: rgba(10, 10, 10, 0.2);

    /* 图表相关 */
    --theme-chart-bg: #ffffff;
    --theme-chart-grid: #f5f5f5;
    --theme-chart-axis: #666666;
    --theme-chart-tooltip-bg: rgba(50, 50, 50, 0.9);
    --theme-chart-tooltip-text: #ffffff;

    /* K线图颜色 */
    --theme-kline-up: #ef4444;
    --theme-kline-down: #22c55e;

    /* 导航栏 */
    --theme-navbar-bg: #ffffff;
    --theme-navbar-dropdown-bg: #ffffff;
    --theme-navbar-hover: #fafafa;
    --theme-navbar-active-bg: #3273dc;
}

/* ========================================
   深色模式 - 使用 Bulma 官方配色
   scheme-main-l: 11%, background-l: 14%
   ======================================== */
[data-theme="dark"] {
    /* 背景色 - 调整对比度 */
    --theme-bg-primary: #121212;
    /* 更深的主背景 */
    --theme-bg-secondary: #181818;
    /* 次级背景，用于页面底色 */
    --theme-bg-tertiary: #2a2a2a;
    /* 三级背景，用于输入框/面板头 */
    --theme-bg-quaternary: #303030;
    /* 四级背景 */
    --theme-bg-terminal: #0a0a0a;
    /* 终端背景 */
    --theme-bg-card: #242424;
    /* 卡片背景 - 保持灰色以从黑色背景中浮出 */
    --theme-bg-hover: #333333;
    /* 悬停背景 */

    /* 文字色 - Bulma 官方深色模式文字 */
    --theme-text-primary: #f5f5f5;
    /* 主文字 text-strong-l: 93% */
    --theme-text-secondary: #dbdbdb;
    /* 次级文字 text-l: 71% */
    --theme-text-muted: #b5b5b5;
    /* 静音文字 text-weak-l: 53% */
    --theme-text-light: #7a7a7a;
    /* 浅色文字 */
    --theme-text-white: #ffffff;
    /* 白色文字 text-title-l: 100% */

    /* 边框色 - Bulma 官方 */
    --theme-border-light: #363636;
    /* 弱边框 border-weak-l: 21% */
    --theme-border-normal: #4a4a4a;
    /* 普通边框 border-l: 24% */
    --theme-border-strong: #5a5a5a;
    /* 强边框 */

    /* 状态颜色 - 成功 */
    --theme-success-bg: #1d3c2c;
    --theme-success-bg-light: #264d38;
    --theme-success-text: #48c78e;
    --theme-success-color: #48c78e;

    /* 状态颜色 - 危险 */
    --theme-danger-bg: #3c1d2c;
    --theme-danger-bg-light: #4d2638;
    --theme-danger-text: #f14668;
    --theme-danger-color: #f14668;

    /* 状态颜色 - 信息 */
    --theme-info-bg: #1d2c3c;
    --theme-info-text: #66b3ff;
    --theme-info-color: #3e8ed0;

    /* 状态颜色 - 警告 */
    --theme-warning-bg: #3c3c1d;
    --theme-warning-text: #ffd93d;
    --theme-warning-color: #ffe08a;

    /* 主色调 */
    --theme-primary: #485fc7;
    --theme-primary-light: #363d5a;
    --theme-link: #66b3ff;

    /* 阴影 */
    --theme-shadow: rgba(0, 0, 0, 0.4);
    --theme-shadow-strong: rgba(0, 0, 0, 0.6);

    /* 图表相关 */
    --theme-chart-bg: #1c1c1c;
    --theme-chart-grid: #363636;
    --theme-chart-axis: #b5b5b5;
    --theme-chart-tooltip-bg: rgba(30, 30, 30, 0.95);
    --theme-chart-tooltip-text: #f5f5f5;

    /* K线图颜色 - 深色模式下保持一致 */
    --theme-kline-up: #ef4444;
    --theme-kline-down: #22c55e;

    /* 导航栏 */
    --theme-navbar-bg: #1c1c1c;
    --theme-navbar-dropdown-bg: #242424;
    --theme-navbar-hover: #363636;
    --theme-navbar-active-bg: #485fc7;

    /* 标签颜色适配 */
    --theme-tag-info-bg: #1d2c3c;
    --theme-tag-info-text: #66b3ff;
}

/* Bulma Tag Theme Overrides for Dark Mode */
[data-theme="dark"] .tag.is-info.is-light {
    background-color: var(--theme-tag-info-bg) !important;
    color: var(--theme-tag-info-text) !important;
}

/* ========================================
   通用覆盖样式
   ======================================== */

/* 页面背景 */
body {
    background-color: var(--theme-bg-secondary) !important;
    color: var(--theme-text-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 导航栏 */
.navbar {
    background-color: var(--theme-navbar-bg) !important;
    transition: background-color 0.3s ease;
}

.navbar-item,
.navbar-link {
    color: var(--theme-text-primary) !important;
}

.navbar-item:hover,
.navbar-link:hover {
    background-color: var(--theme-navbar-hover) !important;
}

.navbar-dropdown {
    background-color: var(--theme-navbar-dropdown-bg) !important;
    background-color: var(--theme-navbar-dropdown-bg) !important;
    border-top-color: var(--theme-primary) !important;
}

/* High Specificity Navbar Override for Top Level Items */
/* Only apply to direct navbar-item links, not dropdown triggers */
nav.navbar .navbar-menu .navbar-start>a.navbar-item.is-active:not(.navbar-link) {
    background-color: var(--theme-bg-hover) !important;
    color: var(--theme-primary) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--theme-primary) !important;
}

/* For dropdown parent links when active, use subtle styling without border */
nav.navbar .navbar-menu .navbar-start>.has-dropdown>.navbar-link.is-active {
    background-color: transparent !important;
    color: var(--theme-primary) !important;
    font-weight: 600;
}

.navbar-dropdown .navbar-item:hover {
    background-color: var(--theme-bg-hover) !important;
}

.navbar-dropdown .navbar-item.is-active {
    background-color: var(--theme-navbar-active-bg) !important;
    color: var(--theme-text-white) !important;
}

/* 卡片 */
.card {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
    box-shadow: 0 0.5em 1em -0.125em var(--theme-shadow) !important;
    transition: background-color 0.3s ease;
}

.card-header {
    background-color: transparent !important;
}

.card-footer {
    border-top-color: var(--theme-border-normal) !important;
}

/* 表格 */
.table {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

.table th {
    color: var(--theme-text-primary) !important;
    background-color: var(--theme-bg-tertiary) !important;
}

.table td,
.table th {
    border-color: var(--theme-border-normal) !important;
}

.table.is-striped tbody tr:not(.is-selected):nth-child(2n) {
    background-color: var(--theme-bg-quaternary) !important;
}

.table.is-hoverable tbody tr:not(.is-selected):hover {
    background-color: var(--theme-bg-hover) !important;
}

/* 面板 */
.panel {
    background-color: var(--theme-bg-card) !important;
}

.panel-heading {
    background-color: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-primary) !important;
}

/* 模态框 */
.modal-card {
    background-color: var(--theme-bg-card) !important;
}

.modal-card-head,
.modal-card-foot {
    background-color: var(--theme-bg-tertiary) !important;
    border-color: var(--theme-border-normal) !important;
}

.modal-card-title {
    color: var(--theme-text-primary) !important;
}

.modal-card-body {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

/* 通知 */
.notification {
    background-color: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-primary) !important;
}

.notification.is-info.is-light {
    background-color: var(--theme-info-bg) !important;
    color: var(--theme-info-text) !important;
}

.notification.is-success.is-light {
    background-color: var(--theme-success-bg) !important;
    color: var(--theme-success-text) !important;
}

.notification.is-warning.is-light {
    background-color: var(--theme-warning-bg) !important;
    color: var(--theme-warning-text) !important;
}

.notification.is-danger.is-light {
    background-color: var(--theme-danger-bg) !important;
    color: var(--theme-danger-text) !important;
}

/* 标签页 */
.tabs ul {
    border-bottom-color: var(--theme-border-normal) !important;
}

.tabs a {
    border-bottom-color: var(--theme-border-normal) !important;
    color: var(--theme-text-primary) !important;
}

.tabs li.is-active a {
    border-bottom-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

/* 输入框 */
.input,
.textarea,
.select select {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-normal) !important;
}

.input:focus,
.textarea:focus,
.select select:focus {
    border-color: var(--theme-primary) !important;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--theme-text-muted) !important;
}

/* 下拉框 */
.dropdown-content {
    background-color: var(--theme-bg-card) !important;
}

.dropdown-item {
    color: var(--theme-text-primary) !important;
}

.dropdown-item:hover {
    background-color: var(--theme-bg-hover) !important;
}

/* 按钮 - 保持 Bulma 默认颜色 */

/* 盒子 */
.box {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

/* 标题 */
.title,
.subtitle {
    color: var(--theme-text-primary) !important;
}

/* 标签 */
.label {
    color: var(--theme-text-primary) !important;
}

/* 帮助文本 */
.help {
    color: var(--theme-text-muted) !important;
}

/* 分隔线 */
hr {
    background-color: var(--theme-border-normal) !important;
}

/* 代码块 */
code {
    background-color: var(--theme-bg-tertiary) !important;
    color: var(--theme-danger-color) !important;
}

pre {
    background-color: var(--theme-bg-terminal) !important;
    color: var(--theme-text-white) !important;
}

/* 主题切换按钮 */
.theme-toggle-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--theme-text-primary) !important;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    color: var(--theme-primary) !important;
}

/* 加载遮罩 */
.loading-overlay {
    background: var(--theme-bg-primary) !important;
    opacity: 0.9;
}

/* 面包屑 */
.breadcrumb a {
    color: var(--theme-link) !important;
}

.breadcrumb li.is-active a {
    color: var(--theme-text-primary) !important;
}

/* 消息 */
.message {
    background-color: var(--theme-bg-tertiary) !important;
}

.message-header {
    background-color: var(--theme-primary) !important;
}

.message-body {
    border-color: var(--theme-border-normal) !important;
    color: var(--theme-text-primary) !important;
}

/* 进度条 */
.progress {
    background-color: var(--theme-bg-tertiary) !important;
}

/* 标签 */
.tag:not(.is-success):not(.is-danger):not(.is-warning):not(.is-info):not(.is-primary):not(.is-link) {
    background-color: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-primary) !important;
}

/* 菜单 */
.menu-label {
    color: var(--theme-text-muted) !important;
}

.menu-list a {
    color: var(--theme-text-primary) !important;
}

.menu-list a:hover {
    background-color: var(--theme-bg-hover) !important;
}

.menu-list a.is-active {
    background-color: var(--theme-primary) !important;
    color: var(--theme-text-white) !important;
}

/* ========================================
   页面特定样式覆盖
   强制覆盖各页面中硬编码的背景色
   ======================================== */

/* 图表容器 - 适用于 snapshot, trade_simulator 等页面 */
.chart-container,
.chart-card,
.chart-wrapper,
[class*="chart"] {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-normal) !important;
}

/* 控制面板 - 适用于 snapshot, rsi_stock_finder 等页面 */
.control-panel,
.sidebar,
.filter-panel,
.settings-panel,
.date-sidebar,
.filter-sidebar {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-normal) !important;
}

/* 日期列表项 */
.date-item {
    background-color: transparent !important;
    color: var(--theme-text-primary) !important;
}

.date-item:hover {
    background-color: var(--theme-bg-hover) !important;
}

.date-item.active {
    background-color: var(--theme-primary) !important;
    color: var(--theme-text-white) !important;
}

/* 月份卡片 - 适用于 snapshot_v5.1 */
.month-card,
.month-container,
.month-chart {
    background-color: var(--theme-bg-card) !important;
    border-color: var(--theme-border-normal) !important;
}

/* 笔记编辑器 - 适用于 notes.php */
.note-card,
.note-item,
.note-list-item,
.note-editor,
.editor-container {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-normal) !important;
}

/* 交易模拟器侧边栏 */
.trade-sidebar,
.buy-points-panel,
.result-panel {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

/* RSI Stock Finder 侧边栏 */
.finder-sidebar,
.stock-list-panel,
.result-list {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

/* 通用白色背景覆盖 - 深色模式下强制转换 */
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background-color:#ffffff"],
[data-theme="dark"] [style*="background-color: #ffffff"] {
    background-color: var(--theme-bg-card) !important;
}

/* 浅灰色背景覆盖 */
[data-theme="dark"] [style*="background:#f5f5f5"],
[data-theme="dark"] [style*="background: #f5f5f5"],
[data-theme="dark"] [style*="background-color:#f5f5f5"],
[data-theme="dark"] [style*="background-color: #f5f5f5"],
[data-theme="dark"] [style*="background:#fafafa"],
[data-theme="dark"] [style*="background: #fafafa"],
[data-theme="dark"] [style*="background:#f8f9fa"],
[data-theme="dark"] [style*="background: #f8f9fa"],
[data-theme="dark"] [style*="background:#f9f9f9"],
[data-theme="dark"] [style*="background: #f9f9f9"] {
    background-color: var(--theme-bg-tertiary) !important;
}

/* 深色文字在深色模式下变浅 */
[data-theme="dark"] [style*="color:#363636"],
[data-theme="dark"] [style*="color: #363636"],
[data-theme="dark"] [style*="color:#666"],
[data-theme="dark"] [style*="color: #666"],
[data-theme="dark"] [style*="color:#4a4a4a"],
[data-theme="dark"] [style*="color: #4a4a4a"] {
    color: var(--theme-text-secondary) !important;
}

/* 主内容区域 */
.main-content,
.content-wrapper,
.page-content {
    background-color: var(--theme-bg-secondary) !important;
}

/* 主布局 */
.main-layout {
    background-color: var(--theme-bg-secondary) !important;
}

/* 任务卡片 - py_manage */
.task-card {
    background-color: var(--theme-bg-card) !important;
    border-color: var(--theme-border-normal) !important;
}

.task-card:hover {
    background-color: var(--theme-bg-hover) !important;
}

.task-list {
    background-color: var(--theme-bg-card) !important;
}

.task-controls {
    background-color: var(--theme-bg-tertiary) !important;
}

/* 日志区域 */
.log-container,
.log-panel,
.log-output {
    background-color: var(--theme-bg-terminal) !important;
    color: #00ff00 !important;
}

/* 登录页面 */
.login-container,
.login-box,
.login-card {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

/* txt.php 页面 */
.txt-container,
.txt-content,
.file-content {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

/* Slider / Range 输入 */
input[type="range"] {
    background-color: var(--theme-bg-tertiary) !important;
}

/* 固定底部栏 */
.fixed-bottom,
.bottom-bar {
    background-color: var(--theme-bg-card) !important;
    border-top-color: var(--theme-border-normal) !important;
}

/* 统计卡片 */
.stat-card,
.stats-card,
.summary-card {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

/* 按钮 is-light 在深色模式下 */
[data-theme="dark"] .button.is-light {
    background-color: var(--theme-bg-tertiary) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-normal) !important;
}

[data-theme="dark"] .button.is-light:hover {
    background-color: var(--theme-bg-hover) !important;
}

/* 分页 */
.pagination-link,
.pagination-previous,
.pagination-next {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border-normal) !important;
}

.pagination-link.is-current {
    background-color: var(--theme-primary) !important;
    color: var(--theme-text-white) !important;
    border-color: var(--theme-primary) !important;
}

/* 骨架屏 */
.skeleton,
.loading-placeholder {
    background: linear-gradient(90deg, var(--theme-bg-tertiary) 25%, var(--theme-bg-hover) 50%, var(--theme-bg-tertiary) 75%) !important;
}

/* 工具提示 */
.tooltip,
.tippy-box {
    background-color: var(--theme-chart-tooltip-bg) !important;
    color: var(--theme-chart-tooltip-text) !important;
}

/* ========================================
   页面布局修复 - 解决底部空白问题
   ======================================== */

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
}

/* ========================================
   深色模式文字可见性修复
   强制所有深色文字在深色模式下变为浅色
   ======================================== */

/* 所有文本元素在深色模式下使用浅色文字 */
[data-theme="dark"] {
    /* Bulma 文本类覆盖 */
    --bulma-text: #f5f5f5;
    --bulma-text-strong: #ffffff;
    --bulma-text-light: #dbdbdb;
    --bulma-scheme-main: #1c1c1c;
    --bulma-scheme-main-bis: #242424;
    --bulma-scheme-main-ter: #2a2a2a;
    --bulma-background: #242424;
    --bulma-border: #4a4a4a;
    --bulma-border-hover: #5a5a5a;
}

/* 强制所有可能的深色文字变为浅色 */
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] li,
[data-theme="dark"] a,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] label,
[data-theme="dark"] .content {
    color: inherit;
}

/* 覆盖硬编码的深色文字颜色 */
[data-theme="dark"] [style*="color: #333"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color: #363636"],
[data-theme="dark"] [style*="color:#363636"],
[data-theme="dark"] [style*="color: #4a4a4a"],
[data-theme="dark"] [style*="color:#4a4a4a"],
[data-theme="dark"] [style*="color: #666"],
[data-theme="dark"] [style*="color:#666"],
[data-theme="dark"] [style*="color: #777"],
[data-theme="dark"] [style*="color:#777"],
[data-theme="dark"] [style*="color: black"],
[data-theme="dark"] [style*="color:black"],
[data-theme="dark"] [style*="color: #000"],
[data-theme="dark"] [style*="color:#000"] {
    color: var(--theme-text-primary) !important;
}

/* 覆盖 Bulma has-text- 类在深色模式下的表现 */
[data-theme="dark"] .has-text-dark {
    color: var(--theme-text-secondary) !important;
}

[data-theme="dark"] .has-text-grey-dark,
[data-theme="dark"] .has-text-grey-darker {
    color: var(--theme-text-muted) !important;
}

/* 表格文字修复 */
[data-theme="dark"] .table {
    color: var(--theme-text-primary);
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    color: var(--theme-text-primary);
}

/* 面板标题和内容 */
[data-theme="dark"] .panel-block,
[data-theme="dark"] .panel-tabs a {
    color: var(--theme-text-primary) !important;
}

/* 列表项 */
[data-theme="dark"] .list-item,
[data-theme="dark"] .menu-list a {
    color: var(--theme-text-primary) !important;
}

/* 下拉菜单选项 */
[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .select select option {
    color: var(--theme-text-primary) !important;
    background-color: var(--theme-bg-card) !important;
}

/* trade_simulator 页面修复 */
[data-theme="dark"] .trade-info,
[data-theme="dark"] .trade-result,
[data-theme="dark"] .buy-point-item,
[data-theme="dark"] .result-item {
    color: var(--theme-text-primary) !important;
    background-color: var(--theme-bg-card) !important;
}

/* rsi_stock_finder 页面修复 */
[data-theme="dark"] .stock-item,
[data-theme="dark"] .filter-item,
[data-theme="dark"] .stock-info {
    color: var(--theme-text-primary) !important;
}

/* py_manage 页面修复 */
[data-theme="dark"] .task-info,
[data-theme="dark"] .task-name,
[data-theme="dark"] .task-desc,
[data-theme="dark"] .task-status {
    color: var(--theme-text-primary) !important;
}

/* snapshot 页面修复 */
[data-theme="dark"] .snapshot-info,
[data-theme="dark"] .chart-title,
[data-theme="dark"] .chart-subtitle {
    color: var(--theme-text-primary) !important;
}

/* 月份标签 */
[data-theme="dark"] .month-label,
[data-theme="dark"] .date-label {
    color: var(--theme-text-primary) !important;
}

/* 通用 info/detail 元素 */
[data-theme="dark"] .info-text,
[data-theme="dark"] .detail-text,
[data-theme="dark"] .description {
    color: var(--theme-text-secondary) !important;
}

/* 强制 Bulma level 元素文字 */
[data-theme="dark"] .level-item {
    color: var(--theme-text-primary) !important;
}

[data-theme="dark"] .level-item .title,
[data-theme="dark"] .level-item .heading {
    color: var(--theme-text-primary) !important;
}

/* 强制 box 内容 */
[data-theme="dark"] .box {
    background-color: var(--theme-bg-card) !important;
    color: var(--theme-text-primary) !important;
}

/* 强制 column 内容 */
[data-theme="dark"] .column {
    color: inherit;
}

/* 卡片内所有文字 */
[data-theme="dark"] .card *:not(.tag):not(.button):not(.notification) {
    color: inherit;
}

/* 模态框内所有文字 */
[data-theme="dark"] .modal-card-body *:not(.tag):not(.button):not(.notification) {
    color: inherit;
}

/* 确保 select 框内文字可见 */
[data-theme="dark"] .select:not(.is-multiple):not(.is-loading)::after {
    border-color: var(--theme-text-primary) !important;
}

/* 强制 field-label 文字 */
[data-theme="dark"] .field-label .label {
    color: var(--theme-text-primary) !important;
}

/* 确保占位符文字可见 */
[data-theme="dark"] ::placeholder {
    color: var(--theme-text-muted) !important;
    opacity: 1;
}

/* 禁用状态文字 */
[data-theme="dark"] .button[disabled],
[data-theme="dark"] .input[disabled],
[data-theme="dark"] .select select[disabled] {
    color: var(--theme-text-muted) !important;
}