body.blitz-auth-open {
  overflow: hidden;
}

body.blitz-auth-open .lobby-support-float {
  visibility: hidden;
  pointer-events: none;
}

.blitz-auth-gate[hidden] {
  display: none !important;
}

.blitz-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 6, 13, 0.74);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: blitzAuthFadeIn 0.2s ease-out;
}

.blitz-auth-stage {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.blitz-auth-logo {
  display: block;
  width: 196px;
  max-width: 62vw;
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

.blitz-auth-sheet {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 108px);
  overflow-y: auto;
  background: #18131d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  padding: 14px 22px 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 24px 70px rgba(0, 0, 0, 0.74);
  color: #ffffff;
  font-family: inherit;
  animation: blitzAuthSheetUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.blitz-auth-sheet-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-bottom: 6px;
}

.blitz-auth-handle {
  width: 46px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.blitz-auth-handle span {
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.blitz-auth-close {
  position: absolute;
  top: -2px;
  right: -8px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #e7e0ef;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.blitz-auth-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.blitz-auth-close:focus-visible,
.blitz-auth-handle:focus-visible,
.blitz-auth-tab:focus-visible,
.blitz-auth-eye:focus-visible,
.blitz-auth-submit:focus-visible,
.blitz-auth-link:focus-visible {
  outline: 2px solid #ff8c24;
  outline-offset: 2px;
}

.blitz-auth-title {
  margin: 0 0 18px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.blitz-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 48px;
  margin-bottom: 20px;
  background: #231c2b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
}

.blitz-auth-tabs[hidden] {
  display: none;
}

.blitz-auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: 1.5px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: #b7afc2;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.blitz-auth-tab:hover:not(.is-active) {
  color: #e9e2f2;
}

.blitz-auth-tab.is-active {
  border-color: #ff7300;
  background: rgba(255, 115, 0, 0.1);
  color: #ffffff;
  font-weight: 700;
}

.blitz-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blitz-auth-reset-note {
  margin: -6px 0 2px;
  font-size: 14px;
  line-height: 1.45;
  color: #bfb6cb;
}

.blitz-auth-reset-note[hidden] {
  display: none;
}

.blitz-auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.blitz-auth-field[hidden] {
  display: none;
}

.blitz-auth-field label {
  font-size: 14px;
  font-weight: 600;
  color: #f4eef9;
  line-height: 1.25;
}

.blitz-auth-input-wrap {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  background: #211b29;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.blitz-auth-input-wrap.has-trailing {
  padding-right: 4px;
}

.blitz-auth-input-wrap:focus-within {
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255, 115, 0, 0.16);
}

.blitz-auth-input-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a69bb4;
}

.blitz-auth-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 46px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  outline: none;
}

.blitz-auth-input-wrap input::placeholder {
  color: #8f849d;
}

.blitz-auth-input-wrap input:-webkit-autofill,
.blitz-auth-input-wrap input:-webkit-autofill:hover,
.blitz-auth-input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  transition: background-color 9999s ease-out 0s;
}

.blitz-auth-eye {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #c8bfd4;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.blitz-auth-eye:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.blitz-auth-feedback {
  margin: 0;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: 500;
}

.blitz-auth-feedback:empty {
  display: none;
}

.blitz-auth-feedback[data-tone="error"] {
  background: rgba(255, 76, 102, 0.12);
  border: 1px solid rgba(255, 92, 118, 0.34);
  color: #ffb8c2;
}

.blitz-auth-feedback[data-tone="success"] {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.34);
  color: #9ff3c0;
}

.blitz-auth-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff7e00 0%, #ff5a00 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 98, 0, 0.28);
  transition: transform 0.12s ease, filter 0.16s ease, opacity 0.16s ease;
}

.blitz-auth-submit:hover:not(:disabled) {
  filter: brightness(1.06);
}

.blitz-auth-submit:active:not(:disabled) {
  transform: scale(0.99);
}

.blitz-auth-submit:disabled {
  opacity: 0.68;
  cursor: progress;
}

.blitz-auth-footer-action {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.blitz-auth-footer-action[hidden] {
  display: none;
}

.blitz-auth-link {
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #ff8414;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.16s ease;
}

.blitz-auth-link:hover {
  color: #ffa24a;
}

@media (max-width: 680px) {
  .blitz-auth-gate {
    justify-content: flex-end;
    padding: 0;
  }

  .blitz-auth-stage {
    width: 100%;
    max-width: 100%;
    gap: 22px;
  }

  .blitz-auth-logo {
    width: 186px;
  }

  .blitz-auth-sheet {
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
    max-height: calc(100dvh - 82px);
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  }

  .blitz-auth-title {
    font-size: 26px;
  }
}

@keyframes blitzAuthFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes blitzAuthSheetUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .blitz-auth-gate,
  .blitz-auth-sheet {
    animation: none;
  }
}
