/* --- Gallery Container --- */
.simple-gallery {
    column-count: 2;
    column-gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding-bottom: 200px;
}

.gallery-item {
    background-color: #1a1a2e;
    border: 2px solid #a584e4;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(165, 132, 228, 0.5);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    margin-bottom: 20px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    backface-visibility: hidden;
}

.gallery-item:hover {
    border-color: #ffcc00;
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.7);
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0;
}

.desc {
    padding: 12px 16px;
    font-size: 0.9em;
    color: #e0e0e0;
    background-color: #1a1a2e;
    text-align: center;
}


.messier-container {
    max-height: 300px;
    max-width: fit-content;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 8px;
    background: #20232a;
}

.messier-container ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.messier-container li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.messier-container li:last-child {
    border-bottom: none;
}

#checked-count {
    font-weight: bold;
    margin-top: 10px;
    color: #ffcc00;
}

/* --- Media Queries for Responsiveness --- */
/* For tablets and medium-sized screens, use 3 columns */
@media (min-width: 768px) {
    .simple-gallery {
        column-count: 3;
    }
}

/* For desktops and large screens, use 4 columns */
@media (min-width: 1024px) {
    .simple-gallery {
        column-count: 4;
    }
}