/* Image Gallery — per-game image grid with lightbox */

.image-gallery {
    width: 100%;
    margin: 2rem 0;
}

.image-gallery__header {
    margin-bottom: 0.5rem;
}

.image-gallery__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0;
}

.image-gallery__accent {
    width: 60px;
    height: 4px;
    background: var(--color-accent-orange, #fb923c);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.image-gallery__grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.image-gallery__item {
    flex: 0 0 auto;
    cursor: pointer;
    transition: transform 0.2s ease;
    background: transparent;
}

.image-gallery__item:hover {
    transform: scale(1.03);
}

.image-gallery__item img {
    max-height: 220px;
    width: auto;
    display: block;
}

.image-gallery__item-label {
    padding: 0.35rem 0.5rem;
    font-size: 0.7rem;
    color: rgba(229, 231, 235, 0.6);
    text-align: center;
}

/* Lightbox overlay */
.image-gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.image-gallery-lightbox--active {
    opacity: 1;
    pointer-events: auto;
}

.image-gallery-lightbox__inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.image-gallery-lightbox__img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.image-gallery-lightbox__caption {
    color: #e5e7eb;
    font-size: 1rem;
    text-align: center;
}

.image-gallery-lightbox__close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: none;
    border: none;
    color: #e5e7eb;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
}

.image-gallery-lightbox__close:hover {
    color: var(--color-accent-orange, #fb923c);
}

.image-gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(31, 41, 55, 0.8);
    border: none;
    color: #e5e7eb;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.image-gallery-lightbox__nav:hover {
    background: rgba(31, 41, 55, 1);
    color: var(--color-accent-orange, #fb923c);
}

.image-gallery-lightbox__nav--prev {
    left: -60px;
}

.image-gallery-lightbox__nav--next {
    right: -60px;
}

.image-gallery-lightbox__nav svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Responsive */
@media (max-width: 768px) {
    .image-gallery__item img {
        max-height: 180px;
    }

    .image-gallery-lightbox__nav--prev {
        left: 10px;
    }

    .image-gallery-lightbox__nav--next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .image-gallery__title {
        font-size: 1.25rem;
    }

    .image-gallery__item img {
        max-height: 150px;
    }
}
