.theme-toggle {
  position: fixed;
  top: var(--space-4);
  inset-inline-end: var(--space-4);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: var(--z-theme-toggle);
  transition: all var(--transition-fast);
  overflow: hidden;
}

.theme-toggle:hover {
  transform: scale(1.02);
  border-color: var(--color-primary);
}

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

.theme-toggle__icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.theme-toggle__icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}