/* Smooth transition for full website */
* {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.theme-toggle {
  display: inline-block;
  position: relative;
}

/* Hide default checkbox */
#theme-switch {
  display: none;
}

/* Switch background */
.toggle-label {
  width: 60px;
  height: 30px;
  background: var(--border);
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px;
  cursor: pointer;
  position: relative;
}

/* Sun & Moon icons */
.toggle-icon {
  font-size: 18px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sun {
  margin-right: 6px;
}

.moon {
  margin-right: 6px;
}

/* Sliding Circle */
.toggle-label::after {
  content: "";
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  left: 3px;
  top: 3px;
  transition: left 0.3s ease, background 0.3s ease;
}

/* When Checked = DARK MODE */
#theme-switch:checked + .toggle-label::after {
  left: calc(100% - 27px);
  background: var(--primary-dark);
}

/* ICON ANIMATIONS */
#theme-switch:not(:checked) + .toggle-label .sun {
  opacity: 1;
  transform: scale(1);
}
#theme-switch:checked + .toggle-label .moon {
  opacity: 1;
  transform: scale(1);
}

/* Optional: Add glow for nicer effect */
#theme-switch:checked + .toggle-label .moon {
  text-shadow: 0 0 5px #ffd700;
}
#theme-switch:not(:checked) + .toggle-label .sun {
  text-shadow: 0 0 5px #ffef9a;
}

@media (max-width: 768px) {
.theme-toggle{
  display: none;
}
}