/* Enhanced Modal Styles for v11 */

/* Override existing modal styles */
.modal-backdrop {
    backdrop-filter: blur(10px) !important;
    background: rgba(10, 14, 26, 0.95) !important;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Enhanced modal content */
.modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border: 2px solid transparent !important;
    background-clip: padding-box;
    position: relative;
    box-shadow: 
        0 0 50px rgba(59, 130, 246, 0.3),
        0 0 100px rgba(16, 185, 129, 0.1),
        inset 0 0 30px rgba(59, 130, 246, 0.05) !important;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    border-radius: 1rem;
    z-index: -1;
    opacity: 0.5;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button positioning */
button[onclick*="close"] {
    position: relative !important;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9ca3af;
    transition: all 0.3s ease;
    z-index: 100;
    padding: 0.5rem;
}

button[onclick*="close"]:hover {
    color: #ffffff;
    transform: scale(1.1);
}

/* Modal header enhancement */
.modal-header {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    padding: 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
}

/* Enhanced form inputs in modals */
.modal-content .cyber-input {
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.3);
    padding: 0.875rem 1rem;
    transition: all 0.3s ease;
}

.modal-content .cyber-input:focus {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.2),
        0 0 30px rgba(59, 130, 246, 0.3);
}

/* Radio and checkbox styling */
.modal-content input[type="radio"],
.modal-content input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* Enhanced selected state */
.modal-content label:has(input:checked) {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* Quiz progress bar enhancement */
.quiz-progress {
    height: 6px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.quiz-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, #3b82f6, #10b981);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

/* Enhanced buttons in modals */
.modal-content button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modal-content button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modal-content button:hover::before {
    width: 300px;
    height: 300px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    button[onclick*="close"] {
        position: relative !important;
        width: auto;
        height: auto;
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }
}

/* Smooth scrollbar for modals */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #10b981);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #059669);
}