/* 主题切换器样式 */
.theme-switcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-tooltip);
}

.theme-switcher-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-primary);
  color: var(--text-white);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-switcher-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.theme-switcher-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 280px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-base);
  overflow: hidden;
}

.theme-switcher-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-switcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: var(--font-size-base);
}

.theme-switcher-header .close-btn {
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.theme-switcher-header .close-btn:hover {
  color: var(--primary-color);
}

.theme-switcher-options {
  padding: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.theme-option:hover {
  background: var(--bg-secondary);
}

.theme-option.active {
  background: var(--primary-light);
}

.theme-option .theme-color {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.theme-option .theme-name {
  flex: 1;
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

/* 深色主题下主题切换器菜单的主题名称文字颜色 */
[data-theme="dark"] .theme-option .theme-name {
  color: var(--text-primary);
}

[data-theme="dark"] .theme-switcher-header {
  color: var(--text-primary);
}

[data-theme="dark"] .theme-switcher-header .close-btn {
  color: var(--text-secondary);
}

[data-theme="dark"] .theme-switcher-header .close-btn:hover {
  color: var(--text-primary);
}

[data-theme="dark"] .theme-option .theme-color {
  border-color: var(--border-color);
}

.theme-option .check-icon {
  color: var(--primary-color);
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition-fast);
}

.theme-option.active .check-icon {
  opacity: 1;
  transform: scale(1);
}

/* 响应式 */
@media (max-width: 768px) {
  .theme-switcher {
    right: 10px;
    bottom: 10px;
  }

  .theme-switcher-toggle {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .theme-switcher-menu {
    width: 240px;
    right: -10px;
  }
}
