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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #11a86c7a 0%, #00613a 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 40px 20px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.search-bar {
    background: white;
    padding: 15px;
    border-radius: 50px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.search-bar input {
    width: 100%;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: 1.1em;
    background: transparent;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.filter-section {
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-section label {
    font-weight: bold;
    margin-right: 10px;
    color: #333;
}

.filter-section select {
    padding: 8px 15px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    background: white;
    outline: none;
}

.filter-section select:hover {
    border-color: #5568d3;
}

.random-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.random-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.clear-filters-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-filters-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.filter-btn {
    background: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.recipe-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.recipe-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.recipe-content {
    padding: 20px;
}

.recipe-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.recipe-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #666;
}

.recipe-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85em;
    margin-top: 10px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-body {
    padding: 30px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1001;
}

.close-btn:hover {
    background: #f0f0f0;
}

.modal-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #333;
}

.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
}

.section-title {
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #667eea;
}

.ingredients-list {
    list-style: none;
    padding: 0;
}

.ingredients-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.ingredients-list li:before {
    content: "✓ ";
    color: #667eea;
    font-weight: bold;
    margin-right: 10px;
}

.serving-adjuster {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.serving-adjuster label {
    font-weight: bold;
    color: #333;
}

.serving-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.serving-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
}

.serving-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.serving-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: scale(1);
}

.serving-count {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    min-width: 40px;
    text-align: center;
}

.instructions-list {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
}

.instructions-list li {
    counter-increment: step-counter;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
    padding-left: 60px;
}

.instructions-list li:before {
    content: counter(step-counter);
    position: absolute;
    left: 15px;
    top: 15px;
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.no-results {
    text-align: center;
    color: white;
    font-size: 1.5em;
    padding: 60px 20px;
}