@font-face {
  font-family: gothicFont;
  src: url(../../assets/font/DelaGothicOne-Regular.ttf);
}

.home {
  width: 100%;
  height: 100dvh;
  box-sizing: border-box;
  display: flex;
  /* display: none; */
  flex-direction: column;
  align-items: center;
  transition: display 0.3s ease-in-out;
  overflow: hidden;
  position: relative;
}

.logo-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-header img {
  width: 25%;
}

.step-content {
  width: 90%;
  margin-bottom: 0.5rem;
}

.step-content img {
  width: 90%;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
  margin-top: 1rem;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-content div {
  width: 90%;
}

.header-content div img {
  width: 100%;
}

.header-content div:last-child img {
  width: 90%;
  margin-top: 1rem;
}

.home-text {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.gender-wrapper {
  width: 80%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  z-index: 2;
}

.gender-wrapper-male,
.gender-wrapper-male {
  display: none;
}

.gender-wrapper div {
  width: 48%;
  cursor: pointer;
}

.gender-wrapper div:hover {
  opacity: 0.75;
}

.gender-wrapper div img {
  width: 100%;
}

.startButton {
  width: 40%;
  cursor: pointer;
  position: absolute;
  bottom: -4%;
}

.startButton:hover {
  opacity: 0.75;
}

.startButton img {
  width: 100%;
}

.logo-home {
  max-width: 90%;
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
}

.logo-home div img {
  width: 100%;
}

.logo-home .logo-left {
  width: 20%;
  z-index: 2;
}

.logo-home .logo-right {
  width: 20%;
}

/* Step rule */
.step-rule {
  width: 100%;
  min-height: 100dvh;
  /* display: flex; */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: display 0.3s ease-in-out;
  z-index: 10;
  color: white;
  overflow: scroll;
}

.step-rule .rule-wrapper {
  position: relative;
  width: 90%;
  /* max-height: 75dvh; */
  box-sizing: border-box;
  background-color: rgb(255, 255, 255, 0.65);
  padding: 0.75rem;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.step-rule .navbar {
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.step-rule::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("../img/bg.png");
  background-repeat: no-repeat;
  background-size: cover;
  width: 100%;
  height: 100%;
  /* opacity: 0.75; */
  z-index: -1;
}

.rule-wrapper div h1 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #750101;
  font-weight: 700;
}

.rule-wrapper div ul {
  list-style: inside;
  font-size: 0.5rem;
  text-align: left;
  color: #580707;
}

.rule-wrapper div ul.custom-bullet {
  list-style: none;
}

.rule-wrapper div ul.custom-bullet li {
  position: relative;
  padding-left: 0.75rem;
  text-align: justify;
  word-spacing: 0.05rem;
  line-height: 0.75rem;
}

.rule-wrapper div ul.custom-bullet li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -0.05em;
  color: #580707;
  font-size: 1.2em;
  line-height: 1;
}

.rule-wrapper div ul.custom-bullet li:last-child {
  margin-bottom: 1rem;
}

.rule-logo {
  margin-top: 3rem;
  width: 80%;
}

.rule-logo img {
  width: 100%;
}

.custom-title {
  font-weight: bold;
  margin-bottom: 0.25rem;
  text-align: left;
  font-size: 0.6rem;
  color: #580707;
}

.home-footer {
  width: 100%;
  overflow: hidden;
}

.home-footer div img {
  width: 100%;
}

.home-footer div:first-child {
  position: absolute;
  width: 120%;
  bottom: -42%;
  left: 55%;
  transform: translate(-50%);
}

.home-footer div:last-child {
  position: absolute;
  bottom: -0.5%;
  left: 0;
  width: 42%;
}

/* Step Two */
.step-two {
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
  padding: 1.5rem 0;
  /* display: flex; */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: display 0.3s ease-in-out;
}

.step-two .step-content {
  width: 30%;
}

.gender-header {
  width: 80%;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  color: white;
  font-style: italic;
  font-weight: 600;
  align-items: center;
  margin-top: -2rem;
}

.gender-header div {
  width: 90%;
  margin-bottom: 0.5rem;
}

.gender-header div img {
  width: 100%;
}

.gender-container {
  width: 100%;
  max-height: 45dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: scroll;
  gap: 0.5rem;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
}

.gender-container .example-item {
  max-width: 32%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 0.1rem;
  overflow: hidden;
}

.gender-container .example-item p {
  font-size: 0.75rem;
  margin: 0;
  margin-bottom: 0.5rem;
  color: #757575;
  white-space: nowrap;
  font-weight: 600;
}

.gender-container .example-item:last-child {
  margin-left: 0;
}

.gender-container .example-item .example-wrapper {
  margin-bottom: 1rem;
  background-color: #ffffff;
  transition: background-color 0.2s linear;
  box-sizing: border-box;
  padding: 0.25rem;
  border-radius: 3px;
}

.gender-container .example-item .example-image {
  clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0% 50%, 0 15%);
  overflow: hidden;
  position: relative;
}

.gender-container .example-item .example-image img {
  width: 100%;
  height: 100%;
  transform: scale(2);
  transform-origin: 45% 5%;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.gender-container .example-item.active .example-wrapper {
  background-color: #0ae318;
}

.genderBtn-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nextStepTwo {
  width: 35%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
  /* margin-top: 1rem; */
}

.nextStepTwo:hover {
  opacity: 0.75;
}

.nextStepTwo img {
  width: 100%;
}

.step-three {
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
  /* display: flex; */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  transition: display 0.3s ease-in-out;
  padding: 1rem 0;
}

.step-three .footer-logo:first-child {
  margin: 0;
  margin-top: 0.5rem;
}

.step-three .footer-logo div {
  width: 15%;
}

.step-three .footer-logo {
  width: 80%;
  margin: 1rem 0;
}

.camera-content {
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.5rem;
  line-height: 1.1rem;
}

.camera-content div:nth-child(1) {
  width: 25%;
}

.camera-content div:nth-child(2) {
  width: 50%;
}

.camera-content div img {
  width: 100%;
}

.wait-camera {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.wait-camera img {
  width: 15%;
  margin-bottom: 0.5rem;
}

.camera-container {
  width: 80%;
  height: 50vh;
  min-height: 50dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  display: inline-block;
}
#frame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99;
  display: block;
}
#countdown {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 72px;
  color: rgb(255, 255, 255);
  background-color: rgba(0, 0, 0, 0.25);
  display: none;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  scale: 0;
}

@keyframes flashAnimation {
  0% {
    opacity: 1;
    scale: 1;
  }
  50% {
    opacity: 1;
    scale: 1;
  }
  100% {
    opacity: 0;
    scale: 0;
  }
}

.flash {
  animation: flashAnimation 0.5s ease-out;
}

#controls {
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

#controls button {
  width: 40%;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

#controls button:disabled {
  filter: grayscale(1);
}

#controls button img {
  width: 100%;
}

#controls-next {
  display: none;
  align-items: center;
  justify-content: center;
}

#controls-next button {
  width: 40%;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

#controls-next button:disabled {
  filter: grayscale(1);
}

#controls-next button img {
  width: 100%;
}

#controls-next button:disabled {
  filter: grayscale(1);
}

.capture-image {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.capture-image canvas {
  width: 100%;
  border: 5px white solid;
}

canvas {
  display: none;
  margin: 10px auto;
  transform: scaleX(-1);
}

video {
  width: 100%;
  height: 100%;
  margin: 5px;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

video::-webkit-media-controls {
  display: none !important;
}

video {
  outline: none;
}

.name-drawer-overlay {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  scroll-behavior: none;
  overflow: hidden;
  inset: 0;
  z-index: 9;
  justify-content: center;
  align-items: flex-end;
}

.name-drawer-overlay.active {
  display: flex;
}

.name-drawer {
  position: fixed;
  bottom: -100%;
  height: 70%;
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
  transition: bottom 0.3s ease;
}

.name-drawer div:nth-child(1) {
  width: 80%;
}

.name-drawer div:last-child {
  width: 45%;
  cursor: pointer;
}

.name-drawer div img {
  width: 100%;
}

.name-drawer input {
  width: 70%;
  border: none;
  background-color: #ffef97;
  color: #945757;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.name-drawer #result {
  margin-bottom: 0.5rem;
}

.step-final {
  width: 100%;
  height: 100dvh;
  /* max-height: 100dvh; */
  padding: 0.75rem 0;
  box-sizing: border-box;
  /* display: flex; */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  transition: display 0.3s ease-in-out;
  position: relative;
}

.step-final .step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: -1rem;
}

.step-final .step-content div:first-child {
  width: 30%;
  margin-bottom: 0.5rem;
}

.step-final .step-content div:last-child {
  width: 100%;
}

.image-final {
  width: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  aspect-ratio: 5/6;
}

.image-final img {
  width: 100%;
  border: 5px white solid;
}

.name-wrapper {
  display: inline-block;
  width: 50%;
  max-width: 50%;
  max-height: 5%;
  position: absolute;
  z-index: 5;
  top: 89%;
  left: 38.5%;
  transform: translate(-50%, -50%);
  color: #017a2a;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0.25rem;
  font-size: 15px;
  text-align: left;
  letter-spacing: 0.03em;
}

.name-wrapper p {
  font-family: gothicFont;
  /* text-shadow: #fff 0px 1px 1px, #fff 0px 1px 1px, #fff 0px 1px 1px,
    #fff 0px -1px 1px, #fff 0px -1px 1px, #fff 0px -1px 1px; */
  text-shadow: rgb(255, 255, 255) 1px 0px 0px,
    rgb(255, 255, 255) 0.540302px 0.841471px 0px,
    rgb(255, 255, 255) -0.416147px 0.909297px 0px,
    rgb(255, 255, 255) -0.989992px 0.14112px 0px,
    rgb(255, 255, 255) -0.653644px -0.756802px 0px,
    rgb(255, 255, 255) 0.283662px -0.958924px 0px,
    rgb(255, 255, 255) 0.96017px -0.279415px 0px;
}

.step-final .final-button {
  width: 90%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.step-final .final-button button {
  width: 40%;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.step-final .final-button button:hover {
  opacity: 0.75;
}

.step-final .final-button button img {
  width: 100%;
}

.step-final .final-button .homeBtn {
  width: 40%;
}

.step-final .final-button .homeBtn img {
  width: 100%;
}

.step-final .footer-logo {
  margin-bottom: 1rem;
}

.drawer-container {
  height: 18dvh;
  width: 90%;
  position: fixed;
  bottom: -100%;
  background-color: white;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 13;
  transition: bottom 0.3s ease;
}

.drawer-container.active {
  bottom: 0;
}

.drawer-container div {
  width: 20%;
  cursor: pointer;
}

.drawer-container div:hover {
  opacity: 0.75;
}

.drawer-container div img {
  width: 100%;
}

.overlay-lds-ring {
  position: fixed;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.lds-ring,
.lds-ring div {
  box-sizing: border-box;
  z-index: 90;
}
.lds-ring {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #ff4b1d;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #ff4b1d transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
