@import url("https://fonts.googleapis.com/css?family=Inter:400,500,700,900&display=swap");

body {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-sizing: border-box;
  background-color: #000;
  color: #fff;
}

main {
  width: 100%;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
  font-family: Inter;
  position: relative;
  box-sizing: border-box;
}

#webar {
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: calc(100dvh - 100px);
  /* max-width: 100%; */
  /* max-height: 720px; */
  /* aspect-ratio: 1280 / 720; */
  background-color: #000000;
}

canvas {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
}

#fps {
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0;
  text-align: left;
  color: #ffffff;
  position: absolute;
  width: 122px;
  height: 48px;
  top: 40px;
  left: 20px;
  opacity: 0.75;
}

#image {
  overflow: hidden;
  width: 0;
  height: 0;
}

#reset-button {
    position: absolute;
    bottom: 100px;
    left: 40px;
    width: 40px;
    height: 40px;
    z-index: 1;
    display: none;
}

#reset-button:disabled {
  opacity: 0.5;
}

.import-message {
  position: absolute;
  bottom: 61px;
  width: 100%;
}

.import-message__inner span {
  font-weight: 700;
}

.import-message__inner {
  border-radius: 60px;
  background: #f5f5f5;
  width: fit-content;
  margin: 0 auto;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0;
  text-align: center;
}

.inverted {
  filter: invert(100%);
}

.controls {
  position: absolute;
  bottom: 100px;
  right: 40px;
  /* width: 152px; */
  display: flex;
  justify-content: space-between;
  z-index: 1;
  display: none
}

.controls + input[type="image"] {
  cursor: pointer;
}

#rec-duration {
  position: absolute;
  bottom: 44px;
  left: 5px;
  color: #fff;
  text-align: center;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
}

.start-screen {
  width: 350px;
  height: 230px;
  flex-shrink: 0;
  border-radius: 20px;
  background: #fff;
  top: calc(50% - 115px);
  left: calc(50% - 175px);
  text-align: center;
  position: absolute;
  z-index: 3;
}

.start-screen__title {
  color: #191428;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 40px auto 42px;
}

.start-screen__webcam {
  margin-bottom: 12px;
}

.start-screen__webcam label {
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  border-radius: 20px;
  border: 1px solid #191428;
  background: #191428;
  display: inline-block;
  width: 164px;
  padding: 12px 0;
  cursor: pointer;
}

.start-screen__photo label {
  width: 164px;
  display: inline-block;
  color: #191428;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  border-radius: 20px;
  border: 1px solid #191428;
  background: #fff;
  padding: 12px 0;
  cursor: pointer;
}

.footer {
  overflow: hidden;
}

.technologies {
  display: flex;
  justify-content: center;
  height: 60px;
  margin: 0 55px;
}

.technology {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  text-align: center;
}

input[type="radio"] {
  display: none;
  margin: 0;
}

input[name="tech"] + label {
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px 5px;
}

input[name="tech"]:checked + label {
  text-shadow: 0 0 1px black;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: -6px;
  cursor: default;
}

input[name="tech"]:checked + label:after {
  background: #191428;
  content: "";
  height: 2px;
  margin-top: 4px;
  width: 20px;
}

.categories {
  font-size: 13px;
  display: flex;
  height: 40px;
  justify-content: center;
  margin-top: 16px;
  padding: 2px 16px;
  display: none;
}

.categories.categories-long {
  justify-content: normal;
  transition: 0.3s;
}

.categories-button__left {
  height: 40px;
  position: absolute;
  bottom: 62px;
  width: 96px;
  padding-left: 16px;
  background: linear-gradient(90deg, #fff 60.13%, hsla(0, 0%, 100%, 0));
  z-index: 2;
}

.categories-button__left-icon {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(51, 61, 83, 0.1);
}

.categories-button__right {
  height: 40px;
  position: absolute;
  bottom: 62px;
  width: 96px;
  right: 0;
  background: linear-gradient(270deg, #fff 60.13%, hsla(0, 0%, 100%, 0));
  z-index: 2;
}

.categories-button__right-icon {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(51, 61, 83, 0.1);
  transform: matrix(-1, 0, 0, 1, 0, 0);
  float: right;
  margin-right: 16px;
}

.category {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  text-align: center;
}

input[name="category"] + label {
  border: 1px solid transparent;
  border-radius: 60px;
  padding: 12px 20px;
  cursor: pointer;
  white-space: nowrap;
}

input[name="category"]:checked + label {
  border: 1px solid #191428;
  cursor: default;
}

.effects {
  position: absolute;
  bottom: 134px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 0;
}

.effects-list {
  display: flex;
  justify-content: center;
  width: 100%;
  /*width: 848px;*/
  /*margin-left: 80px;*/
}

.effect-icon {
  width: 60px;
  height: 60px;
  padding: 4px 0 0 4px;
}

.effect-icon__border {
  border: 1.5px solid transparent;
  border-radius: 50%;
  height: 68px;
  margin: 0 10px;
  width: 68px;
}

input[name="effect"] + .effect-icon__border {
  cursor: pointer;
}

input[name="effect"]:checked + .effect-icon__border {
  border: 1.5px solid #fff;
  cursor: default;
}

.effect-control {
  margin: 0 auto 15px;
  display: none
}

.effect-control__toggle {
  -webkit-appearance: none;
  appearance: none;
  background: #eef2f7;
  border-radius: 30px;
  cursor: pointer;
  height: 33px;
  outline: none;
  position: relative;
  transition: 0.4s;
  vertical-align: top;
  width: 60px;
}

.effect-control__toggle:checked {
  background-color: #4794fe;
}

.effect-control__toggle:after {
  background-color: #4794fe;
  border-radius: 50%;
  content: "";
  height: 28px;
  left: 3px;
  position: absolute;
  top: 2.5px;
  transform: translateX(0);
  transition: 0.4s;
  width: 28px;
}

.effect-control__toggle:checked:after {
  background-color: #fff;
  transform: translateX(calc(100% - 3px));
}

.effect-control__slider-container {
  width: 202px;
}

.effect-control__slider {
  background: linear-gradient(
    to right,
    #4794fe 0%,
    #4794fe 50%,
    #eef2f7 50%,
    #eef2f7 100%
  );
  border-radius: 30px;
  height: 4px;
  width: 100%;
  outline: none;
  transition: background 450ms ease-in;
  -webkit-appearance: none;

  &::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
  }
}

.hand-gestures-tip {
  top: calc(50% - 207px);
  left: calc(50% - 170px);
  padding: 40px 60px;
  position: absolute;
  text-align: center;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px 0 rgba(51, 61, 83, 0.1);
}

.hand-gestures-tip__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 27px;
  margin-bottom: 12px;
}

.hand-gestures-tip__subtitle {
  font-style: normal;
  font-weight: 500;
  line-height: 19px;
  text-align: center;
}

.hand-gestures-tip__content {
  margin: 32px auto 32px 63px;
}

.hand-gestures-tip__content-item {
  align-items: center;
  display: flex;
  height: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.hand-gestures-tip__content-item img {
  font-size: 16px;
  font-weight: 500;
  height: 20px;
  line-height: 19px;
  margin-right: 10px;
  width: 20px;
}

.hand-gestures-tip__button {
  background: #000;
  border-radius: 24px;
  border-width: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  height: 48px;
  line-height: 19px;
  text-align: center;
  width: 220px;
  cursor: pointer;
}

.hand-gestures {
  position: absolute;
  top: calc(74%);
  left: calc(50% - 125px);
  background: #000;
  color: #fff;
  margin: 0 auto 15px;
  padding: 8px 32px;
  align-items: center;
  display: flex;
  font-size: 18px;
  font-weight: 700;
  height: 52px;
  justify-content: center;
  line-height: 22px;
  text-align: center;
  vertical-align: middle;
  width: 180px;
}

.hand-gestures img {
  margin-right: 12px;
}

.heart-rate {
  position: absolute;
  width: 130px;
  left: 495px;
  bottom: 156px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 16px;
  padding: 8px 22px;
}

.heart-rate.heart-rate__analyse {
  width: 190px;
  left: 480px;
}

.test-ruler {
  position: absolute;
  bottom: 156px;
  left: 473px;
  width: 142px;
  background: #000000;
  padding: 8px 0 8px 32px;
  font-weight: 700;
  font-size: 14px;
  line-height: 16px;
  color: #ffffff;
}

.popups {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translate(-50%, -50%);
}

.popup {
  opacity: 1;
  color: #191428;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  padding: 12px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px 0 rgba(51, 61, 83, 0.1);
  transition: all ease-in-out 0.5s;
}

.popup__hidden {
  opacity: 0;
}
.popup__bold {
  margin-right: 8px;
  font-weight: 700;
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 2;
}

.hidden {
  display: none;
}

.start-screen__spinner {
  position: absolute;
  width: 80px;
  height: 80px;
  top: 75px;
  left: 135px;
}

.start-screen__spinner div {
  animation: start-screen__spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  transform-origin: 40px 40px;
}

.start-screen__spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #000;
  margin: -4px 0 0 -4px;
}

.start-screen__spinner div:nth-child(1) {
  animation-delay: -0.036s;
}

.start-screen__spinner div:nth-child(1):after {
  top: 63px;
  left: 63px;
}

.start-screen__spinner div:nth-child(2) {
  animation-delay: -0.072s;
}

.start-screen__spinner div:nth-child(2):after {
  top: 68px;
  left: 56px;
}

.start-screen__spinner div:nth-child(3) {
  animation-delay: -0.108s;
}

.start-screen__spinner div:nth-child(3):after {
  top: 71px;
  left: 48px;
}

.start-screen__spinner div:nth-child(4) {
  animation-delay: -0.144s;
}

.start-screen__spinner div:nth-child(4):after {
  top: 72px;
  left: 40px;
}

.start-screen__spinner div:nth-child(5) {
  animation-delay: -0.18s;
}

.start-screen__spinner div:nth-child(5):after {
  top: 71px;
  left: 32px;
}

.start-screen__spinner div:nth-child(6) {
  animation-delay: -0.216s;
}

.start-screen__spinner div:nth-child(6):after {
  top: 68px;
  left: 24px;
}

.start-screen__spinner div:nth-child(7) {
  animation-delay: -0.252s;
}

.start-screen__spinner div:nth-child(7):after {
  top: 63px;
  left: 17px;
}

.start-screen__spinner div:nth-child(8) {
  animation-delay: -0.288s;
}

.start-screen__spinner div:nth-child(8):after {
  top: 56px;
  left: 12px;
}

@keyframes start-screen__spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
