.gallery-page {
    padding-top: 100px;
    padding-bottom: 40px;
    min-height: 100vh;
}

.gallery-header {
    margin-bottom: 2rem;
}

.gallery-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.lens-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #3498db;
}

.lens-specs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.spec {
    background: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.lens-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: #3498db;
    color: white;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-controls label {
    font-weight: 500;
    color: #2c3e50;
}

.sort-controls select {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #2c3e50;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-grid.list-view {
    grid-template-columns: 1fr;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.thumbnail-container {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.gallery-grid.list-view .thumbnail-container {
    height: 200px;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .thumbnail {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

.camera-info {
    display: flex;
    gap: 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.camera-info span {
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close:hover {
    background: rgba(0,0,0,0.8);
}

.lightbox-image-container {
    position: relative;
    width: calc(100vw - 10px);
    max-width: calc(100vw - 10px);
    height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
}

.lightbox-image-container.dragging {
    cursor: grabbing;
}

#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
    transform-origin: center center;
    user-select: none;
}

.nav-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.prev-btn, .next-btn {
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    pointer-events: all;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(0,0,0,0.8);
}

.prev-btn {
    margin-left: -25px;
}

.next-btn {
    margin-right: -25px;
}

.zoom-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 0.5rem;
    z-index: 1001;
}

.zoom-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 35px;
}

.zoom-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-1px);
}

.zoom-btn:active {
    transform: translateY(0);
}

.lightbox-info {
    position: fixed;
    right: 10px;
    top: 10px;
    width: 320px;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    z-index: 1002;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox-info.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.lightbox-image-container.fullwidth {
    width: 100vw;
    max-width: 100vw;
}

.image-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.exif-data {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.exif-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.exif-label {
    font-weight: 500;
    color: #bbb;
    font-size: 0.9rem;
}

.exif-value {
    font-weight: 600;
    color: white;
    text-align: right;
}

.placeholder-thumb {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 2rem;
}

@media (max-width: 768px) {
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-toggle, .sort-controls {
        justify-content: center;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .lightbox-content {
        flex-direction: column;
        width: 100%;
        height: 100%;
        margin: 0;
    }
    
    .lightbox-image-container {
        width: 100vw;
        max-width: 100vw;
        height: calc(100vh - 200px);
        max-height: calc(100vh - 200px);
    }
    
    .lightbox-image-container.fullwidth {
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
    }
    
    .lightbox-info {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        height: 180px;
        max-height: 180px;
        border-radius: 12px 12px 0 0;
        margin: 0;
    }
    
    .lightbox-info.hidden {
        transform: translateY(100%);
    }
    
    .nav-arrows {
        bottom: 10px;
        top: auto;
        transform: none;
    }
    
    .zoom-controls {
        top: 10px;
        left: 10px;
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .zoom-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 30px;
    }
    
    .close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .lens-specs {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-container {
        height: 250px;
    }
    
    .gallery-header h1 {
        font-size: 2rem;
    }
    
    .camera-info {
        flex-direction: column;
        gap: 0.4rem;
    }
}