/* Enhanced Image Gallery Styles */

/* Lightbox Modal */
#lightbox {
    display: none;
    align-items: center;
    justify-content: center;
}

#lightbox.active {
    display: flex;
}

#lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Album Tiles */
.album-tile {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.album-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Gallery Images */
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blurred {
    filter: blur(8px);
}

.gallery-img.blurred:hover {
    filter: blur(2px);
}

/* Image Container Effects */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.2s ease;
    background: rgba(31, 41, 55, 0.5);
}

.image-container:hover {
    transform: scale(1.02);
}

.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.image-container:hover::after {
    transform: translateX(100%);
}

/* Loading States */
.loading-spinner {
    border: 3px solid #374151;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Handling */
.error-image {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
}

/* Navigation Buttons */
.nav-button {
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.nav-button:hover {
    background: rgba(55, 65, 81, 0.8);
}

/* Password Protection Styling */
#password-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Design */
@media (max-width: 640px) {
    .album-tile h2 {
        font-size: 1rem;
    }
    
    #lightbox-img {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .image-container:hover {
        transform: none;
    }
}

/* Focus States for Accessibility */
.album-tile:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}

/* Animation for modals */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hover glow effect */
.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Status indicators */
.status-indicator {
    position: relative;
}

.status-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #1f2937;
}

/* Loading shimmer effect */
.shimmer {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Payment System Styles */
.album-tile[data-category="text"]:not(.purchased),
.album-tile[data-category="nude"]:not(.purchased) {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.album-tile[data-category="text"]:not(.purchased):hover,
.album-tile[data-category="nude"]:not(.purchased):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.album-tile.purchased {
    border: 2px solid #10b981;
}

.album-tile.purchased::after {
    content: "✅ PURCHASED";
    position: absolute;
    top: 8px;
    left: 8px;
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
}

/* Payment Modal Animations */
#payment-modal {
    animation: fadeIn 0.3s ease-out;
}

#payment-modal > div {
    animation: slideUp 0.3s ease-out;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Mandatory Location System Styles */
#location-permission-modal {
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

#location-permission-modal > div {
    animation: slideUp 0.5s ease-out;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Location modal animations */
@keyframes locationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.location-icon {
    animation: locationPulse 2s infinite;
}

/* Location permission states */
.location-granted {
    background: linear-gradient(135deg, #10b981, #059669);
}

.location-denied {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.location-processing {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Enhanced button styles for location modal */
#location-permission-modal button {
    transition: all 0.3s ease;
    transform: translateY(0);
}

#location-permission-modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#location-permission-modal button:active {
    transform: translateY(0);
}

/* Location details styling */
#location-details {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #374151, #4b5563);
    border: 1px solid #6b7280;
}

/* Responsive adjustments for location modal */
@media (max-width: 768px) {
    #location-permission-modal > div {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        padding: 1.5rem;
    }

    #location-permission-modal h2 {
        font-size: 1.5rem;
    }

    #location-permission-modal .text-6xl {
        font-size: 3rem;
    }
}
