/* Dark gray background - not pure black */
body {
    background-color: #2b2b2b;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

/* Gallery Grid */
#gallery-grid {
    margin: 0;
}

.thumbnail-container {
    padding: 10px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.thumbnail-container:hover {
    opacity: 0.8;
}

.thumbnail {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    background-color: #1a1a1a;
}

/* Viewer Overlay */
.viewer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 43, 43, 0.98);
    z-index: 1000;
    overflow: hidden;
}

.viewer-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.viewer-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    max-height: calc(100% - 120px);
    overflow: hidden;
}

.viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.viewer-title {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin-top: 20px;
    text-align: center;
    padding: 0 20px;
}

/* Controls */
.viewer-controls-top {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.viewer-controls-bottom {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    align-items: center;
}

.btn-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.btn-control:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-control:active {
    background-color: rgba(255, 255, 255, 0.15);
}

#btn-close {
    font-size: 2rem;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .thumbnail-container {
        padding: 5px;
    }
    
    .viewer-title {
        font-size: 1rem;
    }
    
    .btn-control {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .viewer-controls-bottom {
        gap: 10px;
    }
}

/* Loading state */
.loading {
    text-align: center;
    color: #888;
    padding: 40px;
}
