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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #FFC845; /* PMS 1225 C Masa Yellow */
}

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

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    height: 64px;
}

/* Hero Section */
.hero {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Featured Recipe Section */
.featured-recipe-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.featured-recipe-container {
    display: flex;
    justify-content: center;
}

.featured-recipe-card {
    display: flex;
    max-width: 800px;
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    animation: slideIn 0.6s ease forwards;
}

.featured-recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.featured-recipe-image-container {
    position: relative;
    flex: 1;
    min-height: 300px;
}

.featured-recipe-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-recipe-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.featured-label {
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.featured-recipe-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.featured-recipe-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
    flex-wrap: wrap;
}

.featured-recipe-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-recipe-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    flex: 1;
}

.featured-nutrition-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.featured-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.featured-badge-green { background: #dcfce7; color: #166534; }
.featured-badge-blue { background: #dbeafe; color: #1e40af; }
.featured-badge-purple { background: #f3e8ff; color: #7c3aed; }
.featured-badge-orange { background: #fed7aa; color: #ea580c; }

.featured-recipe-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #2563eb;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    align-self: flex-start;
}

.featured-recipe-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #666;
    font-size: 1rem;
}

/* Search and Filter Section */
.search-filter-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Search Bar */
.search-container {
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e5e5;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #666;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: #666;
    transition: color 0.2s;
}

.clear-search:hover {
    color: #333;
}

.clear-search svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Category Filters */
.category-filters {
    margin-bottom: 1.5rem;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e5e5;
    border-radius: 9999px;
    background: white;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
}

.category-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.category-tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Controls Row */
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Quick Filters */
.quick-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-filter {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    background: white;
    color: #666;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-filter:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.quick-filter.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Sort Container */
.sort-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-container label {
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    background: white;
    color: #333;
    cursor: pointer;
    min-width: 150px;
}

/* Advanced Filters */
.advanced-filters {
    border-top: 1px solid #e5e5e5;
    padding-top: 1.5rem;
}

.toggle-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
}

.toggle-filters .chevron {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: transform 0.2s;
}

.toggle-filters.expanded .chevron {
    transform: rotate(180deg);
}

.filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-panel.expanded {
    max-height: 500px;
    padding-top: 1rem;
}

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

.filter-group h4 {
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    background: white;
    color: #666;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.filter-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.clear-filters, .apply-filters {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filters {
    background: white;
    border: 1px solid #e5e5e5;
    color: #666;
}

.clear-filters:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.apply-filters {
    background: #2563eb;
    border: 1px solid #2563eb;
    color: white;
}

.apply-filters:hover {
    background: #1d4ed8;
}

/* Results Summary */
.results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 1rem;
}

#results-count {
    font-weight: 500;
    color: #666;
}

.active-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.active-filter {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #2563eb;
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.active-filter button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
}

/* Recipe Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.recipe-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.recipe-card:nth-child(2) {
    animation-delay: 0.1s;
}

.recipe-card:nth-child(3) {
    animation-delay: 0.2s;
}

.recipe-card:nth-child(4) {
    animation-delay: 0.3s;
}

.recipe-card:nth-child(5) {
    animation-delay: 0.4s;
}

.recipe-card:nth-child(6) {
    animation-delay: 0.5s;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.recipe-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.recipe-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.recipe-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.nutrition-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #f3e8ff; color: #7c3aed; }
.badge-orange { background: #fed7aa; color: #ea580c; }

.recipe-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.recipe-button:hover {
    background: #1d4ed8;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.no-results-content h3 {
    color: #666;
    margin-bottom: 0.5rem;
}

.no-results-content p {
    color: #999;
    margin-bottom: 1.5rem;
}

.reset-button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.reset-button:hover {
    background: #1d4ed8;
}

/* Features Section */
.features {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.features h2 {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
}

.features-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.feature-item:nth-child(2) { animation-delay: 0.1s; }
.feature-item:nth-child(3) { animation-delay: 0.2s; }
.feature-item:nth-child(4) { animation-delay: 0.3s; }
.feature-item:nth-child(5) { animation-delay: 0.4s; }
.feature-item:nth-child(6) { animation-delay: 0.5s; }

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: #666;
    font-size: 0.875rem;
}

/* Loading and Error States */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 200, 69, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.error {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 200, 69, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.error-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.error-content h3 {
    color: #dc2626;
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .recipes-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .search-filter-section, .featured-recipe-section {
        padding: 1.5rem 1rem;
    }
    
    .features {
        padding: 2rem 1rem;
    }
    
    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quick-filters {
        justify-content: center;
    }
    
    .sort-container {
        justify-content: center;
    }
    
    .category-tabs {
        justify-content: flex-start;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    /* Featured Recipe Mobile Layout */
    .featured-recipe-card {
        flex-direction: column;
        max-width: none;
    }
    
    .featured-recipe-image-container {
        min-height: 250px;
    }
    
    .featured-recipe-content {
        padding: 1.5rem;
    }
    
    .featured-recipe-title {
        font-size: 1.5rem;
    }
    
    .featured-recipe-meta {
        gap: 0.75rem;
    }
    
    .featured-nutrition-badges {
        gap: 0.375rem;
    }
    
    .featured-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Icons */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}


/* Clickable Recipe Card Link */
.recipe-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.recipe-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.recipe-card-link .recipe-button {
    pointer-events: none;
}

