.main-theme-btn,
#theme_btn {
  --switch-h: 22px;
  position: relative;
  display: block;
  width: 42px;
  height: var(--switch-h);
  min-width: 42px;
  margin-left: auto;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.12);
  color: inherit;
  cursor: pointer;
  box-sizing: border-box;
}
#theme_btn {
  --switch-h: 24px;
  width: 46px;
  min-width: 46px;
  height: 24px;
  padding: 0;
}

.main-theme-btn::after,
#theme_btn::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(var(--switch-h) - 6px);
  height: calc(var(--switch-h) - 6px);
  border: 1px solid currentColor;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.72;
  transition:
    left 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}
.main-theme-btn.toggle::after,
#theme_btn.toggle::after {
  left: calc(100% - var(--switch-h) + 2px);
}
.main-theme-btn > span,
#theme_btn > span {
  position: absolute;
  pointer-events: none;
}
.main-theme-btn.easter_egg,
#theme_btn.easter_egg {
  color: #77d88b;
  border-color: #4aa35e;
  background: #08140b;
  box-shadow: 0 0 8px rgba(71, 217, 101, 0.15);
}
.main-theme-btn.easter_egg::after,
#theme_btn.easter_egg::after {
  left: calc(100% - var(--switch-h) + 2px);
  background: #0b1d0f;
  box-shadow:
    inset 0 0 0 2px #77d88b,
    0 0 7px rgba(71, 217, 101, 0.35);
  opacity: 1;
}
.main-theme-btn.easter_egg > span:nth-child(1),
#theme_btn.easter_egg > span:nth-child(1) {
  left: 8px;
  top: 5px;
  width: 12px;
  height: 1px;
  background: #77d88b;
  transform: rotate(25deg);
  box-shadow: 0 5px 0 #77d88b;
}
.main-theme-btn.easter_egg > span:nth-child(2),
#theme_btn.easter_egg > span:nth-child(2) {
  left: 7px;
  top: 4px;
  width: 3px;
  height: 3px;
  border: 1px solid #77d88b;
  border-radius: 50%;
  box-shadow:
    8px 6px 0 -1px #08140b,
    8px 6px 0 0 #77d88b;
}
.main-theme-btn.easter_egg > span:nth-child(3),
#theme_btn.easter_egg > span:nth-child(3) {
  display: none;
}

@media (max-width: 760px) {
  .main-theme-btn {
    --switch-h: 22px;
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .main-theme-btn::after {
    top: 10px;
  }
}
