/* General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background-image: url('images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #37a9e9;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

/* Logo Styling */
.logo-container {
    position: absolute;
    top: 10px;
    left: 10px;
}

.logo {
    width: 200px;
    height: auto;
}

/* Title and Headers */
h1.site-title {
    font-size: 3rem;
    color: #37a9e9;
    margin-top: 80px;
}

h2 {
    font-size: 1.5rem;
    color: #37a9e9;
    margin-bottom: 10px;
}

/* Meme button container */
.options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    justify-items: center;
    max-width: 800px;
    margin-bottom: 20px;
}

/* Image Button Styling */
button {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

button img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.2s ease-in-out;
}

/* Hover and Selected State */
button img:hover {
    transform: scale(1.05);
}

button.selected img {
    border: 3px solid #37a9e9;
}

/* Generate and Download Buttons */
button.action-btn {
    padding: 10px 20px;
    margin-top: 20px;
    font-size: 1rem;
    color: #37a9e9;
    background-color: #333;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    width: 150px;
}

button.action-btn:hover {
    background-color: #555;
}

/* Hide the meme preview by default */
#preview-container {
    display: none;
    /* Keep it hidden until meme is generated */
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

#preview {
    max-width: 90%;
    max-height: 400px;
    border: 2px solid #37a9e9;
    border-radius: 10px;
    object-fit: contain;
}

/* New class to show the meme preview once generated */
#preview-container.show {
    display: flex;
    /* Only show when meme is generated */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    h1.site-title {
        display: none;
        /* Hide title on mobile */
    }

    .logo-container {
        position: static;
        /* Center the logo */
        margin: 0 auto;
    }

    .logo {
        max-width: 150px;
        /* Adjust logo size for mobile */
    }

    .options {
        grid-template-columns: repeat(2, 1fr);
        /* Two columns for memes */
    }
}