* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  background-color: #151515;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.container {
  position: absolute;
  height: 600px;
  width: clamp(500px, 80%, 900px);
  background: #1b1b1d;
  border-radius: 10px;
  box-shadow: 20px 20px 50px #00000044;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.logo {
  height: 40px;
  width: auto;
  margin: 20px 0 0 40px;
  display: flex;
  align-items: center;
  & img {
    height: 80%;
  }
  & span {
    color: white;
    font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
    font-weight: 900;
    font-size: 20px;
    margin-left: 10px;
  }
}

.power {
  height: 70px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 50px;
  & input {
    -webkit-appearance: none;
    appearance: none;
    height: 70px;
    width: 70px;
    border-radius: 50%;
    border: solid 5px #ffffff11;
    background: transparent;
    background-image: url("assets/power.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
    display: grid;
    place-items: center;
    outline: none;
    filter: saturate(0);
    &:hover {
      filter: saturate(1);
    }
    &:checked {
      filter: saturate(1);
    }
  }
}

.visualizer {
  height: 250px;
  width: 90%;
  margin: 30px 30px 0 30px;
  align-self: center;
  border-radius: 20px;
  background: #1e1e21;
  border: solid 5px #ffffff11;
  overflow: hidden;
  & canvas {
    position: relative;
    height: 100%;
    width: 100%;
  }
}

.controls {
  width: 90%;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.controls .manual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 30px;
}

.freq-btn {
  height: 40px;
  width: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.05s linear;
  display: grid;
  place-items: center;
  & img {
    height: 70%;
    width: 70%;
  }
  &:hover {
    scale: 1.1;
  }
}

.backward {
  transform: rotate(180deg);
}

.forward {
  transform: rotate(0deg); /*doing this is fixing the issue where hover effects were not working*/
}

#freq-entry {
  height: 50px;
  width: 130px;
  border-radius: 10px;
  border: solid 3px #ffffff11;
  background: #222227;
  color: #ffffff;
  font-size: 20px;
  padding-left: 10px;
  outline: none;
  & ::placeholder {
    font-size: 15px;
    color: #a19bff18;
  }
  &::-webkit-outer-spin-button,
  &::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}

.manual span {
  color: #dbd8ff38;
  font-size: 20px;
  position: absolute;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  margin-left: 90px;
}

.slider {
  width: 100%;
  display: grid;
  place-items: center;
}

#freq-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 40px;
  background: #222227;
  outline: none;
  opacity: 0.7;
  border-radius: 7px;
  &::after,
  &::before {
    position: relative;
    top: -25px;
    color: #ffffff;
    font-size: 17px;
    font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
    width: 0;
    pointer-events: none;
    display: block;
    white-space: nowrap;
  }
  &::before {
    content: "0Hz";
    left: 5px;
  }
  &::after {
    content: "20KHz";
    right: 5px;
    direction: rtl;
  }
}

#freq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 5px;
  height: 40px;
  border-radius: 2px;
  background: #00aeff;
  cursor: pointer;
  transition: all 0.2s linear;
}

#freq-slider:hover::-webkit-slider-thumb {
  width: 20px !important;
}

@media screen and (max-width: 500px) {
  .container {
    width: 100vw;
    height: 100vh;
  }
  .power {
    justify-content: center;
    padding-right: 0;
    margin-top: 50px;
    & input {
      width: 150px;
      border-radius: 35px;
    }
  }
  .controls {
    margin-top: 50px;
  }
  .controls .manual {
    gap: 40px;
  }
  .slider {
    margin-top: 50px;
  }
}
