:root {
	--bg: #0b0c0f;
	--bg-rgb: 11, 12, 15;
	--text: #e6e7eb;
	--muted: #9aa0aa;
	--muted-rgb: 154, 160, 170;
	--card: #12141a;
	--card-rgb: 18, 20, 26;
	--border: #222737;
	--accent: #6ee7b7;
	--accent-rgb: 110, 231, 183;
	--accent-ink: #03281d;
	--link: #8ab4ff;
}

/* Light theme variables */
[data-theme="light"] {
	--bg: #ffffff;
	--bg-rgb: 255, 255, 255;
	--text: #0b0c0f;
	--muted: #5b616e;
	--muted-rgb: 91, 97, 110;
	--card: #f6f7fb;
	--card-rgb: 246, 247, 251;
	--border: #e6e8ef;
	--accent: #0ea5e9;
	--accent-rgb: 14, 165, 233;
	--accent-ink: #ffffff;
	--link: #0b66ff;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
}

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

.site-header {
	position: sticky;
	top: 0;
	-webkit-backdrop-filter: saturate(180%) blur(10px);
	backdrop-filter: saturate(180%) blur(10px);
	background: rgba(var(--bg-rgb), 0.8);
	background: color-mix(in oklab, var(--bg) 80%, transparent);
	border-bottom: 1px solid var(--border);
	z-index: 1000;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: 0.2px; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 14px; align-items: center; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { background: var(--card); }
.theme-toggle { 
	background: transparent; 
	border: 1px solid var(--border); 
	color: var(--text); 
	border-radius: 6px; 
	padding: 6px 8px; 
	cursor: pointer; 
	font-size: 14px;
	min-width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.theme-toggle:hover {
	background: var(--card);
	transform: scale(1.05);
}

.theme-toggle:active {
	transform: scale(0.95);
}
.install-btn { 
	background: var(--accent); 
	color: var(--accent-ink); 
	border: none; 
	font-size: 12px; 
	padding: 4px 6px; 
	min-width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
}
.install-btn:hover { filter: brightness(1.1); }
.hidden { display: none !important; }
.clear-search-hidden { display: none; }
.swap-filter-label { margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.day-card .swap-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.swap-btn { 
	background: var(--accent); 
	border: none; 
	color: var(--accent-ink); 
	border-radius: 10px; 
	padding: 8px 16px; 
	cursor: pointer; 
	font-size: 13px; 
	font-weight: 600;
	transition: all 0.2s;
	box-shadow: 0 2px 6px rgba(0, 128, 255, 0.15);
}
.swap-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0, 128, 255, 0.25);
	filter: brightness(1.05);
}
.favorite-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 10px; padding: 6px 8px; cursor: pointer; font-size: 12px; transition: all 0.2s; }
.favorite-btn:hover { background: var(--card); }
.favorite-btn.favorited { color: #ff6b6b; border-color: #ff6b6b; }
.favorite-btn.favorited:hover { background: rgba(255, 107, 107, 0.1); background: color-mix(in oklab, #ff6b6b 10%, transparent); }

/* Loading and Error States */
.loading { opacity: 0.6; pointer-events: none; }
.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success animation */
@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.success-animation {
    animation: successPulse 0.4s ease-in-out;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--card) 0%,
        rgba(var(--accent-rgb), 0.05) 50%,
        color-mix(in oklab, var(--card) 95%, var(--accent) 5%) 50%,
        var(--card) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    min-height: 20px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.error-message {
    background: #ff6b6b;
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin: 16px 0;
    text-align: center;
}

.success-message {
    background: var(--accent);
    color: var(--accent-ink);
    padding: 12px;
    border-radius: 8px;
    margin: 16px 0;
    text-align: center;
}

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1000; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal[hidden] { display: none !important; }

/* Modal background is now opaque, no need to dim content behind it */
.modal-dialog { background: var(--card); border: 1px solid var(--border); border-radius: 14px; width: min(900px, 96vw); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; position: relative; z-index: 1001; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 12px 14px; overflow: auto; }
.swap-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.swap-card { 
	background: var(--bg); 
	border: 1px solid var(--border); 
	border-radius: 12px; 
	overflow: hidden;
	display: flex; 
	flex-direction: row;
	gap: 12px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.swap-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.swap-card-image {
	width: 120px;
	height: 120px;
	object-fit: cover;
	object-position: center center;
	flex-shrink: 0;
}
.swap-card-content {
	padding: 12px 12px 12px 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.swap-card h4 { margin: 0; font-size: 16px; }
.swap-card .meta { color: var(--muted); font-size: 12px; flex: 1; }
.swap-card .choose { align-self: flex-start; }

/* Recipe modal */
.recipe-modal-image {
	width: 100%;
	max-height: 300px;
	object-fit: cover;
	object-position: center center;
	border-radius: 8px;
	margin-bottom: 16px;
	display: block;
}

.recipe-meta { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.meta-item { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.recipe-nutrition { margin-bottom: 16px; }
.nutrition-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }
.nutrition-item { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.nutrition-value { display: block; font-weight: 600; font-size: 16px; }
.nutrition-label { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.recipe-instructions h4 { margin: 0 0 8px; }
.recipe-instructions p { margin: 0; line-height: 1.6; }

/* Recipe cards */
.meal { 
    font-weight: 600;
    color: var(--text);
    margin: 8px 0;
}
.meal-meta { display: flex; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.meal-meta span { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }

/* Coming Soon Notes */
.recipe-comments { margin-bottom: 16px; }
.coming-soon-note, .nutrition-note { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    padding: 16px; 
    text-align: center;
    color: var(--muted);
}
.coming-soon-note p, .nutrition-note p { margin: 0 0 8px; }
.coming-soon-note p:last-child, .nutrition-note p:last-child { margin-bottom: 0; }
.coming-soon-note strong, .nutrition-note strong { color: var(--accent); }
.nutrition-note a { color: var(--accent); text-decoration: underline; }
.nutrition-note a:hover { text-decoration: none; }

/* Nutrition Loading States */
.nutrition-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.nutrition-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background: #ff6b6b;
    color: white;
    border-radius: 8px;
}

.hero { 
	padding: 72px 0 36px; 
	background: linear-gradient(135deg, 
		rgba(var(--accent-rgb), 0.03) 0%, 
		var(--bg) 50%,
		rgba(var(--accent-rgb), 0.02) 100%);
	background: linear-gradient(135deg, 
		color-mix(in oklab, var(--accent) 3%, var(--bg)) 0%, 
		var(--bg) 50%,
		color-mix(in oklab, var(--accent) 2%, var(--bg)) 100%);
	position: relative;
	overflow: hidden;
}

.hero-inner { text-align: center; position: relative; z-index: 1; }
.hero h1 { 
	font-size: clamp(28px, 5vw, 44px); 
	line-height: 1.15; 
	margin: 0 0 12px;
	background: linear-gradient(135deg, var(--text) 0%, rgba(var(--accent-rgb), 0.3) 100%);
	background: linear-gradient(135deg, var(--text) 0%, color-mix(in oklab, var(--text) 70%, var(--accent) 30%) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.subhead { font-size: 18px; color: var(--muted); margin: 0 auto 24px; max-width: 720px; }

.cta-row { display: inline-flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center; }
.btn { background: transparent; color: var(--text); border: 1px solid var(--border); padding: 12px 24px; border-radius: 12px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; }
.btn.primary { 
	background: var(--accent); 
	color: var(--accent-ink); 
	border-color: transparent;
	box-shadow: 0 4px 12px rgba(0, 128, 255, 0.2);
	font-weight: 600;
}
.btn.primary:hover { 
	filter: brightness(1.05); 
	box-shadow: 0 6px 16px rgba(0, 128, 255, 0.3);
	transform: translateY(-1px);
}
.btn:hover { filter: brightness(1.05); }

.badges { 
	display: flex; 
	gap: 14px; 
	list-style: none; 
	padding: 16px 0 0; 
	margin: 0; 
	justify-content: center; 
	flex-wrap: wrap; 
	color: var(--muted);
}

.badges li {
	padding: 8px 16px;
	background: rgba(var(--accent-rgb), 0.08);
	background: color-mix(in oklab, var(--accent) 8%, transparent);
	border-radius: 20px;
	font-size: 14px;
	animation: fadeIn 0.5s ease-out backwards;
}

.badges li:nth-child(1) { animation-delay: 0.1s; }
.badges li:nth-child(2) { animation-delay: 0.2s; }
.badges li:nth-child(3) { animation-delay: 0.3s; }

.plan-section { padding: 40px 0; border-top: 1px solid var(--border); }
.plan-section h2 { margin: 0 0 16px; }
.plan-hint { 
    text-align: center; 
    color: var(--muted); 
    font-size: 14px; 
    margin: 8px 0 24px; 
    font-style: italic;
}

/* Search and Filters */
.search-filters {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}
.plan-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.day-card { 
	background: var(--card); 
	border: 1px solid var(--border); 
	border-radius: 14px; 
	padding: 14px; 
	display: flex;
	flex-direction: column;
	height: 100%; /* Make all cards the same height */
	transition: all 0.3s ease;
	opacity: 1;
	transform: translateY(0);
}
.day-card h4 { margin: 0 0 8px; font-size: 16px; }
/* .meal styling consolidated above */
.ingredients { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* Card content area - make it flexible */
.day-card .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow content to grow and push buttons to bottom */
}

.tools { display: flex; gap: 12px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
.servings { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.servings select { background: var(--card); color: var(--text); border: 1px solid var(--border); padding: 8px 10px; border-radius: 10px; }

.shopping-list { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; overflow: auto; transition: opacity 0.2s ease; }
.shopping-list .aisle { margin: 10px 0 6px; font-weight: 600; color: var(--text); }
.shopping-list .item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed var(--border); }
.shopping-list .item:last-child { border-bottom: 0; }
.shopping-list .item input { width: 16px; height: 16px; }
.shopping-list .label { flex: 1; }
.shopping-list .label.done { color: var(--muted); text-decoration: line-through; }

.features { padding: 40px 0; border-top: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.feature h3 { margin: 0 0 8px; }

.how { padding: 40px 0; border-top: 1px solid var(--border); }
.steps { margin: 0; padding-left: 18px; }

.signup { padding: 40px 0; border-top: 1px solid var(--border); }
.signup-inner { text-align: center; }
.email-form { display: inline-flex; gap: 10px; align-items: center; width: 100%; max-width: 520px; }
.email-form input { flex: 1; background: var(--card); color: var(--text); border: 1px solid var(--border); padding: 12px 14px; border-radius: 12px; }
.email-status { color: var(--muted); min-height: 24px; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 24px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 12px; }
.footer-nav a { color: var(--muted); text-decoration: none; }

/* Footer styling */
.footer-note {
	font-size: 12px;
	margin-top: 8px;
}

.footer-link {
	color: var(--muted);
	text-decoration: underline;
}

.cookie-learn-link {
	color: var(--muted);
	text-decoration: underline;
	font-size: 14px;
}

/* Cookie Consent Banner */
.cookie-consent {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--card);
	border-top: 2px solid var(--accent);
	padding: 20px;
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
	z-index: 10000;
	animation: slideUp 0.3s ease;
	pointer-events: auto;
	display: none;
}

.cookie-consent.show {
	display: block;
}
.cookie-consent * {
	pointer-events: auto;
}
.cookie-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}
.cookie-content p {
	margin: 0;
	flex: 1;
	min-width: 250px;
}
.cookie-buttons {
	display: flex;
	gap: 12px;
	align-items: center;
}
@keyframes slideUp {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}
@keyframes slideDown {
	from { transform: translate(-50%, -100%); opacity: 0; }
	to { transform: translate(-50%, 0); opacity: 1; }
}
@media (max-width: 768px) {
	.cookie-content {
		flex-direction: column;
		align-items: flex-start;
	}
	.cookie-buttons {
		width: 100%;
		justify-content: space-between;
	}
}

/* Nutrition Disclaimer - Consolidated */
.nutrition-disclaimer {
	font-size: 12px;
	color: var(--muted);
	margin: 12px 0;
	padding: 8px 12px;
	background: rgba(var(--muted-rgb), 0.08);
	border-radius: 6px;
	border-left: 3px solid var(--muted);
	line-height: 1.5;
	width: 100%;
	box-sizing: border-box;
}

/* Prevent horizontal scroll on narrow viewports */
html, body { overflow-x: hidden; }

/* Mobile improvements */
/* Mobile controls container */
.mobile-controls {
	display: none;
	gap: 8px;
	align-items: center;
}

/* Desktop controls */
.desktop-controls {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* Desktop: Show theme and language toggles in nav */
@media (min-width: 601px) {
	.mobile-controls {
		display: none;
	}
	
	.nav {
		display: flex;
	}
	
	.desktop-controls {
		display: flex;
	}
}

/* Mobile: Hide desktop controls */
@media (max-width: 600px) {
	.desktop-controls {
		display: none;
	}
}

/* Mobile hamburger menu */
.mobile-menu-toggle {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--text);
	border-radius: 10px;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
	background: var(--card);
	transform: scale(1.05);
}

.mobile-menu-toggle:active {
	transform: scale(0.95);
}

/* Mobile menu overlay */
.nav-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
}

.nav-overlay.active {
	display: block;
}

@media (max-width: 600px) {
	.container { padding: 0 14px; }
	.hero { padding: 48px 0 24px; }
	.hero h1 { font-size: clamp(24px, 8vw, 32px); }
	.subhead { font-size: 14px; }
	
	/* Mobile controls */
	.mobile-controls {
		display: flex;
	}
	
	/* Mobile menu styles */
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 300px;
		height: 100vh;
		background: var(--bg);
		border-left: 1px solid var(--border);
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 24px 0;
		transition: right 0.3s ease;
		z-index: 1002;
		overflow-y: auto;
		pointer-events: auto;
		box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
	}
	
	.nav.nav-open {
		right: 0;
	}
	
	.nav a,
	.nav button {
		width: 100%;
		text-align: left;
		padding: 18px 24px;
		border-radius: 0;
		border: none;
		border-bottom: 1px solid var(--border);
		background: transparent;
		justify-content: flex-start;
		font-size: 16px;
		font-weight: 500;
		transition: all 0.2s ease;
		position: relative;
	}
	
	.nav a:hover,
	.nav button:hover {
		background: var(--card);
		transform: translateX(4px);
	}
	
	.nav a:active,
	.nav button:active {
		transform: translateX(2px);
	}
	
	/* Mobile menu header */
	.nav::before {
		content: '';
		display: block;
		height: 1px;
		background: var(--border);
		margin: 0 24px 16px;
	}
	
	/* Mobile menu footer */
	.nav::after {
		content: '';
		display: block;
		height: 1px;
		background: var(--border);
		margin: 16px 24px 0;
	}
	
	
	.plan-grid { grid-template-columns: 1fr; gap: 12px; }
	.day-card { padding: 12px; }
	.meal-meta { font-size: 11px; }
	.ingredients { font-size: 13px; }
	.tools { gap: 8px; }
	.shopping-list { padding: 12px; }
	.features-grid { grid-template-columns: 1fr; }
	.email-form { flex-direction: column; align-items: stretch; gap: 8px; }
	.email-form input { width: 100%; }
	.btn { width: 100%; justify-content: center; }
	/* Modal becomes nearly full-screen on mobile */
	.modal { padding: 10px; }
	.modal-dialog { width: 100vw; max-width: 100%; height: auto; max-height: 85vh; border-radius: 12px; }
	.modal-header { padding: 10px 12px; }
	.modal-body { padding: 10px 12px; }
	.recipe-meta .meta-item { font-size: 12px; }
	.footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
	.search-filters { padding: 12px; }
	.filter-row { flex-direction: column; gap: 8px; }
	.filter-select { min-width: auto; width: 100%; }
	.install-btn { font-size: 11px; padding: 4px 8px; }
}

@media (prefers-color-scheme: light) {
	body:not([data-theme="dark"]) { background: #ffffff; color: #0b0c0f; }
}

/* Print styles */
@media print {
	.site-header, .footer-inner, .cta-row, .features, .how, .signup, #copyList, #themeToggle, #langToggle, #printBtn, #icsBtn { display: none !important; }
	.hero { padding: 0 0 12px; }
	.plan-grid { grid-template-columns: repeat(2, 1fr); }
	.day-card { break-inside: avoid; }
}

/* Recipe Image Styles */
.recipe-image {
	width: 100%;
	height: 200px;
	object-fit: cover;
	object-position: center center;
	border-radius: 8px 8px 0 0;
	cursor: pointer;
	background: var(--border);
	transition: opacity 0.3s ease;
	margin: -16px -16px 12px -16px;
	display: block;
}

/* Card content wrapper for when image is present */

/* Visual Enhancements - Transitions and Hover Effects */
.btn {
	transition: all 0.2s ease !important;
}

.btn:active {
	transform: scale(0.98);
}

.day-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease !important;
	overflow: hidden;
}

/* Loading state for recipe cards */
.day-card.loading {
	opacity: 0.7;
	transform: translateY(4px);
}

.day-card.updating {
	opacity: 0.8;
	transform: scale(0.98);
}

/* Fade-in animation for new cards */
.day-card.fade-in {
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.day-card img {
	object-position: center center !important;
}

.day-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.day-card:hover .recipe-image {
	transform: scale(1.05);
}

.recipe-image {
	transition: transform 0.3s ease !important;
	object-position: center center;
}

/* .meal transition removed - no longer a link */

.favorite-btn {
	transition: all 0.2s ease !important;
}

.modal {
	animation: fadeIn 0.2s ease-out !important;
}

.nutrition-item {
	animation: fadeIn 0.4s ease-out !important;
}

.shopping-list li {
	transition: opacity 0.2s ease, text-decoration 0.2s ease !important;
}

/* Force image centering */
.recipe-image {
	object-position: center center !important;
}

/* Alternative centering approach */
.day-card img {
	object-position: center center !important;
}

/* Most specific centering rule */
.plan-grid .day-card .recipe-image {
	object-position: center center !important;
}

/* Force centering with even more specificity */
.plan-grid .day-card img {
	object-position: center center !important;
}

/* Nutrition info styles */
.nutrition-info details {
	cursor: pointer;
}

.nutrition-info details summary {
	-webkit-user-select: none;
	-webkit-user-select: none;
	user-select: none;
	transition: color 0.2s ease;
}

.nutrition-info details summary:hover {
	color: var(--primary);
}

.nutrition-info details[open] summary {
	margin-bottom: 8px;
}

.nutrition-info a {
	text-decoration: none;
	font-weight: 500;
}

.nutrition-info a:hover {
	text-decoration: underline;
}

/* Nutrition section layout */
.nutrition-content {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

/* Ensure nutrition info section is completely outside flex layout */
.nutrition-content + .nutrition-info-section {
	width: 100%;
	margin-top: 16px;
	clear: both;
	display: block;
	flex: none;
	order: 999;
	position: relative;
	left: 0;
	right: 0;
}

/* Nutrition info section - below the table */
.nutrition-info-section {
	width: 100%;
	margin-top: 16px;
	clear: both;
	display: block;
	flex: none; /* Ensure it doesn't participate in flex layout */
	order: 999; /* Force it to appear after flex items */
}

/* Desktop-specific fix for nutrition info section */
@media (min-width: 769px) {
	.nutrition-info-section {
		width: 100% !important;
		max-width: none !important;
		float: none !important;
		display: block !important;
		position: relative;
		left: 0;
		right: 0;
		margin-left: 0 !important;
		margin-right: 0 !important;
		transform: none !important;
	}
	
	/* Force nutrition info section to break out of flex layout */
	.nutrition-content {
		flex-wrap: wrap;
	}
	
	.nutrition-info-section {
		flex-basis: 100%;
		width: 100% !important;
		order: 999;
	}
}

/* Override inline styles for nutrition info */
.nutrition-info-section .nutrition-info {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	display: block !important;
}

/* Ensure nutrition disclaimer is full width */
.nutrition-info-section .nutrition-disclaimer {
	width: 100% !important;
	display: block !important;
}

/* Ensure disclaimer is properly positioned */
#nutritionData .nutrition-disclaimer {
	clear: both;
	width: 100%;
	margin-top: 16px;
}

.nutrition-table-section {
	flex: 1;
	min-width: 0;
}

.nutrition-sidebar {
	flex-shrink: 0;
	width: 300px;
}

@media (max-width: 768px) {
	.nutrition-content {
		flex-direction: column;
		gap: 12px;
	}
	
	.nutrition-sidebar {
		width: 100%;
	}
	
	.nutrition-disclaimer {
		font-size: 11px;
		margin: 8px 0;
		padding: 6px 8px;
	}
}

/* Nutrition table styles */
.nutrition-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
	font-size: 14px;
}

.nutrition-table th,
.nutrition-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.nutrition-table th {
	background: var(--card);
	font-weight: 600;
	color: var(--text);
	font-size: 13px;
}

.nutrition-table td {
	color: var(--muted);
}

.nutrition-table tr:hover {
	background: rgba(var(--card-rgb), 0.5);
	background: color-mix(in oklab, var(--card) 50%, transparent);
}

.nutrition-table td:last-child,
.nutrition-table th:last-child {
	text-align: right;
}

.nutrition-table td:nth-child(2),
.nutrition-table th:nth-child(2) {
	text-align: center;
}

.nutrition-warnings,
.nutrition-missing {
	border-radius: 6px;
	padding: 8px 10px;
	margin: 8px 0;
	font-size: 12px;
	max-width: 250px;
}

.nutrition-warnings {
	background: rgba(255, 243, 205, 0.2);
	border: 1px solid rgba(255, 234, 167, 0.3);
	color: #856404 !important;
}

.nutrition-missing {
	background: rgba(248, 215, 218, 0.2);
	border: 1px solid rgba(245, 198, 203, 0.3);
	color: #721c24 !important;
}

.nutrition-warnings ul,
.nutrition-missing ul {
	margin: 6px 0 0 0;
	padding-left: 16px;
}

.nutrition-warnings li,
.nutrition-missing li {
	margin: 2px 0;
	font-size: 11px;
}

.nutrition-info {
	background: var(--card) !important;
	border: 1px solid var(--border) !important;
	border-radius: 6px;
	padding: 10px !important;
	margin: 8px 0 !important;
	font-size: 12px !important;
	opacity: 0.9;
}

/* Recipe Comments Styles */
.recipe-comments {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
}

/* Hide elements by default */
.recipe-rating-display,
.add-comment-form,
.comments-empty,
.comments-signin-prompt {
	display: none;
}

/* Show elements when needed */
.recipe-rating-display.show,
.add-comment-form.show,
.comments-empty.show,
.comments-signin-prompt.show {
	display: block;
}

.recipe-comments h4 {
	margin-bottom: 16px;
	color: var(--text);
}

/* Rating Display */
.recipe-rating-display {
	margin-bottom: 20px;
	padding: 12px;
	background: var(--card);
	border-radius: 8px;
	border: 1px solid var(--border);
}

.rating-summary {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rating-stars {
	display: flex;
	gap: 2px;
}

.rating-stars .star {
	font-size: 18px;
	color: #fbbf24;
}

.rating-text {
	color: var(--muted);
	font-size: 14px;
}

/* Star Rating Input */
.star-rating {
	display: flex;
	gap: 4px;
	margin: 8px 0;
}

.star-rating .star {
	font-size: 24px;
	color: #d1d5db;
	cursor: pointer;
	transition: color 0.2s;
	padding: 4px;
	border-radius: 4px;
	-webkit-user-select: none;
	user-select: none;
}

.star-rating .star:hover {
	color: #fbbf24;
	background: rgba(251, 191, 36, 0.1);
}

.star-rating .star.active {
	color: #fbbf24;
}

/* Comment Form */
.add-comment-form {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
}

.comment-form-header h5 {
	margin: 0 0 4px 0;
	color: var(--text);
}

.comment-form-header p {
	margin: 0 0 16px 0;
	color: var(--muted);
	font-size: 14px;
}

.rating-input {
	margin-bottom: 16px;
}

.rating-input label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: var(--text);
}

.comment-input {
	margin-bottom: 16px;
}

.comment-input label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: var(--text);
}

.comment-input textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--background);
	color: var(--text);
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	min-height: 80px;
}

.comment-input textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-actions {
	display: flex;
	gap: 12px;
}

/* Comments List */
.comments-list {
	margin-top: 20px;
}

.comment-item {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 12px;
}

.comment-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.comment-author {
	font-weight: 500;
	color: var(--text);
}

.comment-rating {
	display: flex;
	gap: 2px;
}

.comment-rating .star {
	font-size: 14px;
	color: #fbbf24;
}

.comment-date {
	font-size: 12px;
	color: var(--muted);
}

.comment-text {
	color: var(--text);
	line-height: 1.5;
	margin: 8px 0;
}

.comment-actions-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--border);
}

.comment-likes {
	display: flex;
	align-items: center;
	gap: 8px;
}

.like-button {
	background: none;
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 4px 8px;
	cursor: pointer;
	font-size: 12px;
	color: var(--muted);
	transition: all 0.2s;
}

.like-button:hover {
	background: var(--hover);
}

.like-button.liked {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
}

.comment-edit-actions {
	display: flex;
	gap: 8px;
}

.edit-comment-btn,
.delete-comment-btn {
	background: none;
	border: none;
	color: var(--muted);
	cursor: pointer;
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 4px;
	transition: all 0.2s;
}

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

.delete-comment-btn:hover {
	background: var(--hover);
	color: #dc2626;
}

/* Sign in prompt */
.comments-signin-prompt {
	text-align: center;
	padding: 24px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 8px;
}

.comments-signin-prompt p {
	margin-bottom: 16px;
	color: var(--muted);
}

/* Loading and empty states */
.comments-loading,
.comments-empty {
	text-align: center;
	padding: 24px;
	color: var(--muted);
}

.comments-empty {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 8px;
}

/* User Actions Container - Much more compact */
.user-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

/* Authentication Styles - Compact */
.auth-btn {
	font-size: 13px;
	padding: 6px 12px;
}

/* Profile Dropdown Styles */
.profile-dropdown {
	position: relative;
}

.profile-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 8px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
}

.profile-toggle:hover {
	background: var(--bg);
	border-color: var(--accent);
}

.user-avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

.user-name {
	font-size: 14px;
	font-weight: 500;
	color: var(--text);
}

.dropdown-arrow {
	font-size: 10px;
	color: var(--muted);
	transition: transform 0.2s;
}

.profile-toggle.active .dropdown-arrow {
	transform: rotate(180deg);
}

/* Profile Menu */
.profile-menu {
	position: absolute;
	top: 100%;
	right: 0;
	width: 280px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	z-index: 1000;
	margin-top: 8px;
	overflow: hidden;
}

.profile-header {
	padding: 16px;
	background: var(--bg);
}

.profile-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.profile-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.profile-details {
	flex: 1;
}

.profile-name {
	font-size: 16px;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 2px;
}

.profile-email {
	font-size: 13px;
	color: var(--muted);
}

.profile-divider {
	height: 1px;
	background: var(--border);
	margin: 8px 0;
}

.profile-actions {
	padding: 8px 0;
}

.profile-action {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 16px;
	background: none;
	border: none;
	color: var(--text);
	font-size: 14px;
	cursor: pointer;
	transition: background 0.2s;
	text-align: left;
}

.profile-action:hover {
	background: var(--bg);
}

.profile-action.sign-out {
	color: #ef4444;
}

.profile-action.sign-out:hover {
	background: rgba(239, 68, 68, 0.1);
}

/* Settings Modal */
.settings-modal {
	max-width: 600px;
	width: 90vw;
}

.settings-section {
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.settings-section h4 {
	margin: 0 0 16px 0;
	color: var(--text);
	font-size: 18px;
	font-weight: 600;
}

.settings-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	border-bottom: 1px solid var(--border-light);
}

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

.settings-info {
	flex: 1;
	margin-right: 16px;
}

.settings-label {
	display: block;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 4px;
}

.settings-description {
	display: block;
	font-size: 14px;
	color: var(--text-muted);
	line-height: 1.4;
}

.settings-select {
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg);
	color: var(--text);
	font-size: 14px;
	min-width: 120px;
}

.settings-select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Toggle Switch */
.toggle-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 24px;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: var(--border);
	transition: 0.3s;
	border-radius: 24px;
}

.toggle-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
}

input:checked + .toggle-slider {
	background-color: var(--primary);
}

input:checked + .toggle-slider:before {
	transform: translateX(26px);
}

/* Danger Zone */
.danger-zone {
	border: 2px solid #ef4444;
	border-radius: 8px;
	padding: 16px;
	background: rgba(239, 68, 68, 0.05);
}

.danger-zone h4 {
	color: #ef4444;
}

.btn.danger {
	background: #ef4444;
	color: white;
	border: 1px solid #ef4444;
}

.btn.danger:hover {
	background: #dc2626;
	border-color: #dc2626;
	transform: translateY(-1px);
}

.btn.danger:active {
	transform: translateY(0);
}

/* Profile Edit Form */
.profile-form {
	max-width: 500px;
	margin: 0 auto;
}

.profile-form .form-group {
	margin-bottom: 20px;
}

.profile-form .form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: var(--text);
}

.profile-form .form-input,
.profile-form .form-select,
.profile-form textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg);
	color: var(--text);
	font-size: 14px;
	transition: border-color 0.2s ease;
	font-family: inherit;
}

.profile-form textarea {
	resize: vertical;
	min-height: 80px;
}

.profile-form .form-input:focus,
.profile-form .form-select:focus,
.profile-form textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.profile-form .form-input[readonly] {
	background: var(--card);
	color: var(--text-muted);
	cursor: not-allowed;
}

.profile-form .form-help {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--text-muted);
}

.profile-form .form-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}

.profile-form .form-actions .btn {
	min-width: 100px;
}

/* Profile Edit Messages */
.profile-messages {
	margin: 1rem 0;
	padding: 0;
}

.profile-messages .message {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
	font-weight: 500;
}

.profile-messages .message.success {
	background: rgba(34, 197, 94, 0.1);
	color: #16a34a;
	border: 1px solid rgba(34, 197, 94, 0.2);
}

.profile-messages .message.error {
	background: rgba(239, 68, 68, 0.1);
	color: #dc2626;
	border: 1px solid rgba(239, 68, 68, 0.2);
}

.profile-messages .message-icon {
	font-size: 1rem;
	flex-shrink: 0;
}

.profile-messages .message-text {
	flex: 1;
}

.profile-messages.hidden {
	display: none;
}

.profile-messages .message.hidden {
	display: none;
}

/* Settings Messages */
.settings-messages {
	margin: 1rem 0;
	padding: 0;
}

.settings-messages .message {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
	font-weight: 500;
}

.settings-messages .message.success {
	background: rgba(34, 197, 94, 0.1);
	color: #16a34a;
	border: 1px solid rgba(34, 197, 94, 0.2);
}

.settings-messages .message.error {
	background: rgba(239, 68, 68, 0.1);
	color: #dc2626;
	border: 1px solid rgba(239, 68, 68, 0.2);
}

.settings-messages .message-icon {
	font-size: 1rem;
	flex-shrink: 0;
}

.settings-messages .message-text {
	flex: 1;
}

.settings-messages.hidden {
	display: none;
}

.settings-messages .message.hidden {
	display: none;
}

.action-icon {
	font-size: 16px;
	width: 20px;
	text-align: center;
}

.action-text {
	font-weight: 500;
}

.user-avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

.user-name {
	font-size: 14px;
	font-weight: 500;
	color: var(--text);
}

/* Modal Styles */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2000;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.modal-content {
	background: var(--card);
	border-radius: 16px;
	border: 1px solid var(--border);
	width: 90%;
	max-width: 400px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 0;
}

.modal-header h2 {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	color: var(--text);
}

.modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--muted);
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	transition: all 0.2s;
}

.modal-close:hover {
	background: var(--border);
	color: var(--text);
}

.modal-body {
	padding: 20px 24px 24px;
}

/* Auth Tabs */
.auth-tabs {
	display: flex;
	margin-bottom: 24px;
	border-radius: 8px;
	background: var(--bg);
	padding: 4px;
}

.auth-tab {
	flex: 1;
	background: transparent;
	border: none;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--muted);
	cursor: pointer;
	transition: all 0.2s;
}

.auth-tab.active {
	background: var(--accent);
	color: var(--accent-ink);
}

.auth-tab:hover:not(.active) {
	color: var(--text);
}

/* Auth Forms */
.auth-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-group label {
	font-size: 14px;
	font-weight: 500;
	color: var(--text);
}

.form-group input {
	padding: 12px 16px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--bg);
	color: var(--text);
	font-size: 16px;
	transition: border-color 0.2s;
}

.form-group input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.btn.full-width {
	width: 100%;
	justify-content: center;
}

.auth-divider {
	display: flex;
	align-items: center;
	margin: 20px 0;
	color: var(--muted);
	font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--border);
}

.auth-divider span {
	padding: 0 16px;
}

.google-btn {
	background: #ffffff;
	color: #333333;
	border: 1px solid #dadce0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-weight: 500;
	transition: all 0.2s;
}

.google-btn:hover {
	background: #f8f9fa;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

.google-btn svg {
	width: 20px;
	height: 20px;
}

/* Dark theme adjustments for Google button */
[data-theme="dark"] .google-btn {
	background: #2d2d2d;
	color: #ffffff;
	border-color: #5f6368;
}

[data-theme="dark"] .google-btn:hover {
	background: #3c4043;
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.auth-section {
		gap: 8px;
	}
	
	.auth-btn {
		font-size: 12px;
		padding: 6px 12px;
	}
	
	.user-profile {
		padding: 2px 6px;
	}
	
	.user-avatar {
		width: 20px;
		height: 20px;
	}
	
	.user-name {
		font-size: 12px;
	}
	
	.modal-content {
		width: 95%;
		margin: 20px;
	}
	
	.modal-header,
	.modal-body {
		padding: 16px 20px;
	}
	
	.modal-header {
		padding-bottom: 0;
	}
}

/* Household Styles */
.household-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.household-btn {
    background: var(--accent);
    color: var(--accent-ink);
    border: none;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.household-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.household-tab-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.invite-code {
    background: var(--bg);
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    color: var(--accent);
    border: 2px dashed var(--border);
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-weight: 500;
    color: var(--text);
}

.member-role {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .household-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Household Side Panel */
.household-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100vh;
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1500;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.household-panel:not(.hidden) {
    transform: translateX(0);
}

.household-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.household-panel-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.close-panel-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-panel-btn:hover {
    background: var(--border);
    color: var(--text);
}

.household-panel-content {
    padding: 24px;
}

.household-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.household-members-count {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
}

.household-members-list {
    margin-bottom: 24px;
}

.member-item-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 16px;
}

.member-details {
    flex: 1;
}

.member-name-panel {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.member-role-panel {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
}

.household-sync-status {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.sync-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
    display: inline-block;
}

.sync-dot.synced {
    background: #10b981;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.sync-dot.syncing {
    background: #f59e0b;
    animation: pulse 1s infinite;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

.sync-text {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.household-actions {
    margin-top: 24px;
}

.app-note {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
}

/* Panel overlay */
.household-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.household-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile adjustments for panel */
@media (max-width: 768px) {
    .household-panel {
        width: 100%;
        max-width: 320px;
    }
    
    .household-panel-header {
        padding: 16px 20px;
    }
    
    .household-panel-content {
        padding: 20px;
    }
    
    .household-name {
        font-size: 20px;
    }
}

/* Week Navigation Styles */
.week-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
    padding: 16px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.week-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 128, 255, 0.15);
}

.week-nav-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.3);
}

.week-nav-btn:active {
    transform: scale(0.98);
}

.week-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.week-info {
    text-align: center;
    min-width: 200px;
}

.week-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.week-dates {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.today-container {
    display: flex;
    justify-content: center;
    margin: 12px 0 24px;
}

.today-btn {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.today-btn:hover {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.2);
    filter: brightness(1.05);
}

.today-btn:active {
    transform: scale(0.98);
}

/* Mobile adjustments for week navigation */
@media (max-width: 768px) {
    .week-navigation {
        gap: 12px;
        padding: 12px;
        margin: 16px 0;
    }
    
    .week-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .week-info {
        min-width: 160px;
    }
    
    .week-title {
        font-size: 18px;
    }
    
    .week-dates {
        font-size: 13px;
    }
    
    .today-container {
        margin: 8px 0 16px;
    }
    
    .today-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Shopping List Sync Status */
.sync-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--muted);
}

.sync-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}

.sync-indicator:hover {
    background: var(--hover);
    color: var(--text);
}

.sync-indicator.synced {
    animation: none;
}

.sync-indicator.syncing {
    animation: none;
}

/* Sync Details Modal */
#syncDetailsModal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#syncDetailsModal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

#syncDetailsModal .modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#syncDetailsModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

#syncDetailsModal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

#syncDetailsModal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

#syncDetailsModal .modal-close:hover {
    background: var(--hover);
    color: var(--text);
}

#syncDetailsModal .modal-body {
    padding: 20px 24px 24px;
}

#syncDetailsModal .sync-info {
    margin-bottom: 24px;
}

#syncDetailsModal .sync-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

#syncDetailsModal .sync-status-item:last-child {
    border-bottom: none;
}

#syncDetailsModal .sync-label {
    font-weight: 500;
    color: var(--text);
}

#syncDetailsModal .sync-value {
    color: var(--muted);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 14px;
}

#syncDetailsModal .sync-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

#syncDetailsModal .sync-actions .btn {
    min-width: 120px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #syncDetailsModal .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    #syncDetailsModal .modal-header,
    #syncDetailsModal .modal-body {
        padding: 16px 20px;
    }
    
    #syncDetailsModal .sync-actions {
        flex-direction: column;
    }
    
    #syncDetailsModal .sync-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sync-text {
    font-weight: 500;
}

/* Card Actions Container - Push to bottom */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto; /* Push buttons to bottom of card */
    padding-top: 8px;
}

/* Per-Day Serving Controls */
.servings-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-ink);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 128, 255, 0.15);
}

.servings-control:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.3);
}

.servings-control:active {
    transform: scale(0.98);
}

.servings-label {
    font-weight: 600;
    color: var(--accent-ink);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.day-servings-select {
    background: var(--accent-ink);
    border: 1px solid var(--accent-ink);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    min-width: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.day-servings-select:hover {
    background: var(--accent-ink);
    color: var(--accent);
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.day-servings-select:focus {
    outline: none;
    background: var(--accent-ink);
    color: var(--accent);
    filter: brightness(1.1);
    box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.3);
    transform: translateY(-1px);
}

.day-servings-select:active {
    transform: scale(0.98);
}

/* Swap Row */
.swap-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

/* Swap Modal Search */
.swap-search-container {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
    padding: 8px 0;
}

.swap-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s;
}

.swap-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 128, 255, 0.1);
}

.clear-search-hidden {
    display: none;
}

/* Mobile adjustments for cleaned header */
@media (max-width: 768px) {
    .user-actions {
        gap: 6px;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .auth-btn.secondary {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .household-btn {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .user-profile {
        padding: 2px 6px;
    }
    
    .user-avatar {
        width: 20px;
        height: 20px;
    }
    
    .user-name {
        font-size: 12px;
    }
    
    .sync-status {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .card-actions {
        min-height: 70px;
        gap: 6px;
    }
    
    .servings-control {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .day-servings-select {
        padding: 5px 8px;
        font-size: 13px;
        min-width: 50px;
    }
}

