.image-overlay-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.image-overlay-container.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.image-overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.image-overlay-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 90vh;
    max-width: 95vw;
    pointer-events: none;
}

.image-overlay-content::before {
    position: absolute;
    content: " ";
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    border-radius: 8px;
    background-image: url('/images/transparent.webp');
    background-repeat: repeat;
    background-size: 10px;
    image-rendering: pixelated;
    opacity: 0.3;
    z-index: -1;
}

.image-overlay-content img {
    max-height: 85vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.image-overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
    pointer-events: auto;
}

.image-overlay-close:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.image-overlay-close::before {
    content: "✕";
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
}

@media (max-width: 768px) {
    .image-overlay-content img {
        max-height: 80vh;
        max-width: 95vw;
    }

    .image-overlay-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .image-overlay-close::before {
        font-size: 20px;
    }
}

