:root {
  --clr-white: #ffffff;
  --clr-body: #aaafff;
  --clr-text: #42404b;
  --clr-btn: #9d74ff;
  --clr-update: #292847;
  --clr-icon: #ffed00;
  --ff: 'Poppins', sans-serif;
}

/* Reset style */
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: inherit;
}
ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  outline: none;
}

/* Main style */
body {
  min-height: 100vh;
  font-family: var(--ff);
  background: var(--clr-body);
  background-image: url('./assets/img/bg-img.svg');
  background-repeat: no-repeat;
  background-position: center;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-inline: 1rem;
}

.container {
  width: 50rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  transition: all .5s;
}

@media only screen and (min-width: 768px) {
  .container {
    grid-template-columns: 15rem auto;
    gap: 2.5rem;
  }
}

.btn {
  cursor: pointer;
  padding: 0.75rem;
  width: 10.7rem;
  border: 2px solid var(--clr-btn);
  border-radius: 0.5rem;
  background: var(--clr-btn);
  color: var(--clr-white);
  font-size: 0.8rem;
  transition: all 0.5s;
}

.btn i {
  padding-right: 0.5rem;
}

.btn:hover {
  background: var(--clr-white);
  color: var(--clr-btn);
  border-color: var(--clr-btn);
}

.top,
.upgrade,
.users,
.new-users,
.percentage {
  background: var(--clr-white);
  border-radius: 0.625rem;
}

/* Top section */
.top {
  grid-column: 1 / -1;
  padding: 1.25rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;  
}

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-list a {
  position: relative;
  font-size: 0.9rem;
}

.nav-list a::before {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: var(--clr-update);
  transition: width 0.5s;
}

.nav-list a:hover::before {
  width: 100%;
}

a.active {
  font-weight: 500;
}

/* Profile */
.profile {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

@media only screen and (min-width: 572px) {
  .profile {
    margin-top: 0;
  }
}

@media only screen and (min-width: 768px) {
  .profile {
    gap: 2.5rem;
  }
}
 
.notifications {
  position: relative;
  cursor: pointer;
}

.notifications i {
  font-size: 1.25rem;
}

.notifications-count {
  position: absolute;
  right: -5px;
  top: -7px;
  width: 1rem;
  background: var(--clr-btn);
  color: var(--clr-white);
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 0.7rem;
  text-align: center;
}

.profile-pic {
  margin-left: auto;
  width: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-body);
  color: var(--clr-white);
  border-radius: 50%;
  aspect-ratio: 1;
  cursor: pointer;
}

/* Upgrade Section */
.upgrade {
  grid-column: 1 / 2;
  padding: 3.75rem 2.2rem 2.5rem;
  max-width: 22rem;
  background: var(--clr-update);
  color: var(--clr-white);
  text-align: center;
}

.upgrade-pic {
  position: relative;
}

.upgrade-pic i {
  position: relative;
  color: var(--clr-icon);
  font-size: 2.8rem;
  z-index: 1;
  animation: star 3s infinite linear;
}

.upgrade-pic::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 36%;
  width: 28%;
  height: 1rem;
  background: var(--clr-text);
  border-radius: 50%;
  animation: star-shadow 3s infinite linear;
}

.upgrade p {
  margin: 1.5rem auto;
  font-size: 0.8rem;
}

.upgrade p span {
  font-weight: 600;
}

.btn-upgrate {
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 1.5px;
}

/* Statistics Sections */
.statistics {
  display: grid;
  grid-template-columns: 1 fr;
  gap: 1rem;
  place-content: center;
}

@media only screen and (min-width: 768px) {
  .statistics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.statistics h2 {
  margin: 0 0 -4px;
  font-size: 0.875rem;
  font-weight: 400;
}

.statistics p {
  font-size: 1.375rem;
  font-weight: 500;
}

.users,
.new-users {
  padding: 1.25rem;
  max-width: 15rem;
}

@media only screen and (min-width: 820px) {
  .users,
  .new-users {
  max-width: 20rem;
}
}

.percentage {
  grid-column: 1 / -1;
  position: relative;
  padding: 1rem 1.875rem;
}

.progress {
  display: flex;
  gap: 3px;
  border-radius: 0.625rem;
}

.progress-line {
  position: relative;
  height: 0.875rem;
  margin: 3.75rem 0 0;
}

.legend {
  position: absolute;
  top: -2.5rem;
  font-size: 0.75rem;
  padding-left: 1.4rem;
}

.legend::before {
  content: "";
  width: 0.813rem;
  position: absolute;
  left: 0;
  top: 3px;
  border-radius: 50%;
  aspect-ratio: 1;
}

.progress-line:nth-child(1) {
  width: 24%;
  border-radius: 10px 0 0 10px;
}

.progress-line:nth-child(2) {
  width: 31%;
}

.progress-line:nth-child(3) {
  width: 45%;
  border-radius: 0 0.625rem 0.625rem 0;
}

.progress-line:nth-child(1),
.progress-line:nth-child(1) .legend::before {
  background: #7a72ea;
}

.progress-line:nth-child(2),
.progress-line:nth-child(2) .legend::before {
  background: #908cee;
}

.progress-line:nth-child(3),
.progress-line:nth-child(3) .legend::before {
  background: #ac91f1;
}

/* Animations */
@keyframes star {
  0%, 100% {
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(0);
  }
}

@keyframes star-shadow {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.2);
  }
}

/* Charts */
#users-chart,
#new-users-chart {
  display: block;
  height: 3.75rem;
  width: 13.313rem;
}