/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff6b6b;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.search-container {
    display: flex;
    gap: 0.5rem;
}

#searchInput {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
}

#searchBtn {
    padding: 0.5rem 1rem;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Main content styles */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Categories section */
.categories-section {
    margin-bottom: 2rem;
}

.categories-container {
    margin-top: 1rem;
}

.categories-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.categories-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.category-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem;
    min-width: 100px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.category-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.category-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

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

.recipe-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recipe-card-content {
    padding: 1rem;
}

.recipe-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Enhanced Recipe Detail styles */
.recipe-detail {
    max-width: 800px;
    margin: 0 auto;
}

.recipe-header {
    text-align: center;
    margin-bottom: 2rem;
}

.recipe-area,
.recipe-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.5rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
}

.recipe-image {
    text-align: center;
    margin-bottom: 2rem;
}

.recipe-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ingredients-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    list-style: none;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

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

.instruction-step {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    position: relative;
}

.step-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 0.5rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ff0000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.video-link:hover {
    background: #cc0000;
}

/* Loading animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Footer Styles */
.desktop-footer {
    background-color: #fff;
    padding: 3rem 1rem;
    margin-top: 4rem;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

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

.footer-content {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    text-align: center;
}

.footer-section h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.social-links a {
    color: #666;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ff6b6b;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ff6b6b;
}

.copyright {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* Recommended Tools Section */
.recommended-tools {
    margin: 3rem 0;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 12px;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.tool-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem;
    position: relative;
    margin-top: 16px;
}

.tool-badge {
    position: absolute;
    top: -16px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 1;
    white-space: nowrap;
    transform: translateY(0);
    backface-visibility: hidden;
}

.tool-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.tool-content h4 {
    color: #333;
    margin: 0;
    padding-right: 100px;
}

.tool-content p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: auto;
}

.tool-link:hover {
    color: #ff5252;
}

/* Random Recipe Tool */
.random-recipe-section {
    margin: 2rem 0;
    padding: 2rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.random-recipe-section h2 {
    color: #333;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.random-recipe-section p {
    margin-bottom: 1.5rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.random-recipe-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.random-recipe-btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

.random-recipe-btn i {
    font-size: 1.1rem;
}

.random-recipe-result {
    margin-top: 1.5rem;
    display: none; /* Initially hidden */
}

.random-recipe-result.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.random-recipe-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.random-recipe-card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.random-recipe-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.random-recipe-card p {
    margin-bottom: 1.2rem;
    color: #555;
    font-size: 0.95rem;
}

.view-recipe-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.view-recipe-btn:hover {
    background-color: #555;
}

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

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

.random-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    display: none;
}

.random-spinner.active {
    display: inline-block;
}

/* Add media queries for the random recipe tool */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-left {
        flex-direction: column;
        margin-bottom: 0.5rem;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-container {
        width: 100%;
    }

    .category-card {
        min-width: 90px;
        padding: 0.5rem;
    }

    .category-thumb {
        width: 40px;
        height: 40px;
    }

    .category-card span {
        font-size: 0.8rem;
    }

    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .categories-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .ingredients-list {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 2% auto;
        padding: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links,
    .footer-links {
        justify-content: center;
    }

    .footer-links {
        align-items: center;
    }

    .tool-content h4 {
        padding-right: 0;
        padding-top: 0.5rem;
    }

    .tool-badge {
        right: 50%;
        transform: translateX(50%);
        top: -14px;
    }

    .random-recipe-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .random-recipe-card {
        padding: 1rem;
    }
    
    .random-recipe-card img {
        width: 150px;
        height: 150px;
    }
}

/* Ensure all headings use Plus Jakarta Sans */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
} 