:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #292f36;
    --light-color: #f7fff7;
    --accent-color: #ff9f1c;
    --gray-color: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.search-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.search-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray-color);
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.search-panel {
    display: none;
}

.search-panel.active {
    display: block;
}

.ingredient-input {
    display: flex;
    margin-bottom: 15px;
}

.ingredient-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.ingredient-input button {
    padding: 12px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.ingredient-input button:hover {
    background-color: #3dbeb6;
}

.ingredient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ingredient-tag {
    background-color: var(--light-color);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.ingredient-tag button {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    font-size: 0.8rem;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    background-color: white;
    color: var(--dark-color);
}

.name-input {
    display: flex;
}

.name-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-btn {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    display: block;
    margin: 20px auto 0;
}

.search-btn:hover {
    background-color: #ff5252;
}

.results-section {
    display: none;
}

.results-section h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.recipe-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.recipe-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.recipe-info {
    padding: 20px;
}

.recipe-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.recipe-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.recipe-description {
    font-size: 0.95rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: -webkit-box;
    /* -webkit-line-clamp: 3; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-recipe {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.view-recipe:hover {
    background-color: #ff5252;
}

.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.recipe-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    max-width: 800px;
    border-radius: 10px;
    padding: 30px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-color);
}

.modal-recipe-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.modal-recipe-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    color: var(--gray-color);
}

.modal-recipe-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.modal-ingredients h3, .modal-instructions h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.modal-ingredients ul {
    list-style: none;
}

.modal-ingredients li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.modal-ingredients li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.modal-instructions ol {
    list-style-position: inside;
}

.modal-instructions li {
    margin-bottom: 15px;
    padding-left: 5px;
}

.save-recipe {
    display: block;
    margin-top: 30px;
    padding: 12px 25px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.save-recipe:hover {
    background-color: #3dbeb6;
}

@media (max-width: 768px) {
    .modal-recipe-content {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
    }
}
/* Language Toggle Styles */
.language-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    gap: 10px;
}

.lang-btn {
    padding: 8px 15px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}