:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --secondary: #fbbf24;
    --bg-light: #fef3c7;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40" opacity="0.1">🥢</text></svg>') repeat;
    opacity: 0.1;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.title-en {
    font-family: 'Inter', sans-serif;
}

.title-zh {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.8rem;
    opacity: 0.95;
}

.subtitle {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
}

/* Main */
.main {
    padding: 2rem 0 4rem;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 3.5rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    background: var(--border);
    color: var(--text-dark);
}

.search-tips {
    text-align: center;
    margin-top: 0.75rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.tip {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Filter Section */
.filter-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
}

.filter-tab:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

.filter-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary-dark);
}

.filter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-filter {
    padding: 0.4rem 0.9rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.badge-filter:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.badge-filter.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Results Info */
.results-info {
    margin-bottom: 1.5rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    text-align: center;
}

/* Dishes Grid */
.dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dish-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.dish-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.dish-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dish-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.view-images-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.view-images-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dish-content {
    padding: 1.25rem;
}

.dish-header {
    margin-bottom: 0.75rem;
}

.dish-name-en {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.dish-name-zh {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
}

.dish-pinyin {
    color: var(--text-gray);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.dish-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-spicy {
    background: #fee2e2;
    color: #dc2626;
}

.badge-vegetarian {
    background: #dcfce7;
    color: #16a34a;
}

.badge-popular {
    background: #fef3c7;
    color: #d97706;
}

.badge-mild {
    background: #dbeafe;
    color: #2563eb;
}

.dish-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.dish-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-gray);
}

.dish-calories {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dish-cooking {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

.no-results svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--border);
    transform: rotate(90deg);
}

.modal-image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-icon {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.modal-view-images-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-view-images-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.modal-body {
    padding: 2rem;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title-en {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-title-zh {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.modal-pinyin {
    color: var(--text-gray);
    font-size: 1rem;
    font-style: italic;
}

.modal-pronunciation {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section p,
.modal-section ul {
    color: var(--text-gray);
    line-height: 1.7;
}

.modal-section ul {
    list-style: none;
    padding-left: 0;
}

.modal-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.modal-section li:last-child {
    border-bottom: none;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stat-box {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.order-tip {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.order-tip h3 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.order-tip p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.5rem;
}

.chinese-phrase {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 1rem 0;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Footer */
.footer {
    background: var(--white);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-gray);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer p {
    margin: 0.5rem 0;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .title-zh {
        font-size: 1.5rem;
    }
    
    .dishes-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-stats {
        grid-template-columns: 1fr;
    }
}

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

.dish-card {
    animation: fadeIn 0.4s ease;
}
