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

html {
  height: 100%;
}

body {
  height: 100%;
  background-color: hsl(226, 43%, 10%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Rubik';
}

.user-image {
  width: 60px;
  border-radius: 50%;
  border: 2px solid white;
}

.time-tracking-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  width: 850px;
}

.card {
  position: relative;
  padding-top: 33px;
  border-radius: 12px;
}

.card-content:hover {
  cursor: pointer;
  background-color: #34397b;
}

.card::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 45px;
  z-index: -1;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  top: 0;
}

.card-content {
  height: 100%;
  padding: 23px;
  background-color: hsl(235, 46%, 20%);
  border-radius: 12px;
  background-image: url(images/icon-ellipsis.svg);
  background-repeat: no-repeat;
  background-position: top 27px right 25px ;
  background-size: 16px; 
  padding-right: 30px; 

}

.card-avatar {
  background-color: hsl(235, 46%, 20%);
  grid-row: 1 / 3;
  grid-column: 1 / 2;
  border-radius: 12px;
}

.user-details__name {
  color: white;
  font-size: 30px;
  font-weight: 300;
  padding-bottom: 40px;
}

.user-details p {
  color: hsl(236, 100%, 87%);
  padding: 30px 0 4px;
  font-size: 12px;
}

.activities {
  color: white;
  font-weight: 500;
  font-size: 15px;
  padding-bottom: 20px;
}

.activities-time {
  color: white;
  font-weight: 300;
  font-size: 45px;
}

.activities-period {
  color: hsl(236, 100%, 87%);
  font-size: 12px;
  padding-top: 15px;
  font-weight: 300;
}

.card-work {
  grid-row: 1 / 2;
  grid-column: 2 / 3;
  background-image: url(images/icon-work.svg);
  background-repeat: no-repeat;
  background-size: 61px;
  background-position: top -10px right 10px;
}
.card-work::before {
  background: hsl(15, 100%, 70%);
}

.card-play {
  grid-row: 1 / 2;
  grid-column: 3 / 4;
  background-image: url(images/icon-play.svg);
  background-repeat: no-repeat;
  background-size: 61px;
  background-position: top -6px right 10px;
}

.card-play::before {
  background: hsl(195, 74%, 62%);
}

.card-study {
  grid-row: 1 / 2;
  grid-column: 4 / 5;
  background-image: url(images/icon-study.svg);
  background-repeat: no-repeat;
  background-size: 61px;
  background-position: top -10px right 10px;
}

.card-study::before {
  background: hsl(348, 100%, 68%);
}

.card-exercise {
  grid-row: 2 / 3;
  grid-column: 2 / 3;
  background-image: url(images/icon-exercise.svg);
  background-repeat: no-repeat;
  background-size: 61px;
  background-position: top right 10px;
}

.card-exercise::before {
  background: hsl(145, 58%, 55%);
}

.card-social {
  grid-row: 2 / 3;
  grid-column: 3 / 4;
  background-image: url(images/icon-social.svg);
  background-repeat: no-repeat;
  background-size: 61px;
  background-position: top -13px right 10px;
}

.card-social::before {
  background: hsl(264, 64%, 52%);
}

.card-self-care {
  grid-row: 2 / 3;
  grid-column: 4 / 5;
  background-image: url(images/icon-self-care.svg);
  background-repeat: no-repeat;
  background-size: 61px;
  background-position: top -12px right 10px;
}

.card-self-care::before {
  background: hsl(43, 84%, 65%);
}

.user-details {
  padding: 25px;
  border-radius: 12px;
  background-color: hsl(246, 80%, 60%);
}

.period {
  padding: 25px 25px 0 25px;
  color: hsl(236, 100%, 87%);
  list-style: none;
  font-size: 15px;
}

.period li {
  padding-bottom: 20px;
} 

.active-button {
  color: white;
}

.period li:hover {
  cursor: pointer;
}

@media screen and (max-width: 420px) {
  body {
    height: auto;
  }

  .time-tracking-dashboard {
    display: block;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px;
  }

  .period {
    display: flex;
    justify-content: space-around;
    padding: 25px 20px 0 20px;
  }

  .user-details {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .user-details p {
    padding: 0;
    font-size: 14px;
  }

  .user-details__name {
    padding: 0;
    font-size: 22px;
  }

  .description {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .activities-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 65px;
  }

  .activities {
    padding-bottom: 10px;
  }

  .activities-time {
    font-size: 25px;
  }

  .activities-period {
    font-size: 14px;
    padding: 0;
  }
}
