:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --secondary-color: #2c3e50;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    padding-top: 150px;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.search-container {
    display: flex;
    flex: 1;
    max-width: 500px;
}

#search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-size: 1rem;
}

#search-button:hover {
    background: var(--primary-dark);
}

/* Categories */
.categories-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--secondary-color);
    z-index: 999;
    padding: 10px 0;
    overflow-x: auto;
}

.categories-scroll {
    display: flex;
    gap: 8px;
    padding: 0 5px;
}

.category-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-btn:hover {
    background: rgba(255,255,255,0.2);
}

.category-btn.active {
    background: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 0;
}

.spinner {
    border: 4px solid rgba(0,0,0,0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Recipes Container */
.recipes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

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

/* Recipe Card */
.recipe-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

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

.recipe-image {
    height: 200px;
    background: var(--light-gray);
    background-size: cover;
    background-position: center;
    position: relative;
}

.recipe-time {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.recipe-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recipe-category {
    display: inline-block;
    background: var(--light-gray);
    color: var(--dark-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
    align-self: flex-start;
}

.recipe-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
    line-height: 1.4;
}

.recipe-ingredients {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* No Recipes */
.no-recipes {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-recipes i {
    font-size: 3rem;
    color: var(--light-gray);
    margin-bottom: 15px;
}

.no-recipes h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.reset-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
}

.reset-btn:hover {
    background: var(--primary-dark);
}

.hidden {
    display: none !important;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

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

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding-top: 140px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .categories-nav {
        top: 115px;
    }
    
    .recipes-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 160px;
    }
    
    .categories-nav {
        top: 135px;
    }
    
    .recipes-container {
        grid-template-columns: 1fr;
    }
                                      }
