.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 80%;
    overflow: hidden;
    max-height: 90dvh;
    transform: scale(0.8) translateY(30px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: var(--clr-primary-500);
    color: white;
    padding: 24px 32px;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='m0 40l40-40h-40v40zm40 0v-40h-40l40 40z'/%3E%3C/g%3E%3C/svg%3E") repeat;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.modal-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 8px 0 0 0;
    position: relative;
    z-index: 1;
}
.modal-title, .modal-subtitle {
    max-width: 90%;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 2;
}


.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}


.modal-body {
    padding: 32px;
    line-height: 1.6;
    color: #333;
    max-height: 50dvh;
    overflow-y: scroll;
}

.modal-body h3 {
    color: #2d3748;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.modal-body p {
    margin-bottom: 16px;
    color: #4a5568;
}

.modal-footer {
    padding: 24px 32px;
    background: #f8f9fa;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}


/* Responsive */
@media (max-width: 768px) {
    .modal {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 20px;
    }
}
