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

body {
  background-color: hsl(27, 66%, 92%);
  font-family: "DM sans";
  color: hsl(25, 47%, 15%);
  --red-color: rgba(236, 119, 95, 1);
}

main {
  width: 400px;
  height: 700px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 5vh auto;
}
.spending,
.balance {
  padding: 25px;
}
.balance {
  background-color: var(--red-color);
  border-radius: 14px;
  height: 16%;
  width: 100%;
  color: white;
}
.balance p {
  margin-bottom: 10px;
}
img {
  position: relative;
  left: 275px;
  top: -55px;
}
.spending {
  border-radius: 14px;
  margin-top: 20px;
  background-color: white;
  /* height: 80%; */
}
.spending h2 {
  margin-bottom: 25px;
}

.graph {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 30px;
  height: 170px;
}
.amount {
  width: 50px;
  height: 33px;
  background-color: hsl(25, 47%, 15%);
  color: white;
  font-size: 0.85rem;
  border-radius: 5px;
  padding-top: 8px;
  position: absolute;
  translate: -7px -40px;
  visibility: hidden;
}

.bar-container {
  width: 100%;
  height: 100%;
  margin: 7px;
  position: relative;
  text-align: center;
}
.bar {
  width: 100%;
  height: 100%;
  background-color: var(--red-color);
  border-radius: 5px;
}
.bar:hover {
  opacity: 0.7;
}
.bar-container:hover > .amount {
  visibility: visible;
}
label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(30px);
  font-size: 0.8rem;
  color: grey;
}

hr {
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 50px;
  margin-bottom: 20px;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total h4,
.total p {
  font-weight: 200;
  color: rgba(0, 0, 0, 0.5);
}

#split-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#split-left h2 {
  font-size: 2rem;
  margin-bottom: 0;
}

#split-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#split-right span {
  color: hsl(25, 47%, 15%);
}

@media only screen and (min-width: 768px) {
  main {
    width: 450px;
  }
  img {
    left: 326px;
  }

  .amount {
    width: 60px;
    font-size: 0.9rem;
    padding-top: 7px;
    translate: -8px -40px;
  }
}
