@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

:root {
  --background-white: #f8f9fe;
  --background-card: #f0f3fa;
  --background-card-hover: #e0e2ef;
  --color-primary: #898c9b;
  --color-white: #efeff7;
  --color-black: #1d2027;
  --color-black-secondary: #64677a;
  --color-green: hsl(163, 72%, 41%);
  --color-red: hsl(356, 69%, 56%);
  --toggle-gradient: #a0a4bd;
}

.dark {
  --background-white: #20222f;
  --background-card: #252b43;
  --background-card-hover: #333a56;
  --color-primary: #898c9b;
  --color-white: #282945;
  --color-black: #efeff7;
  --color-black-secondary: #818aa7;
  --toggle-gradient: linear-gradient(
    90deg,
    hsl(210, 79%, 56%),
    hsl(146, 68%, 55%)
  );
}

body {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 0.875rem;
  padding-left: 1.563rem;
  padding-right: 1.563rem;
  color: var(--color-primary);
  background-color: var(--background-white);
  transition-property: all;
  transition-duration: 0.3s;
}

header {
  margin-bottom: 2.813rem;
  padding-top: 2.5rem;

  @media (min-width: 69.375rem) {
    max-width: 69.375rem;
    margin: 0.625rem auto 1.375rem auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  & .title {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #898c9b;

    @media (min-width: 69.375rem) {
      border: none;
      margin-bottom: 0;
    }

    h1 {
      color: var(--color-black);
      margin-bottom: 0.875rem;

      @media (min-width: 69.375rem) {
        margin-bottom: -0.25rem;
      }
    }

    p {
      color: var(--color-black-secondary);
      font-weight: 600;
    }
  }

  & .dark-mode {
    color: var(--color-black-secondary);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;

    @media (min-width: 69.375rem) {
      display: flex;
      column-gap: 0.875rem;
      align-items: center;
      margin-top: -1.5rem;
    }
  }
}

.toggle {
  width: 2.75rem;
  height: 1.5rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  background: var(--toggle-gradient);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: right;
  cursor: pointer;
  transition-property: all;
  transition-duration: 0.3s;

  & .circle {
    background-color: var(--color-white);
    border-radius: 50%;
    width: 1.125rem;
    height: 1.125rem;
    pointer-events: none;
  }
}

.toggle.active {
  justify-content: left;
}

main {
  @media (min-width: 69.375rem) {
    max-width: 69.375rem;
    margin: 0 auto;
  }

  & .todays-overview {
    .title {
      font-size: 1.5rem;
      font-weight: 600;
      color: var(--color-black-secondary);
      margin-bottom: 2rem;

      @media (min-width: 69.375rem) {
        margin-bottom: 1.625rem;
      }
    }
  }
}

.followers-container {
  margin-bottom: 3.125rem;

  @media (min-width: 69.375rem) {
    margin-bottom: 1.875rem;
    display: flex;
    column-gap: 1.875rem;
    justify-content: space-evenly;
  }

  & .followers-card {
    background-color: var(--background-card);
    margin-bottom: 1.5rem;
    text-align: center;
    border-radius: 0.313rem;
    overflow: hidden;
    padding: 0 0 1.563rem 0;
    width: 100%;
    cursor: pointer;
    transition-duration: 0.3s;
    transition-property: all;

    .gradient {
      margin-bottom: 1.563rem;
      height: 0.25rem;
    }

    .social-network-wrapper {
      margin-bottom: 0.625rem;
      display: flex;
      justify-content: center;
      align-items: center;
      column-gap: 0.625rem;
    }

    .total-followers {
      font-size: 3.5rem;
      font-weight: 600;
      color: var(--color-black);
      margin-bottom: -0.875rem;
    }

    .total-followers-text {
      color: var(--color-black-secondary);
      text-transform: uppercase;
      letter-spacing: 0.25rem;
      margin-bottom: 0.625rem;
      font-size: 0.75rem;
    }

    .todays-followers-container {
      color: hsl(163, 72%, 41%);
      font-weight: 600;
      display: flex;
      justify-content: center;
      align-items: center;
      column-gap: 0.25rem;
      img {
        display: inline-block;
      }
    }

    .social-user-handle {
      font-weight: 500;
      color: var(--color-black-secondary);
    }
  }

  .followers-card:hover {
    background-color: var(--background-card-hover);
  }
}

.todays-overview-container {
  @media (min-width: 69.375rem) {
    display: grid;
    column-gap: 1.875rem;
    row-gap: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 4.625rem;
  }

  & .today-card {
    background-color: var(--background-card);
    border-radius: 0.313rem;
    padding: 1.375rem 1.75rem;
    margin-bottom: 1rem;
    width: 100%;
    cursor: pointer;
    transition-duration: 0.3s;
    transition-property: all;

    @media (min-width: 69.375rem) {
      margin-bottom: 0;
    }

    .overview-title-wrapper {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2rem;

      @media (min-width: 69.375rem) {
        margin-bottom: 0.875rem;
      }
    }

    .total-percentage-wrapper {
      font-weight: 600;
      display: flex;
      justify-content: center;
      column-gap: 0.25rem;
      align-items: center;
    }

    .overview-totals {
      display: flex;
      justify-content: space-between;
      align-items: center;

      .total {
        font-size: 2rem;
        font-weight: 600;
        color: var(--color-black);
      }
    }
  }

  .today-card:hover {
    background-color: var(--background-card-hover);
  }
}
