@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: white;
  color: black;
}

.container {
  width: 400px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-direction: column;
}

.battery {
  width: 300px;
  height: 150px;
  border: 5px solid black;
  border-radius: 10px;
  background-color: white;
  display: grid;
  place-content: center;
  position: relative;
}

.battery::after {
  content: "";
  position: absolute;
  background-color: black;
  width: 20px;
  height: 50px;
  top: 45px;
  right: -20px;
  border-radius: 0 5px 5px 0;
}

.charging {
  width: 270px;
  height: 120px;
  position: absolute;
  background-color: black;
  top: 10px;
  left: 10px;
  border-radius: 5px;
}

.charging-percent {
  color: red;
  font-size: 40px;
  font-weight: 600;
  z-index: 100;
}

.charging-time-remaining {
  font-weight: 500;
  font-size: 20px;
}

.charging-time-remaining p {
  text-align: center;
  color: red;
}

.charging.active {
  animation: percentage 1.5s infinite linear;
}

@keyframes percentage {
  0% {
    width: 0;
  }
  100% {
    width: 270px;
  }
}
