* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f2ed;
    line-height: 1.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #b8956d;
    padding: 20px 25px;
    text-align: center;
}

.header h1 {
    color: white;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Search Section */
.search-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-bar {
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;

}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fafafa;
}

.search-input:focus {
    outline: none;
    border-color: #b8956d;
    background-color: white;
}

.filters {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 20px;
}

.filter-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
}

.radio-item input[type="radio"] {
    margin-right: 10px;
    accent-color: #b8956d;
}

.radio-item:first-child .radio-label {
    background-color: #b8956d;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.radio-item:first-child input[type="radio"]:not(:checked) + .radio-label {
    background-color: #e5e5e5;
    color: #666;
}

.radio-label {
    font-size: 14px;
    color: #333;
    user-select: none;
}

.search-btn {
    display: none; /* Hidden since we auto-submit */
}

/* Recipes Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.recipe-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.recipe-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #e5e5e5;
    border: 2px dashed #ccc;
}

.placeholder-text {
    color: #999;
    font-size: 18px;
    font-weight: 500;
}

.recipe-info {
    padding: 16px;
}

.recipe-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.recipe-meta {
    margin-bottom: 8px;
}

.recipe-time {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.recipe-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tag {
    background-color: #f0f0f0;
    color: #666;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* No recipes message */
.no-recipes {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 20px 0;
}

.step-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-links a {
    color: #b8956d;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.step-links a:hover {
    background-color: #f0f0f0;
}

.current {
    color: #333;
    font-weight: 500;
    padding: 8px 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 15px;
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .search-section {
        padding: 20px;
    }

    .filters {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .recipe-image {
        height: 150px;
    }

    .step-links {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .recipes-grid {
        grid-template-columns: 1fr;
    }

    .recipe-image {
        height: 200px;
    }
}

.nutrition-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nutriscore {
    text-align: center;
    margin-bottom: 20px;
}

.nutriscore-badge {
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 24px;
    line-height: 60px;
    text-align: center;
}

.nutriscore-a { background-color: #038141; }
.nutriscore-b { background-color: #85bb2f; }
.nutriscore-c { background-color: #fecb02; }
.nutriscore-d { background-color: #ee8100; }
.nutriscore-e { background-color: #e63e11; }

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.nutrition-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.label {
    font-weight: 500;
    color: #666;
}

.value {
    font-weight: bold;
    color: #333;
}