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

body {
    font-family: 'Liberation Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 { font-size: 1.5rem; }

nav { display: flex; gap: 10px; flex-wrap: wrap; }

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    background: #3498db;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover { background: #2980b9; }

main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.search-bar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-bar form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-bar input, .search-bar select {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.recipe-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.recipe-card:hover { transform: translateY(-5px); }

.recipe-card h3 { color: #2c3e50; margin-bottom: 10px; }

.recipe-card .meta { color: #7f8c8d; font-size: 0.9rem; margin-bottom: 15px; }

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover { background: #2980b9; }

.btn-secondary { background: #95a5a6; }

.btn-secondary:hover { background: #7f8c8d; }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

.recipe-detail {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.recipe-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 5px;
}

.ingredients pre {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    white-space: pre-wrap;
}

.procedure {
    line-height: 1.8;
}

.notes {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 5px;
}

.source {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #2c3e50;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
}

.login-container h1 { text-align: center; margin-bottom: 20px; }

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.empty { text-align: center; padding: 40px; color: #7f8c8d; }

@media (max-width: 768px) {
    header { flex-direction: column; gap: 15px; text-align: center; }
    
    .recipe-grid { grid-template-columns: 1fr; }
    
    .search-bar form { flex-direction: column; }
    
    .search-bar input, .search-bar select { width: 100%; }
}