/* ============================================
   theme-toggle.css — 主题切换按钮（v7.1.6 新增 · 极简版）

   设计：与 music 按钮同款鎏金圆环 56px
   不动 v6 任何视觉 / 仅追加新组件
   ============================================ */

.theme-toggle {
  position: fixed;
  bottom: 100px;        /* music 按钮正上方 */
  right: 30px;
  z-index: 9990;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 30% 30%, var(--ivory-light), var(--ivory));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.15),
    inset 0 0 12px rgba(var(--gold-deep-rgb), 0.15);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  padding: 0;
}

.theme-toggle:hover {
  transform: scale(1.08);
  box-shadow:
    0 6px 24px rgba(var(--gold-deep-rgb), 0.4),
    0 0 16px rgba(var(--gold-rgb), 0.3),
    inset 0 0 16px rgba(var(--gold-deep-rgb), 0.25);
}

.theme-toggle:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
  position: absolute;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (max-width: 900px) {
  .theme-toggle { width: 42px; height: 42px; bottom: 80px; right: 20px; }
  .theme-toggle svg { width: 18px; height: 18px; }
}

/* ============================================
   v7.1.12 theme-toggle 暗色增强
   - 暗色下背景：暗月蓝径向
   - 边框：月白
   - svg color：月白
   ============================================ */
:root[data-theme="dark"] .theme-toggle {
  border-color: var(--text-light);
  background: radial-gradient(circle at 30% 30%, rgba(60, 85, 120, 0.85), rgba(35, 55, 80, 0.95));
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 0 12px rgba(168, 192, 216, 0.15);
}
:root[data-theme="dark"] .theme-toggle:hover {
  box-shadow:
    0 6px 28px rgba(168, 192, 216, 0.5),
    0 0 20px rgba(168, 192, 216, 0.4),
    inset 0 0 16px rgba(168, 192, 216, 0.3);
}
:root[data-theme="dark"] .theme-toggle svg {
  color: var(--text-light);
}
