* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --tinder1: #fd267a; --tinder2: #ff6036; --tinder3: #ff7854;
  --nope: #ec5e6f; --text: #ffffff; --dim: rgba(255,255,255,0.7);
  --ink: #1b1b23;
}
html, body { height: 100%; }
body {
  min-height: 100%;
  background: #0f0f14;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}
.hidden { display: none !important; }
.flame { filter: saturate(1.2); }

/* ---------- Startmenü ---------- */
.menu {
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px;
  background: linear-gradient(160deg, var(--tinder1), var(--tinder2) 60%, var(--tinder3));
}
.brand {
  font-size: 44px; font-weight: 800; letter-spacing: -0.03em;
  display: flex; align-items: center; gap: 8px;
}
.brand.small { font-size: 26px; }
.tagline { margin-top: 4px; color: rgba(255,255,255,0.9); font-size: 15px; }
.menu-card {
  margin-top: 30px; width: min(92vw, 380px);
  background: rgba(255,255,255,0.14); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 22px; padding: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}
.menu-card h3 { font-size: 14px; text-align: left; margin: 6px 2px 10px; font-weight: 600; }
.menu-card h3 + .seg { margin-bottom: 18px; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 12px 8px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.1);
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.seg button:active { transform: scale(0.96); }
.seg button.active { background: #fff; color: var(--tinder1); border-color: #fff; }
.start-btn {
  margin-top: 10px; width: 100%; padding: 15px; border-radius: 999px; border: none;
  background: #fff; color: var(--tinder1); font-size: 16px; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.2);
}
.start-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.start-btn:not(:disabled):active { transform: scale(0.98); }

/* ---------- Wizard (3-Schritte-Menü) ---------- */
.steps { display: flex; justify-content: center; gap: 10px; margin: 2px 0 18px; }
.steps .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.35); transition: background 0.2s ease, transform 0.2s ease;
}
.steps .dot.active { background: #fff; transform: scale(1.25); }
.steps .dot.done { background: rgba(255,255,255,0.75); }
.step { min-height: 96px; }
.step.hidden { display: none; }
.text-input {
  width: 100%; box-sizing: border-box; padding: 14px 16px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12); color: #fff; font-size: 16px;
  outline: none; transition: border-color 0.15s ease, background 0.15s ease;
}
.text-input::placeholder { color: rgba(255,255,255,0.7); }
.text-input:focus { border-color: #fff; background: rgba(255,255,255,0.2); }
.wizard-nav { display: flex; gap: 10px; margin-top: 20px; }
.nav-btn {
  flex: 1; padding: 15px; border-radius: 999px; border: none;
  background: #fff; color: var(--tinder1); font-size: 16px; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.2);
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.nav-btn.ghost {
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.4); box-shadow: none;
}
.nav-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.nav-btn:not(:disabled):active { transform: scale(0.98); }

/* ---------- App / Swipe ---------- */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 20px 8px;
}
.topbar .brand { background: linear-gradient(90deg, var(--tinder1), var(--tinder3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.settings { background: none; border: none; font-size: 22px; cursor: pointer; opacity: 0.85; }
.greeting {
  flex: 1; text-align: center; font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.92); margin: 0 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.stage { flex: 1; position: relative; display: grid; place-items: center; padding: 6px 14px 2px; }
.cards { position: relative; width: min(94vw, 400px); height: min(70vh, 620px); }
.loading { position: absolute; color: var(--dim); font-size: 14px; }

/* Vollbild-Fotokarte (Tinder-Stil) */
.card {
  position: absolute; inset: 0;
  border-radius: 14px; overflow: hidden;
  background: #23232b center/cover no-repeat;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  will-change: transform; user-select: none; -webkit-user-select: none;
}
/* Foto-Fortschrittsstriche oben (wie bei Tinder) */
.card::before {
  content: "";
  position: absolute; top: 10px; left: 12px; right: 12px; height: 3px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, #fff 0 32%, transparent 32% 34%,
      rgba(255,255,255,0.45) 34% 66%, transparent 66% 68%,
      rgba(255,255,255,0.45) 68% 100%);
  z-index: 3;
}
/* Platzhalter-Initiale (solange keine Fotos) */
.ph-avatar {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 128px; font-weight: 800; color: rgba(255,255,255,0.28);
  text-shadow: 0 6px 30px rgba(0,0,0,0.3);
}
/* Illustrierter Avatar (DiceBear, CC0) — liegt über der Fallback-Initiale */
.card .avatar-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center 42%;
  padding: 8% 8% 22%;
  pointer-events: none; -webkit-user-drag: none;
}
/* Kennzeichnung als Demodaten */
.card .badge-demo {
  position: absolute; top: 40px; left: 22px; z-index: 3;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: 2px;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.45);
}
.card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.15) 62%, rgba(0,0,0,0.82) 100%);
}
.card .info { position: absolute; left: 20px; right: 20px; bottom: 22px; z-index: 2; }
.card .name { font-size: 30px; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.card .name .age { font-weight: 300; margin-left: 8px; }
.card .city { font-size: 15px; color: rgba(255,255,255,0.92); margin-top: 4px; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
.card .bio { font-size: 14px; color: rgba(255,255,255,0.85); margin-top: 10px; text-shadow: 0 1px 8px rgba(0,0,0,0.6); }

/* NOPE-Stempel */
.card .stamp {
  position: absolute; top: 40px; right: 22px; z-index: 3;
  border: 4px solid var(--nope); color: var(--nope);
  font-size: 34px; font-weight: 900; letter-spacing: 3px;
  padding: 4px 16px; border-radius: 10px;
  transform: rotate(18deg); opacity: 0; text-transform: uppercase;
  text-shadow: none;
}

/* Steuerung */
.controls { display: flex; align-items: center; justify-content: center; gap: 26px; padding: 12px 0 max(22px, env(safe-area-inset-bottom)); }
.rewind-btn {
  width: 54px; height: 54px; border-radius: 50%;
  background: #fff; border: none; color: #f5b544;
  font-size: 22px; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3); transition: transform 0.12s ease, opacity 0.15s ease;
}
.rewind-btn:disabled { opacity: 0.4; cursor: default; }
.rewind-btn:not(:disabled):active { transform: scale(0.9); }
.nope-btn {
  width: 68px; height: 68px; border-radius: 50%;
  background: #fff; border: none; color: var(--nope);
  font-size: 28px; font-weight: 700; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  transition: transform 0.12s ease;
}
.nope-btn:active { transform: scale(0.88); }

/* Leerer Zustand */
.empty { text-align: center; padding: 30px; max-width: 340px; }
.empty-emoji { font-size: 56px; }
.empty h2 { margin-top: 12px; font-size: 24px; }
.empty p { margin-top: 8px; color: var(--dim); }
.btn-restart {
  margin-top: 22px; padding: 13px 26px; border-radius: 999px; border: none;
  background: linear-gradient(90deg, var(--tinder1), var(--tinder3));
  color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
}
.btn-restart:active { transform: scale(0.96); }
