/* I have tried my best with this CSS. I know some of this is redundant. I have broke it so many time I am scared to remove anything at this point */
label {
    display: block;
    margin: 5px 0;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    margin: 20px 0;
}

td, th {
    padding: 8px;
    border-bottom: 1px solid #aaa;
    text-align: left;
    color: white;
}

tr:hover td {
    background-color: #f5f5f5;
    color: #333;
}

th {
    background-color: #4CAF50;
    color: white;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

h1, h2 {
    color: #333;
    margin-bottom: 20px;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"],
.button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
}

input[type="submit"]:hover,
.button:hover {
    background-color: #45a049;
    text-decoration: none;
}

a {
    color: #333;
    text-decoration: none;
}

a:hover {
    color: #4CAF50;
    text-decoration: underline;
}

blockquote {
    background-color: #e8f5e9;
    border-left: 5px solid #4CAF50;
    padding: 15px;
    margin: 20px 0;
}

form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.update-form {
    padding: 20px;
    background: #f9f9f9;
    margin: 10px 0;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.button-small {
    padding: 5px 10px;
    font-size: 0.9em;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.button-small:hover {
    background: #45a049;
}

.search-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.recipe-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recipe-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin: 10px 0;
    font-size: 0.9em;
}

.recipe-rating {
    color: #f39c12;
    margin: 10px 0;
}

.recipe-author {
    color: #666;
    font-style: italic;
    font-size: 0.9em;
}

.button-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
}

.button-secondary:hover {
    background: #e9e9e9;
    text-decoration: none;
}

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

.form-hint {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.review-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.review-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-rating {
    color: #f39c12;
}

.review-author {
    color: #666;
}

.review-text {
    margin: 0;
    line-height: 1.6;
}

.ingredient-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.ingredient-select,
.ingredient-input,
.amount-input {
    flex: 1;
}

.remove-ingredient {
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.remove-ingredient:hover {
    background: #c82333;
}


.table-container {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.table-container a {
    color: white;
    text-decoration: none;
}

.table-container tr:hover a {
    color: #333;
}


@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .ingredient-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .remove-ingredient {
        align-self: flex-end;
    }
}