.leaderboard {
    margin: 20px auto;
    width: 90%;
    max-width: 1000px;
    background-color: #1a1a1a;
    border: 3px solid #4b0082;
    border-radius: 8px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 0 15px rgba(75, 0, 130, 0.5);
}

    .leaderboard h3 {
        margin: 0 0 20px;
        text-align: center;
        font-size: 2em;
        color: #C8A000;
        text-shadow: 0 0 5px rgba(200, 160, 0, 0.7);
    }

    .leaderboard ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }

    .leaderboard li {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        background: #222;
        border-radius: 5px;
        border: 2px solid #4b0082;
        transition: transform 0.3s ease;
    }

        .leaderboard li:hover {
            transform: scale(1.05);
            box-shadow: 0 0 10px #4b0082;
        }

    .leaderboard img {
        width: 150px;
        height: 150px;
        object-fit: cover;
        border-radius: 5px;
        border: 3px solid #4b0082;
        cursor: pointer;
        margin-bottom: 10px;
    }

    .leaderboard .image-score {
        font-weight: bold;
        color: #C8A000;
        font-size: 1.3em;
        background: rgba(0, 0, 0, 0.8);
        padding: 5px 10px;
        border-radius: 5px;
    }

/* General Styling */
body {
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}
/* Style for the back to top button */
.back-to-top {
    display: block;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    padding: 12px 30px;
    border: 2px solid #4b0082;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.filter-options select {
    background-color: #000;
    color: white;
    border: 2px solid #4b0082;
    padding: 5px 10px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}
/* Action Buttons Container */
.action-buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 5px auto;
}

/* Action Buttons Groups */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 5px 0;
    width: 100%;
}

/* Button Styling */
.btn {
    background-color: black;
    color: white;
    padding: 14px 28px;
    font-size: 20px;
    font-weight: 700;
    border: 3px solid #4b0082;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.2s;
    margin: 4px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(75, 0, 130, 0.3);
}

    .btn:hover {
        background-color: black;
        color: #4b0082;
        box-shadow: 0 4px 8px rgba(75, 0, 130, 0.5);
    }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.page-button {
    background-color: #000;
    color: #fff;
    border: 2px solid #4b0082;
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

    .page-button:hover:not(:disabled) {
        background-color: #4b0082;
        color: #fff;
    }

    .page-button.active {
        background-color: #4b0082;
        color: #fff;
        font-weight: bold;
    }

    .page-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.top-strip {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-bottom: 5px solid #4b0082;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .top-strip h1 {
        margin: 0;
        padding: 0px;
        text-align: left;
        padding-left: 20px;
        font-size: 60px;
    }

        .top-strip h1 a {
            text-decoration: none;
            color: #4b0082;
        }

.nav-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: auto;
    padding-right: 10px;
}

.nav-button {
    background-color: black;
    color: white;
    padding: 15px 50px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    white-space: nowrap;
    box-sizing: border-box;
    border: 3px solid #4b0082;
}

    .nav-button:hover {
        background-color: black;
        color: #4b0082;
        border: 3px solid #4b0082;
    }

/* Instructions Styling */
.instructions {
    text-align: center;
    background-color: #1a1a1a;
    color: #fff;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 0px;
    border-radius: 8px;
    font-size: 1.1em;
    border: 2px solid #4b0082;
    width: 95%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

    .instructions p {
        margin: 0;
        font-weight: bold;
    }
/* Gallery Styling */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px;
    width: 97%;
    max-width: 100%;
    margin: 10px auto;
    margin-bottom: 50px;
}

.gallery-item {
    position: relative;
    border: 2px solid #4b0082;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(75, 0, 130, 0.5);
    padding: 10px;
    text-align: center;
    height: 370px;
}

    .gallery-item img {
        width: 100%;
        height: 280px;
        display: block;
        border-radius: 5px;
        object-fit: fill;
        padding-bottom: 5px;
    }

    .gallery-item:hover {
        transform: scale(1.05);
        box-shadow: 0 0 20px #4b0082;
    }

    .gallery-item .username {
        display: block;
        font-size: 16px;
        margin-bottom: 5px;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

.lightbox-info .username {
    font-weight: bold;
    margin-right: 5px;
}

.like-button {
    background-color: transparent !important;
    border: 2px solid #4b0082 !important;
    color: white !important;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.comment-button {
    background-color: transparent;
    border: 2px solid #4b0082;
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    margin-left: 10px;
}

    .like-button:hover:not(:disabled),
    .comment-button:hover:not(:disabled) {
        background-color: #4b0082;
        color: #fff;
    }

.like-comment {
    padding: 5px 0;
}

.like-button:disabled,
.comment-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.upload-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 20;
}

    .upload-overlay.show {
        display: flex;
    }

    .upload-overlay .overlay-content {
        background: #1a1a1a;
        padding: 25px;
        border: 3px solid #4b0082;
        border-radius: 10px;
        max-width: 500px;
        width: 90%;
        box-sizing: border-box;
        text-align: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    }

    .upload-overlay h2 {
        color: #4b0082;
        margin-top: 0;
        font-size: 28px;
        text-shadow: 1px 1px 2px rgba(75, 0, 130, 0.5);
    }

    /* Inside the existing <style> block */
    .upload-overlay input[type="file"],
    .upload-overlay textarea {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        background: #000;
        color: #fff;
        border: 2px solid #4b0082;
        border-radius: 5px;
        padding: 10px;
        box-sizing: border-box;
    }

    .upload-overlay input[type="text"] {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        background: #000;
        color: #fff;
        border: 2px solid #4b0082;
        border-radius: 5px;
        padding: 10px;
        box-sizing: border-box;
    }

    .upload-overlay textarea {
        height: 100px;
        resize: vertical;
    }

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 10;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-img {
    max-width: 80%;
    max-height: 80%;
    border: 4px solid #4b0082;
    border-radius: 10px;
    box-shadow: 0 0 30px #4b0082;
    margin-top: 60px;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2em;
    cursor: pointer;
    transition: color 0.3s;
}

    .close:hover {
        color: #4b0082;
    }

.comment-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 20;
    animation: fadeIn 0.4s ease;
}

    .comment-popup.show {
        display: flex;
    }

.comment-container {
    background: black;
    padding: 20px;
    border: 3px solid #4b0082;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

    .comment-container h3 {
        color: #4b0082;
        margin-top: 0;
        font-size: 24px;
    }

.comment-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.comment {
    background: #000;
    width: 90%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #4b0082;
    border-radius: 5px;
    color: #fff;
}

.comment-form textarea {
    width: 90%;
    height: 80px;
    background: #000;
    color: #fff;
    border: 2px solid #4b0082;
    border-radius: 5px;
    padding: 10px;
    resize: vertical;
    margin-bottom: 10px;
}

.comment-form button {
    background-color: #4b0082;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .comment-form button:hover {
        background-color: #fff;
        color: #4b0082;
    }

.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
}

#lightbox-description {
    margin: 0 0 10px 0;
    font-size: 16px;
    max-height: 100px;
    overflow-y: auto;
}

.lightbox-info .username {
    font-weight: bold;
    margin-right: 5px;
}

/* Heart Animation */
.heart {
    position: absolute;
    font-size: 40px;
    color: #ff69b4;
    pointer-events: none;
    animation: heartFade 1s ease-out forwards;
    z-index: 15;
}

@keyframes heartFade {
    0% {
        opacity: 1;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}
/* Footer */
.welcome-text {
    text-align: center;
    margin: 20px;
    color: #ddd;
    font-size: 1.2em;
    top-padding: 35px;
}

.gallery-item.member-upload .like-button,
.gallery-item.member-upload .comment-button {
    border: 2px solid #C8A000 !important;
}

    .gallery-item.member-upload .like-button:hover:not(:disabled),
    .gallery-item.member-upload .comment-button:hover:not(:disabled) {
        background-color: #C8A000;
        color: #000;
    }

.gallery-item.member-upload {
    border: 2px solid #C8A000;
    box-shadow: 0 0 15px rgba(200, 160, 0, 0.5);
}

    .gallery-item.member-upload:hover {
        box-shadow: 0 0 20px #C8A000;
    }

@media (max-width: 768px) {
    .top-strip h1 {
        font-size: 45px;
        padding-left: 30px;
    }

    .action-buttons {
        gap: 4px;
        margin: 4px 0;
    }

    .btn {
        padding: 12px 24px;
        font-size: 18px;
        margin: 3px;
        border: 3px solid #4b0082;
    }

    .back-to-top {
        display: block;
    }

    .pagination {
        margin-top: 10px;
    }

    .page-button {
        padding: 8px 16px;
        font-size: 14px;
    }

        .page-button.active {
            font-size: 14px;
        }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
        padding: 10px;
        width: 100%;
        max-width: 100%;
        margin: 10px auto;
        padding-left: 10px;
    }
    .gallery-item .username {
        display: block;
        font-size: 14px;
        margin-bottom: 5px;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    .top-strip {
        width: 105%;
        padding: 10px 5px;
        border-bottom: 3px solid #4b0082;
    }

    .nav-button, .btn {
        padding: 10px 15px;
        font-size: 16px;
    }

    .gallery-item {
        padding: 5px;
        height: 395px;
    }

        .gallery-item img {
            height: 210px;
        }

    .upload-overlay .overlay-content {
        padding: 20px;
        width: 95%;
    }

    .upload-overlay h2 {
        font-size: 24px;
    }

    .lightbox-img {
        max-width: 70%;
        max-height: 70%;
        border: 4px solid #4b0082;
        border-radius: 10px;
        box-shadow: 0 0 30px #4b0082;
    }

    .gallery-item:hover {
        transform: none;
        box-shadow: 0 0 15px rgba(75, 0, 130, 0.5);
    }

    .like-comment {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 0;
    }

    .like-button,
    .comment-button {
        display: block;
        width: 85%;
        max-width: 140px;
        margin: 6px 0;
        padding: 10px 20px;
        font-size: 14px;
        text-align: center;
    }

    .comment-button {
        margin-left: 0;
    }

    .lightbox-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 10px;
    }

    #lightbox-like-button,
    #lightbox-comment-button {
        display: block;
        width: 85%;
        max-width: 140px;
        margin: 6px 0;
        padding: 10px 20px;
        font-size: 14px;
        text-align: center;
    }

    #lightbox-comment-button {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .top-strip h1 {
        font-size: 32px;
    }


    .gallery-item {
        height: 345px;
    }

        .gallery-item img {
            height: 170px;
        }

    .upload-overlay h2 {
        font-size: 20px;
    }

    .action-buttons {
        gap: 3px;
        margin: 3px 0;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
        padding: 5px;
        width: 100%;
        padding-left: 10px;
        max-width: 100%;
        margin: 10px auto;
    }

    .btn {
        padding: 10px 20px;
        font-size: 16px;
        margin: 2px;
        border: 2px solid #4b0082;
        box-shadow: 0 1px 3px rgba(75, 0, 130, 0.3);
    }

    .lightbox-img {
        max-width: 70%;
        max-height: 70%;
        border: 2px solid #4b0082;
        border-radius: 10px;
        box-shadow: 0 0 30px #4b0082;
    }

    .like-comment {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 6px 0;
    }

    .like-button,
    .comment-button {
        width: 90%;
        max-width: 120px;
        margin: 5px 0;
        padding: 8px 16px;
        font-size: 13px;
    }

    .comment-button {
        margin-left: 0;
    }

    .lightbox-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 8px;
    }

    #lightbox-like-button,
    #lightbox-comment-button {
        width: 90%;
        max-width: 120px;
        margin: 5px 0;
        padding: 8px 16px;
        font-size: 13px;
    }

    #lightbox-comment-button {
        margin-left: 0;
    }
}
