#tgMask.mask,
#tgErrMask.mask {
  display: none;
  position: fixed;
  inset: 0;
  background: #000a;
  z-index: 46;
  align-items: center;
  justify-content: center;
}

#tgMask.show,
#tgErrMask.show {
  display: flex !important;
}

#tgBox.login-modal,
#tgErrBox.login-modal {
  width: calc(100% - 28px);
  max-width: 400px;
  margin: 0;
  padding: 0;
  background: #101010;
  border: 0;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .65);
}

#tgBox .login-head,
#tgErrBox .login-head {
  position: relative;
  padding: 16px 36px 0;
  text-align: center;
  background: #101010;
  border-radius: 8px 8px 0 0;
}

#tgBox .login-head span,
#tgErrBox .login-head span {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
}

#tgBox .login-head hr,
#tgErrBox .login-head hr {
  margin: 12px 0 0;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
}

#tgBox .login-x,
#tgErrBox .login-x {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 28px;
  height: 28px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

#tgBox .login-body,
#tgErrBox .login-body {
  padding: 16px 16px 18px;
}

#tgBox label {
  display: block;
  margin: 0 0 6px;
  color: #fff;
  font-size: 13px;
  text-align: left;
}

#tgBox input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
  background: #0c0c0c;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
}

#tgBox .tg-note,
#tgErrBox .tg-note {
  margin: 0 0 14px;
  text-align: center;
  color: #ddd;
  font-size: 13px;
  line-height: 1.45;
}

#tgBox .tg-alert {
  margin: 0 0 12px;
  padding: 8px 10px;
  background: #3a1414;
  color: #ffb4b4;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}

#tgBox .login-submit,
#tgErrBox .tg-bot {
  width: 100%;
  height: 44px;
  margin-top: 16px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #f8e7a2, #e2be55 45%, #c9a227);
  color: #1c1608;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

#tgErrBox .tg-bot[hidden] {
  display: none;
}

.otp-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(0, 0, 0, .5);
  align-items: center;
  justify-content: center;
}

.otp-popup.open {
  display: flex;
}

.otp-popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 90%;
  max-width: 360px;
  padding: 40px 16px 24px;
  border-radius: 8px;
  background: #1d1d1d;
  color: #fff;
  box-sizing: border-box;
  position: relative;
}

.otp-popup-content h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.otp-popup-content p {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.otp-x {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.otp-input-container {
  position: relative;
  width: 100%;
  margin: 8px 0;
}

.otp-fake-inputs {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.otp-fake-inputs div {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 36px;
  border-radius: 4px;
  font-size: 16px;
  background: #101010;
  color: #fff;
  border: 1px solid #2b2b2b;
  box-shadow: 0 4px 4px #00000040;
}

.otp-fake-inputs div.filled,
.otp-fake-inputs div.focused {
  border-color: #f8e588;
}

.otp-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
}

.otp-resend {
  background: none;
  border: 0;
  padding: 0;
  color: #f5e082;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.otp-resend.disabled {
  pointer-events: none;
  color: #808080;
}

.otp-err {
  min-height: 14px;
  color: #f87171;
  font-size: 12px;
}

.otp-popup .login-submit {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #f8e7a2, #e2be55 45%, #c9a227);
  color: #1c1608;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
