/* Modal Overlay Base */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    /* Default Hidden */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Activate Modal */
.modal-overlay.active {
    display: flex !important;
}

/* Modal Content Box */
.modal-content {
    background: #0f172a;
    /* Darker bg */
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    position: relative;
    max-height: 90vh;
    /* Prevent too tall */
    overflow-y: auto;

    /* Animation */
    transform: scale(0.95);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-header .btn-icon {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: color 0.2s;
}

.modal-header .btn-icon:hover {
    color: #fff;
}

/* Body & Footer */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}