/* Modal Styling */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Halbtransparenter Hintergrund */
    display: none;
    /* Standardmäßig ausgeblendet */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    /* Über allem anderen */
    backdrop-filter: blur(3px);
    /* Hintergrund-Weichzeichner */
}

.modal {
    background-color: #f8faff;
    /* Helles Blau-Weiß, wie der Hauptbereich */
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
    padding: 25px;
    position: relative;
    animation: modalOpen 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
    /* Scrollbar bei Bedarf */
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: flex-end;
    /* Button nach rechts ausrichten */
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 0;
    /* Kein unterer Abstand mehr nötig */
    border-bottom: none;
    /* Keine Trennlinie mehr */
}

.modal-header h3 {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    color: #4a6fa5;
    /* Mittelblau, passend zum Rest der Seite */
    margin: 0;
    font-size: 2rem;
}

/* Neuer Schließen-Button */
.modal-close {
    background-color: #4a8ecc;
    /* Angenehmes Mittelblau */
    border: none;
    color: white;
    /* Weißer Text für besseren Kontrast */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 5px;
    line-height: 1.2;
    position: absolute;
    right: 20px;
    top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Subtiler Schatten */
}

.modal-close:hover {
    background-color: #3a7db5;
    /* Dunkleres Blau beim Hover */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    /* Verstärkter Schatten */
}

.modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 142, 204, 0.3);
    /* Fokus-Rahmen in passender Farbe */
}

/* Modal Inhalt */
.modal-content {
    margin-bottom: 20px;
    font-size: 1rem;
}

/* Modal Footer (optional) */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px;
}

.modal-btn {
    padding: 8px 16px;
    background-color: #4a6fa5;
    /* Mittelblau */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}

.modal-btn.secondary {
    background-color: #e0e0e0;
    /* Hellgrau */
    color: #333;
}

.modal-btn:hover {
    background-color: #6aa5d8;
    /* Helleres Blau beim Hover */
}

.modal-btn.secondary:hover {
    background-color: #d0d0d0;
    /* Dunkleres Grau beim Hover */
}

/* Animation */
@keyframes modalOpen {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design für verschiedene Bildschirmgrößen */

/* Kleine Bildschirme (Tablets, Mobilgeräte) */
@media (max-width: 768px) {
    .modal {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .modal-content {
        font-size: 0.95rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
        margin-bottom: 5px;
        font-size: 0.95rem;
        padding: 8px 12px;
    }

    .modal-close {
        font-size: 13px;
        padding: 5px 10px;
        top: 15px;
        right: 15px;
    }
}

/* Mittlere Bildschirme (Laptops, Desktops) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .modal {
        max-width: 700px;
        padding: 30px;
    }

    .modal-header h3 {
        font-size: 1.5rem;
    }

    .modal-content {
        font-size: 1.05rem;
        margin-bottom: 25px;
    }

    .modal-btn {
        padding: 10px 18px;
        font-size: 1.05rem;
    }

    .modal-close {
        font-size: 15px;
        padding: 7px 14px;
    }
}

/* Größere Bildschirme (größere Desktops) */
@media (min-width: 1600px) and (max-width: 1919px) {
    .modal {
        max-width: 850px;
        padding: 35px;
        max-height: 75vh;
    }

    .modal-header h3 {
        font-size: 1.7rem;
    }

    .modal-content {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .modal-footer {
        padding-top: 20px;
        gap: 15px;
    }

    .modal-btn {
        padding: 12px 22px;
        font-size: 1.1rem;
        border-radius: 6px;
    }

    .modal-close {
        font-size: 16px;
        padding: 8px 16px;
        top: 25px;
        right: 30px;
    }
}

/* Sehr große Bildschirme (4K und größer) */
@media (min-width: 1920px) {
    .modal {
        max-width: 1000px;
        padding: 40px;
        border-radius: 15px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        max-height: 70vh;
    }

    .modal-header {
        margin-bottom: 25px;
    }

    .modal-header h3 {
        font-size: a2rem;
    }

    .modal-content {
        font-size: 1.2rem;
        margin-bottom: 35px;
    }

    .modal-footer {
        padding-top: 25px;
        gap: 20px;
    }

    .modal-btn {
        padding: 15px 30px;
        font-size: 1.2rem;
        border-radius: 8px;
    }

    .modal-close {
        font-size: 17px;
        padding: 10px 20px;
        top: 30px;
        right: 35px;
        border-radius: 6px;
    }

    /* Verstärkter Blur-Effekt für größere Bildschirme */
    .modal-container {
        backdrop-filter: blur(5px);
    }
}
