/* Popup Modal Styles */
.popup-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-in-out;
    overflow-y: auto;
}

.popup-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    overflow: hidden;
    border: 3px solid #fff;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.popup-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.2);
}

.popup-close:active {
    transform: scale(0.95);
}

.popup-image-container {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.popup-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popup-image:hover {
    transform: scale(1.02);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        margin: 10% auto;
        max-width: none;
        border-width: 2px;
    }
    
    .popup-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: 98%;
        margin: 15% auto;
        border-radius: 8px;
        border-width: 1px;
    }
    
    .popup-close {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .popup-content {
        margin: 2% auto;
        max-height: 90vh;
    }
    
    .popup-image {
        max-height: 80vh;
        object-fit: contain;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .popup-close {
        border-width: 1px;
    }
    
    .popup-content {
        border-width: 2px;
    }
}
