@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

p {
  color: hsl(228, 34%, 66%);
}

body {
  font-family: 'Inter', sans-serif;
  background: hsl(230, 17%, 14%);
  color: #fff;
  transition: background 0.5s;
}

body.light {
  background: #fff;
  color: hsl(230, 17%, 14%);
}

.bg {
  position: absolute;
  background: hsl(230, 24%, 15%);
  padding: 130px 0;
  width: 100%;
  border-radius: 0 0 30px 30px;
  z-index: -1;
}

.bg.light {
  background: hsl(227, 47%, 96%);
}

/* Toggle button */
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  border-top: 1px solid hsl(228, 34%, 66%);
  padding-top: 20px;
}

.checkbox {
  display: none;
}

.label {
  position: relative;
  background: linear-gradient(120deg, hsl(210, 78%, 56%), hsl(146, 68%, 55%));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 50px;
  padding: 5px;
  margin: 0 20px;
  width: 50px;
  height: 22px;
  cursor: pointer;
}

.label.light {
  background: hsl(230, 22%, 74%);
}

.name {
  font-size: 14px;
  font-weight: 700;
  color: hsl(228, 34%, 66%);
}

.ball {
  background: hsl(230, 17%, 14%);
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  transition: transform 0.15s linear;
}

.ball.light {
  background: hsl(0, 0%, 100%);
}

.checkbox:checked + .label .ball {
  transform: translateX(28px);
}

.container {
  max-width: 300px;
  margin: auto;
  padding: 40px 10px 0;
}

.container h1 {
  font-size: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.container .social p {
  font-size: 14px;
  font-weight: 700;
}

/* Current stats */
.current {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.current .div {
  background: hsl(228, 28%, 20%);
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
  border-radius: 5px;
}

.current .div:hover {
  cursor: pointer;
  background: hsl(232, 49%, 19%);
}

.current .div.light {
  background: hsl(227, 47%, 96%);
}

.current .div.light:hover {
  background: hsl(228, 16%, 87%);
}

.current h2 {
  font-size: 46px;
  margin-top: 10px;
}

.current .followers {
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 4px;
}

.current .up {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: hsl(163, 72%, 41%);
  margin-bottom: 20px;
}

.current .down {
  color: hsl(356, 69%, 56%);
}

.current .up img {
  margin-right: 3px;
}

.current .c-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.current .c-inner p {
  font-size: 13px;
  margin-left: 10px;
}

.current .facebook {
  border-top: 5px solid hsl(208, 92%, 53%);
}

.current .twitter {
  border-top: 5px solid hsl(203, 89%, 53%);
}

.current .instagram .border-top {
  position: absolute;
  background-image: linear-gradient(
    120deg,
    hsl(37, 97%, 70%),
    hsl(329, 70%, 58%)
  );
  padding: 2.5px;
  width: 280px;
  border-radius: 5px 5px 0 0;
}

.current .youtube {
  border-top: 5px solid hsl(348, 97%, 39%);
}

/* Overview stats */
.overview {
  display: flex;
  flex-direction: column;
}

.overview h3 {
  margin-bottom: 20px;
}

.overview .inner {
  background: hsl(228, 28%, 20%);
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 5px;
}

.overview .inner:hover {
  cursor: pointer;
  background: hsl(232, 49%, 19%);
}

.overview .inner.light {
  background: hsl(227, 47%, 96%);
}

.overview .inner.light:hover {
  background: hsl(228, 16%, 87%);
}

.overview .inner > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.overview .inner > div h4 {
  font-size: 12px;
  color: hsl(228, 34%, 66%);
}

.overview .inner-1 p {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-top: 30px;
}

.overview .inner-1 p.light {
  color: #000;
}

.overview .inner-1 > div {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
}

.overview .inner-1 .desc {
  font-size: 12px;
  color: hsl(146, 68%, 55%);
  margin: 0 0 0 2px;
}

.overview .inner-1 .desc-inner {
  color: hsl(356, 69%, 56%);
}

.attribution {
  margin: 10px 0 20px;
  font-size: 13px;
  text-align: center;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}

/* Media queries */
@media (min-width: 768px) {
  .container {
    max-width: 700px;
  }

  .current {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .current .div {
    height: 200px;
    margin-bottom: 0;
  }

  .current .instagram .border-top {
    width: 330px;
  }

  .overview .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .overview h3 {
    margin-top: 20px;
  }

  .overview .inner {
    margin-bottom: 0;
  }

  .attribution {
    margin-top: 20px;
  }
}

@media (min-width: 900px) {
  .container {
    max-width: 850px;
  }

  .social {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .social h1 {
    font-size: 26px;
  }

  .social p {
    font-size: 30px;
  }

  .toggle {
    border-top: none;
    margin-top: -20px;
  }

  .current {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
  }

  .current .div {
    height: 180px;
  }

  .current .instagram .border-top {
    width: 192px;
  }

  .overview .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .overview h3 {
    font-size: 22px;
  }

  .overview .inner > div h4 {
    font-size: 14px;
  }

  .overview .inner-1 > p {
    font-size: 30px;
  }
}

@media (min-width: 1000px) {
  .container {
    max-width: 950px;
  }

  .current .instagram .border-top {
    width: 217px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1150px;
  }

  .current .instagram .border-top {
    width: 267px;
  }
}
