/* =================================================================== */
/*  Modernes Modal System v3 (Final Polish)
/* =================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-color: rgba(10, 10, 20, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);

    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    /* NEU: Subtiler Farbverlauf statt flacher Farbe für mehr Tiefe */
    background-image: linear-gradient(145deg, #3a3f47, #2c2f36);
    
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
    
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    
    display: flex;
    flex-direction: column;

    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    
    /* NEU: Wir entfernen die harte border-bottom und ersetzen sie durch einen Pseudo-Effekt */
    position: relative; /* Wichtig für das ::after Element */
    border-bottom: none; 
}

/* NEU: Die Akzent-Linie, die den Header vom Body trennt */
.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 2px;
    /* Ein weicher Farbverlauf, der in der Mitte am hellsten ist */
    background: linear-gradient(to right, transparent, rgba(93, 173, 236, 0.4), transparent);
}


.modal-title {
    margin: 0;
    font-size: 1.5rem;
    color: #f0f0f0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2.5rem;
    color: #a0a0a0;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

/* Gestylter Scrollbalken (bleibt unverändert) */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px;
    border: 2px solid #33373E;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #777;
}
