* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
}

body {
    display: none;
    background: linear-gradient(-45deg, #ffffff, #e8c78f, #ffffff, #cfcfcf);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

header,
footer {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
}

h1 {
    font-size: xx-large;
    text-shadow: 3px 4px 9px #0000001f;
    font-weight: 800;
    color: #484848;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    padding: 30px;
    flex: 1;
}

.box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 18px 14px 20px rgb(42 42 42 / 12%);
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.box:hover {
    transform: scale(1.05);
}

.box img {
    width: auto;
    height: 70%;
    margin-top: 20px;
}

.box h3 {
    color: #191919;
    font-size: 12px;
}

.ref {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #004aad;
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
}

footer p {
    font-size: 11px;
    color: #33333333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: scroll;
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
}

#close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: #d44165;
    font-size: 24px;
    cursor: pointer;
}

.modal-actions {
    margin-top: 15px;
}

#download-btn {
    background: #00ad51;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    transition: 0.3s;
}

#download-btn:hover {
    background: #0066ff;
}