/* ============================================================
   Die Unsichtbaren Gefahren im Internet
   Dark-Mode / Cyber-Look
   ============================================================ */

:root {
  --bg: #05060a;
  --bg-2: #0a0d16;
  --card: rgba(18, 22, 34, 0.72);
  --card-border: rgba(120, 180, 255, 0.14);
  --text: #e8ecf5;
  --text-dim: #8a92a8;
  --cyan: #22e3ff;
  --purple: #8b5cff;
  --pink: #ff4ecd;
  --green: #29ffa6;
  --accent-grad: linear-gradient(120deg, #22e3ff 0%, #8b5cff 55%, #ff4ecd 100%);
  --radius: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, #10162b 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Hintergrund ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 180, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
  z-index: 0;
  animation: gridMove 30s linear infinite;
}
@keyframes gridMove { to { background-position: 44px 44px; } }

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.glow-1 { width: 460px; height: 460px; background: var(--purple); top: -120px; left: -120px; animation: float1 14s ease-in-out infinite; }
.glow-2 { width: 420px; height: 420px; background: var(--cyan); bottom: -140px; right: -120px; animation: float2 16s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translate(60px, 40px); } }
@keyframes float2 { 50% { transform: translate(-50px, -30px); } }

/* ---------- Layout ---------- */
.stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  box-shadow: 0 0 28px rgba(139, 92, 255, 0.55);
  flex-shrink: 0;
}
.brand-logo .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #05060a;
  box-shadow: 0 0 0 4px rgba(5, 6, 10, 0.4) inset;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }
.brand-text h1 { font-size: 1.12rem; line-height: 1.25; letter-spacing: 0.2px; }
.brand-text p { font-size: 0.82rem; color: var(--text-dim); margin-top: 3px; }
.brand-text strong { color: var(--text); font-weight: 600; }

/* ---------- Fortschritt ---------- */
.progress { margin-bottom: 18px; }
.progress-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 25%;
  background: var(--accent-grad);
  border-radius: 99px;
  transition: width 0.6s var(--ease);
  box-shadow: 0 0 14px rgba(34, 227, 255, 0.6);
}
.progress-steps {
  display: flex; justify-content: space-between;
  margin-top: 12px;
}
.pstep {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s var(--ease);
}
.pstep.active {
  color: #05060a;
  background: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 0 18px rgba(139, 92, 255, 0.6);
}
.pstep.done {
  color: var(--green);
  border-color: rgba(41, 255, 166, 0.5);
}

/* ---------- Karte ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 34px 30px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  padding: 1px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(34, 227, 255, 0.5), transparent 40%, transparent 60%, rgba(255, 78, 205, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- Steps / Transitions ---------- */
.step { display: none; }
.step.active {
  display: block;
  animation: stepIn 0.55s var(--ease);
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.step-title { font-size: 1.5rem; letter-spacing: 0.2px; }
.step-sub { color: var(--text-dim); margin-top: 8px; margin-bottom: 24px; font-size: 0.95rem; }

/* ---------- Eingabefeld ---------- */
.field { margin-bottom: 26px; }
#nameInput {
  width: 100%;
  padding: 16px 18px;
  font-size: 1.05rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
#nameInput::placeholder { color: #5b6379; }
#nameInput:focus {
  border-color: var(--cyan);
  background: rgba(34, 227, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(34, 227, 255, 0.12);
}
.hint {
  margin-top: 12px;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--text-dim);
  padding: 12px 14px;
  border-left: 2px solid var(--purple);
  background: rgba(139, 92, 255, 0.06);
  border-radius: 0 10px 10px 0;
}

/* ---------- Auswahl-Optionen ---------- */
.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.option {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  padding: 22px 10px;
  font-size: 1.7rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.option span { font-size: 0.9rem; color: var(--text-dim); transition: color 0.3s; }
.option-num { font-size: 1.9rem; font-weight: 700; }
.option:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 227, 255, 0.5);
  background: rgba(34, 227, 255, 0.06);
}
.option.selected {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(34, 227, 255, 0.18), rgba(139, 92, 255, 0.18));
  box-shadow: 0 0 0 1.5px var(--cyan), 0 0 22px rgba(34, 227, 255, 0.35);
}
.option.selected span { color: var(--text); }

/* ---------- Buttons ---------- */
.actions {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.actions button:only-child { margin-left: auto; }
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.28s var(--ease);
}
.btn-primary, .btn-send {
  color: #05060a;
  background: var(--accent-grad);
  background-size: 180% 180%;
  box-shadow: 0 10px 30px rgba(139, 92, 255, 0.35);
}
.btn-primary:hover, .btn-send:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(34, 227, 255, 0.45);
}
.btn-send {
  background: linear-gradient(120deg, #29ffa6, #22e3ff, #8b5cff);
  background-size: 180% 180%;
}
.btn-ghost {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.btn.loading::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(5, 6, 10, 0.35);
  border-top-color: #05060a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Erfolg ---------- */
.step-success { text-align: center; }
.success-icon {
  width: 84px; height: 84px; margin: 0 auto 22px;
}
.success-icon svg { width: 100%; height: 100%; }
.success-icon circle {
  stroke: var(--green); stroke-width: 3;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: draw 0.7s var(--ease) forwards;
}
.success-icon path {
  stroke: var(--green); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: draw 0.5s var(--ease) 0.5s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-note {
  margin-top: 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-dim);
  padding: 14px 16px;
  background: rgba(41, 255, 166, 0.06);
  border: 1px solid rgba(41, 255, 166, 0.15);
  border-radius: 12px;
}

/* ---------- Footer ---------- */
.foot {
  text-align: center;
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .card { padding: 26px 20px; }
  .brand-text h1 { font-size: 1rem; }
  .step-title { font-size: 1.3rem; }
  .btn { padding: 12px 18px; }
}
