/* ===== Global Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.flex-content {
    flex: 1; /* Nimmt den restlichen Platz zwischen Header und Footer ein */
}

body {
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.5;
}

/* ===== Header ===== */
header {
    background-color: #ff7043;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 1.5em;
}

#menuBtn {
    background: #fff;
    color: #ff7043;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* ===== Content Container ===== */
.container {
    flex: 1; /* nimmt den Platz zwischen Header und Footer */
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
}

/* ===== Cards (Rezepte/Kategorien) ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

.card h3 {
    margin-bottom: 5px;
    color: red; /* Autorennamen auf Karten in rot */
}

/* ===== Buttons ===== */
button, .openRecipeBtn, .backBtn {
    background-color: #ff7043;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 5px;
    display: inline-block;
    font-size: 0.9em;
    transition: background 0.3s;
}

button:hover, .openRecipeBtn:hover, .backBtn:hover {
    background-color: #ff5722;
}

/* ===== Modals (Popups) ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 15px;
}

.modal-content input, .modal-content textarea, .modal-content select {
    width: 90%;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* ===== Recipe Full View ===== */
.recipe-full img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.recipe-full h2 {
    margin-bottom: 5px;
}

.recipe-full section {
    margin-bottom: 15px;
}

/* ===== Footer ===== */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 12px 20px;
    width: 100%;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== Forms ===== */
form input, form textarea, form select {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* ===== Dashboards ===== */
#recipeList, #userList, #categoryList, #userRecipeList {
    list-style: none;
    margin-top: 10px;
    padding-left: 0;
}

#recipeList li, #userList li, #categoryList li, #userRecipeList li {
    background: white;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px){
    header h1 { font-size: 1.2em; }
    #menuBtn { padding: 6px 10px; }
}

/* ===== Menü-Popup ===== */
#menuModal {
    display: none; /* Standard: unsichtbar */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

#menuContent {
    background: #ff7043; /* orangener Hintergrund passend zum Header */
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    width: 250px;
    max-width: 90%;
}

#menuContent nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#menuContent nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

#menuContent nav a:hover {
    background-color: #ff5722;
}