@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Space+Grotesk:wght@300..700&display=swap");

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

.attribution {
  width: 100%;
  position: fixed;
  bottom: 0;
  padding: 10px;
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

:root {
  --soft-red: hsl(10, 79%, 65%);
  --cyan: hsl(186, 34%, 60%);
  --dark-brown: hsl(25, 47%, 15%);
  --medium-brown: hsl(28, 10%, 53%);
  --cream: hsl(27, 66%, 92%);
  --very-pale-orange: hsl(33, 100%, 98%);
}

body {
  font-family: "Space Grotesk", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--cream);
  padding: 0 15px;
}
main {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.balance {
  padding: 20px;
  background-color: var(--soft-red);
  border-radius: 20px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.balance-number {
  font-size: 1.5rem;
  font-weight: 500;
}
.spending {
  padding: 25px;
  border-radius: 20px;
  background-color: var(--very-pale-orange);
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}
.spending-text {
  color: var(--dark-brown);
  font-size: 2rem;
  font-weight: 500;
}

.line {
  width: 100%;
  height: 1px;
  background-color: var(--medium-brown);
}
.bottom-info {
  display: flex;
  justify-content: space-between;
}
.total-div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.totat-this-month {
  color: var(--medium-brown);
}
.total-number {
  font-size: 2.8rem;
  color: var(--dark-brown);
  font-weight: 500;
}
.rate-div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: end;
  text-align: right;
}
.rate-text {
  color: var(--dark-brown);
  font-weight: 500;
}
.from-last-month {
  color: var(--medium-brown);
}
.chart-div {
  display: flex;
  width: 100%;
  height: 200px;
  gap: 10px;
}
.bar {
  width: 90%;
  border-radius: 4px;
  cursor: pointer;
  background-color: var(--soft-red);
}
.day {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-direction: column-reverse;
  width: calc(1 / 7 * 100%);
}

.wed {
  background-color: var(--cyan);
}
.tool-tip {
  background-color: var(--dark-brown);
  color: var(--very-pale-orange);
  padding: 10px;
  border-radius: 5px;
  display: none;
  z-index: 200;
}
.bar:hover {
  opacity: 0.7;
}
.show {
  display: block;
}
@media (max-width: 500px) {
  .spending-text {
    font-size: 1.4rem;
  }
  .total-number {
    font-size: 2rem;
  }
  .chart-div {
    gap: 5px;
  }
  .bar {
    width: 70%;
  }
}