.theme-switch.premium {
  width: 56px;
  height: 30px;
  position: relative;
}

.theme-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.theme-switch .track {
  position: relative;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  transition: background 0.4s ease;
}

.theme-switch .icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  opacity: 0.55;
  transition:
    opacity 0.4s ease,
    transform 0.45s ease;
}

.theme-switch .sun {
  transform-origin: center;
}

.theme-switch .moon {
  fill: currentColor;
  stroke: none;
}

/* Thumb */
.theme-switch .thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow:
    0 0 0 0 rgba(0, 0, 0, 0),
    0 4px 10px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.45s cubic-bezier(0.65, 0, 0.35, 1),
    box-shadow 0.45s ease;
}

/* LIGHT MODE (checked) */
.theme-switch input:checked + .track .thumb {
  transform: translateX(26px);
  box-shadow:
    0 0 0 6px rgba(255, 200, 0, 0.15),
    0 6px 14px rgba(0, 0, 0, 0.35);
}

.theme-switch input:checked + .track .sun {
  opacity: 1;
  transform: rotate(90deg) scale(1.1);
}

.theme-switch input:checked + .track .moon {
  opacity: 0.25;
  transform: scale(0.85);
}

/* DARK MODE */
.theme-switch input:not(:checked) + .track .moon {
  opacity: 1;
  transform: scale(1.05);
}

.theme-switch input:not(:checked) + .track .sun {
  opacity: 0.25;
  transform: rotate(-90deg) scale(0.85);
}
@media (prefers-reduced-motion: no-preference) {
  .theme-switch input:checked + .track .sun {
    animation: sunSpin 0.6s ease;
  }

  @keyframes sunSpin {
    0% {
      transform: rotate(0deg) scale(0.9);
    }
    100% {
      transform: rotate(90deg) scale(1.1);
    }
  }
}
