/* Fullscreen Image Viewer Styles */
.fullscreen-image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 250000;
}

.fullscreen-image-modal.active {
    display: flex;
}

.fullscreen-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.fullscreen-image-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    pointer-events: all;
}

#fullscreenImage {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border-radius: var(--border-radius);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#fullscreenImage.loaded {
    opacity: 1;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 30px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.fullscreen-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
}

.fullscreen-nav.prev {
    left: 20px;
}

.fullscreen-nav.next {
    right: 20px;
}

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

.fullscreen-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    display: none;
}

.fullscreen-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    pointer-events: none;
}

.fullscreen-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.fullscreen-loading.active {
    display: block;
}

.fullscreen-loading .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Make dream gallery images clickable */
.photo-gallery-slide img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.photo-gallery-slide img:hover {
    transform: scale(1.02);
}

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

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

/* Mobile optimizations */
@media (max-width: 768px) {
    .fullscreen-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .fullscreen-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .fullscreen-nav.prev {
        left: 10px;
    }
    
    .fullscreen-nav.next {
        right: 10px;
    }
    
    .fullscreen-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    #fullscreenImage {
        max-width: 95%;
        max-height: 85vh;
    }
}

/* Touch areas for mobile swipe */
.fullscreen-touch-area {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: 10001;
    pointer-events: all;
}

.fullscreen-touch-area.left {
    left: 0;
}

.fullscreen-touch-area.right {
    right: 0;
}