:root {
    --primary-color: #4CAF50;
    --secondary-color: #2E7D32;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --card-bg: #fff;
    --header-bg: #fff;
    --transition: all 0.3s ease;
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #f4f4f4;
    --card-bg: #2d2d2d;
    --header-bg: #2d2d2d;
}

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

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

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

/* Header & Nav */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    margin-right: 20px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1490818387583-1baba5e638af?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px;
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Layout Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
    #hero h1 { font-size: 2rem; }
}

/* Cards & Forms */
.card, #food-form-container, #food-list-container, article {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group { margin-bottom: 15px; }
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-primary:hover { background-color: var(--secondary-color); }

/* Summary Section */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-cards .card {
    text-align: center;
}

.summary-cards .value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Footer */
footer {
    background-color: var(--header-bg);
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #ddd;
    margin-top: 60px;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    margin: 0 10px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
}
