/* ============================================
   主题切换 - 悬浮按钮样式
   烽审榜（黑金 / 日间 双主题）
   ============================================ */

/* 悬浮切换按钮：固定右下角，金边 + 半透明背景，两主题自适应 */
.fsb-theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1.5px solid var(--color-gold-primary);
  background: color-mix(in srgb, var(--color-bg-secondary) 82%, transparent);
  color: var(--color-gold-primary);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast), box-shadow var(--transition-fast);
  padding: 0;
  line-height: 1;
}

.fsb-theme-toggle:hover {
  transform: scale(1.08) rotate(-6deg);
  color: var(--color-gold-highlight);
  box-shadow: var(--shadow-gold);
}

.fsb-theme-toggle:active {
  transform: scale(0.94);
}

.fsb-theme-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* 移动端稍微收一点，避免挡内容 */
@media (max-width: 768px) {
  .fsb-theme-toggle {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
  .fsb-theme-toggle svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   内联变体：页面指定 #theme-toggle-mount 容器时使用
   不悬浮，跟随容器布局（如后台登录卡片右上角）
   ============================================ */
.fsb-theme-toggle--inline {
  position: static;
  right: auto;
  bottom: auto;
  width: 38px;
  height: 38px;
}

.fsb-theme-toggle--inline svg {
  width: 19px;
  height: 19px;
}

/* 挂载容器：固定在登录卡片右上角 */
.theme-toggle-mount {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  line-height: 0;
}

/* ============================================
   头部导航内挂载容器：跟随 flex 布局，固定在导航栏右侧，不悬浮
   ============================================ */
.theme-toggle-mount--header {
  position: static;
  display: flex;
  align-items: center;
  line-height: 0;
  margin-left: 0.75rem;
}

.theme-toggle-mount--header .fsb-theme-toggle {
  width: 40px;
  height: 40px;
  border-width: 1.5px;
}

.theme-toggle-mount--header .fsb-theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   后台侧边栏内挂载容器：推到侧边栏标题右侧，不悬浮
   ============================================ */
.theme-toggle-mount--sidebar {
  position: static;
  display: flex;
  align-items: center;
  line-height: 0;
  margin-left: auto;
}

.theme-toggle-mount--sidebar .fsb-theme-toggle {
  width: 32px;
  height: 32px;
  border-width: 1.25px;
}

.theme-toggle-mount--sidebar .fsb-theme-toggle svg {
  width: 16px;
  height: 16px;
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .fsb-theme-toggle {
    transition: none;
  }
  .fsb-theme-toggle:hover {
    transform: none;
  }
}
