:root {
  color-scheme: dark;
  --ceboo-theme-bg: #0b1020;
  --ceboo-theme-surface: rgba(12, 18, 32, 0.9);
  --ceboo-theme-surface-strong: rgba(17, 24, 39, 0.96);
  --ceboo-theme-text: #f8fafc;
  --ceboo-theme-text-soft: #94a3b8;
  --ceboo-theme-border: rgba(255, 255, 255, 0.08);
  --ceboo-theme-shadow: 0 24px 80px rgba(2, 6, 23, 0.3);
}

html[data-theme='light'] {
  color-scheme: light;
  --ceboo-theme-bg: #eef4ff;
  --ceboo-theme-surface: rgba(255, 255, 255, 0.9);
  --ceboo-theme-surface-strong: rgba(255, 255, 255, 0.98);
  --ceboo-theme-text: #0f172a;
  --ceboo-theme-text-soft: #475569;
  --ceboo-theme-border: rgba(15, 23, 42, 0.12);
  --ceboo-theme-shadow: 0 20px 54px rgba(100, 116, 139, 0.16);
}

html[data-theme='light'] body,
html[data-theme='light'] .main-content,
html[data-theme='light'] .strategy-zone-page,
html[data-theme='light'] .bg-grid-overlay {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 52%, #dfeaff 100%) !important;
}

html[data-theme='light'] body {
  color: var(--ceboo-theme-text) !important;
}

html[data-theme='light'] .bg-grid-overlay {
  opacity: 0.45;
  filter: hue-rotate(160deg) saturate(0.72) brightness(1.35);
}

html[data-theme='light'] .navbar,
html[data-theme='light'] .sidebar,
html[data-theme='light'] .profile-menu,
html[data-theme='light'] .strategy-card-panel,
html[data-theme='light'] .notification-card-panel,
html[data-theme='light'] .notification-summary-card,
html[data-theme='light'] .notification-card,
html[data-theme='light'] .auth-table-card,
html[data-theme='light'] .note-card,
html[data-theme='light'] .profile-card,
html[data-theme='light'] .contact-modal-panel,
html[data-theme='light'] .contact-modal-item,
html[data-theme='light'] .modal,
html[data-theme='light'] .modal-content,
html[data-theme='light'] .auth-field,
html[data-theme='light'] .notifications-empty,
html[data-theme='light'] .strategy-card,
html[data-theme='light'] .strategy-dashboard-card,
html[data-theme='light'] .strategy-dashboard-overview-card,
html[data-theme='light'] .strategy-dashboard-status-card,
html[data-theme='light'] .strategy-dashboard-modal,
html[data-theme='light'] .strategy-card-chart {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.84)), var(--ceboo-theme-surface-strong) !important;
  color: var(--ceboo-theme-text) !important;
  border-color: var(--ceboo-theme-border) !important;
  box-shadow: var(--ceboo-theme-shadow) !important;
}

html[data-theme='light'] .navbar,
html[data-theme='light'] .sidebar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(18px) saturate(160%);
}

html[data-theme='light'] .text-white,
html[data-theme='light'] .page-title,
html[data-theme='light'] .hero-title,
html[data-theme='light'] .profile-row-title,
html[data-theme='light'] .profile-card-title,
html[data-theme='light'] .auth-modal-title,
html[data-theme='light'] .note-title,
html[data-theme='light'] .notification-title,
html[data-theme='light'] .strategy-zone-title,
html[data-theme='light'] .strategy-card-title,
html[data-theme='light'] .strategy-card-stat-value,
html[data-theme='light'] .strategy-dashboard-title,
html[data-theme='light'] .strategy-dashboard-value,
html[data-theme='light'] .strategy-dashboard-modal-title,
html[data-theme='light'] .alias-value,
html[data-theme='light'] .exchange-label,
html[data-theme='light'] .dashboard-user-name,
html[data-theme='light'] [data-user-email] {
  color: var(--ceboo-theme-text) !important;
}

html[data-theme='light'] .nav-item,
html[data-theme='light'] .text-slate-200,
html[data-theme='light'] .text-slate-500,
html[data-theme='light'] .text-slate-400,
html[data-theme='light'] .text-slate-300,
html[data-theme='light'] .page-subtitle,
html[data-theme='light'] .note-body,
html[data-theme='light'] .profile-row-value,
html[data-theme='light'] .contact-modal-label,
html[data-theme='light'] .notification-content,
html[data-theme='light'] .auth-table thead th,
html[data-theme='light'] .uid-value,
html[data-theme='light'] .hero-uid,
html[data-theme='light'] .auth-modal-subtitle,
html[data-theme='light'] .auth-field-label,
html[data-theme='light'] .strategy-card-stat-label,
html[data-theme='light'] .strategy-card-description,
html[data-theme='light'] .strategy-zone-subtitle,
html[data-theme='light'] .strategy-dashboard-subtext,
html[data-theme='light'] .strategy-dashboard-meta,
html[data-theme='light'] .strategy-dashboard-risk-link,
html[data-theme='light'] .strategy-runtime-tip {
  color: var(--ceboo-theme-text-soft) !important;
}

html[data-theme='light'] .nav-item {
  color: #334155 !important;
}

html[data-theme='light'] .nav-item:hover,
html[data-theme='light'] .nav-item.active {
  color: #0f172a !important;
}

html[data-theme='light'] .exchange-label {
  color: #334155 !important;
  font-weight: 500;
}

.strategy-running-exchange {
  color: rgba(248, 250, 252, 0.92) !important;
  font-weight: 500;
}

html[data-theme='light'] .strategy-running-exchange {
  color: #334155 !important;
  font-weight: 600;
}

html[data-theme='light'] .primary-action,
html[data-theme='light'] .notifications-primary-btn,
html[data-theme='light'] .auth-submit-btn,
html[data-theme='light'] .profile-primary-btn,
html[data-theme='light'] .strategy-dashboard-stop,
html[data-theme='light'] .strategy-confirm-button,
html[data-theme='light'] .strategy-runtime-button-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 56%, #0f9f6e 100%) !important;
  border-color: rgba(37, 99, 235, 0.24) !important;
  color: #ffffff !important;
}

html[data-theme='light'] .notifications-page-btn,
html[data-theme='light'] .notification-read-btn,
html[data-theme='light'] .modal-close-btn,
html[data-theme='light'] .profile-outline-btn,
html[data-theme='light'] .profile-back-btn,
html[data-theme='light'] .strategy-dashboard-risk-chip,
html[data-theme='light'] .strategy-runtime-button-secondary {
  background: rgba(255, 255, 255, 0.74) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: var(--ceboo-theme-text) !important;
}

html[data-theme='light'] .auth-field-input,
html[data-theme='light'] .auth-field-select,
html[data-theme='light'] input,
html[data-theme='light'] select,
html[data-theme='light'] textarea {
  background: rgba(255, 255, 255, 0.98) !important;
  color: var(--ceboo-theme-text) !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
}

html[data-theme='light'] input::placeholder,
html[data-theme='light'] textarea::placeholder {
  color: #64748b !important;
  opacity: 1;
}

html[data-theme='light'] input:-webkit-autofill,
html[data-theme='light'] input:-webkit-autofill:hover,
html[data-theme='light'] input:-webkit-autofill:focus,
html[data-theme='light'] select:-webkit-autofill,
html[data-theme='light'] select:-webkit-autofill:hover,
html[data-theme='light'] select:-webkit-autofill:focus,
html[data-theme='light'] textarea:-webkit-autofill,
html[data-theme='light'] textarea:-webkit-autofill:hover,
html[data-theme='light'] textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ceboo-theme-text) !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.98) inset !important;
  transition: background-color 9999s ease-out;
}

html[data-theme='light'] .status-pill.is-normal,
html[data-theme='light'] .notification-type-badge,
html[data-theme='light'] .strategy-card-badge-official {
  background: rgba(15, 159, 110, 0.12) !important;
  color: #0f9f6e !important;
}

html[data-theme='light'] .status-pill.is-invalid,
html[data-theme='light'] .text-rose-300,
html[data-theme='light'] .text-rose-400,
html[data-theme='light'] .strategy-card-stat-value.is-negative {
  color: #dc2626 !important;
}

html[data-theme='light'] [class*='text-[#02B977]'],
html[data-theme='light'] .text-emerald-400,
html[data-theme='light'] .strategy-card-stat-value.is-positive {
  color: #0f9f6e !important;
}

html[data-theme='light'] .text-yellow-400,
html[data-theme='light'] .text-amber-300,
html[data-theme='light'] .strategy-card-stat-value.is-drawdown {
  color: #d97706 !important;
}

.ceboo-theme-switch {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 16px 40px rgba(2, 6, 23, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  color: #f8fafc;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.ceboo-theme-switch:hover {
  transform: translateY(-1px);
  border-color: rgba(2, 185, 119, 0.36);
  box-shadow:
    0 18px 44px rgba(2, 6, 23, 0.28),
    0 0 0 1px rgba(2, 185, 119, 0.08),
    0 0 24px rgba(2, 185, 119, 0.14);
}

.ceboo-theme-switch:focus-visible {
  outline: 0;
  border-color: rgba(2, 185, 119, 0.42);
  box-shadow:
    0 0 0 3px rgba(2, 185, 119, 0.18),
    0 18px 44px rgba(2, 6, 23, 0.26);
}

html[data-theme='light'] .ceboo-theme-switch {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.88)),
    rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    0 16px 40px rgba(148, 163, 184, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

html[data-theme='light'] .ceboo-theme-switch:hover {
  border-color: rgba(14, 165, 233, 0.28);
  box-shadow:
    0 18px 44px rgba(148, 163, 184, 0.24),
    0 0 0 1px rgba(14, 165, 233, 0.08),
    0 0 24px rgba(14, 165, 233, 0.12);
}

.ceboo-theme-switch__icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
}

.ceboo-theme-switch__glyph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s ease, transform 0.22s ease;
}

.ceboo-theme-switch.is-dark .ceboo-theme-switch__glyph--sun,
.ceboo-theme-switch.is-light .ceboo-theme-switch__glyph--moon {
  opacity: 0;
  transform: scale(0.75) rotate(-12deg);
}

.ceboo-theme-switch.is-dark .ceboo-theme-switch__glyph--moon,
.ceboo-theme-switch.is-light .ceboo-theme-switch__glyph--sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

@media (max-width: 768px) {
  .ceboo-theme-switch {
    width: 40px;
    height: 40px;
  }
}

html[data-theme='light'] .strategy-zone-page .strategy-card-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.68)) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 24px 60px rgba(148, 163, 184, 0.2) !important;
}

html[data-theme='light'] .strategy-zone-page .strategy-risk-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 255, 0.92)) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  box-shadow: 0 18px 42px rgba(148, 163, 184, 0.18) !important;
}

html[data-theme='light'] .strategy-zone-page .strategy-risk-card,
html[data-theme='light'] .strategy-zone-page .strategy-risk-card * {
  color: #475569 !important;
}

html[data-theme='light'] .strategy-zone-page .strategy-risk-card strong,
html[data-theme='light'] .strategy-zone-page .strategy-risk-card b {
  color: #0f172a !important;
}

html[data-theme='light'] .strategy-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.96)) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  box-shadow:
    0 22px 56px rgba(148, 163, 184, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-theme='light'] .strategy-card:hover {
  border-color: rgba(37, 99, 235, 0.22) !important;
  box-shadow:
    0 28px 60px rgba(148, 163, 184, 0.28),
    0 0 0 1px rgba(37, 99, 235, 0.06),
    0 0 28px rgba(14, 165, 233, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

html[data-theme='light'] .strategy-card-title {
  color: #0f172a !important;
}

html[data-theme='light'] .strategy-card-description {
  color: #64748b !important;
  text-shadow: none !important;
}

html[data-theme='light'] .strategy-card-chart {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 246, 255, 0.95)) !important;
  border: 1px solid rgba(125, 211, 252, 0.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -12px 30px rgba(191, 219, 254, 0.22),
    0 12px 28px rgba(148, 163, 184, 0.16) !important;
}

html[data-theme='light'] .strategy-card-metrics {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
}

html[data-theme='light'] .strategy-card .strategy-card-button {
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.96), rgba(219, 234, 254, 0.98)) !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  color: #0369a1 !important;
  box-shadow: 0 10px 24px rgba(125, 211, 252, 0.14) !important;
}

html[data-theme='light'] .strategy-card .strategy-card-button:hover {
  background: linear-gradient(135deg, rgba(186, 230, 253, 0.98), rgba(219, 234, 254, 1)) !important;
  border-color: rgba(14, 165, 233, 0.32) !important;
  color: #0f172a !important;
}

html[data-theme='light'] .strategy-card .strategy-card-button.is-running {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.96), rgba(240, 253, 244, 0.98)) !important;
  border-color: rgba(34, 197, 94, 0.24) !important;
  color: #15803d !important;
}

html[data-theme='light'] .strategy-vx::before {
  background:
    linear-gradient(rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.08) 1px, transparent 1px) !important;
  opacity: 0.55 !important;
}

html[data-theme='light'] .strategy-vx::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 12%, rgba(219, 234, 254, 0.32) 100%) !important;
}

html[data-theme='light'] .strategy-card-chart [class*='strategy-vx-'] {
  filter: saturate(1.18) brightness(1.08);
}

html[data-theme='light'] .strategy-vx-holo-lane .strategy-vx-grid,
html[data-theme='light'] .strategy-vx-shield-matrix .strategy-vx-matrix {
  opacity: 0.6 !important;
}

html[data-theme='light'] .strategy-vx-holo-lane .strategy-vx-scanner,
html[data-theme='light'] .strategy-vx-flow-line,
html[data-theme='light'] .strategy-vx-midline,
html[data-theme='light'] .strategy-vx-orbit-trace,
html[data-theme='light'] .strategy-vx-prism-line {
  opacity: 0.95 !important;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.24) !important;
}

html[data-theme='light'] .strategy-vx-dot,
html[data-theme='light'] .strategy-vx-core,
html[data-theme='light'] .strategy-vx-beacon-core,
html[data-theme='light'] .strategy-vx-prism-node,
html[data-theme='light'] .strategy-vx-flow-node,
html[data-theme='light'] .strategy-vx-orbit-spark,
html[data-theme='light'] .strategy-vx-order-dot,
html[data-theme='light'] .strategy-vx-lane-node {
  opacity: 1 !important;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.3) !important;
}

/* === 白色主题导航栏强制覆盖 === */
html[data-theme='light'] .navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme='light'] .navbar span.text-white,
html[data-theme='light'] .navbar .text-white {
  color: #1e293b !important;
}

html[data-theme='light'] .navbar .top-nav-pill a {
  color: #475569 !important;
}

html[data-theme='light'] .navbar .top-nav-pill a:hover,
html[data-theme='light'] .navbar .top-nav-pill a.is-active {
  color: #0f172a !important;
}

html[data-theme='light'] .navbar .border-white\/10 {
  border-color: rgba(0, 0, 0, 0.1) !important;
}
