.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: transparent;
    border-radius: 10px;
    overflow: visible;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    padding: 40px;
    margin: -40px;
    z-index: 100001;
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.popup-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: #ff4757;
    border: 4px solid #fff;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100002;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transform: translate(0%, 0%);
}

.popup-close-btn:hover {
    background: #ff3742;
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.popup-close-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .popup-container {
        max-width: 90%;
        max-height: 70%;
        margin: 20px;
    }
    
    .popup-close-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
        top: 0;
        right: 0;
        border-width: 4px;
        transform: translate(0%, 0%);
        z-index: 100002;
        background: #ff0000;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .popup-container {
        max-width: 85%;
        max-height: 75%;
        margin: 15px;
    }
}

@media (orientation: portrait) {
    .popup-container {
        max-width: 90%;
        max-height: 70%;
        margin: 20px;
    }
} 