* {
  font-family: 'SB Sans Text', 'SB Sans', sans-serif !important;
}

html, body {
  margin: 0;
  padding: 0;
  touch-action: none;
  overflow: hidden;
  background: #000;
  font-family: 'SB Sans Text', 'SB Sans', sans-serif;
}

#webcam-feed {
  z-index: 0 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  object-fit: cover !important;
}

#blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1;
  display: none;
}

.soundBox {
  background: rgba(255, 255, 255, 0.18);
  padding: 40px 60px;
  border-radius: 35px;
  text-align: center;
  backdrop-filter: blur(20px);
}

#progress-bar {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: auto;
  margin: 0 10%;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  z-index: auto;
}

#main-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

#question-container {
  color: #FFFFFF;
  width: 80vw;
  border-radius: 35px;
  background: linear-gradient(0deg, rgba(0, 176, 244, 0.3), rgba(0, 176, 244, 0.3)),
  linear-gradient(-68.51deg,
          rgba(250, 237, 0, 0.3) 0%,
          rgba(17, 189, 28, 0.3) 50%,
          rgba(33, 160, 56, 0.3) 100%);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-sizing: border-box;
  z-index: 99;
}

#video-container,
#cat-container {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
}

#video-container video,
#cat-container video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%); /* Центрируем видео точно посередине */
  width: auto;
  height: 100%; /* Чуть больше высоты, чтобы не было полос сверху/снизу */
  object-fit: cover; /* Ключевое свойство: заполняет экран, обрезая бока */
}

#ui {
  position: fixed;
  bottom: 2vh;
  left: 50%;
  transform: translate(-50%, -7%);
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-family: sans-serif;
  border-radius: 35px;
  font-size: 50px;
  padding: 25px;
  width: 80vw;
  z-index: 99;
  box-sizing: border-box;
  text-align: center;
}

#kl {
  position: fixed;
  display: none;
  font-family: sans-serif;
  top: 30px;
  right: 30px;
  width: auto;
  z-index: 98;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
  padding: 20px 40px;
  border-radius: 35px;
}

#questionCounter {
  display: none;
  position: fixed;
  top: 30px;
  left: 30px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(80px);
  -webkit-backdrop-filter: blur(80px);
  color: #FFFFFF;
  font-size: 55px;
  padding: 20px 40px;
  border-radius: 35px;
  z-index: 100;
}

#topAsk {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 13.5vh;
  padding: 35px;
  box-sizing: border-box;
  margin: 8vh 4vw 0 4vw;
  overflow: hidden;
  text-align: center;
  border-radius: 35px;
  font-size: 40px;
  font-weight: bold;
  background: linear-gradient(
          0deg,
          rgba(0, 176, 244, 0.3),
          rgba(0, 176, 244, 0.3)
  ),
  linear-gradient(
          -68.51deg,
          rgba(250, 237, 0, 0.3) 0%,
          rgba(17, 189, 28, 0.3) 50%,
          rgba(33, 160, 56, 0.3) 100%
  );
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
  color: #FFFFFF;
  box-sizing: border-box;
}

#progress-bar .active {
  background: #FFFFFF;
}

#cat-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#progress-bar .step {
  width: 27vw;
  height: 6px;
  border-radius: 10px;
  transition: background 0.3s ease;
}

#soundOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: rgba(0, 0, 0, 0.25);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#soundStartBtn, #interaction-btn, #close-browser-popup {
  font-size: 42px;
  padding: 30px 70px;
  border-radius: 90px;
  background: linear-gradient(100deg, rgba(250, 237, 0, 1), rgba(88, 213, 105, 1), rgba(32, 199, 209, 1));
  color: white;
  border: none;
  cursor: pointer;
}

button, .optionBtn, .primary, #soundStartBtn {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

button.primary {
  min-height: 140px;
  border-radius: 90px;
  margin-top: 25px;
  padding: 30px 60px;
  width: 100%;
  background: linear-gradient(100deg, rgba(250, 237, 0, 1), rgba(88, 213, 105, 1), rgba(32, 199, 209, 1));
  border: none;
  color: #fff;
  font-size: 50px;
  cursor: pointer;
}

#ui h2 {
  margin: 6px 0 10px;
  color: #ffffff;
}

.optionBtn {
  border-radius: 90px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 38px;
  min-height: 140px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: #77777733;
  margin-top: 25px;
  padding: 30px 60px;
  display: block;
  width: 100%;
  color: #fff;
  cursor: pointer;
  text-align: left;
}
/*TODO: Убрать buttonS?*/
.buttonS {
  border-radius: 60px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  font-size: 38px;
  background: #77777733;
  margin-top: 25px;
  padding: 15px 60px;
  backdrop-filter: blur(80px);
  -webkit-backdrop-filter: blur(80px);
  background: linear-gradient(100deg, rgba(250, 237, 0, 1), rgba(88, 213, 105, 1), rgba(32, 199, 209, 1));
  color: #fff;
  cursor: pointer;
}

#ui p {
  margin: 6px 0;
  color: #ffffff;
}
#kl p2 {
  font-size: 50px;
  color: #ffffff;
  font-weight: bold;
}

/*QR Scanner*/
.scan-frame {
  position: absolute;
  width: 70vw;
  max-width: 300px;
  height: 70vw;
  max-height: 300px;
  border-radius: 40px;
  z-index: 6;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.image {
  position: absolute;
  width: 100vw;
  height: auto;
  border-radius: 40px;
  z-index: 1;
  pointer-events: none;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hint {
  position: absolute;
  bottom: 16vh;
  right: 4vw;
  background: linear-gradient(
          0deg,
          rgba(0, 176, 244, 0.3),
          rgba(0, 176, 244, 0.3)
  ),
  linear-gradient(
          -68.51deg,
          rgba(250, 237, 0, 0.3) 0%,
          rgba(17, 189, 28, 0.3) 50%,
          rgba(33, 160, 56, 0.3) 100%
  );
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  padding: 10px 18px;
  border-radius: 14px;
  border-top-left-radius: 0px;
  z-index: 1;
}

.scanner-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#qr-canvas {
  display: none;
}

#video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/*index*/

#startBtn, #flow-buttons {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 86vw;
  box-sizing: border-box;
  text-align: center;
  border-radius: 70px;
  font-size: 60px;
  align-items: center;
  justify-content: center;
}

#startBtn {
  padding: 0;
  height: 140px;
  bottom: 4%;
  background: linear-gradient(100deg, rgba(250, 237, 0, 1), rgba(88, 213, 105, 1), rgba(32, 199, 209, 1));
  border: none;
  z-index: 999999;
  color: #fff;
  cursor: pointer;
  align-content: center;
  line-height: 140px;
  display:none;
}

#flow-buttons {
  flex-direction: row;
  gap: 18px;
  z-index: 99;
  background: rgba(255, 255, 255, 0);
  padding: 0 0 25px 0;
  display: none;
  height: auto;
  bottom: 2vh;
}

.flow-btn {
  height: 140px;
  padding: 18px;
  width: 100%;
  border-radius: 60px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  font-size: 40px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: #77777733;
  color: #fff;
}

#start-text, #flow-question {
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: static;
  transform: none;
  margin: 0;
  padding: 0;
  width: auto;
  font-size: 40px;
  color: #ffffff;
  font-family: sans-serif;
  border-radius: 0;
  display: block;
}
#start-text h2 {
  margin: 15px 0;
}

#supported-browsers-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: rgba(0, 0, 0, 0.25);
  z-index: 1000; /* Highest z-index for popups */
  display: flex;
  align-items: center;
  justify-content: center;
}

/*final*/
#arjs-video {
  z-index: 0 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  object-fit: cover !important;
}