/* 02-login.css — Anmelden / Registrieren. Teil der geordneten Kaskade: in index.html in Nummern-Reihenfolge geladen; Regeln NICHT zwischen Dateien verschieben, ohne die Reihenfolge zu bedenken. */
/* ─── LOGIN / REGISTER – Premium Liquid-Glass Welcome ───────────────────── */
/* Konzept: Dunkler Hero-Background mit zwei Radial-Glows in Akzentfarbe,
   schwebende Glass-Card matching dem App-Header-Stil, Gradient-Text Title,
   moderne Filled-Inputs mit Focus-Glow, Primary-CTA als Akzent-Pill mit Glow. */
/* ─── LOGIN / REGISTER – Aurora Glass v2 ──────────────────────────────── */
/* Theme-aware: nutzt --page-bg falls vom Design-Picker gesetzt, sonst Dark-Default */
#loginScreen,
#registerScreen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 22px;
  position: relative;
  overflow: hidden;
  background: var(--page-bg, #050811);
  color: var(--text, #fff);
}
/* Aurora-Blobs – langsam wandernde Farbverläufe als Premium-Background */
.login-aurora {
  position: absolute; inset: 0;
  pointer-events: none;
  filter: blur(60px) saturate(140%);
  z-index: 0;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: screen;
}
.aurora-blob--1 {
  width: 480px; height: 480px;
  top: -180px; left: -140px;
  background: radial-gradient(circle, rgba(var(--blue-rgb), 0.85) 0%, transparent 70%);
  animation: auroraDrift1 22s ease-in-out infinite alternate;
}
.aurora-blob--2,
.aurora-blob--3 {
  display: none;
}
@keyframes auroraDrift1 {
  0%   { transform: translate(0,0)      scale(1);   }
  100% { transform: translate(80px,40px) scale(1.15); }
}
@keyframes auroraDrift2 {
  0%   { transform: translate(0,0)        scale(1);   }
  100% { transform: translate(-60px,-80px) scale(1.10); }
}
@keyframes auroraDrift3 {
  0%   { transform: translate(0,0)       scale(1);   }
  100% { transform: translate(40px,-50px) scale(1.20); }
}
/* Subtile Noise-Overlay für filmic grain */
.login-noise {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.login-content {
  position: relative; z-index: 2;
  width: 100%;
  max-width: 380px;
  display: flex; flex-direction: column;
  align-items: center;
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
/* App-Icon (PNG) im Login/Register-Header – mit Glow + Float */
.login-app-icon {
  display: block;
  width: 82px; height: 82px;
  margin: 0 auto 18px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow:
    0 22px 44px -14px rgba(var(--blue-rgb), 0.55),
    0 0 0 1px rgba(255,255,255,0.10),
    0 0 60px -6px rgba(var(--blue-rgb), 0.40);
  animation: loginIconFloat 6s ease-in-out infinite;
}
@keyframes loginIconFloat {
  0%, 100% { transform: translateY(0)    rotate(-1.2deg); }
  50%      { transform: translateY(-6px) rotate(1.2deg); }
}
.login-title {
  font-size: 34px;
  font-weight: var(--fw-heavy);
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin: 0 0 8px;
  background: linear-gradient(180deg,
    #FFFFFF 0%,
    rgba(255,255,255,0.70) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.login-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.62);
  font-weight: var(--fw-med);
  letter-spacing: 0.005em;
  margin: 0;
}

.login-card {
  width: 100%;
  background:
    radial-gradient(circle at 10% -10%, rgba(var(--blue-rgb), 0.10) 0%, transparent 55%),
    linear-gradient(150deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 26px;
  padding: 22px 20px;
  backdrop-filter: blur(calc(18px * var(--glass-mult) * var(--glass-scroll, 1))) saturate(180%);
  -webkit-backdrop-filter: blur(calc(18px * var(--glass-mult) * var(--glass-scroll, 1))) saturate(180%);
  box-shadow:
    0 30px 60px -24px rgba(0,0,0,0.65),
    0 6px 18px -6px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.20);
}

/* Input mit Icon im Field-Wrap */
.login-field {
  position: relative;
  margin-bottom: 10px;
}
.login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: rgba(255,255,255,0.55);
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.25s;
}
.login-field-icon svg { width: 18px; height: 18px; }
.login-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.005em;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 2px rgba(0,0,0,0.25);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.login-input::placeholder { color: rgba(255,255,255,0.38); font-weight: var(--fw-med); }
.login-input:focus {
  border-color: color-mix(in srgb, var(--blue) 70%, white);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 0 3px rgba(var(--blue-rgb), 0.22),
    0 4px 14px rgba(var(--blue-rgb), 0.22);
}
.login-field:focus-within .login-field-icon { color: rgba(255,255,255,0.85); }

.login-error {
  display: none;
  color: #FCA5A5;
  font-size: 12.5px;
  font-weight: var(--fw-bold);
  text-align: center;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(248,113,113,0.10);
  border: 1px solid rgba(248,113,113,0.25);
  margin: 4px 0 14px;
}

.login-btn {
  width: 100%;
  padding: 15px 18px;
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--blue-rgb), 0.45);
  background:
    radial-gradient(circle at 30% 15%, rgba(255,255,255,0.30) 0%, transparent 55%),
    linear-gradient(150deg,
      color-mix(in srgb, var(--blue) 85%, white) 0%,
      var(--blue) 55%,
      color-mix(in srgb, var(--blue) 80%, black) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: var(--fw-heavy);
  letter-spacing: 0.005em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 14px 32px -10px rgba(var(--blue-rgb), 0.70),
    0 0 0 1px rgba(255,255,255,0.06);
  transition:
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s,
    filter 0.18s;
}
.login-btn .login-btn-arrow {
  width: 18px; height: 18px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-btn:hover .login-btn-arrow { transform: translateX(4px); }
.login-btn:active {
  transform: scale(0.97);
  filter: brightness(0.96);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 6px 16px -6px rgba(var(--blue-rgb), 0.50);
}

.login-divider {
  text-align: center;
  margin: 18px 0 14px;
  position: relative;
  display: flex; align-items: center; gap: 12px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}
.login-divider span {
  color: rgba(255,255,255,0.38);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-register-btn {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  color: rgba(255,255,255,0.92);
  font-family: inherit;
  font-size: 14px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.005em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 2px rgba(0,0,0,0.20);
  transition: background 0.20s, border-color 0.20s, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-register-btn:active {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.26);
  transform: scale(0.97);
}

.login-footer {
  margin: 22px 0 0;
  font-size: 11px;
  color: rgba(255,255,255,0.32);
  font-weight: var(--fw-bold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-align: center;
}

/* Back-Button für Register-Screen — schwebt links über der Content-Card */
.login-back {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  left: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  backdrop-filter: blur(calc(11px * var(--glass-mult) * var(--glass-scroll, 1)));
  -webkit-backdrop-filter: blur(calc(11px * var(--glass-mult) * var(--glass-scroll, 1)));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 4px 14px -4px rgba(0,0,0,0.45);
  transition: background 0.20s, border-color 0.20s, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-back svg { width: 20px; height: 20px; }
.login-back:active {
  transform: scale(0.92);
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.28);
}

/* Section-Label im Register-Card (z.B. „Dein Avatar") */
.login-section-label {
  font-size: 10px;
  font-weight: var(--fw-bold);
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 10px 2px 10px;
}

/* Avatar-Grid: 4-Spalten, Glass-Items mit Tap-Feedback */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.avatar-item {
  cursor: pointer;
  padding: 6px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition:
    background 0.20s,
    border-color 0.20s,
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.20s;
}
.avatar-item svg { width: 100%; height: auto; max-width: 40px; }
.avatar-item:hover {
  border-color: rgba(255,255,255,0.20);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
}
.avatar-item:active { transform: scale(0.94); }
/* Ausgewählter Avatar: Akzent-Glow */
.avatar-item.selected,
.avatar-item[data-selected="true"] {
  border-color: color-mix(in srgb, var(--blue) 70%, white);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--blue) 22%, transparent),
      color-mix(in srgb, var(--blue) 8%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 0 0 3px rgba(var(--blue-rgb), 0.18),
    0 4px 14px rgba(var(--blue-rgb), 0.32);
}

/* Floating Design-Picker-Button unten links im Login/Register */
.login-theme-btn {
  position: absolute;
  left: max(20px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 3;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.18) 0%, transparent 60%),
    linear-gradient(150deg,
      rgba(var(--blue-rgb), 0.32) 0%,
      rgba(255,255,255,0.06) 100%);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(calc(12px * var(--glass-mult) * var(--glass-scroll, 1))) saturate(180%);
  -webkit-backdrop-filter: blur(calc(12px * var(--glass-mult) * var(--glass-scroll, 1))) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 8px 24px -8px rgba(0,0,0,0.55),
    0 0 0 1px rgba(var(--blue-rgb), 0.20),
    0 0 24px -8px rgba(var(--blue-rgb), 0.55);
  transition:
    background 0.25s,
    border-color 0.25s,
    transform 0.20s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s;
}
.login-theme-btn svg { width: 22px; height: 22px; }
.login-theme-btn:hover {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.22) 0%, transparent 60%),
    linear-gradient(150deg,
      rgba(var(--blue-rgb), 0.42) 0%,
      rgba(255,255,255,0.08) 100%);
}
.login-theme-btn:active {
  transform: scale(0.92);
  border-color: rgba(255,255,255,0.30);
}
.back-btn {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--r-pill);
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-6);
  backdrop-filter: blur(calc(8px * var(--glass-mult) * var(--glass-scroll, 1)));
  transition: background 0.15s;
}
.back-btn:active { background: rgba(255,255,255,0.18); }

/* (Avatar-Item-Definition steht weiter unten in der Login/Register-Sektion mit
   Glass-Materialität – die alte transparente Variante hier wurde entfernt um
   Cascade-Konflikt zu vermeiden.) */

