.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding: 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(52,73,94,0.8));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    margin: 3% auto;
    padding: 0;
    border: none;
    border-radius: 20px;
    width: 85%;
    max-width: 650px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.1);
    animation: modalFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(231,76,60,0.8), rgba(192,57,43,0.9));
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(231,76,60,0.3);
    border: 2px solid rgba(255,255,255,0.2);
}

.close:hover,
.close:focus {
    background: linear-gradient(135deg, rgba(192,57,43,0.9), rgba(155,89,182,0.8));
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(231,76,60,0.4);
}

.modal-header {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.modal-body {
    padding: 30px;
    text-align: center;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.modal-body img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.modal-body img:hover {
    transform: scale(1.02);
}

.modal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@media (max-width: 768px) {
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        width: 92%;
        margin: 8% auto;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 15px;
        border-radius: 15px 15px 0 0;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 20px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 12% auto;
        border-radius: 12px;
    }
    
    .modal-header {
        border-radius: 12px 12px 0 0;
    }
    
    .modal-body {
        padding: 15px;
    }
}