@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");
:root {
  /* Colors */

  /* Primary */
  --gradient: linear-gradient(to right, hsl(6, 100%, 80%), hsl(335, 100%, 65%));

  /* Neutral */
  --blue-200: hsl(243, 100%, 93%);
  --grayish-blue: hsl(229, 7%, 55%);
  --blue-850: hsl(228, 56%, 26%);
  --blue-950: hsl(229, 57%, 11%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Raleway", sans-serif;
  background-color: var(--blue-950);
  color: var(--blue-200);
  background-image: url('../images/bg-mobile.png');
  background-repeat: no-repeat;
}
main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  max-width: 100vw;
  gap: 1.5rem;
  padding: 0 1.5rem;
}

section {
  background: var(--blue-850);
  width: 100%;
  padding: 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-radius: 0.5rem;
}

.tool_container {
  border-top-right-radius: 5rem;
}

.logo img {
  width: 10rem;
}

.tool {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  padding: 0.5rem 0;
}
.tool__item {
  padding: 0.8rem;
  border-radius: 0.7rem;
  background-color: var(--blue-950);
}

.storage__info {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  height: fit-content;
  padding: 3.5rem 1rem;
  width: 100%;
}

.storage__info > p > span {
  color: white;
  font-weight: 600;
}

.storage__bar {
  width: 100%;
  height: 1rem;
  background-color: var(--blue-950);
  border-radius: 0.5rem;
  overflow: hidden;
}

.storage__bar--used {
  height: 100%;
  background: var(--gradient);
  border-radius: 0.5rem;
  transition: width 0.3s ease-in-out;
  position: relative;
  width: 81.5%;
}

.storage__bar--circle {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: white;
  position: absolute;
  right: 0;
  top: 0;
  transition: left 0.3s ease-in-out;
}

.storage_count {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  font-weight: 500;
  color: white;
}

.storage__info .storage__tooltip {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: var(--blue-950);
  white-space: nowrap;
  height: fit-content;
  width: fit-content;
}

.storage__info .storage__tooltip span {
  font-weight: 600;
  font-size: 1.5rem;
}

@media (min-width: 800px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background-image: url('../images/bg-desktop.png');
    background-size: 100% 50%;
    background-position: bottom;
    background-repeat: no-repeat;
    
  }
  main {
    flex-direction: row;
    align-items: flex-end;
    height: fit-content;
    max-width: 80%;
  }

  .tool_container {
    width: 40%;
  }

  .storage__info {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 1.5rem 3rem;
    width: 60%;
  }

  .storage__info .storage__tooltip {
    top: -25%;
    left: unset;
    right: -5%;
    /* transform: translateX(100%); */
    /* triangle dimension */
    --b: 2em; /* base */
    --h: 1em; /* height */

    --p: 100%; /* position  */
    --r: 1.2em; /* the radius */
    --c: #fff;

    border-radius: var(--r);
    clip-path: polygon(
      0 100%,
      0 0,
      100% 0,
      100% 100%,
      min(100%, var(--p) + var(--b) / 2) 100%,
      var(--p) calc(100% + var(--h)),
      max(0%, var(--p) - var(--b) / 2) 100%
    );
    border-image: conic-gradient(var(--c) 0 0) fill 0 / var(--r)
      calc(100% - var(--p) - var(--b) / 2) 0 calc(var(--p) - var(--b) / 2) / 0 0
      var(--h) 0;
  }
}

@media (min-width: 1250px) {
  main {
    max-width: 70%;
  }
}
