

/* -------- Overlay Wrapper -------- */
.modal-wrapper {
    position: fixed;
    inset: 0;

    display: flex;                  /* IMMER flex → kein Unsichtbar-Bug */
    align-items: center;
    justify-content: center;

    z-index: 12000;
    padding: 20px;

    /* Start: unsichtbar */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 200ms ease, visibility 200ms ease;
}

.modal-wrapper.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* -------- Dunkler Hintergrund -------- */
#modal-backdrop {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at 10% 0%, rgba(255,255,255,0.06), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(255,215,130,0.30), transparent 65%),
        rgba(0,0,0,0.78);

    backdrop-filter: blur(7px);
}

/* -------- Modal Box -------- */
.door-popup-modal {
    position: relative;
    width: min(980px, 92vw);
    height: min(720px, 92vh);
    margin: auto;

    background:
        radial-gradient(circle at 10% 0%, rgba(255,255,255,0.10), transparent 52%),
        radial-gradient(circle at 90% 100%, rgba(255,215,130,0.34), transparent 62%),
        linear-gradient(145deg, #050a1b, #081a3a 45%, #0b2a52 90%);

    border-radius: 28px;
    border: 1px solid rgba(255,232,180,0.55);

    box-shadow:
        0 26px 80px rgba(0,0,0,0.92),
        0 0 58px rgba(255,215,130,0.55);

    padding: 28px;

    display: flex;
    flex-direction: column;

    z-index: 1;
}

/* -------- Close Button -------- */
.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;

    width: 42px;
    height: 42px;
    border-radius: 999px;

    border: 1px solid rgba(255,235,190,0.75);
    background: radial-gradient(circle at 30% 20%, #ffffff, #ffe2b0 60%, #d89b4b 100%);
    color: #2a1406;

    font-size: 1.6rem;
    font-weight: 800;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    box-shadow: 0 0 20px rgba(255,215,130,0.9);
}

.modal-close:hover {
    transform: scale(1.05);
}

/* -------- Content (Text / Markdown) -------- */
.modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;

    font-family: "Segoe UI", "Inter", Arial, sans-serif;
    color: rgba(255,255,255,0.97);
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);

    font-size: 1.3rem;
    line-height: 1.85;
}

/* Überschrift */
.modal-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: #fff7e0;
}

/* Unterüberschriften */
.modal-content h2,
.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 22px;
    margin-bottom: 10px;
    color: #ffe3a3;
}

/* Text */
.modal-content p {
    max-width: 60ch;
    margin-bottom: 14px;
}

/* Listen */
.modal-content ul,
.modal-content ol {
    margin-left: 26px;
    margin-bottom: 18px;
}

.modal-content li {
    margin-bottom: 8px;
}

.modal-content ol li::marker,
.modal-content ul li::marker {
    font-weight: 700;
    color: #ffd78a;
}

/* -------- IFRAME -------- */
#iframe {
    flex: 1;
    width: 100%;
    height: 100%;

    border-radius: 20px;
    border: 1px solid rgba(255,232,180,0.25);

    background: #020611;
}

/* -------- Mobile -------- */
@media (max-width: 600px) {
    .door-popup-modal {
        width: 96vw;
        height: 88vh;
        padding: 20px;
    }

    .modal-content {
        font-size: 1.25rem;
        line-height: 1.9;
    }

    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 1.7rem;
    }


    .modal-content {
        font-family: "Georgia", "Times New Roman", serif;
        font-size: 1.35rem;
        line-height: 1.9;
        letter-spacing: 0.2px;
        color: rgba(255, 255, 255, 0.97);
    }

    /* Hauptüberschrift */
    .modal-content h1 {
        font-family: "Segoe UI", "Inter", sans-serif;
        font-size: 2.4rem;
        font-weight: 800;
        letter-spacing: 0.5px;
        color: #fff3d6;

        margin-bottom: 20px;
        text-shadow:
            0 2px 6px rgba(0, 0, 0, 0.7),
            0 0 14px rgba(255, 215, 130, 0.35);
    }

    /* Zwischenüberschriften */
    .modal-content h2,
    .modal-content h3 {
        font-family: "Segoe UI", "Inter", sans-serif;
        font-size: 1.6rem;
        font-weight: 700;
        color: #ffe0a3;

        margin-top: 26px;
        margin-bottom: 12px;
    }

    /* Fließtext */
    .modal-content p {
        max-width: 62ch;
        margin-bottom: 16px;
    }

    /* Listen – mehr Luft & bessere Marker */
    .modal-content ul,
    .modal-content ol {
        margin-left: 30px;
        margin-bottom: 22px;
    }

    .modal-content li {
        margin-bottom: 10px;
    }

    /* Marker klar & festlich */
    .modal-content ul li::marker,
    .modal-content ol li::marker {
        color: #ffd78a;
        font-weight: 700;
    }

    /* Letzter Satz (z. B. „Viel Freude beim Backen…“) */
    .modal-content p:last-of-type {
        margin-top: 26px;
        font-weight: 600;
        color: #fff1cc;
    }



    @media (min-width: 900px) {
        .modal-content {
            font-size: 1.45rem;
        }
    }

}
