/* Auth / Registration modal (glassmorphism) */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  isolation: isolate;
}
.auth-overlay.hidden {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-modal {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  border-radius: 28px;
  padding: 28px 26px 26px;
  color: #fff;
  background: radial-gradient(
    120% 120% at 20% 0%,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.02) 100%
  );
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  overflow: hidden;
}

/* subtle gradient border like the reference */
.auth-modal::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 30px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 0, 92, 0.55),
    rgba(130, 87, 229, 0.45),
    rgba(52, 199, 89, 0.25)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.55;
}

.auth-header {
  height: 110px;
  border-radius: 20px;
  background: radial-gradient(
    70% 120% at 50% 20%,
    rgba(255, 0, 92, 0.18),
    rgba(130, 87, 229, 0.12) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  position: relative;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.9);
  box-shadow: 0 0 18px rgba(52, 199, 89, 0.55);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
  z-index: 1;
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.auth-close svg {
  width: 18px;
  height: 18px;
}

.auth-title {
  font-family: var(
    --font-display,
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial
  );
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.62);
}

.auth-form {
  display: block;
}

.auth-label {
  display: block;
  font-size: 13px;
  margin: 12px 0 8px;
  color: rgba(255, 255, 255, 0.75);
}

.auth-field {
  position: relative;
}

.auth-input {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 35, 60, 0.45);
  color: #fff;
  padding: 0 44px 0 16px;
  outline: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 200ms ease, background 200ms ease,
    box-shadow 200ms ease;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.auth-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(30, 35, 60, 0.58);
  box-shadow: 0 0 0 4px rgba(130, 87, 229, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.auth-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.auth-submit {
  width: 100%;
  height: 54px;
  margin-top: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    90deg,
    rgba(255, 0, 92, 0.55),
    rgba(130, 87, 229, 0.55)
  );
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(255, 0, 92, 0.18);
  transition: transform 180ms ease, filter 180ms ease;
}
.auth-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.auth-submit:active {
  transform: translateY(0px);
}

.auth-footnote {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.auth-link {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Register / Sign in panels */
.auth-panels {
  position: relative;
}
.auth-panel {
  display: none;
}
.auth-panel.is-active {
  display: block;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  user-select: none;
}

.auth-check input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  accent-color: rgba(130, 87, 229, 0.95);
}

.auth-forgot {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 1px;
}

.auth-forgot:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.45);
}

.auth-divider {
  position: relative;
  margin: 14px 0 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0);
}

.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-social-btn {
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 180ms ease, background 180ms ease;
}

.auth-social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.auth-social-btn:active {
  transform: translateY(0px);
}

.auth-social-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 800;
}
