/* 路利达官网 — 主题扩展（浅色/深色） */
/* 基础：主题切换按钮（两种主题下均可用） */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.theme-toggle:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* 平滑过渡 */
body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---------- 深色主题 ---------- */
[data-theme="dark"] {
  --color-bg: #0C1526;
  --color-bg-alt: #121D33;
  --color-border: #263650;
  --color-text: #E6EBF3;
  --color-text-muted: #9DAABF;
  color-scheme: dark;
}

/* 深色下的卡片/表面（原为硬编码 #fff） */
[data-theme="dark"] .card,
[data-theme="dark"] .product-card,
[data-theme="dark"] .news-card,
[data-theme="dark"] .contact-form,
[data-theme="dark"] .case-card,
[data-theme="dark"] .brand-item,
[data-theme="dark"] .hero-stats {
  background: #16233C;
}

/* 头部与移动端抽屉 */
[data-theme="dark"] .header {
  background: rgba(12, 21, 38, 0.92);
}

[data-theme="dark"] .nav {
  background: #0C1526;
}

[data-theme="dark"] .mobile-menu-btn span {
  background: #EDF1F8;
}

/* 原使用 --color-primary 作文字色的标题类元素 */
[data-theme="dark"] .logo,
[data-theme="dark"] .section-title,
[data-theme="dark"] .card h3,
[data-theme="dark"] .product-body h3,
[data-theme="dark"] .split-content h2,
[data-theme="dark"] .timeline-item h3,
[data-theme="dark"] .news-body h3,
[data-theme="dark"] .contact-info h3,
[data-theme="dark"] .case-card h3,
[data-theme="dark"] .hero-stat strong,
[data-theme="dark"] .case-logo {
  color: #EDF1F8;
}

/* 时间轴节点描边（原为 #fff） */
[data-theme="dark"] .timeline-item::before {
  border-color: #0C1526;
}

/* 表单控件 */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background: #0F1A2E;
  color: var(--color-text);
  border-color: var(--color-border);
}

/* 半透明色块在深色下加深，保证对比度 */
[data-theme="dark"] .product-tag {
  background: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .card-icon,
[data-theme="dark"] .contact-item-icon {
  background: rgba(229, 57, 53, 0.16);
}

[data-theme="dark"] .case-meta span {
  background: rgba(229, 57, 53, 0.16);
}

/* 表单提示文案 */
[data-theme="dark"] .form-message.success {
  color: #7EE2A0;
  border-color: rgba(34, 197, 94, 0.35);
}

[data-theme="dark"] .form-message.error {
  color: #FF9E9B;
  border-color: rgba(229, 57, 53, 0.35);
}
