.screenshots {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.screenshots img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.download-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #4a6fa5;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #3a5a80;
}

.screenshots-container {
    position: relative;
    max-width: 100%;
    margin: 30px auto;
}

.gallery-main {
    position: relative;
    height: 0;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: #1a1a1a;
}

.gallery-main img,
.gallery-main video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-main img.active,
.gallery-main video.active {
    display: block;
}

.gallery-main img:hover {
    transform: scale(1.02);
}

.thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent; 
}

.thumbnail.active, .thumbnail:hover {
    opacity: 1;
    border-color: #4a6fa5;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.thumbnail:hover img {
    transform: scale(1.1); 
}
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 20px;
    transition: background 0.3s ease;
}

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

.prev-btn {
    left: 15px;
    z-index: 100;
}

.next-btn {
    right: 15px;
    z-index: 100;
}

/* Fullscreen overlay */
.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.144);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
body.overlay-open {
    overflow: hidden;
}
.fullscreen-media {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-fullscreen {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
}
/* Fullscreen navigation buttons */
.fullscreen-overlay .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    font-size: 24px;
    transition: background 0.3s ease;
}

.fullscreen-overlay .prev-btn {
    left: 30px;
}

.fullscreen-overlay .next-btn {
    right: 30px;
}

.fullscreen-overlay .nav-btn:hover {
    background: rgba(0,0,0,0.8);
}
/* Fullscreen caption */
.fullscreen-caption {
    color: white;
    font-size: 1.2em;
    text-align: center;
    margin-top: 15px;
    max-width: 90%;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

/* Center image container */
.fullscreen-overlay > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 90%;
}

/* Adjust image size */
.fullscreen-image {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
}
@media (max-width: 768px) {
    .screenshots-container {
        max-width: 95%;
    }
    
    .gallery-main {
        padding-top: 75%;
    }
    
    .thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .fullscreen-overlay .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .fullscreen-overlay .prev-btn {
        left: 10px;
    }
    
    .fullscreen-overlay .next-btn {
        right: 10px;
    }
}