/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #fef7f0 0%, #fff5ee 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #ff6b35 0%, #f56a00 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.tagline {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
}

.nav {
    flex: 1;
    max-width: 400px;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15), 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    opacity: 0.6;
    pointer-events: none;
}

/* Main Content */
.main {
    padding: 3rem 0;
}

/* Filters Section */
.filters-section {
    margin-bottom: 3rem;
    text-align: center;
}

.filters-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ff6b35, #d32f2f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b35, #f56a00);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    border-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.filter-icon {
    font-size: 1.125rem;
}

/* Results Counter */
.results-counter {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    color: #4a5568;
    font-weight: 500;
}

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

/* Recipe Card */
.recipe-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.recipe-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #ff6b35, #f56a00);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.05);
}

.recipe-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #2d3748;
    line-height: 1.3;
}

.recipe-description {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.recipe-times {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.time-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.time-icon {
    font-size: 1rem;
}

.recipe-details {
    display: grid;
    gap: 1.5rem;
}

.recipe-details h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ingredients h4::before {
    content: '🥄';
    font-size: 1.125rem;
}

.instructions h4::before {
    content: '📝';
    font-size: 1.125rem;
}

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

.ingredients li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f7fafc;
    position: relative;
    padding-left: 1.5rem;
}

.ingredients li::before {
    content: '•';
    color: #ff6b35;
    font-size: 1.25rem;
    position: absolute;
    left: 0;
    top: 0.5rem;
}

.ingredients li:last-child {
    border-bottom: none;
}

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

.instructions li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f7fafc;
    position: relative;
    padding-left: 2.5rem;
    counter-increment: step-counter;
}

.instructions li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0.75rem;
    background: linear-gradient(135deg, #ff6b35, #f56a00);
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.instructions li:last-child {
    border-bottom: none;
}

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

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
}

.no-results p {
    color: #4a5568;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-credit {
    text-align: right;
}

.footer-credit p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-credit strong {
    color: #ff6b35;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .filters {
        gap: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .recipe-times {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-credit {
        text-align: center;
    }
    
    .filters-section h2 {
        font-size: 1.875rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .recipe-content {
        padding: 1rem;
    }
    
    .recipe-title {
        font-size: 1.25rem;
    }
    
    .filters-section h2 {
        font-size: 1.5rem;
    }
    
    .main {
        padding: 2rem 0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-out {
    animation: fadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Loading Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth transitions for filtering */
.recipe-card.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.recipe-card.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}