/* 라이트박스 모달 스타일 */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

/* 닫기 버튼 */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100001;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* 메인 이미지 영역 */
.lightbox-main-image {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 이미지 정보 */
.lightbox-info {
    color: #fff;
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
}

.lightbox-location-name {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffd700;
}

.lightbox-counter {
    font-size: 16px;
    opacity: 0.8;
    margin-top: 10px;
}

/* 썸네일 네비게이션 */
.lightbox-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90%;
}

.lightbox-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.lightbox-thumbnail:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.lightbox-thumbnail.active {
    opacity: 1;
    border: 2px solid #ffd700;
    transform: scale(1.1);
}

/* 좌우 화살표 버튼 */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow.prev {
    left: 30px;
}

.lightbox-arrow.next {
    right: 30px;
}

/* 클릭 가능한 카드 표시 */
.location-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(45, 80, 22, 0.3);
}

.location-card::after {
    content: '사진 보기 👁️';
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(45, 80, 22, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.location-card:hover::after {
    opacity: 1;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .lightbox-main-image {
        max-width: 95%;
        max-height: 60vh;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .lightbox-arrow {
        font-size: 35px;
        width: 45px;
        height: 45px;
    }

    .lightbox-arrow.prev {
        left: 10px;
    }

    .lightbox-arrow.next {
        right: 10px;
    }

    .lightbox-thumbnails {
        gap: 8px;
        margin-top: 15px;
    }

    .lightbox-thumbnail {
        width: 60px;
        height: 45px;
    }

    .lightbox-location-name {
        font-size: 20px;
    }

    .lightbox-info {
        font-size: 16px;
    }

    .lightbox-counter {
        font-size: 14px;
    }
}

/* 터치 제스처 인디케이터 */
@media (max-width: 768px) {
    .lightbox-container::before {
        content: '← 스와이프 →';
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(255, 255, 255, 0.5);
        font-size: 14px;
        animation: fadeInOut 3s ease infinite;
    }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 로딩 애니메이션 */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
}

.lightbox-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
