/* CSS Variables for Theme Switching */
:root {
    /* Light Theme (Default) */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-header: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #ffffff;
    --border-color: #ecf0f1;
    --shadow: 0 8px 25px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.15);
    --accent-color: #3498db;
    --price-color: #e74c3c;
    --popularity-color: #f39c12;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-header: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-light: #ffffff;
    --border-color: #404040;
    --shadow: 0 8px 25px rgba(0,0,0,0.3);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.4);
    --accent-color: #4fc3f7;
    --price-color: #ff6b6b;
    --popularity-color: #ffd54f;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: var(--bg-header);
    color: var(--text-light);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header h2 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 15px;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
    opacity: 0.9;
}

/* Restaurant Info Bar - Simplified */
.restaurant-info {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}

.restaurant-info h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.info-item {
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.info-item h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.info-item p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Social Media & Map Links */
.social-links {
    text-align: center;
    margin-bottom: 25px;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Categories Grid */
.categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

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

/* Category Image Overlay */
.category-image-container {
    position: relative;
    overflow: hidden;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--text-light);
    padding: 15px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.category-card:hover .category-overlay {
    transform: translateY(-3px);
}

.category-overlay h3 {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.category-overlay p {
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.item-count {
    background: var(--accent-color);
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.popularity {
    color: var(--popularity-color);
    font-size: 0.8rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Menu Items Grid */
.menu-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.menu-item-card {
    background: var(--bg-secondary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

.menu-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.menu-item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Menu Item Image Overlay */
.menu-item-image-container {
    position: relative;
    overflow: hidden;
}

.menu-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: var(--text-light);
    padding: 15px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.menu-item-card:hover .menu-item-overlay {
    transform: translateY(-3px);
}

.menu-item-overlay h2 {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.menu-item-overlay p {
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 10px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.menu-item-price-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--price-color);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.menu-item-content {
    padding: 20px;
}

.menu-item-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.menu-item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.detail-item i {
    color: var(--accent-color);
    width: 14px;
}

.menu-item-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    background: none;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    background: var(--accent-color);
    color: var(--text-light);
}

.action-btn.favorited {
    background: var(--price-color);
    border-color: var(--price-color);
    color: var(--text-light);
}

/* Search and Filters */
.search-container {
    margin-bottom: 25px;
    text-align: center;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.filters-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--accent-color);
    background: var(--bg-secondary);
    color: var(--accent-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Back Button */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.back-link:hover {
    background: var(--accent-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header h2 {
        font-size: 1.3rem;
    }
    
    .categories-list,
    .menu-items-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .menu-item-details {
        grid-template-columns: 1fr;
    }
    
    .social-links a {
        margin: 5px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .category-overlay,
    .menu-item-overlay {
        padding: 12px;
    }
    
    .category-overlay h3,
    .menu-item-overlay h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 25px 15px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .search-input {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .category-overlay,
    .menu-item-overlay {
        padding: 10px;
    }
    
    .category-overlay h3,
    .menu-item-overlay h2 {
        font-size: 1.1rem;
    }
    
    .theme-toggle {
        top: 15px;
        right: 15px;
        padding: 8px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card,
.menu-item-card {
    animation: fadeInUp 0.5s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
