* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  background-color: white;
  transition:
    background-color 0.3s ease-in-out,
    color 0.3s ease-in-out;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 1rem;
  max-width: 1375px;
  margin: 0 auto;
}

header span {
  font-size: 13px;
  color: hsl(228, 12%, 44%);
  transition: color 0.3s ease-in-out;
}

.toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.toggle-btn {
  position: relative;
  width: 43px;
  height: 23.5px;
  border: 1px solid white;
  outline: none;
  border-radius: 50px;
  background: hsl(230, 5%, 78%);
}

.slider:hover {
  background: linear-gradient(to right, hsl(210, 79%, 56%), hsl(146, 68%, 55%));
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #b9bdd1;
  transition: 0.3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider.toggle::before {
  left: 22px;
}

.hr {
  display: hidden;
}

.card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 2rem 1rem;
  max-width: 1375px;
  margin: 0 auto;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background-color: hsl(227, 47%, 96%);
  height: 240px;
  width: 320px;
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out;
}

.card:hover {
  cursor: pointer;
  background-color: hsl(231, 13%, 90%);
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.card h1 {
  font-size: 68px;
}

.followers-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.followers-container span {
  margin-left: 5px;
  letter-spacing: 6px;
  color: darkgray;
  font-size: 14px;
}

.stat-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: green;
}

.face-card {
  border-top: 4px solid hsl(208, 92%, 53%);
}

.twitter-card {
  border-top: 4px solid hsl(203, 89%, 53%);
}

.ig-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  padding-top: 4px;
}

.ig-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    to right,
    hsl(37, 97%, 70%),
    hsl(5, 77%, 71%),
    hsl(329, 70%, 58%)
  );
}
.yt-card {
  border-top: 4px solid hsl(348, 97%, 39%);
}

div h2 {
  max-width: 1375px;
  margin: 0 auto;
  padding: 2rem 1rem;
  color: hsl(228, 12%, 44%);
}

.overview-card-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 30px;
  padding: 2rem 1rem;
  max-width: 1375px;
  margin: 0 auto;
}

.overview-card {
  display: grid;
  grid-template-columns: repeat(2, 2fr);
  grid-template-rows: repeat(2, 1fr);
  place-items: center;
  background-color: hsl(227, 47%, 96%);
  height: 130px;
  width: 270px;
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out;
}

.overview-card p {
  font-size: 18px;
  color: hsl(228, 12%, 44%);
}
.overview-card h3 {
  font-weight: 800;
  font-size: 30px;
}

.overview-card:hover {
  cursor: pointer;
  background-color: hsl(231, 13%, 90%);
}

/* =========
  DARK THEME
  ========== */

body.dark-theme {
  background-color: hsl(230, 17%, 14%);
  color: white;
}

header span.dark-theme {
  color: hsl(230, 22%, 74%);
}

.card.dark-theme,
.overview-card.dark-theme {
  background-color: hsl(228, 28%, 20%);
}

.card.dark-theme:hover,
.overview-card.dark-theme:hover {
  background-color: hsl(229, 38%, 28%);
}

div h2.dark-theme {
  color: hsl(230, 22%, 74%);
}

.overview-card p.dark-theme {
  color: hsl(230, 22%, 74%);
}

/*===========
  MEDIA QUERY 
  ===========*/

@media (max-width: 480px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .title {
    margin-bottom: 1.5rem;
  }

  .title h1 {
    font-size: 22px;
  }

  .hr {
    display: block;
    height: 1px;
    width: 100%;
    background-color: black;
    margin-bottom: 1.5rem;
  }
  .card-container {
    flex-direction: column;
  }

  .card {
    width: 340px;
  }

  .overview-card-container {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, 1fr);
  }

  .overview-card {
    width: 340px;
  }
}

@media (min-width: 480px) and (max-width: 786px) {
  .card-container {
    flex-wrap: wrap;
  }
}
