/* Modal Overlay (The blurred background) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* The Modal Box */
.custom-modal {
    background: var(--glass-bg, rgba(255, 255, 255, 0.85));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.5));
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .custom-modal {
    transform: scale(1);
}

/* Content Styling */
.modal-logo {
    width: 50px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main, #333);
}

.modal-message {
    color: var(--text-muted, #666);
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Buttons */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-btn:hover { transform: translateY(-2px); }

.btn-cancel {
    background: transparent;
    border: 1px solid var(--text-muted, #ccc);
    color: var(--text-muted, #666);
}

.btn-confirm {
    background: #6c5ce7;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-danger {
    background: #ff4757;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
/* --- ENHANCED DARK MODE MODAL --- */
[data-theme="dark"] .custom-modal {
    background: rgba(15, 23, 42, 0.8) !important; /* Deep Slate Transparent */
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    
    /* Subtle glowing border */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    
    /* Stronger outer shadow for depth */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
                0 0 20px rgba(108, 99, 255, 0.1) !important; 
}

/* Success Title Text */
[data-theme="dark"] .modal-title {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Success Message Text */
[data-theme="dark"] .modal-message {
    color: #cbd5e1 !important; /* Lighter slate for readability */
}

/* The "Got it" Button Polish */
[data-theme="dark"] .btn-confirm {
    background: linear-gradient(135deg, #6c63ff, #8b5cf6) !important;
    border: none !important;
    color: white !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
    transition: all 0.3s ease;
}

[data-theme="dark"] .btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
    filter: brightness(1.1);
}