
/* ═══════════════════════════════════════════════════════════════
   亮色主题 v1.0 — 白天/黑夜模式切换
   ═══════════════════════════════════════════════════════════════ */

/* 亮色主题变量覆盖 */
[data-theme="light"] {
  --bg: #f5f5f7;
  --bg2: #eeeef0;
  --bg3: #e4e4e8;
  --card: #ffffff;
  --card-hover: #f8f8fa;
  --border: #d8d8de;
  --text: #1a1a2e;
  --text-muted: #5a5a72;
  --text-dim: #8888a0;
  --primary: #5b54e6;
  --primary-dark: #4a44cc;
  --accent: #e85588;
  --green: #16a34a;
  --yellow: #d97706;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
}

/* 亮色模式下需要特殊处理的元素 */
[data-theme="light"] .navbar {
  background: rgba(245,245,247,0.95);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .hero-bg {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(91,84,230,0.1) 0%, transparent 70%);
}

[data-theme="light"] .hero-badge {
  background: rgba(91,84,230,0.08);
  border-color: rgba(91,84,230,0.2);
}

[data-theme="light"] .badge-free {
  background: rgba(22,163,74,0.1);
  color: var(--green);
  border-color: rgba(22,163,74,0.25);
}

[data-theme="light"] .badge-new {
  background: rgba(217,119,6,0.1);
  color: var(--yellow);
  border-color: rgba(217,119,6,0.25);
}

[data-theme="light"] .badge-hot {
  background: rgba(232,85,136,0.1);
  color: var(--accent);
  border-color: rgba(232,85,136,0.25);
}

[data-theme="light"] .ranking-tab.active {
  box-shadow: 0 2px 8px rgba(91,84,230,0.2);
}

[data-theme="light"] .filter-chip.active {
  background: rgba(91,84,230,0.08);
}

[data-theme="light"] .tag-xl {
  background: rgba(91,84,230,0.06);
}

[data-theme="light"] .home-tag.tag-hot {
  background: rgba(91,84,230,0.06);
  border-color: rgba(91,84,230,0.2);
}

[data-theme="light"] .scene-chip:hover {
  background: rgba(91,84,230,0.06);
}

[data-theme="light"] .tag-cloud-item:hover {
  background: rgba(91,84,230,0.06);
}

[data-theme="light"] .cta-section {
  background: linear-gradient(135deg, rgba(91,84,230,0.06), rgba(232,85,136,0.06));
}

[data-theme="light"] .compare-tag {
  background: rgba(91,84,230,0.08);
}

[data-theme="light"] .sidebar-link.active {
  background: rgba(91,84,230,0.08);
}

[data-theme="light"] .intent-tag-category {
  background: rgba(91,84,230,0.08);
}

[data-theme="light"] .intent-tag-price {
  background: rgba(16,185,129,0.08);
}

[data-theme="light"] .intent-tag-feature {
  background: rgba(245,158,11,0.08);
}

[data-theme="light"] .toast-msg {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

[data-theme="light"] .tool-logo-fallback,
[data-theme="light"] .tool-logo-fallback-lg {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .form-group select option {
  background: #ffffff;
}

[data-theme="light"] .mobile-bottom-nav {
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

/* ═══════════════════════════════════════════════════════════════
   主题切换按钮
   ═══════════════════════════════════════════════════════════════ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(108,99,255,0.1);
}

.theme-toggle .theme-icon {
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* 移动端主题切换 */
.mobile-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  transition: all 0.15s;
}

.mobile-theme-toggle:hover {
  background: var(--bg3);
  color: var(--text);
}
