#artGallery {
    top: 10px;
    left: 10px;
    width: 1200px;
    max-width: calc(100vw - 25px);
    height: 93%;
}

#artGallery .window-content {
    background-image: url(images/artGallery/artGallery_wallpaper.png);
    background-repeat: repeat;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding: 24px;
    overflow-y: auto;
    align-items: start; /* This prevents stretching */
}

.introCard {
    background-color: #f1c154;
    padding: 24px;
}

/* Frame container */
.art-frame {
    width: 100%; /* Takes full width of grid column */
    cursor: pointer;
    transition: transform 0.2s ease;
}

.art-frame:hover {
    transform: scale(1.02); /* Subtle hover effect */
}

/* The actual frame image (your pixel art frame) */
.frame-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    display: block;
}

/* Container for the actual artwork */
.artwork-container {
    position: relative;
    width: 100%;
}

/* For portrait-oriented frames, you might want to constrain height */
.art-frame.portrait {
    max-width: 250px; /* Prevents portraits from getting too wide */
    justify-self: center;
}

.artwork {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px); /* Adjust based on frame border width */
    height: calc(100% - 40px);
    object-fit: cover; /* This will crop to fill the frame */
    z-index: 1;
}

/* For frames with different border widths, you might need specific classes */
.art-frame.vintage-frame .artwork {
    width: calc(100% - 60px);
    height: calc(100% - 60px);
}

/* If you want to maintain aspect ratio without cropping */
.art-frame.contain .artwork {
    object-fit: contain;
    background: rgba(255,255,255,0.1); /* Optional: shows behind letterboxed art */
}

.art-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

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

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: #c0c0c0;
    border: 2px solid #ffffff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.lightbox-content video {
    max-width: 90vw;
    max-height: 90vh;
    border: 10px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    background: black; /* Shows while video loads */
}