#cameraRoll {
    top: 10px;
    left: 110px;
    width: 904px;
    height: 600px;
}

#cameraRoll .window-content {
    display: flex;
    height: calc(100% - 30px); /* Subtract titlebar height */
    padding: 0;
    overflow: hidden; /* Prevents double scrollbars */
}

#photoAlbumsSidebar {
    width: 150px;
    background: #ffccf1;
    border-right: 2px solid #fe81cf;
    padding: 12px;
    overflow-y: auto; /* makes sidebar independently scrollable */
}

#photoAlbumsSidebar h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 900;
    border-bottom: 2px solid #fe81cf;
    padding-bottom: 6px;
}

#photoAlbumsSidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#photoAlbumsSidebar li {
    padding: 6px 8px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 2px;
    transition: background 0.1s ease;
}

#photoAlbumsSidebar li:hover {
    background: #fb2d9b;
    color: white;
    font-weight: bold;
}

#photoAlbumsSidebar li.active {
    background: #fb2d9b;
    color: white;
    font-weight: bold;
}

#photoAlbumGrid {
    flex: 1; /* Takes remaining space */
    padding: 16px;
    overflow-y: auto; /* Makes grid independently scrollable */
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-content: flex-start; /* Makes items start from top */
}

.cameraRollThumbnail {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid #fe81cf;
    background: white;
    padding: 4px;
    overflow: hidden; 
}

.cameraRollThumbnail:hover {
    transform: scale(1.02);
    border-color: #fb2d9b;
    box-shadow: 3px 3px 10px rgba(251,45,155,0.8);
}

.cameraRollThumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* Lightbox navigation styles */
.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.lightbox-image-container {
    position: relative;
    max-width: 80vw;
    max-height: 85vh;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 85vh;
    border: 10px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    background: white;
}

.lightbox-nav {
    width: 40px;
    height: 80px;
    background: #fe81cf;
    color: white;
    border: 2px solid #fb2d9b;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: #fb2d9b;
    transform: scale(1.05);
}

.lightbox-prev {
    border-radius: 8px 0 0 8px;
}

.lightbox-next {
    border-radius: 0 8px 8px 0;
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: #fe81cf;
    border: 2px solid #fb2d9b;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: white;
    z-index: 10001;
}

.lightbox-close:hover {
    background: #fb2d9b;
}

.lightbox-title {
    text-align: center;
    margin-top: 10px;
    color: white;
    font-family: 'MS Sans Serif', monospace;
    font-size: 14px;
    text-shadow: 1px 1px 2px black;
}