body {
    background-color: #000;
    color: #33ff33;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery {
    text-align: center;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(51, 255, 51, 0.3);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    max-width: 200px; /* Set a max width for the card */
    display: inline-block; /* Change to inline-block to fit content height */
}

.card img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block; /* Prevent bottom space caused by inline-block */
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #33ff33;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
}

.caption {
    margin: 10px auto;
    text-align: center;
    color: #fff;
}

.close {
    position: absolute;
    top: 20px;
    left: 25px;
    color: #33ff33;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
}

.prev, .next {
    position: absolute;
    top: 50%;
    color: #33ff33;
    font-size: 30px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    transform: translateY(-50%);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev:hover, .next:hover {
    color: #fff;
}
