:root {
    --bg-color: #f6f8fc;
    --card-bg: #ffffff;
    --accent-blue: #1a73e8;
    --accent-red: #d93025;
    --accent-green: #1e8e3e;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --hover-bg: #f1f3f4;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

header nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

header nav .btn {
    padding: 0.5rem 1rem;
}

h1 {
    font-size: 1.75rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

h1:hover {
    color: var(--text-primary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #ffffff;
    color: var(--accent-red);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302), 0 1px 3px 1px rgba(60, 64, 67, 0.149);
    border-radius: 24px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.302), 0 4px 8px 3px rgba(60, 64, 67, 0.149);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.search-container {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302), 0 1px 3px 1px rgba(60, 64, 67, 0.149);
    transition: box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302), 0 2px 6px 2px rgba(60, 64, 67, 0.149);
}

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

.recipe-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.recipe-card:hover {
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.recipe-card h3 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.recipe-card .btn {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Recipe Details */
.recipe-header {
    margin-bottom: 2rem;
}

.section-title {
    color: var(--accent-blue);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    font-weight: 500;
}

.ingredient-list {
    list-style: none;
    padding: 0;
}

.ingredient-item {
    background: #ffffff;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.note {
    font-style: italic;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Add Recipe Form */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

input,
textarea {
    width: 100%;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.dynamic-rows .row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dynamic-rows input {
    flex: 1;
}

/* Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    header nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    header nav .btn {
        flex: 1 1 calc(50% - 0.5rem);
        padding: 0.5rem;
        text-align: center;
        font-size: 0.75rem;
    }

    header nav .btn-primary {
        flex: 1 1 100%;
        order: -1;
        margin-bottom: 0.5rem;
    }

    header nav div {
        display: flex;
        width: 100%;
        gap: 0.5rem;
        margin-left: 0 !important;
        border-left: none !important;
        padding-left: 0 !important;
        margin-top: 0.5rem;
    }

    header nav div .btn {
        flex: 1;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .btn-primary {
        padding: 0.75rem 1rem;
    }
}

.profile-switcher {
    display: inline-flex;
    align-items: center;
    background: #f1f3f4;
    padding: 0.25rem;
    border-radius: 24px;
    margin-right: 0.5rem;
}

.profile-switcher .btn {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: none;
    transition: all 0.2s ease;
}

.profile-switcher .btn-active {
    background: white !important;
    color: var(--accent-blue) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.profile-switcher .btn-inactive {
    background: transparent !important;
    color: var(--text-secondary) !important;
    font-weight: 400;
}

@media (max-width: 768px) {
    .profile-switcher {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
        justify-content: center;
    }
}
/* Responsive Table / Planner */
@media (max-width: 600px) {
    .responsive-table, .responsive-table thead, .responsive-table tbody, .responsive-table tr, .responsive-table th, .responsive-table td {
        display: block;
    }

    .responsive-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table td {
        padding: 1rem !important;
        border-bottom: 1px solid var(--border-color);
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }

    .day-header {
        background: var(--hover-bg) !important;
        font-size: 1.125rem;
        text-align: center;
        border-bottom: 2px solid var(--border-color) !important;
    }

    .meal-cell::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--accent-blue);
        font-size: 0.75rem;
        text-transform: uppercase;
        margin-bottom: 0.5rem;
        letter-spacing: 0.05em;
    }
}