/* Lightbox Styles */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

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

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    z-index: 10002;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 15px;
    z-index: 10002;
    transition: background 0.2s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-caption {
    color: white;
    margin-top: 15px;
    font-size: 1rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

.lightbox-counter {
    position: absolute;
    top: -45px;
    left: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 4px;
}

/* ギャラリーアイテムのポインター */
.gallery-item img {
    cursor: pointer;
    transition: filter 0.2s;
}

.gallery-item img:hover {
    filter: brightness(0.9);
}

@media (max-width: 768px) {

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.5);
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: -50px;
        right: 10px;
    }

    .lightbox-image {
        max-width: 100vw;
        max-height: 70vh;
    }
}