/* ============================================================
 * 前台换肤按钮（悬浮球 + 面板）
 * 全部基于 style.css 的 CSS 变量，会自动跟随当前皮肤变色
 * ============================================================ */

/* 悬浮球 */
.theme-fab{
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
  transition: transform .2s, box-shadow .2s;
}
.theme-fab:hover{
  transform: scale(1.1);
  box-shadow: 0 8px 26px rgba(0,0,0,.3);
}
.theme-fab svg{
  width: 24px;
  height: 24px;
  fill: var(--on-primary);
}

/* 面板 */
.theme-panel{
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 901;
  width: 252px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.theme-panel.show{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.theme-panel-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.theme-panel-close{
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  padding: 0 2px;
}
.theme-panel-close:hover{
  color: var(--text);
}

/* 选项列表 */
.theme-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.theme-opt{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-2);
  transition: background .15s, border-color .15s, color .15s;
}
.theme-opt:hover{
  background: var(--surface-2);
}
.theme-opt.active{
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.theme-swatch{
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.theme-name{
  flex: 1;
}
.theme-check{
  font-weight: 700;
  color: var(--primary);
  opacity: 0;
}
.theme-opt.active .theme-check{
  opacity: 1;
}

/* 移动端 */
@media (max-width: 768px){
  .theme-fab{
    right: 12px;
    bottom: 12px;
    width: 46px;
    height: 46px;
  }
  .theme-fab svg{
    width: 21px;
    height: 21px;
  }
  .theme-panel{
    right: 12px;
    bottom: 70px;
    width: calc(100% - 24px);
    max-width: 260px;
  }
}
