
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    font-family: system-ui, sans-serif;
    background: #181818;
    color: #eee;
}

header {
    text-align: center;
    margin-bottom: 25px;
}

h1 {
    margin-bottom: 5px;
}

#updated {
    color: #aaa;
    font-size: 0.9rem;
}

.meme-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 12px;
    max-width: 1600px;
    margin: 0 auto;
}

.meme-card {
    min-width: 0;
    min-height: 0;
    padding: 8px;
    background: #282828;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.meme-card img {
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1;
    object-fit: contain;
}

.meme-name {
    width: 100%;
    padding-top: 8px;
    text-align: center;
    font-size: 0.85rem;
    color: #ddd;
    overflow-wrap: anywhere;
}

footer {
    text-align: center;
    margin-top: 25px;
    color: #888;
}

a {
    color: #80bfff;
}

/* Smaller screens */
@media (max-width: 700px) {
    .meme-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }

    .meme-card {
        aspect-ratio: 1 / 1;
    }
}
