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

:root {
    /* Mint and Violet Color Palette */
    --mint-50: #f0fdf4;
    --mint-100: #dcfce7;
    --mint-200: #bbf7d0;
    --mint-300: #86efac;
    --mint-400: #4ade80;
    --mint-500: #22c55e;
    --mint-600: #16a34a;
    --mint-700: #15803d;
    --mint-800: #166534;
    
    --violet-50: #faf5ff;
    --violet-100: #f3e8ff;
    --violet-200: #e9d5ff;
    --violet-300: #d8b4fe;
    --violet-400: #c084fc;
    --violet-500: #a855f7;
    --violet-600: #9333ea;
    --violet-700: #7c3aed;
    --violet-800: #6b21a8;
    
    --gradient-primary: linear-gradient(135deg, var(--mint-400) 0%, var(--violet-500) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--violet-200) 0%, var(--mint-200) 100%);
    --gradient-accent: linear-gradient(45deg, var(--mint-300), var(--violet-300));
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 4rem 0;
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(168, 85, 247, 0.15);
    --shadow-medium: 0 8px 30px rgba(34, 197, 94, 0.2);
    --shadow-strong: 0 12px 40px rgba(107, 33, 168, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: #374151;
    background: linear-gradient(45deg, var(--mint-50) 0%, var(--violet-50) 100%);
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--violet-600);
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--violet-600);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--violet-600);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: radial-gradient(ellipse at center, var(--mint-100) 0%, var(--violet-100) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23a855f7" opacity="0.05"/><circle cx="80" cy="40" r="1" fill="%2322c55e" opacity="0.05"/><circle cx="40" cy="80" r="1" fill="%23a855f7" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cta-button {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-ingredients {
    position: relative;
    width: 300px;
    height: 300px;
}

.ingredient-icon {
    position: absolute;
    font-size: 3rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    animation: bounce 3s ease-in-out infinite;
}

.ingredient-icon:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.ingredient-icon:nth-child(2) {
    top: 10%;
    right: 30%;
    animation-delay: 0.5s;
}

.ingredient-icon:nth-child(3) {
    bottom: 30%;
    left: 10%;
    animation-delay: 1s;
}

.ingredient-icon:nth-child(4) {
    bottom: 20%;
    right: 20%;
    animation-delay: 1.5s;
}

.ingredient-icon:nth-child(5) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 2s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Section Titles */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Categories Section */
.categories {
    padding: var(--section-padding);
    background: rgba(255, 255, 255, 0.5);
}

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

.category-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(168, 85, 247, 0.1);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.category-card.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.category-card.active h3,
.category-card.active p {
    color: white;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(168, 85, 247, 0.3));
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.category-card p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Recipes Section */
.recipes-section {
    padding: var(--section-padding);
}

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

.recipe-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 85, 247, 0.1);
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.recipe-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-accent);
    position: relative;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.recipe-content {
    padding: 1.5rem;
}

.recipe-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

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

.recipe-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.recipe-link {
    display: inline-block;
    color: var(--violet-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.recipe-link:hover {
    color: var(--mint-600);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--violet-800) 0%, var(--mint-800) 100%);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Recipes Page Styles */
.recipes-hero {
    background: var(--gradient-primary);
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.recipes-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.recipes-hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.recipes-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.recipes-filter {
    background: #f8fafc;
    padding: 3rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.filter-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--violet-700);
    font-size: 1.8rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: white;
    border: 2px solid var(--violet-200);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--violet-700);
}

.filter-btn:hover {
    border-color: var(--violet-400);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 33, 168, 0.2);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: var(--violet-400);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 33, 168, 0.3);
}

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

.search-container {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--violet-200);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--violet-400);
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

.all-recipes-section {
    padding: 3rem 0;
}

.recipes-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.recipes-grid-header h3 {
    font-size: 1.8rem;
    color: var(--violet-700);
    margin: 0;
}

.results-count {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}

.recipe-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--violet-700);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.recipe-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.recipe-link.primary {
    flex: 1;
    text-align: center;
    margin-right: 0.5rem;
}

.recipe-action.secondary {
    background: none;
    border: 2px solid var(--violet-200);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.recipe-action.secondary:hover {
    border-color: var(--mint-400);
    background: var(--mint-50);
    transform: scale(1.1);
}

.loading-state {
    text-align: center;
    padding: 4rem 0;
    color: var(--violet-600);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--violet-200);
    border-top: 4px solid var(--violet-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.no-results-state {
    text-align: center;
    padding: 4rem 0;
    color: var(--violet-600);
}

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

.no-results-state h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--violet-700);
}

.clear-filters-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 33, 168, 0.3);
}

.test-popup-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

.test-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 33, 168, 0.3);
}

/* Active navigation link */
.nav-link.active {
    color: var(--mint-400);
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--mint-400);
    border-radius: 1px;
}

/* Responsive Design for Recipes Page */
@media (max-width: 768px) {
    .recipes-hero-title {
        font-size: 2.5rem;
    }
    
    .recipes-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .recipes-grid-header {
        flex-direction: column;
        text-align: center;
    }
    
    .search-container {
        max-width: 100%;
        margin: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .recipes-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}
