@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Playfair+Display:wght@700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

:root {
    --primary: #D35400; /* Terrakotta */
    --secondary: #2C3E50; /* Anthrazit */
    --background: #FDF8F5; /* Cremeweiß */
    --white: #FFFFFF;
    --text: #333333;
    --error: #E74C3C;
    --success: #27AE60;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    line-height: 1.8;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    margin-top: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 0;
    margin-bottom: 3rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--secondary);
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--secondary);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 700;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary);
}

nav button {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
    padding: 6px 15px;
    border-radius: 20px;
    margin-left: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

nav button:hover {
    background: var(--error);
    color: var(--white);
}

/* Cards */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Auth Forms */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #DDD;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

button.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, background 0.3s;
}

button.btn-primary:hover {
    background: #BF4D00;
    transform: translateY(-2px);
}

#toggle-auth {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

/* Recipe Grid */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.recipe-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.recipe-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.recipe-card-content {
    padding: 1.5rem;
}

.recipe-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
}

.recipe-card .category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
}

/* Recipe Details */
.recipe-detail-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .recipe-detail-container {
        grid-template-columns: 1fr;
    }
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    nav a {
        margin-left: 0;
        margin-right: 1rem;
    }
}

.recipe-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.recipe-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.recipe-meta {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #EEE;
    color: #777;
}

.ingredient-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.ingredient-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #DDD;
    display: flex;
    align-items: center;
}

.ingredient-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    margin-right: 10px;
}

.instructions-text {
    white-space: pre-wrap;
    font-size: 1.1rem;
}

/* Buttons in Content */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
}

.btn-edit {
    background: var(--secondary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-delete {
    background: var(--error);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.message.error { background: #FDEAEA; color: var(--error); }
.message.success { background: #EBF9EE; color: var(--success); }

/* Form Controls */
.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}
