:root {
    /* Color Palette - Light Mode (Default) */
    --primary: #FF5722;
    /* Vibrant Orange */
    --primary-hover: #E64A19;
    --secondary: #2196F3;
    /* Modern Blue */
    --accent: #FFC107;
    /* Golden Yellow */
    --background: #F8F9FA;
    --surface: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --border: #E0E0E0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --primary: #FF7043;
    --primary-hover: #FF8A65;
    --secondary: #42A5F5;
    --accent: #FFD54F;
    --background: #0F1115;
    --surface: #181A20;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B3B8;
    --border: #2D3035;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(24, 26, 32, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* Header */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 90px;
}

.brand img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Theme-based Logo Visibility */
.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.brand span {
    color: var(--primary);
}

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

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(128, 128, 128, 0.1);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.1) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Filter/Search */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-input {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    width: 300px;
    font-family: inherit;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.2);
}

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

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-image {
    height: 160px;
    background-color: var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-secondary);
    font-weight: 900;
    background-size: cover;
    background-position: center;
}

/* Overlay gradient for text readability on images if needed */
.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 87, 34, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

.delivery-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Menu Modal (Mock) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--surface);
    width: 90%;
    max-width: 800px;
    height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.menu-category {
    margin-bottom: 2rem;
}

.menu-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-item:hover {
    border-color: var(--primary);
}

.item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.item-price {
    font-weight: 700;
    color: var(--primary);
}

.add-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.add-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* Cart Float */
.cart-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: var(--background);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    z-index: 90;
    transition: var(--transition);
}

.cart-float:hover {
    transform: translateY(-5px);
}

.cart-count {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .brand {
        height: 60px;
        /* Smaller logo for mobile */
    }

    .nav-links {
        display: flex;
        /* Show links */
        gap: 1rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .hero p {
        padding: 0 1rem;
    }

    .controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
    }

    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Two columns */
        gap: 0.75rem;
    }

    .card {
        display: flex;
        flex-direction: column;
    }

    .card-image {
        height: 100px;
        /* Reduced height for square feel */
        font-size: 2.5rem;
    }

    .card-content {
        padding: 0.75rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .card-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .card-meta {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-bottom: 0;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }

    .modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .cart-float {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1.2rem;
    }

    /* Compact Mobile Footer */
    .site-footer {
        padding: 2rem 0;
    }

    .footer-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .footer-col {
        width: auto;
    }

    .footer-col h4,
    .footer-col p {
        display: none;
        /* Hide headers and description */
    }

    .footer-col ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .footer-col ul li {
        margin-bottom: 0;
        display: inline-block;
    }

    .footer-col ul li a {
        font-size: 0.85rem;
        padding: 0 0.25rem;
    }

    /* Add separators between links */
    .footer-col ul li:not(:last-child)::after {
        content: '|';
        color: var(--border);
        margin-left: 0.75rem;
    }

    .copyright {
        padding-top: 1rem;
        font-size: 0.75rem;
    }
}