/* ═══════════════════════════════════════════════════
   WEATHERHUNTERS — Auth System (Login + Register)
   Vereinheitlicht mit dem Hauptsystem (weather-hunters.com)
   ═══════════════════════════════════════════════════ */

/* ═══ PAGE WRAPPER ═══
   Login nutzt .auth-wrapper, Register nutzt .auth-page –
   beide erhalten dasselbe Layout. */
.auth-wrapper,
.auth-page{
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2rem 1rem;
}

/* ═══ CARD ═══
   Funktioniert eigenständig, auch ohne zusätzliche .glass-Klasse */
.auth-card{
  background:var(--bg-card);
  border:1px solid var(--bg-border);
  border-top:2px solid var(--gold);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  width:100%;
  max-width:520px;
  padding:2.5rem;
  position:relative;
}

/* ═══ LOGO / HEADER ═══ */
.logo-area{
  text-align:center;
  margin-bottom:2rem;
}
.logo-area h1{
  margin-bottom:.4rem;
  font-size:2.4rem;
}
.logo-area p{
  font-size:.85rem;
  letter-spacing:.04em;
}

/* Register: h1/p liegen als Geschwister direkt im .auth-card,
   nicht innerhalb von .logo-area — gleiche Optik erzwingen */
.auth-card > h1{
  text-align:center;
  font-size:2.2rem;
  margin-bottom:.5rem;
}
.auth-card > p{
  text-align:center;
  margin-bottom:1.5rem;
  font-size:.85rem;
  letter-spacing:.04em;
}

/* Emoji-Icon (Login) und Logo-Icon-Wrapper (Register, "logo-area weather-icon") */
.weather-icon{
  font-size:2.75rem;
  line-height:1;
  margin-bottom:1rem;
  filter:drop-shadow(0 0 14px var(--gold-glow));
  animation:iconFloat 4s ease-in-out infinite;
}
@keyframes iconFloat{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-8px)}
}

/* Logo-Bild, eingefärbt im Gold-Ton der Hauptseite.
   width:100% + max-width sorgt dafür, dass das sehr breite
   Wordmark-Logo (~12:1 Seitenverhältnis) nie über die Card
   hinausragt, egal wie schmal der Bildschirm ist. */
.logo-img{
  display:block;
  width:100%;
  max-width:260px;
  height:auto;
  margin:0 auto;
  filter:brightness(0) saturate(100%) invert(73%) sepia(50%) saturate(500%) hue-rotate(5deg) brightness(.95);
}

/* ═══ TWO-COLUMN ROWS (Vorname/Nachname) ═══
   .row (Register) und .auth-row (Legacy-Name) werden gleich behandelt */
.row,
.auth-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem;
}

/* ═══ INPUTS ═══
   .auth-input (Register) verhält sich wie .input in style.css */
.auth-input{
  width:100%;
  padding:.9rem 1rem;
  background:rgba(255,255,255,.02);
  border:1px solid var(--bg-border);
  color:var(--txt);
  border-radius:4px;
  font-family:'Outfit',system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  font-size:.95rem;font-weight:300;
  outline:none;
  transition:border-color var(--transition-base);
}
.auth-input:focus{border-color:var(--gold)}
.auth-input::placeholder{color:var(--txt-d)}

/* ═══ PASSWORT-STÄRKE ═══ */
.password-strength{
  height:4px;
  margin-top:.6rem;
  border-radius:20px;
  background:var(--bg-border);
  overflow:hidden;
}
#strengthBar{
  height:100%;
  width:0%;
  border-radius:20px;
  transition:width .3s ease,background .3s ease;
}

/* ═══ CHECKBOXEN ("Angemeldet bleiben" / Datenschutz) ═══ */
.remember,
.checkbox{
  display:flex;
  align-items:center;
  gap:.6rem;
  margin:1.2rem 0;
  font-size:.85rem;
  color:var(--txt-m);
}
.remember input,
.checkbox input{
  width:18px;height:18px;
  accent-color:var(--gold);
  cursor:pointer;
}
.checkbox label{cursor:pointer}

/* ═══ SUBMIT BUTTON ═══
   Funktioniert eigenständig (Register nutzt nur .auth-btn ohne .btn) */
.auth-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:100%;
  margin-top:1rem;
  padding:.9rem;
  background:var(--gold);
  color:var(--bg);
  border:none;
  border-radius:3px;
  font-family:'Outfit',system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  font-size:.8rem;font-weight:600;
  letter-spacing:.12em;text-transform:uppercase;
  cursor:pointer;
  transition:background var(--transition-base),transform var(--transition-base);
}
.auth-btn:hover,.auth-btn:focus-visible{
  background:var(--gold-light);
  transform:translateY(-1px);
}

/* ═══ FOOTER LINKS ═══ */
.auth-footer{
  margin-top:2rem;
  text-align:center;
  color:var(--txt-m);
  font-size:.85rem;
}
.auth-footer p{margin:.6rem 0}
.auth-footer a{
  color:var(--gold);
  text-decoration:none;
}
.auth-footer a:hover,.auth-footer a:focus-visible{
  text-decoration:underline;
}

/* ═══ RESPONSIVE ═══ */
@media(max-width:600px){
  .auth-card{padding:1.5rem}
  .row,.auth-row{grid-template-columns:1fr}
  .auth-card > h1{font-size:1.9rem}
}

/* ── Footer: Impressum / Datenschutz ── */
.site-footer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.2rem 20px calc(1.2rem + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, .45);
  font-size: .8rem;
}
.site-footer a { color: rgba(255, 255, 255, .55); text-decoration: none; }
.site-footer a:hover { color: #C9A84C; }
.site-footer-links a + a { margin-left: 1.2rem; }

/* ── NDA-Box in der Registrierung ── */
.nda-box { margin: 1.2rem 0 .4rem; }
.nda-box h3 {
  font-size: .82rem;
  color: #C9A84C;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.nda-scroll {
  max-height: 200px;
  overflow-y: auto;
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: .76rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .72);
}
.nda-scroll p { margin-bottom: .6rem; }
.nda-scroll strong { color: #E8C96B; }
.checkbox label a { color: #E8C96B; }

/* ── NDA-Modal (erscheint beim Absenden der Registrierung) ── */
.nda-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.nda-overlay[hidden] { display: none; }
.nda-modal {
  width: min(620px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #15161b;
  border: 1px solid rgba(201, 168, 76, .35);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .7);
}
.nda-modal h3 {
  font-size: .9rem;
  color: #C9A84C;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}
.nda-modal .nda-scroll { flex: 1; max-height: none; min-height: 120px; }
.nda-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 4px;
  font-size: .82rem;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
}
.nda-check input { margin-top: 3px; accent-color: #C9A84C; }
.nda-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.nda-btn-ghost, .nda-btn-gold {
  border-radius: 8px;
  padding: 10px 18px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.nda-btn-ghost {
  background: transparent;
  color: #aaa;
  border: 1px solid rgba(255, 255, 255, .2);
}
.nda-btn-ghost:hover { color: #fff; border-color: #fff; }
.nda-btn-gold {
  background: #C9A84C;
  color: #101014;
  border: none;
}
.nda-btn-gold:hover:not(:disabled) { background: #E8C96B; }
.nda-btn-gold:disabled { opacity: .4; cursor: not-allowed; }

/* Datenschutz-Inhalt im Modal (h2/Listen/Karten aus privacy_text) */
.nda-scroll h2 { font-size: .84rem; color: #E8C96B; margin: 14px 0 6px; }
.nda-scroll ul { padding-left: 18px; margin-bottom: 8px; }
.nda-scroll li { margin-bottom: 4px; }
.nda-scroll .card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(201, 168, 76, .2);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
}
.nda-scroll .muted { color: #777; font-size: .72rem; }
.nda-scroll a { color: #E8C96B; }

/* ================================================================
   Mobile-Feinschliff Login/Register (01.08.2026)
   ================================================================ */
@media (max-width: 600px) {

  /* Karte oben ausrichten statt streng zentriert - verhindert
     Springen, wenn die Handy-Tastatur die Viewport-Hoehe halbiert */
  .auth-wrapper,
  .auth-page {
    align-items: flex-start;
    padding: 22px 12px calc(24px + env(safe-area-inset-bottom));
  }
  .auth-card { padding: 1.6rem 1.15rem; }
  .logo-area h1 { font-size: 2rem; }

  /* iOS Safari zoomt automatisch hinein, wenn Eingabefelder
     kleiner als 16px sind - deshalb hier fest 16px */
  .auth-input,
  .input,
  .auth-card input[type="text"],
  .auth-card input[type="email"],
  .auth-card input[type="password"] {
    font-size: 16px;
  }

  .auth-btn { font-size: 15px; padding-top: .9rem; padding-bottom: .9rem; }

  /* NDA-/Datenschutz-Modal: volle Breite, echte Viewport-Hoehe */
  .nda-overlay { padding: 10px; }
  .nda-modal { max-height: 92dvh; padding: 16px 14px; }
  .nda-scroll { padding: 10px 12px; }

  .site-footer-links a + a { margin-left: .9rem; }
}
