:root {
    --primary-color: #27ae60; /* Green Emerald */
    --primary-light: #eafaf1;
    --secondary-color: #2c3e50; /* Dark Blue */
    --accent-color: #3498db; /* Blue */
    --text-color: #333333;
    --text-light: #666666;
    --background-color: #f9fafb;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    --header-height: 60px;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.app-header {
    background-color: var(--sidebar-bg);
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.app-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-left: 15px;
}

#menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 5px;
    display: none; /* Hidden on desktop by default */
}

/* Layout */
.app-container {
    display: flex;
    padding-top: var(--header-height);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid #eaeaea;
    height: calc(100vh - var(--header-height));
    position: fixed;
    top: var(--header-height);
    left: 0;
    overflow-y: auto;
    z-index: 90;
    transition: transform 0.3s ease;
}

.recipe-nav {
    padding: 20px;
}

.recipe-nav h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 5px;
}

#recipe-list {
    list-style: none;
}

.recipe-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--secondary-color);
}

.recipe-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(3px);
}

.recipe-item.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 300px; /* Sidebar width */
    padding: 30px;
    max-width: 1000px;
}

/* Welcome Card */
.welcome-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-top: 20px;
}

.welcome-icon {
    margin-bottom: 20px;
}

/* Recipe Detail */
.recipe-detail {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.4s ease;
}

.hidden {
    display: none;
}

.recipe-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.recipe-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.recipe-meta {
    display: flex;
    gap: 20px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recipe-description {
    font-style: italic;
    color: var(--text-light);
    margin: 15px 0;
}

.recipe-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.section-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.ingredients-list {
    list-style: none;
}

.ingredients-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.instructions-list {
    list-style: none;
    counter-reset: step-counter;
}

.instructions-list li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 20px;
}

.instructions-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Overlay for Mobile */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 80;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    #menu-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
        width: 100%;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .recipe-body {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .recipe-title {
        font-size: 1.8rem;
    }
}

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