body {
    font-family: 'Garamond', 'Georgia', serif;
    margin: 0;
    padding: 0;
    background-color: #e0e0e0;
    /* Slightly darker grey for a more refined look */
    color: #333;
}

body.dark-mode {
    background-color: #333;
    color: #f0f0f0;
}

header {
    background-color: #8B0000;
    /* Dark red, resembling wine */
    color: white;
    padding: 1rem;
    text-align: center;
}

main {
    padding: 2rem;
}

button {
    background-color: #8B0000;
    /* Dark red, resembling wine */
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    height: 2.5rem;
    /* Set a consistent height for all buttons */
    border-radius: 4px;
    /* Smooth edges for all buttons */
}

button:hover {
    background-color: #A52A2A;
    /* Brownish red, resembling spices */
}

button.dark-mode {
    background-color: #555;
    color: #fff;
}

#main_courses ul {
    list-style-type: none;
    margin-left: 1rem;
    padding-left: 0;
    /* Apply consistent no-indent style */
}

.ingredients-list li::before {
    content: "- ";
    color: #333;
}

.steps-list li::before {
    content: none;
}

a {
    color: #0000ff;
    /* Bright blue for normal mode */
}

a:visited {
    color: #4169e1;
    /* Royal blue for visited links in normal mode */
}

body.dark-mode a {
    color: white;
    /* White links for better contrast in dark mode */
}

body.dark-mode a:visited {
    color: #d3d3d3;
    /* Light grey for visited links in dark mode */
}

footer {
    text-align: center;
    padding: 0.2rem;
    background-color: #f8f8f8;
    border-top: 1px solid #ddd;
    font-size: 0.9rem;
}

body.dark-mode footer {
    background-color: #444;
    color: #f0f0f0;
    border-top: none;
    /* Remove the white line above the footer in dark mode */
}

section {
    margin: 1rem 0;
    /* Ensure consistent vertical spacing */
    padding: 0;
    /* Remove extra padding */
}

section ul {
    list-style-type: none;
    margin-left: 1rem;
    /* Apply consistent indent transcending course type */
    padding-left: 0;
}

section h2 {
    text-align: center;
}

#search-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

#search-input {
    width: 60%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#search-button {
    display: none;
    /* Hide the search button */
}

#reset-button {
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#reset-button:hover {
    background-color: #A52A2A;
}

#randomize-button {
    padding: 0.5rem 1rem;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 1rem auto;
    display: block;
    text-align: center;
}

#randomize-button:hover {
    background-color: #A52A2A;
}


/* Commented out styles for the translation container */


/*
#translation-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

#language-select {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 0.5rem;
}

#translate-button {
    padding: 0.5rem 1rem;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#translate-button:hover {
    background-color: #A52A2A;
}
*/

.recipe-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Ensures all child elements, including the image, are centered */
    justify-content: center;
    /* Centers content vertically if needed */
    margin-bottom: 1rem;
}

.recipe-item img {
    max-width: 100px;
    margin: 0 auto 0.5rem auto;
    /* Ensures the image is centered */
    display: block;
    border-radius: 4px;
    object-fit: cover;
}

#recipe-additional-details img {
    max-width: 500px;
    margin: 10px auto;
    display: block;
    border-radius: 4px;
    object-fit: cover;
}

@media (max-width: 768px) {
    header {
        text-align: center;
        padding: 0.5rem;
    }
    main {
        padding: 1rem;
    }
    section ul {
        margin-left: 0;
        padding-left: 0;
    }
    button {
        width: 100%;
        padding: 0.5rem;
    }
    footer {
        font-size: 0.8rem;
    }
    #reset-button {
        width: auto;
        padding: 0.5rem;
    }
    .recipe-item {
        align-items: center;
        /* Reapply centering for smaller screens */
    }
    .recipe-item img {
        margin: 0 auto 0.5rem auto;
        /* Ensure centering on smartphones */
    }
    #recipe-additional-details img {
        margin: 10px auto;
        display: block;
    }
}