/* ===========================
   BrainFlip – Forgot Styles
   File: assets/css/forgot.css
   =========================== */

/* ----- Design Tokens ----- */
:root{
  --bg:#f7f8fa;
  --panel:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;

  --primary:#2563eb;
  --primary-600:#1d4ed8;
  --primary-700:#1e40af;

  --success:#10b981;
  --success-600:#059669;

  --danger:#ef4444;
  --danger-600:#dc2626;

  --radius:14px;
  --shadow-sm:0 1px 2px rgba(16,24,40,.06);
  --shadow-md:0 6px 20px rgba(2,6,23,.10);

  --font:ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --fs-base:16px;
  --fs-sm:14px;
  --lh:1.55;

  --transition:180ms cubic-bezier(.2,.6,.2,1);
}

/* ----- Base & Centering ----- */
*, *::before, *::after{ box-sizing:border-box; }
html, body{ height:100%; }
html{ font-size:100%; }

body{
  margin:0;
  display:flex;                /* zentriert die Card */
  justify-content:center;
  align-items:center;
  min-height:100vh;
  font-family:var(--font);
  font-size:var(--fs-base);
  line-height:var(--lh);
  color:var(--text);
  background:radial-gradient(1200px 600px at 10% -10%, #e8eeff 0%, rgba(232,238,255,0) 50%), var(--bg);
  padding-left:max(0px, env(safe-area-inset-left));
  padding-right:max(0px, env(safe-area-inset-right));
}

/* Korrektes Mobile-Viewport-Verhalten */
@supports (height:100svh){
  body{ min-height:100svh; }
}

/* Weniger Bewegung, wenn gewünscht */
@media (prefers-reduced-motion:reduce){
  *{ transition:none !important; animation:none !important; }
}

/* ----- Card ----- */
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-md);
  width:min(96%, 480px);
  padding:clamp(18px,3.2vw,28px);
  margin:auto;
}

h1{
  font-size:clamp(22px,2.2vw,28px);
  line-height:1.2;
  margin:0 0 12px;
  letter-spacing:-.01em;
}

.muted{ color:var(--muted); margin:0 0 16px; }

/* ----- Form ----- */
form{ display:grid; gap:16px; }

label{
  display:grid;
  gap:8px;
  font-weight:600;
  font-size:15px;
}

.input{
  appearance:none;
  width:100%;
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  padding:12px 14px;
  font:inherit;
  color:var(--text);
  transition:border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  font-size:16px;             /* iOS-Zoom verhindern */
}
.input::placeholder{ color:#9aa3b2; }
.input:hover{ border-color:#d5dbea; }
.input:focus-visible{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(37,99,235,.15);
}
.input:user-invalid{
  border-color:var(--danger);
  box-shadow:0 0 0 3px rgba(239,68,68,.15);
}

/* Safari/Chrome Autofill */
input:-webkit-autofill{
  transition: background-color 9999s ease-in-out 0s;
  -webkit-text-fill-color: var(--text);
}

/* ----- Buttons & Links ----- */
.btn{
  appearance:none;
  border:0;
  border-radius:12px;
  background:linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
  color:#fff;
  font-weight:700;
  padding:12px 16px;
  min-height:46px;
  box-shadow:0 8px 18px rgba(37,99,235,.24);
  transition:transform var(--transition), box-shadow var(--transition), background var(--transition);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.btn:hover{ transform:translateY(-1px); box-shadow:0 10px 22px rgba(37,99,235,.3); }
.btn:active{ transform:translateY(0); box-shadow:0 6px 14px rgba(37,99,235,.22); }
.btn:focus-visible{ outline:none; box-shadow:0 0 0 4px rgba(37,99,235,.22); }

/* ----- Alerts ----- */
.alert{
  padding:10px 12px;
  border-radius:10px;
  font-weight:600;
  margin:0 0 12px;
  border:1px solid;
}
.alert.error{
  color:var(--danger-600);
  background:#fff1f1;
  border-color:#ffd4d4;
}
.alert.success{
  color:var(--success-600);
  background:#ecfdf5;
  border-color:#b7f7df;
}

/* ===========================
   MOBILE OPTIMIERUNG
   =========================== */

/* Tablet */
@media (max-width:768px){
  .card{ width:min(92%, 460px); padding:clamp(18px,4vw,26px); }
  h1{ font-size:clamp(22px,4vw,26px); }
  .btn{ width:100%; }
}

/* Mobile */
@media (max-width:520px){
  .card{ width:90%; padding:clamp(16px,5vw,24px); box-shadow:var(--shadow-sm); border-radius:12px; }
  h1{ font-size:clamp(21px,6vw,25px); margin-bottom:10px; }
  .muted{ font-size:14.5px; margin-bottom:14px; }
  label{ font-size:14.5px; gap:6px; }
  .input{ padding:12px 13px; min-height:46px; }
  .btn{ width:100%; min-height:48px; font-size:15.5px; }
  .alert{ font-size:14.5px; }
  .input:focus-visible{ box-shadow:0 0 0 3px rgba(37,99,235,.18); }
  .btn:focus-visible{ box-shadow:0 0 0 3px rgba(37,99,235,.24); }
}

/* Extra Small Phones (≤375px) */
@media (max-width:375px){
  h1{ font-size:20px; }
  .btn{ font-size:15px; padding:10px 14px; }
  label, .muted, .alert{ font-size:14px; }
}
