body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
}

h1 {
    text-align: center;
    font-weight: 300;
    margin-bottom: 30px;
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1000px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Removed 4 column layout as requested */

.gallery-item {
    background: #1e1e1e;
    padding: 15px;
    /* Slightly more padding for frame effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, background-color 0.2s;
    text-align: center;
    border-radius: 4px;
}

.gallery-item:hover {
    transform: scale(1.02);
    background: #2a2a2a;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 2px;
}

/* Detail View */
.view-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
    padding: 20px;
    box-sizing: border-box;
}

.view-image {
    max-width: 100%;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.view-container h1 {
    margin-bottom: 5px;
    margin-top: 0;
    font-size: 2em;
    /* Ensure it looks like a heading */
}

.nav-links {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 16px;
    z-index: 100;
}

.nav-links a {
    text-decoration: none;
    color: #aaa;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
}

/* Pagination links at bottom */
a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #fff;
}