:root {
    --bg-light: #e9ecef;
    --bg-card: #f8f9fa;
    --bg-input: #ffffff;
    --text-primary: #000000;
    --text-secondary: #495057;
    --accent-blue: #007bff;
    --accent-blue-light: #0056b3;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue);
}

.logo-icon {
    font-size: 28px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}

nav a:hover {
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    padding: 60px 0;
    text-align: center;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), 
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f8f9fa"/><path d="M0 0L100 100M100 0L0 100" stroke="%23dee2e6" stroke-width="1"/></svg>');
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Search Section */
.search-section {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.search-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: var(--shadow);
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
    color: var(--text-primary);
}

.suggestion-item:hover {
    background-color: var(--bg-input);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.popular-dishes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.dish-tag {
    padding: 8px 16px;
    background-color: var(--bg-input);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.dish-tag:hover {
    background-color: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* Recommendations */
.recommendations {
    margin-bottom: 60px;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
    margin-left: 15px;
}

.recommendation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 480px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 280px;
    background-color: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.card-title {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.3;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-type {
    font-size: 13px;
    color: var(--accent-blue);
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.card-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 10px;
}

.availability {
    font-size: 13px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.availability.out-of-stock {
    color: var(--error);
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-blue-light);
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--accent-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    display: none;
    border: 1px solid #f5c6cb;
}

/* Meal Info */
.meal-info {
    background: var(--bg-input);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid var(--border-color);
}

.meal-info.active {
    display: block;
}

.meal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.meal-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.meal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meal-details h3 {
    margin-bottom: 5px;
    color: var(--accent-blue);
}

.meal-details p {
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--accent-blue);
}

.modal-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--accent-blue);
    text-align: center;
}

.modal-image {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    margin-bottom: 20px;
}

.modal-info-item {
    margin-bottom: 15px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border-left: 3px solid var(--accent-blue);
}

.modal-info-item strong {
    color: var(--text-primary);
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

.modal-info-item span {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

/* Catalog Section */
.catalog-section {
    display: none;
    margin-bottom: 60px;
}

.catalog-section.active {
    display: block;
}

.catalog-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.filter-btn:hover {
    border-color: var(--accent-blue);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* About Section */
.about-section {
    display: none;
    margin-bottom: 60px;
}

.about-section.active {
    display: block;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card i {
    font-size: 48px;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.about-card h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: auto;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-info {
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        gap: 15px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .search-container {
        flex-direction: column;
    }

    .recommendation-cards {
        grid-template-columns: 1fr;
    }

    .card {
        height: 450px;
    }

    .card-image {
        height: 230px;
    }

    .card-content {
        min-height: 180px;
    }

    .meal-header {
        flex-direction: column;
        text-align: center;
    }

    .modal-content {
        max-width: 95%;
        padding: 20px;
    }

    .modal-image {
        height: 250px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .card {
        height: 420px;
    }
    
    .card-image {
        height: 200px;
    }
    
    .card-content {
        min-height: 170px;
    }
    
    .recommendation-cards {
        gap: 20px;
    }

    .card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .availability {
        justify-content: center;
    }
    
    .dish-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}