@import url("https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&family=Open+Sans:wght@400;600;700&display=swap");

:root {
  color-scheme: dark;
  --auth-nacht: #071a2a;
  --auth-nacht-hell: #0f344b;
  --auth-tuerkis: #164d59;
  --auth-gold: #ffd166;
  --auth-orange: #ff9f43;
  --auth-text: #f7fbff;
  --auth-text-sanft: #c8d8e3;
  --auth-gefahr: #ff8d96;
  --auth-erfolg: #7ee0b5;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--auth-nacht);
}

body.auth-page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 50% 38%, rgba(31, 107, 124, 0.24), transparent 34%),
    radial-gradient(circle at 12% 92%, rgba(32, 107, 115, 0.38), transparent 35%),
    radial-gradient(circle at 88% 8%, rgba(50, 96, 125, 0.17), transparent 30%),
    linear-gradient(155deg, #061725 0%, #0b2a3e 50%, #154b56 100%);
  font-family: "Open Sans", Arial, sans-serif;
}

body.auth-page::before {
  position: fixed;
  z-index: -2;
  inset: -220px 0 0;
  content: "";
  pointer-events: none;
  opacity: 0.68;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1.2px, transparent 1.7px),
    radial-gradient(circle, rgba(218, 238, 251, 0.78) 0 1.6px, transparent 2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.54) 0 0.9px, transparent 1.4px);
  background-position: 18px 24px, 92px 58px, 44px 112px;
  background-size: 158px 164px, 231px 246px, 109px 127px;
  animation: auth-schneefall 28s linear infinite;
}

body.auth-page::after {
  position: fixed;
  z-index: -1;
  top: -12rem;
  left: 50%;
  width: min(86vw, 68rem);
  height: 34rem;
  content: "";
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 209, 102, 0.12), transparent 65%);
  filter: blur(10px);
  transform: translateX(-50%);
}

@keyframes auth-schneefall {
  to {
    background-position: -42px 352px, 48px 404px, 12px 366px;
  }
}

.auth-main {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(1.25rem, 5vh, 4.5rem) 1rem;
}

.auth-main::before,
.auth-main::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
}

.auth-main::before {
  right: -9rem;
  bottom: 8%;
  width: 25rem;
  height: 25rem;
  background: radial-gradient(circle, rgba(61, 169, 164, 0.12), transparent 68%);
}

.auth-main::after {
  top: 8%;
  left: -10rem;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle, rgba(73, 121, 155, 0.11), transparent 70%);
}

.auth-card {
  position: relative;
  width: min(100%, 32rem);
  overflow: hidden;
  padding: clamp(1.45rem, 4vw, 2.5rem);
  border: 1px solid transparent;
  border-radius: 1.75rem;
  background:
    linear-gradient(145deg, rgba(10, 35, 52, 0.96), rgba(6, 25, 40, 0.92)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 209, 102, 0.44), rgba(92, 185, 195, 0.18)) border-box;
  box-shadow:
    0 2rem 5rem rgba(0, 8, 18, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset;
  backdrop-filter: blur(18px);
}

.auth-card::before {
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 230, 169, 0.9), transparent);
  box-shadow: 0 0 1.3rem rgba(255, 209, 102, 0.42);
}

.auth-back {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  min-height: 2.25rem;
  margin: -0.25rem 0 1.15rem;
  padding: 0.35rem 0.15rem;
  color: var(--auth-text-sanft);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.auth-back svg {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 180ms ease;
}

.auth-back:hover {
  color: #ffffff;
}

.auth-back:hover svg {
  transform: translateX(-0.2rem);
}

.auth-header {
  margin-bottom: 1.55rem;
  text-align: center;
}

.auth-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.8rem;
  height: 3.8rem;
  margin: 0 auto 0.95rem;
  border: 1px solid rgba(255, 224, 149, 0.43);
  border-radius: 1.15rem;
  background:
    linear-gradient(145deg, rgba(255, 209, 102, 0.2), rgba(255, 159, 67, 0.06)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    0 0.8rem 2rem rgba(0, 0, 0, 0.22),
    0 0 1.8rem rgba(255, 176, 72, 0.08) inset;
}

.auth-emblem::before {
  position: absolute;
  top: 0.72rem;
  width: 1.85rem;
  height: 2px;
  content: "";
  border-radius: 1rem;
  background: rgba(255, 238, 198, 0.42);
}

.auth-emblem span {
  padding-top: 0.38rem;
  color: var(--auth-gold);
  font-family: "Mountains of Christmas", "Open Sans", cursive;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 1rem rgba(255, 196, 76, 0.35);
}

.auth-kicker {
  margin: 0 0 0.35rem;
  color: var(--auth-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  font-family: "Mountains of Christmas", "Open Sans", cursive;
  font-size: clamp(2.35rem, 9vw, 3.15rem);
  font-weight: 700;
  line-height: 1;
  text-wrap: balance;
}

.auth-intro {
  max-width: 26rem;
  margin: 0.75rem auto 0;
  color: var(--auth-text-sanft);
  font-size: 0.94rem;
  line-height: 1.55;
  text-wrap: balance;
}

.auth-alert {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid;
  border-radius: 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.auth-alert svg {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.08rem;
}

.auth-alert--error {
  border-color: rgba(255, 141, 150, 0.42);
  color: #ffe8ea;
  background: rgba(143, 39, 53, 0.27);
}

.auth-alert--success {
  border-color: rgba(126, 224, 181, 0.35);
  color: #e5fff4;
  background: rgba(23, 112, 79, 0.24);
}

.auth-form {
  display: grid;
  gap: 1.05rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.auth-label {
  color: #edf6fb;
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-hint {
  display: block;
  margin-top: -0.1rem;
  color: #9fb7c6;
  font-size: 0.75rem;
  line-height: 1.4;
}

.auth-input-wrap {
  position: relative;
  min-width: 0;
}

.auth-input-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 1rem;
  width: 1.15rem;
  height: 1.15rem;
  color: #91aaba;
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 180ms ease;
}

.auth-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3.35rem;
  padding: 0.78rem 3rem 0.78rem 2.85rem;
  border: 1px solid rgba(186, 215, 231, 0.2);
  border-radius: 0.9rem;
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.auth-input::placeholder {
  color: #8099a8;
  opacity: 1;
}

.auth-input:hover {
  border-color: rgba(207, 229, 240, 0.36);
  background: rgba(255, 255, 255, 0.085);
}

.auth-input:focus {
  border-color: rgba(255, 209, 102, 0.86);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 3px rgba(255, 193, 72, 0.13),
    0 0 1.2rem rgba(255, 176, 59, 0.07);
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--auth-gold);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  transition: background-color 9999s ease-out 0s;
  box-shadow: 0 0 0 1000px #17364a inset;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.48rem;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 0.68rem;
  color: #9eb5c2;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 180ms ease, background 180ms ease;
}

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

.auth-password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

.auth-password-toggle .auth-eye-closed,
.auth-password-toggle[aria-pressed="true"] .auth-eye-open {
  display: none;
}

.auth-password-toggle[aria-pressed="true"] .auth-eye-closed {
  display: block;
}

.auth-submit {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  min-height: 3.45rem;
  margin-top: 0.25rem;
  padding: 0.8rem 1.25rem;
  border: 0;
  border-radius: 0.95rem;
  color: #231a0d;
  background: linear-gradient(135deg, #ffe188 0%, var(--auth-gold) 44%, var(--auth-orange) 100%);
  box-shadow:
    0 0.75rem 1.7rem rgba(0, 0, 0, 0.28),
    0 0.25rem 1rem rgba(255, 161, 55, 0.12);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.auth-submit svg {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 180ms ease;
}

.auth-submit:hover {
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-2px);
  box-shadow:
    0 1rem 2.1rem rgba(0, 0, 0, 0.32),
    0 0.35rem 1.25rem rgba(255, 161, 55, 0.2);
}

.auth-submit:hover svg {
  transform: translateX(0.18rem);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-security {
  display: flex;
  gap: 0.42rem;
  align-items: center;
  justify-content: center;
  margin: 0.85rem 0 0;
  color: #8fa8b7;
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: center;
}

.auth-security svg {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
}

.auth-switch {
  margin: 1.45rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(196, 220, 233, 0.13);
  color: var(--auth-text-sanft);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.auth-switch a {
  color: var(--auth-gold);
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 0.22rem;
}

.auth-switch a:hover {
  color: #ffe7a5;
  text-decoration: underline;
}

.auth-footer {
  position: relative;
  z-index: 1;
  padding: 1.15rem 1rem;
  border-top: 1px solid rgba(159, 203, 222, 0.18);
  color: #d5e1e8;
  background: rgba(6, 28, 45, 0.72);
  box-shadow: 0 -0.8rem 2.5rem rgba(0, 8, 18, 0.14);
  font-size: 0.84rem;
  text-align: center;
  backdrop-filter: blur(10px);
}

.auth-footer p {
  margin: 0;
}

.auth-back:focus-visible,
.auth-password-toggle:focus-visible,
.auth-submit:focus-visible,
.auth-switch a:focus-visible {
  outline: 3px solid #fff1bd;
  outline-offset: 3px;
}

@media (max-width: 34rem) {
  .auth-main {
    place-items: start center;
    padding: 0.8rem;
  }

  .auth-card {
    padding: 1.25rem;
    border-radius: 1.4rem;
  }

  .auth-back {
    margin-bottom: 0.8rem;
  }

  .auth-header {
    margin-bottom: 1.25rem;
  }

  .auth-emblem {
    width: 3.4rem;
    height: 3.4rem;
    margin-bottom: 0.75rem;
  }

  .auth-title {
    font-size: clamp(2.15rem, 12vw, 2.75rem);
  }

  .auth-intro {
    font-size: 0.88rem;
  }

  .auth-footer {
    padding: 0.95rem 0.75rem;
    font-size: 0.75rem;
  }
}

@media (max-height: 46rem) and (min-width: 34.01rem) {
  .auth-main {
    place-items: start center;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-page::before {
    animation: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .auth-card,
  .auth-input,
  .auth-alert {
    border: 1px solid CanvasText;
  }

  .auth-submit {
    border: 1px solid ButtonText;
  }
}
