.login-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.login-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: #000000ad;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.login-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 22.5rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 18% -10%, rgba(255, 176, 196, 0.16), transparent 11rem),
    radial-gradient(circle at 88% 8%, rgba(255, 107, 122, 0.16), transparent 10rem),
    linear-gradient(180deg, #19191b, #0d0d0f);
  box-shadow:
    0 1rem 2.6rem rgba(0, 0, 0, 0.58),
    0 0 1.4rem rgba(255, 107, 138, 0.1),
    inset 0 1px rgba(255, 255, 255, 0.08);
  padding: 1.35rem 1.2rem 1.25rem;
  transform: translateY(0.34rem) scale(0.97);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease;
}

.login-modal.is-open .login-modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.login-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.login-modal-close:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.login-modal-close .material-symbols-outlined {
  font-size: 1.1rem;
  line-height: 1;
}

.login-modal-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1.1rem;
}

.login-modal-title {
  margin: 0;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 1000;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.login-modal-subtitle {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
}

.login-modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.35rem;
}

.login-modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.login-modal-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.login-modal-input-wrap {
  position: relative;
}

.login-modal-input {
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 0.85rem;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.login-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.login-modal-input:focus {
  border-color: rgba(255, 107, 138, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.login-modal-input--password {
  padding-right: 2.65rem;
}

.login-modal-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  place-items: center;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  transform: translateY(-50%);
  transition: color 0.16s ease, background 0.16s ease;
}

.login-modal-password-toggle:active {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.login-modal-password-toggle .material-symbols-outlined {
  font-size: 1.15rem;
  line-height: 1;
}

.login-modal-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
}

.login-modal-turnstile-wrap {
  margin: 0.15rem 0 0.35rem;
  min-height: 65px;
}

.login-modal-turnstile-widget {
  display: flex;
  justify-content: center;
}

.login-modal-submit {
  display: inline-flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 0.72rem;
  background: linear-gradient(135deg, #ff6b8a, #e85d75);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 0.8rem 1.65rem rgba(255, 107, 138, 0.24);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.login-modal-submit:active {
  transform: scale(0.985);
  filter: brightness(1.05);
}

body.login-modal-open {
  overflow: hidden;
}

.login-modal-status {
  min-height: 1.2rem;
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
}

.login-modal-status.is-error {
  color: #ff8a80;
}

.login-modal-status.is-success {
  color: #ffc0d0;
}

.login-modal-submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
