/* General Styling */
body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4; /* Light gray background */
    color: #333; /* Dark gray text */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    width: 100%;
    padding: 1rem;
    background-color: #2c3e50; /* Muted dark blue */
    color: #ecf0f1; /* Light gray */
    text-align: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

main {
    width: 90%;
    max-width: 900px;
    margin: 2rem auto;
    background: #ffffff; /* White background */
    border-radius: 15px;
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

#controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

#controls input,
#controls select,
#controls button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background: #3498db; /* Soft blue */
    color: #fff; /* White text */
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#controls input:hover,
#controls select:hover,
#controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
    background: #2980b9; /* Slightly darker blue */
}

#canvas-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

#memeCanvas {
    border: 2px solid #3498db; /* Blue border */
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #ecf0f1;
}

#gallery {
    text-align: center;
    margin-top: 2rem;
}

#gallery h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #2c3e50; /* Muted dark blue */
}

#galleryContent img {
    max-width: 150px;
    max-height: 150px;
    border: 2px solid #3498db;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

#galleryContent img:hover {
    transform: scale(1.1);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.4);
}

footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 1rem 0;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }

    main {
        padding: 1rem;
    }

    #controls {
        flex-direction: column;
        align-items: center;
    }

    #controls input,
    #controls select,
    #controls button {
        width: 100%;
        text-align: center;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    #memeCanvas {
        width: 100%;
        height: auto;
    }

    #gallery h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    #controls {
        gap: 0.5rem;
    }

    #controls input,
    #controls select,
    #controls button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    #gallery h2 {
        font-size: 1.25rem;
    }

    #galleryContent img {
        max-width: 120px;
        max-height: 120px;
    }
}
