:root {
    --gold: #b9822f;
    --gold-dark: #7a5320;
    --brown: #4a2f14;
    --bg-deep: #1a0f05;
    --card-bg: #fffaf2;
    --text: #2c1e10;
    --muted: #8a7658;
    --muted-2: #8a7658;
    --green: #2f7a4f;
    --red: #a53d3d;
    --radius: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at 20% 20%, #3a230d 0%, #1a0f05 55%, #0d0703 100%);
    color: var(--text);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px 80px;
    position: relative;
    overflow-x: hidden;
}

/* Warme "Bokeh"-Lichter im Hintergrund, per CSS statt Foto */
.bg-lights {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255,210,120,0.30) 0, transparent 6%),
        radial-gradient(circle at 82% 12%, rgba(255,190,90,0.26) 0, transparent 5%),
        radial-gradient(circle at 70% 70%, rgba(255,170,60,0.20) 0, transparent 7%),
        radial-gradient(circle at 25% 80%, rgba(255,200,110,0.22) 0, transparent 6%),
        radial-gradient(circle at 92% 55%, rgba(255,220,150,0.18) 0, transparent 5%),
        radial-gradient(circle at 45% 40%, rgba(255,180,80,0.13) 0, transparent 8%);
    filter: blur(1px);
    animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
    from { transform: scale(1) translateY(0); }
    to   { transform: scale(1.06) translateY(-10px); }
}

/* Schwebende, funkelnde Lichtpartikel (wie treibende Glut / Feuerwerksfunken) */
.particle {
    position: fixed;
    bottom: -6vh;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,224,160,0.95) 0%, rgba(255,190,90,0.5) 45%, rgba(255,190,90,0) 75%);
    animation: floatUp linear infinite;
    will-change: transform, opacity;
}
@keyframes floatUp {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
    10%  { opacity: 1; }
    85%  { opacity: 0.85; }
    100% { transform: translate(var(--drift, 30px), -115vh) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .particle, .bg-lights { animation: none; }
}

/* Matrix-Regen-Easter-Egg auf der letzten Frage vor dem Absenden */
#matrix-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #050a05;
    animation: matrixFadeIn 0.6s ease;
}
@keyframes matrixFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    overflow: hidden;
    animation: rise 0.5s ease;
}
.center-card { margin-top: 8vh; }

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Nach dem Absenden (Zusage): Formular-Fenster ausblenden, damit während
   der Matrix-Outro-Zeit nur noch der Matrix-Effekt zu sehen ist. */
.card.card-fade-out {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
@media (prefers-reduced-motion: reduce) {
    .card.card-fade-out { transition: none; }
}

.card-inner { padding: 36px 28px 28px; }

/* Sanfter Übergang bei jedem Formularschritt-Wechsel */
#app > div {
    animation: stepFadeIn 0.45s ease;
}
@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Beim Weiterklicken: aktueller Schritt fadet nach links weg, bevor der
   nächste Schritt (über die stepFadeIn-Animation oben) erscheint. */
.step-exit-left {
    animation: none !important;
    opacity: 0 !important;
    transform: translateX(-40px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    pointer-events: none;
}
/* Wiederverwendbare gestaffelte Einblend-Animation (z.B. für die
   Startseite: Begrüßung, Titel, Untertitel, Datum, Button nacheinander).
   Verzögerung pro Element über die CSS-Variable --fade-delay steuerbar. */
.fade-up {
    opacity: 0;
    animation: fadeUpIn 0.7s ease forwards;
    animation-delay: var(--fade-delay, 0s);
}
@keyframes fadeUpIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    #app > div { animation: none; }
    .fade-up { animation: none; opacity: 1; }
    .step-exit-left { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Persönliche Begrüßung auf der Startseite */
.greeting-fade {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin-bottom: 10px;
}

h1 {
    font-size: 1.7rem;
    margin: 0 0 8px;
    color: var(--gold-dark);
    line-height: 1.25;
}
p { line-height: 1.5; }
.muted { color: var(--muted-2); margin-top: 0; }
.small { font-size: 0.85rem; }

.step-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 6px;
}
.back-link {
    display: inline-block;
    color: var(--muted-2);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    user-select: none;
}
.back-link:hover { color: var(--gold-dark); }
.question {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text);
}
.hint { color: var(--muted-2); font-size: 0.92rem; margin-bottom: 20px; }

/* Persönliches Foto auf der Startseite */
.intro-photo { margin: 4px 0 14px; }
.intro-photo img {
    display: block;
    width: 100%;
    /* Skaliert mit der Fensterhöhe (vh), damit das Bild so groß wie möglich
       ist, ohne dass die Startseite auf dem Handy scrollen muss. */
    height: clamp(200px, 42vh, 460px);
    object-fit: cover;
    object-position: 50% 82%;
    border-radius: 16px;
    box-shadow: 0 14px 26px rgba(0,0,0,0.3), 0 0 0 4px #fffaf2;
}

/* Fake-Hacking-Terminal beim Absage-Gag */
.hacker-lines {
    background: #05130a;
    color: #3ef26a;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.75;
    padding: 18px;
    border-radius: 14px;
    min-height: 170px;
    box-shadow: inset 0 0 20px rgba(62,242,106,0.15);
}
.hacker-line {
    animation: hackerLineIn 0.25s ease;
}
.hacker-punchline {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(62,242,106,0.35);
    color: #eafff0;
    font-weight: 800;
    font-family: inherit;
    font-size: 1.35rem;
    line-height: 1.4;
    text-align: center;
    text-shadow: 0 0 14px rgba(62,242,106,0.6);
}
@keyframes hackerLineIn {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .hacker-line { animation: none; }
}

.intro-text { color: #5a4326; font-size: 0.96rem; line-height: 1.6; }
.intro-text p { margin: 0 0 14px; }
.intro-text p:last-child { margin-bottom: 0; }
.intro-text sup { font-size: 0.7em; color: var(--gold-dark); font-weight: 700; }

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    box-shadow: 0 8px 20px rgba(122, 83, 32, 0.35);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-secondary {
    background: #fff;
    color: var(--gold-dark);
    border: 2px solid #e7dcc8;
}
.btn-row { display: flex; gap: 12px; margin-top: 24px; }
.btn-row .btn { flex: 1; }

/* Choice options (radio-style cards) */
.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #ecdfc7;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 1.02rem;
    transition: all 0.15s ease;
    background: #fff;
}
.option:hover { border-color: #d9c396; }
.option.selected {
    border-color: var(--gold);
    background: #fdf3e2;
    box-shadow: 0 0 0 3px rgba(185,130,47,0.15);
}
.option .dot {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid #cbb98d; flex-shrink: 0; position: relative;
}
.option.selected .dot { border-color: var(--gold); }
.option.selected .dot::after {
    content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--gold);
}
.option.checkbox .dot { border-radius: 6px; }
.option.checkbox.selected .dot::after { border-radius: 3px; }

input[type="text"], textarea, select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #ecdfc7;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
input[type="text"]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
}
textarea { resize: vertical; min-height: 90px; }

.other-input { margin-top: -4px; margin-bottom: 12px; margin-left: 4px; }

/* Stepper (Kinderanzahl etc.) */
.stepper-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stepper-box {
    flex: 1;
    min-width: 60px;
    padding: 18px 8px;
    text-align: center;
    border-radius: 12px;
    border: 2px solid #ecdfc7;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    background: #fff;
}
.stepper-box.selected {
    border-color: var(--gold);
    background: #fdf3e2;
    color: var(--gold-dark);
}
.stepper-box.wide {
    flex-basis: 100%;
    font-size: 0.98rem;
}

/* Progress bar */
.progressbar-wrap { padding: 0 28px 24px; position: relative; z-index: 1; background: var(--card-bg); }
.progress-label { font-size: 0.8rem; color: var(--muted-2); margin-bottom: 8px; }
.progressbar { height: 8px; background: #eee3cc; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold-dark)); transition: width 0.3s ease; }

/* Summary page */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 14px;
}
.badge-yes { background: #e4f5e9; color: var(--green); }
.badge-no { background: #fbe8e8; color: var(--red); }

.summary { margin: 20px 0; border-top: 1px solid #eee1c8; }
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee1c8;
    font-size: 0.95rem;
}
.summary-row span { color: var(--muted-2); }
.summary-row strong { text-align: right; font-weight: 600; }

.location-box {
    margin-top: 22px;
    padding: 20px;
    background: #fdf6e8;
    border: 1px solid #f0e2c4;
    border-radius: 16px;
}

/* Location-Foto: rechteckig, mit Schatten für etwas Tiefe */
.location-photo {
    margin: 0 auto 18px;
    max-width: 260px;
}
.location-photo-img {
    width: 100%;
    height: 130px;
    border-radius: 16px;
    background-size: cover;
    background-position: 50% 55%;
    background-repeat: no-repeat;
    box-shadow: 0 14px 26px rgba(0,0,0,0.3), 0 0 0 4px #fffaf2;
    transition: transform 0.25s ease;
}
.location-photo:hover .location-photo-img { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) {
    .location-photo-img { transition: none; }
}

.location-heading {
    font-weight: 800;
    color: var(--gold-dark);
    margin-bottom: 8px;
    font-size: 1.02rem;
}
.location-name { font-weight: 700; }
.location-address { color: var(--muted-2); margin-bottom: 16px; }
.location-links { display: flex; flex-direction: column; gap: 10px; }
.location-links .btn { display: block; text-decoration: none; flex: 1; }

@media (min-width: 420px) {
    .location-links { flex-direction: row; }
}

.spezi-visual {
    width: 100%;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: -6px;
}

@media (max-width: 480px) {
    .card-inner { padding: 28px 20px 22px; }
    .progressbar-wrap { padding: 0 20px 20px; }
}
