* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
	--dark: #292C35;
	--light: #F1F1F1;
	--label: #111;

  font-family: 'Roboto', sans-serif;
  font-size: 62.5%;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 100vh;
  background: var(--light);

  transition: .4s ease-in-out;
  -webkit-tap-highlight-color: transparent;
}

body.black {
  background: var(--dark);
}

h2 {
  font-size: 3rem;
  text-align: center;

  width: 45rem;
  height: auto;

  position: absolute;
  top: 120px;
  padding: 10px 30px;

  color: var(--label);

  border: 1.7px solid var(--label);
  border-radius: 50px;

  transition: .4s ease-in-out;
}

h2.black {
  color: var(--light);
  border: 1.7px solid var(--light);
}

.toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1px;

  border-radius: 50px;

  width: 235px;
  height: 102px;
  background: var(--label);

  position: relative;
  cursor: pointer;
}

.toggle img:nth-child(1) {
  position: absolute;
  left: 14px;
}

.toggle img:nth-child(2) {
  position: absolute;
  right: 15px;
}

.toggle .ball {
  width: 86.31px;
  height: 86.31px;

  position: absolute;
  left: 12px;

  background: var(--light);
  border-radius: 50%;

  transition: .4s ease-in-out;
}

.toggle .ball.black {
  left: 138px;
}

p {
  font-size: 13px;
  position: absolute;
  bottom: 10px;

  color: var(--dark);
  opacity: 0.6;

  transition: .4s ease-in-out;
}

a {
  text-decoration: none;
  color: var(--dark);

  transition: .4s ease-in-out;
}

p.black,
a.black {
  color: var(--light);
}

@media (max-width: 500px) {
  h2 {
    font-size: 2.5rem;
    width: 70%;

    margin: 0 2rem;
  }

  .toggle {
    width: 21.7rem;
    height: 99px;
  }

  .toggle .ball.black {
    left: 121px;
  }
}
