:root {
    --primary-color: #2c5530;
    --primary-light: #4a7c4e;
    --accent-color: #d4a574;
    --bg-color: #faf8f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #e0dcd5;
    --danger-color: #c44536;
    --success-color: #2c5530;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
nav {
    background-color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav .logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

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

nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color 0.2s;
}

nav a:hover {
    color: white;
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
    transition: all 0.2s;
    line-height: 1.2;
    box-sizing: border-box;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

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

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

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

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
}

/* Messages */
.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

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

.recipe-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.recipe-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.recipe-card-link:hover {
    text-decoration: none;
}

.recipe-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--accent-color);
}

.recipe-card-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.recipe-card-body {
    padding: 1rem;
}

.recipe-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.recipe-card-title a {
    color: var(--text-color);
    text-decoration: none;
}

.recipe-card-title a:hover {
    color: var(--primary-color);
}

.recipe-card-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.recipe-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.category-tag {
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
}

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

.recipe-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.recipe-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.recipe-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.recipe-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.recipe-info-item {
    text-align: center;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 8px;
}

.recipe-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.recipe-info-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.recipe-section {
    margin-bottom: 2rem;
}

.recipe-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

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

.ingredients-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.ingredients-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

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

.instructions-list li {
    padding: 1rem 0;
    padding-left: 3rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.instructions-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    width: 2rem;
    height: 2rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Sidebar Layout */
.sidebar-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .sidebar-layout {
        grid-template-columns: 1fr;
    }
}

.sidebar {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

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

.sidebar-list li {
    margin-bottom: 0.5rem;
}

.sidebar-list a {
    display: block;
    padding: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sidebar-list a:hover,
.sidebar-list a.active {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn {
    margin: 0 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Actions Row */
.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Shared Users List */
.shared-users-list {
    list-style: none;
}

.shared-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.shared-user-item:last-child {
    border-bottom: none;
}

.shared-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.shared-user-name {
    font-weight: 500;
}

.shared-user-email {
    color: var(--text-muted);
    font-size: 0.875rem;
}
/* Logout Button */
.logout-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: color 0.2s;
}

.logout-btn:hover {
    color: white;
}