/* Plant Baked - Modern Styles with Refined Design System */

/* Enhanced Color Palette - Claude/Anthropic + Sage Green */
:root {
    /* Primary Colors */
    --primary-dark: #191919;
    --warm-cream: #EBDBBC;
    --terracotta: #CC785C;
    --warm-beige: #D4A27F;
    --off-white: #FAFAF7;
    --light-grey: #F0F0EB;
    
    /* Sage Green Accent */
    --sage-green: #87A96B;
    --sage-light: #A4BF88;
    --sage-dark: #6B8A4F;
    
    /* Darker Brown for Primary Actions */
    --dark-brown: #6B4423;
    --dark-brown-hover: #8B4513;
    
    /* Modern Neutrals */
    --pure-white: #FFFFFF;
    --soft-gray: #F8F9FA;
    --border-gray: #E9ECEF;
    --text-gray: #6C757D;
    --text-light: #ADB5BD;
    
    /* Form Background - Much Lighter Warm Off-White */
    --form-bg: #FBFAF8;
    --form-border: #F0EDE6;
    --input-bg: #FEFEFE;
    --input-border: #E9E9E9;
    
    /* Refined Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* iOS-inspired Typography */
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, sans-serif;
    --font-family-heading: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    
    /* Refined Spacing System */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    
    /* Border Radius Scale */
    --radius-none: 0px;
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-3xl: 24px;
    --radius-full: 9999px;
    
    /* Smooth transitions */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family-primary);
    background-color: var(--soft-gray);
    color: var(--primary-dark);
    line-height: 1.5;
    font-size: 14px; /* iOS-inspired smaller base font */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

/* Modern mobile app layout */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: var(--space-4) var(--space-4);
    padding-bottom: calc(var(--space-4) + 70px); /* Account for shorter bottom nav */
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Page sections */
.page-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page-section.active {
    display: block;
}

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

/* Universal App Header */
.app-header {
    background: var(--pure-white);
    padding: var(--space-5) var(--space-4);
    border-bottom: 1px solid var(--border-gray);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.app-title {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Hide search by default, only show in cookbook */
.header-search:not(.cookbook-only) {
    display: none !important;
}

.header-search .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--form-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    width: 0;
    opacity: 0;
    pointer-events: none;
}

.header-search.active .search-input-wrapper {
    width: min(280px, calc(100vw - 80px));
    opacity: 1;
    pointer-events: all;
}

.header-search #search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    color: var(--primary-dark);
    outline: none;
}

.header-search #search-input::placeholder {
    color: var(--text-light);
}

.search-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.search-toggle-btn:hover {
    background: var(--soft-gray);
    color: var(--primary-dark);
}

.search-toggle-btn .icon {
    width: 1rem;
    height: 1rem;
}

.search-clear {
    background: none;
    border: none;
    padding: var(--space-2);
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-right: var(--space-2);
    width: 28px;
    height: 28px;
    transition: all var(--transition);
}

.search-clear:hover {
    background: var(--soft-gray);
    color: var(--primary-dark);
}

.search-clear svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Page Sub-headers */
.page-headers {
    background: var(--soft-gray);
    padding: 0 var(--space-4);
}

.page-subheader {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-4) 0;
}

.page-subheader.hidden {
    display: none;
}

.subheader-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subheader-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Small Create List Button */
.create-list-btn-small {
    background: var(--dark-brown);
    color: var(--pure-white);
    border: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    white-space: nowrap;
}

.create-list-btn-small:hover {
    background: var(--dark-brown-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.create-list-btn-small .icon {
    width: 0.875rem;
    height: 0.875rem;
}

.page-title {
    font-family: var(--font-family-heading);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Clean modern buttons with refined design */
.primary-btn {
    background: var(--dark-brown);
    color: var(--pure-white);
    border: none;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: 0.8rem; /* Slightly smaller iOS-style */
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-sm);
}

.primary-btn:hover {
    background: var(--dark-brown-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.primary-btn .icon {
    width: 1rem;
    height: 1rem;
}

.secondary-btn {
    background: var(--pure-white);
    color: var(--primary-dark);
    border: 1px solid var(--border-gray);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.secondary-btn:hover {
    background: var(--form-bg);
    border-color: var(--warm-beige);
}

.icon-btn {
    background: var(--pure-white);
    border: 1px solid var(--border-gray);
    color: var(--text-gray);
    padding: var(--space-3);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
    width: 44px;
    height: 44px;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--soft-gray);
    border-color: var(--terracotta);
    color: var(--terracotta);
}

.icon-btn .icon {
    width: 1rem;
    height: 1rem;
}

.icon-btn .label {
    display: none;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Modern loading state */
.loading-state {
    text-align: center;
    padding: var(--space-12) var(--space-4);
    color: var(--text-gray);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-gray);
    border-top: 2px solid var(--terracotta);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

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

.loading-state p {
    font-size: 1rem;
    font-weight: 500;
}

/* Clean modern footer */
.app-footer {
    background: var(--pure-white);
    padding: var(--space-6) var(--space-4);
    border-top: 1px solid var(--border-gray);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.footer-links {
    display: flex;
    gap: var(--space-6);
}

.footer-link {
    background: none;
    border: none;
    color: var(--terracotta);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Floating Add Recipe Button */
.floating-add-btn {
    position: fixed;
    bottom: calc(70px + var(--space-4)); /* Above bottom nav */
    right: var(--space-4);
    width: 56px;
    height: 56px;
    background: var(--dark-brown);
    border: none;
    border-radius: var(--radius-full);
    color: var(--pure-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(107, 68, 35, 0.3);
    transition: all var(--transition);
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.floating-add-btn:hover {
    background: var(--dark-brown-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(107, 68, 35, 0.4);
}

.floating-add-btn .icon {
    width: 24px;
    height: 24px;
}

/* Bottom Navigation - Shorter */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--pure-white);
    border-top: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-around;
    padding: var(--space-2) var(--space-4);
    z-index: 50;
    box-shadow: 0 -2px 8px var(--shadow-md);
    height: 70px; /* Shorter height */
}

.nav-item {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Push content to bottom of nav area */
    gap: 2px; /* Tighter spacing */
    padding: var(--space-1) var(--space-2) var(--space-2) var(--space-2); /* Extra bottom padding */
    border-radius: var(--radius-md);
    transition: all var(--transition);
    color: var(--text-gray);
    flex: 1;
    max-width: 80px;
    height: 100%; /* Take full height of nav container */
}

.nav-item:hover {
    background: var(--soft-gray);
    color: var(--primary-dark);
}

.nav-item.active {
    color: var(--terracotta);
    background: rgba(204, 120, 92, 0.1);
}

.nav-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Homepage Components */
.quick-stats {
    display: flex;
    justify-content: space-around;
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-gray);
}

.quick-stats .stat-item {
    text-align: center;
    flex: 1;
}

.quick-stats .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--terracotta);
    line-height: 1;
}

.quick-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 500;
    margin-top: var(--space-1);
}

.welcome-section {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    margin-bottom: var(--space-6);
}

.welcome-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
    letter-spacing: -0.01em;
}

.welcome-section p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.5;
}

.recent-recipes {
    margin-bottom: var(--space-8);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: -0.01em;
}

.text-link {
    background: none;
    border: none;
    color: var(--terracotta);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: color var(--transition);
}

.text-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.recipe-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-4);
}

.empty-preview {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-8);
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-gray);
}

.empty-preview .empty-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: var(--space-4);
    opacity: 0.4;
    color: var(--text-gray);
}

.empty-preview p {
    color: var(--text-gray);
    margin-bottom: var(--space-4);
    font-size: 0.9rem;
}

/* Homepage Hero Section */
.hero-section {
    position: relative;
    min-height: 55vh; /* Reduced from 70vh to show recent recipes */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-6); /* Reduced margin */
    /* Removed box-shadow and border for cleaner look */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(25, 25, 25, 0.7) 0%, 
        rgba(25, 25, 25, 0.4) 50%, 
        rgba(25, 25, 25, 0.6) 100%);
    backdrop-filter: blur(1px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: var(--space-10);
    animation: heroFadeIn 1.2s ease-out;
}

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

.hero-title {
    font-size: 3.5rem; /* 56px - larger and more prominent */
    font-weight: 600; /* iOS uses 600, not 700 */
    color: var(--pure-white);
    margin-bottom: var(--space-4);
    line-height: 1.1;
    letter-spacing: -0.02em; /* Slightly more spacing for large text */
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    font-family: var(--font-family-heading);
}

.hero-subtitle {
    font-size: 1rem; /* 16px - consistent with iOS */
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-8);
    line-height: 1.5;
    font-weight: 400;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-actions {
    margin-top: var(--space-8);
    display: flex;
    justify-content: center;
}

.hero-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--pure-white);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    font-size: 0.875rem; /* 14px - iOS style */
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.hero-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.hero-btn .icon {
    width: 1rem;
    height: 1rem;
}

/* Responsive hero */
@media (max-width: 768px) {
    .hero-section {
        min-height: 45vh; /* Even smaller on mobile to ensure recent recipes visible */
        margin-bottom: var(--space-4);
    }
    
    .hero-title {
        font-size: 2.75rem; /* 44px */
    }
    
    .hero-subtitle {
        font-size: 0.875rem; /* 14px */
    }
    
    .hero-content {
        padding: var(--space-6) var(--space-4); /* Reduced padding on mobile */
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.25rem; /* 36px */
    }
    
    .hero-subtitle {
        font-size: 0.8rem; /* 13px */
    }
    
    .hero-content {
        padding: var(--space-6) var(--space-4);
    }
}


/* Sort Dropdown */
.sort-dropdown {
    position: relative;
}

.sort-select {
    background: var(--pure-white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    font-size: 0.8rem;
    color: var(--primary-dark);
    cursor: pointer;
    min-width: 140px;
    transition: all var(--transition);
}

.sort-select:hover {
    border-color: var(--warm-beige);
}

.sort-select:focus {
    outline: none;
    border-color: var(--sage-green);
    box-shadow: 0 0 0 3px rgba(135, 169, 107, 0.1);
}

.view-toggle-compact {
    display: flex;
    background: var(--pure-white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.view-btn-compact {
    background: transparent;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: all var(--transition);
    color: var(--text-gray);
}

.view-btn-compact:hover {
    background: var(--soft-gray);
    color: var(--primary-dark);
}

.view-btn-compact.active {
    background: var(--terracotta);
    color: var(--pure-white);
}

.view-btn-compact .icon {
    width: 0.875rem;
    height: 0.875rem;
}

/* Search Filters - Full Width */
.search-filters {
    margin-bottom: var(--space-4);
}

.search-container {
    max-width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--pure-white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

#search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    color: var(--primary-dark);
    outline: none;
}

#search-input::placeholder {
    color: var(--text-light);
}

.search-clear {
    background: none;
    border: none;
    padding: var(--space-2);
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-right: var(--space-2);
    width: 28px;
    height: 28px;
    transition: all var(--transition);
}

.search-clear:hover {
    background: var(--soft-gray);
    color: var(--primary-dark);
}

.search-clear svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Horizontal Filter Pills */
.filter-pills-container {
    margin-bottom: var(--space-4);
}

.filter-pills-wrapper {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding: var(--space-1) 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
}

.filter-pills-wrapper::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    background: var(--pure-white);
    border: 1px solid var(--border-gray);
    color: var(--text-gray);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    min-width: auto;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.filter-pill:hover {
    background: var(--soft-gray);
    border-color: var(--warm-beige);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.filter-pill.active {
    background: var(--sage-green);
    color: var(--pure-white);
    border-color: var(--sage-green);
    box-shadow: var(--shadow-md);
}

.filter-pill .icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .subheader-controls {
        gap: var(--space-2);
    }
    
    .sort-select {
        min-width: 120px;
        font-size: 0.75rem;
        padding: var(--space-1) var(--space-2);
    }
    
    .view-btn-compact {
        width: 28px;
        height: 28px;
        padding: var(--space-1);
    }
    
    .view-btn-compact .icon {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .create-list-btn-small {
        font-size: 0.7rem;
        padding: var(--space-1) var(--space-2);
    }
    
    .create-list-btn-small .icon {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .filter-pill {
        padding: var(--space-1) var(--space-2);
        font-size: 0.7rem;
    }
    
    .filter-pill .icon {
        width: 0.7rem;
        height: 0.7rem;
    }
}

/* Shopping List Components */
.shopping-lists-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.shopping-list-card {
    background: var(--pure-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}

.shopping-list-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--warm-beige);
}

.shopping-list-card-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--form-border);
}

.shopping-list-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-1);
    line-height: 1.2;
}

.shopping-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.shopping-list-date {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.recipe-count {
    background: var(--sage-green);
    color: var(--pure-white);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
}

.shopping-list-recipes {
    padding: var(--space-3) var(--space-4);
}

.recipe-thumbnails {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.recipe-thumb {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--light-grey);
    border: 2px solid var(--pure-white);
    object-fit: cover;
}

.recipe-thumb.placeholder {
    background: var(--sage-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pure-white);
    font-size: 0.6rem;
    font-weight: 600;
}

/* Floating Generate Button */
.floating-generate-btn {
    position: fixed;
    bottom: calc(70px + var(--space-4));
    left: var(--space-4);
    background: var(--sage-green);
    border: none;
    border-radius: var(--radius-full);
    color: var(--pure-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    box-shadow: 0 8px 24px rgba(135, 169, 107, 0.3);
    transition: all var(--transition);
    z-index: 1000;
    font-size: 0.875rem;
    font-weight: 500;
}

.floating-generate-btn:hover {
    background: var(--sage-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(135, 169, 107, 0.4);
}

.floating-generate-btn .icon {
    width: 1rem;
    height: 1rem;
}

.selected-count {
    background: var(--pure-white);
    color: var(--sage-green);
    border-radius: var(--radius-full);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: var(--space-1);
}

/* Recipe Selection Modal */
.recipe-selection-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.selection-instructions {
    color: var(--text-gray);
    margin-bottom: var(--space-4);
    text-align: center;
}

.recipe-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    max-height: 400px;
    overflow-y: auto;
}

.recipe-selection-card {
    background: var(--pure-white);
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.recipe-selection-card:hover {
    border-color: var(--sage-light);
    transform: translateY(-1px);
}

.recipe-selection-card.selected {
    border-color: var(--sage-green);
    background: rgba(135, 169, 107, 0.05);
}

.recipe-selection-card.selected::before {
    content: '✓';
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: var(--sage-green);
    color: var(--pure-white);
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.selection-card-image {
    width: 100%;
    height: 100px;
    border-radius: var(--radius-md);
    background: var(--light-grey);
    margin-bottom: var(--space-2);
    object-fit: cover;
}

.selection-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-dark);
    line-height: 1.2;
}

.selection-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-gray);
}

#confirm-selection:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* General Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--pure-white);
    border-radius: var(--radius-xl);
    max-width: 90vw;
    max-height: 90vh;
    width: 600px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: scale(0.9);
}

/* Recipe Modal Specific Styles */
#recipe-modal .modal-content {
    width: 90vw;
    max-width: 800px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.modal-title-section {
    flex: 1;
    min-width: 0;
}

.modal-title-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.recipe-meta {
    display: flex;
    gap: var(--space-2);
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-top: 2px;
}

.modal-actions {
    display: flex;
    gap: var(--space-1);
    align-items: center;
    flex-shrink: 0;
}

#close-modal {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    z-index: 10;
}

.icon-btn {
    background: none;
    border: none;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--soft-gray);
    color: var(--primary-dark);
}

.icon-btn.active {
    color: var(--terracotta);
}

.icon-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Photo Carousel */
.photo-carousel {
    position: relative;
    background: var(--soft-gray);
    height: 120px;
    flex-shrink: 0;
}

.photo-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Favorite star in photo */
#favorite-toggle {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 5;
}

#favorite-toggle:hover {
    background: rgba(255, 255, 255, 1);
}

#favorite-toggle.active {
    background: var(--terracotta);
    color: white;
}

#favorite-toggle.active:hover {
    background: var(--dark-brown);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid var(--border-gray);
    background: var(--pure-white);
    flex-shrink: 0;
    margin-top: -1px; /* Reduce space between photo and tabs */
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 6px var(--space-2);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    background: var(--soft-gray);
    color: var(--primary-dark);
}

.tab-btn.active {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
    background: var(--pure-white);
}

.tab-btn svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* Tab Content */
.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Portions Calculator */
.portions-calculator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--space-2);
    padding: 4px 8px;
    background: var(--soft-gray);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.portions-calculator label {
    font-weight: 500;
    color: var(--primary-dark);
    font-size: 0.7rem;
}

.portions-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.portions-btn {
    background: var(--pure-white);
    border: 1px solid var(--border-gray);
    width: 18px;
    height: 18px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-dark);
    transition: all 0.2s ease;
    font-size: 0.65rem;
    line-height: 1;
}

.portions-btn:hover {
    background: var(--terracotta);
    color: white;
    border-color: var(--terracotta);
}

#portions-input {
    width: 28px;
    text-align: center;
    border: 1px solid var(--border-gray);
    border-radius: 2px;
    padding: 2px;
    font-weight: 500;
    font-size: 0.7rem;
    height: 18px;
    background: var(--pure-white);
    cursor: default;
}

/* Remove number input spinners */
#portions-input::-webkit-outer-spin-button,
#portions-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#portions-input[type=number] {
    -moz-appearance: textfield;
}

/* Ingredients List */
.ingredients {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

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

.ingredient-quantity {
    font-weight: 600;
    color: var(--terracotta);
    min-width: 80px;
}

.ingredient-name {
    flex: 1;
    color: var(--primary-dark);
}

/* Directions List */
.directions {
    list-style: none;
    padding: 0;
    margin: 0;
}

.direction-step {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    align-items: flex-start;
}

.step-number {
    background: var(--terracotta);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    line-height: 1.6;
    color: var(--primary-dark);
}

/* Recipe Notes */
.recipe-notes {
    margin-top: var(--space-4);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-gray);
}

.recipe-notes h3 {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recipe-notes p {
    font-size: 0.65rem;
    line-height: 1.4;
    color: var(--text-gray);
}

.empty-text {
    color: var(--text-gray);
    font-style: italic;
    text-align: center;
    padding: var(--space-2);
    font-size: 0.7rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #recipe-modal .modal-content {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    
    .modal-header {
        padding: var(--space-2) var(--space-3);
    }
    
    .recipe-meta {
        flex-direction: column;
        gap: var(--space-1);
    }
    
    .photo-carousel {
        height: 100px;
    }
    
    .tab-content {
        padding: var(--space-2);
    }
    
    #close-modal {
        top: var(--space-1);
        right: var(--space-1);
    }
}

/* Add Recipe Form Styles - Mobile Optimized */
.add-recipe-modal-content {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    padding: 0;
    border-radius: 0;
    margin: 0;
}

.add-recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--border-gray);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.add-recipe-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-dark);
}

.close-add-recipe-btn {
    padding: var(--space-1);
    margin: 0;
}

#add-recipe-form {
    padding: var(--space-2) var(--space-3) var(--space-4);
}

.form-section {
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-1);
    border-bottom: 1px solid var(--border-gray);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: var(--space-1);
}

.form-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 2px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: inherit;
    background: var(--pure-white);
    transition: border-color 0.2s ease;
}

/* Specific input sizing for mobile */
@media (max-width: 480px) {
    .qty-input {
        width: 45px;
        font-size: 0.7rem;
    }
    
    .unit-select {
        width: 55px;
        font-size: 0.65rem;
    }
    
    .ingredient-row {
        gap: 4px;
    }
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--terracotta);
    box-shadow: 0 0 0 2px rgba(204, 120, 92, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-gray);
    margin-top: var(--space-3);
    position: sticky;
    bottom: 0;
    background: white;
    padding-bottom: var(--space-2);
}

.form-actions .secondary-btn,
.form-actions .primary-btn {
    flex: 1;
    padding: var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
}

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

.primary-btn {
    background: var(--terracotta);
    color: white;
    border: 1px solid var(--terracotta);
}

/* Photo Upload */
/* Multi-Photo Upload */
.photos-upload-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.photo-count {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: normal;
}

.photo-upload-area {
    position: relative;
    border: 2px dashed var(--border-gray);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-upload-area:hover {
    border-color: var(--terracotta);
    background: var(--soft-gray);
}

.photo-upload-area.dragover {
    border-color: var(--terracotta);
    background: rgba(204, 120, 92, 0.1);
}

.photo-upload-area.hidden {
    display: none;
}

.photos-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.photo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-gray);
}

.photo-upload-placeholder small {
    font-size: 0.8rem;
    opacity: 0.7;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--terracotta);
}

/* Photos Preview Grid */
.photos-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.photo-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.photo-preview-item.dragging {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--terracotta);
    z-index: 10;
}

.photo-preview-item.drag-over {
    border-color: var(--sage-green);
    background: rgba(135, 169, 107, 0.1);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-item .photo-controls {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    display: flex;
    gap: var(--space-1);
}

.photo-preview-item .photo-order {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.photo-remove-btn {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s ease;
}

.photo-remove-btn:hover {
    background: rgba(220, 53, 69, 1);
}

/* Primary photo indicator */
.photo-preview-item.primary::after {
    content: 'Primary';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(204, 120, 92, 0.9), transparent);
    color: white;
    text-align: center;
    padding: var(--space-2);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ingredients Section */
.ingredients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.unit-toggle {
    display: flex;
    background: var(--light-grey);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.unit-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    border: none;
    background: transparent;
    color: var(--text-gray);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unit-btn.active {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ingredient-item {
    margin-bottom: var(--space-1);
}

/* Ingredient Row - Single Line Mobile Layout */
.ingredient-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.qty-input {
    width: 50px;
    padding: 4px 6px;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-sm);
    background: var(--pure-white);
}

.unit-select {
    width: 60px;
    padding: 4px 2px;
    font-size: 0.7rem;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-sm);
    background: var(--pure-white);
}

.name-input {
    flex: 1;
    padding: 4px 6px;
    font-size: 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-sm);
    background: var(--pure-white);
}

.ingredient-quantity input {
    text-align: center;
}

.ingredient-unit select {
    font-size: 0.75rem;
}

.remove-ingredient-btn,
.remove-instruction-btn {
    background: var(--soft-gray);
    border: 1px solid var(--border-gray);
    color: var(--text-gray);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-ingredient-btn:hover,
.remove-instruction-btn:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.add-btn {
    background: var(--soft-gray);
    border: 1px dashed var(--border-gray);
    color: var(--terracotta);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
}

.add-btn:hover {
    background: var(--terracotta);
    color: white;
    border-style: solid;
}

/* Instructions */
.instruction-item {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: var(--space-1);
    align-items: start;
    margin-bottom: var(--space-1);
}

.instruction-number {
    background: var(--terracotta);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 4px;
}

.instruction-textarea {
    resize: vertical;
    min-height: 32px;
    font-family: inherit;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-gray);
}

.primary-btn,
.secondary-btn {
    padding: var(--space-3);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
}

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

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

.secondary-btn {
    background: var(--pure-white);
    color: var(--text-gray);
    border-color: var(--border-gray);
}

.secondary-btn:hover {
    background: var(--soft-gray);
}

/* Responsive Form */
@media (max-width: 768px) {
    #add-recipe-modal .modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .ingredient-item .form-row {
        grid-template-columns: 1fr;
    }
    
    .ingredient-item .form-row .remove-ingredient-btn {
        justify-self: center;
        margin-top: var(--space-1);
    }
}

/* Shopping List Modal - iOS style full page */
.shopping-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--pure-white);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.shopping-list-modal.active {
    transform: translateY(0);
}

.shopping-list-modal-header {
    background: var(--pure-white);
    border-bottom: 1px solid var(--border-gray);
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.shopping-list-modal-content {
    padding: var(--space-4);
    height: calc(100vh - 80px);
    overflow-y: auto;
}

/* Recipe Cards - Matching Style Guide Exactly */
.recipe-card {
    background: var(--pure-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 280px;
    width: 100%;
}

.recipe-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.recipe-card-image {
    position: relative;
    height: 160px;
    background: var(--light-grey);
    overflow: hidden;
}

.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recipe-card-image.empty {
    background: var(--form-bg);
}

.recipe-image-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.recipe-icon {
    width: 2rem;
    height: 2rem;
    margin-bottom: var(--space-2);
}

.placeholder-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.favorite-btn {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-gray);
}

.favorite-btn:hover {
    background: var(--pure-white);
    color: var(--terracotta);
    transform: scale(1.1);
}

.favorite-btn svg {
    width: 1rem;
    height: 1rem;
}

.recipe-card-content {
    padding: var(--space-4);
}

.recipe-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-3);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.recipe-time {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.75rem;
    color: var(--text-gray);
}

.recipe-time .icon {
    width: 0.75rem;
    height: 0.75rem;
}

.recipe-difficulty {
    font-size: 0.7rem;
    font-weight: 500;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.recipe-difficulty.easy {
    background: rgba(135, 169, 107, 0.1);
    color: var(--sage-green);
}

.recipe-difficulty.medium {
    background: rgba(212, 162, 127, 0.1);
    color: var(--warm-beige);
}

.recipe-difficulty.hard {
    background: rgba(204, 120, 92, 0.1);
    color: var(--terracotta);
}

.recipe-tags {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
}

.recipe-tag {
    background: var(--form-bg);
    color: var(--text-gray);
    font-size: 0.65rem;
    font-weight: 500;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* Recipe Grid Layout */
.recipe-preview-grid,
.recipes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
    padding: var(--space-4) 0;
}

@media (max-width: 768px) {
    .recipe-preview-grid,
    .recipes-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--space-3);
    }
    
    .recipe-card {
        max-width: none;
    }
}

/* Recipe List Interactive States */
.results-count-area {
    margin-bottom: var(--space-4);
}

.results-info {
    padding: var(--space-3) 0;
    color: var(--text-gray);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-gray);
    margin-bottom: var(--space-4);
}

.loading-state,
.empty-state,
.error-state {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-gray);
}

.empty-state h3,
.error-state h3 {
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
}

.retry-btn {
    background: var(--terracotta);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: var(--space-3);
    transition: background 0.2s ease;
}

.retry-btn:hover {
    background: var(--dark-brown);
}

/* Header Search Container */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

/* Search Toggle Button */
.search-toggle-btn {
    background: transparent;
    border: none;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle-btn:hover {
    background: var(--light-grey);
    color: var(--primary-dark);
}

.search-toggle-btn .icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Search Input Wrapper - replaces button when active */
.search-input-wrapper {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    width: min(280px, calc(100vw - 80px));
    max-width: 280px;
    z-index: 100;
}

.search-input-wrapper.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.search-input-wrapper:not(.hidden) {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

#search-input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--input-bg);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

#search-input:focus {
    outline: none;
    border-color: var(--terracotta);
    box-shadow: 0 0 0 2px rgba(204, 120, 92, 0.1);
}

.search-close {
    background: var(--input-bg);
    border: 1px solid var(--border-gray);
    border-left: none;
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    padding: var(--space-2);
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close:hover {
    color: var(--text-gray);
    background: var(--form-bg);
}

.search-close svg {
    width: 1rem;
    height: 1rem;
}

/* Filter Pills Active State Enhancement */
.filter-pill.active {
    background: var(--terracotta);
    color: white;
    transform: translateY(-1px);
}

.filter-pill:hover:not(.active) {
    background: var(--light-grey);
    transform: translateY(-1px);
}

/* View Mode Buttons */
.view-controls button.active {
    background: var(--terracotta);
    color: white;
}

/* List View Styling - Table Format */
.recipes-container.list-view {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.recipes-container.list-view .results-info {
    display: table-caption;
    caption-side: top;
    text-align: left;
    padding: var(--space-2) 0;
    border-bottom: none;
    margin-bottom: var(--space-2);
}

.recipes-container.list-view .recipe-card {
    display: table-row;
    max-width: none;
    background: var(--pure-white);
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-gray);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.recipes-container.list-view .recipe-card:hover {
    background: var(--soft-gray);
}

.recipes-container.list-view .recipe-card:last-child {
    border-bottom: none;
}

.recipes-container.list-view .recipe-card-image {
    display: none; /* No images in list view */
}

.recipes-container.list-view .recipe-card-content {
    display: table-cell;
    padding: var(--space-2);
    vertical-align: middle;
}

/* List view specific layout */
.recipes-container.list-view .recipe-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.recipes-container.list-view .recipe-card-meta {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-gray);
}

.recipes-container.list-view .recipe-tags {
    display: none; /* Hide tags in list view for space */
}

.recipes-container.list-view .favorite-btn {
    display: table-cell;
    width: 40px;
    text-align: center;
    padding: var(--space-1);
    vertical-align: middle;
}

.recipes-container.list-view .favorite-btn svg {
    width: 16px;
    height: 16px;
}

/* Loading Animation */
.loading-state {
    position: relative;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-gray);
    border-top: 2px solid var(--terracotta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Page Layouts - Remove Headers */
.cookbook-page {
    padding-top: 0;
}

.shopping-page {
    padding-top: 0;
}

/* Hide header on all pages for consistent experience */
.homepage-page-active .app-header,
.cookbook-page-active .app-header,
.shopping-page-active .app-header {
    display: none;
}

.homepage-page-active .page-subheader,
.cookbook-page-active .page-subheader,
.shopping-page-active .page-subheader {
    display: none;
}

/* Homepage adjustments - bring up hero image */
.homepage-page-active #homepage {
    padding-top: 0;
    margin-top: 0;
}

.homepage-page-active .hero-section {
    margin-top: 0;
}

.centered-search-container {
    padding: var(--space-4) var(--space-3) var(--space-3);
    background: var(--off-white);
    display: flex;
    justify-content: center;
    align-items: center;
}

.centered-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-gray);
}

.centered-search-input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: var(--primary-dark);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.centered-search-input:focus {
    outline: none;
}

.centered-search-input::placeholder {
    color: var(--text-light);
}

.centered-search-btn {
    background: var(--terracotta);
    border: none;
    padding: var(--space-3);
    border-top-right-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    cursor: pointer;
    color: white;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.centered-search-btn:hover {
    background: var(--dark-brown);
}

.centered-search-btn .icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Categories Section */
.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-1);
}

.category-actions {
    display: flex;
    gap: var(--space-1);
}

.icon-btn.small {
    width: 24px;
    height: 24px;
    padding: 2px;
}

.icon-btn.small .icon {
    width: 16px;
    height: 16px;
}

.custom-categories {
    margin-top: var(--space-2);
}

/* Filter pills adjustments for cookbook page */
.cookbook-page .filter-pills-container {
    padding-top: 0;
    padding-bottom: var(--space-3);
    background: var(--off-white);
}

/* Recipe Modal - Mobile-First Hero Layout */
.recipe-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    overflow-y: auto;
    padding: 0;
}

/* Hero Image Section - Top Third of Screen */
.recipe-hero {
    position: relative;
    height: 33vh;
    min-height: 200px;
    overflow: visible !important; /* Changed to visible to show carousel dots */
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Ensure no favorite button appears on hero image */
.recipe-hero .favorite-btn,
.recipe-hero .favorite-btn-hero,
.recipe-hero .favorite-btn-inline,
.recipe-hero button[aria-label*="favorite"],
.recipe-hero button[class*="favorite"] {
    display: none !important;
}

/* Only allow close button and carousel buttons in hero */
.recipe-hero > button:not(.close-btn):not(.modal-carousel-nav):not(#carousel-prev):not(#carousel-next):not(.carousel-dot),
.recipe-hero button:not(#close-modal):not(#carousel-prev):not(#carousel-next):not(.modal-carousel-nav):not(.carousel-dot) {
    display: none !important;
}

/* Force hide any star-related elements from hero */
.recipe-hero *[class*="star"],
.recipe-hero *[id*="favorite"],
.recipe-hero *[aria-label*="favorite"] {
    display: none !important;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.close-btn {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.close-btn .icon {
    width: 20px;
    height: 20px;
}


/* Recipe Info Section - Compact */
.recipe-info {
    padding: var(--space-2) var(--space-3);
    background: white;
}

/* Title Row with Inline Actions */
.title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-1);
}

.recipe-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.recipe-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

/* Inline Action Buttons - Style Guide Compliant */
.favorite-btn-inline,
.edit-btn-inline {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-gray);
    flex-shrink: 0;
}

.favorite-btn-inline:hover,
.edit-btn-inline:hover {
    background: var(--pure-white);
    color: var(--terracotta);
    transform: scale(1.1);
}

.edit-btn-inline.editing {
    background: var(--terracotta);
    color: var(--pure-white);
}

.favorite-btn-inline .icon,
.edit-btn-inline .icon {
    width: 1rem;
    height: 1rem;
}

/* Favorited state - filled star (from style guide) */
.favorite-btn-inline.favorited {
    color: var(--terracotta);
}

.favorite-btn-inline.favorited .icon {
    fill: currentColor;
}

/* Not favorited state - outline star (from style guide) */
.favorite-btn-inline:not(.favorited) .icon {
    fill: none;
    stroke: currentColor;
}

/* Recipe Edit Mode Styles */
.recipe-modal-content.editing-mode {
    border: 2px solid var(--terracotta);
}

/* Editable fields styling */
.recipe-modal-content.editing-mode [contenteditable="true"] {
    background: var(--cream);
    border: 2px solid var(--terracotta);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    cursor: text;
    outline: none;
    transition: all 0.2s ease;
}

.recipe-modal-content.editing-mode [contenteditable="true"]:hover {
    background: var(--pure-white);
    border-color: var(--sage-green);
}

.recipe-modal-content.editing-mode [contenteditable="true"]:focus {
    background: var(--pure-white);
    border-color: var(--sage-green);
    box-shadow: 0 0 0 3px rgba(139, 165, 137, 0.1);
}

/* Ingredient editing - preserve original styling */
.recipe-modal-content.editing-mode .ingredient-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) 0;
}

.recipe-modal-content.editing-mode .ingredient-amount {
    background: var(--cream);
    border: 1px solid var(--terracotta);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    min-width: 80px;
    margin-right: var(--space-2);
}

.recipe-modal-content.editing-mode .ingredient-name {
    background: var(--cream);
    border: 1px solid var(--terracotta);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    flex: 1;
    margin-right: var(--space-2);
}

/* Instruction editing */
.recipe-modal-content.editing-mode .direction-step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.recipe-modal-content.editing-mode .step-number {
    background: var(--sage-green);
    color: white;
    border-radius: var(--radius-full);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.recipe-modal-content.editing-mode .instruction-text {
    flex: 1;
    background: var(--cream);
    border: 1px solid var(--terracotta);
    border-radius: var(--radius-sm);
    padding: var(--space-2);
    min-height: 40px;
}

/* Delete buttons */
.delete-btn {
    background: var(--terracotta);
    border: none;
    border-radius: var(--radius-full);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: var(--space-2);
    font-size: 0.8rem;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.delete-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.recipe-times {
    display: flex;
    gap: var(--space-3);
    margin: 0;
}

.time-item {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* Tab Navigation - Compact Version of Original */
.tab-navigation.compact {
    display: flex;
    border-bottom: 1px solid var(--border-gray);
    margin: 0 var(--space-3);
    margin-bottom: var(--space-2);
}

.tab-navigation.compact .tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-navigation.compact .tab-btn .icon {
    width: 14px;
    height: 14px;
}

.tab-navigation.compact .tab-btn.active {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
}

.tab-navigation.compact .tab-btn:hover:not(.active) {
    color: var(--primary-dark);
    background: var(--light-grey);
}

/* Tab Content - Compact */
.tab-content {
    padding: var(--space-2) var(--space-3);
    flex: 1;
    overflow-y: auto;
    display: none;
}

.tab-content.active {
    display: block;
}

/* Compact Portions Calculator */
.portions-calculator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    padding: var(--space-1) var(--space-2);
    background: var(--light-grey);
    border-radius: var(--radius-md);
}

.portions-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-gray);
}

.portions-controls {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.portions-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-gray);
    background: white;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.portions-btn:hover {
    background: var(--terracotta);
    color: white;
    border-color: var(--terracotta);
}

#portions-input {
    width: 40px;
    text-align: center;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-sm);
    padding: 2px 4px;
    font-size: 0.8rem;
    background: var(--pure-white);
    cursor: default;
}

/* Compact Ingredients List */
.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

/* Compact Directions */
.directions-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.recipe-notes {
    margin-top: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-gray);
}

.recipe-notes h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0 0 var(--space-1) 0;
}

/* Delete Recipe Button - Bottom Right Corner */
.delete-recipe-btn {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--terracotta);
    color: var(--pure-white);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.delete-recipe-btn:hover {
    background: #B8684A;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.delete-recipe-btn .icon {
    width: 16px;
    height: 16px;
}

/* Delete Confirmation Modal - Style Guide Compliant */
.delete-confirmation-content {
    max-width: 400px;
    margin: 50vh auto 0;
    transform: translateY(-50%);
    background: var(--pure-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.delete-modal-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-gray);
    background: var(--form-bg);
}

.delete-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    letter-spacing: -0.01em;
}

.delete-modal-body {
    padding: var(--space-6);
}

.delete-modal-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-gray);
    margin: 0;
}

.delete-modal-actions {
    padding: var(--space-6);
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    border-top: 1px solid var(--border-gray);
    background: var(--form-bg);
}

/* Apply style guide button styling to delete modal buttons */
.delete-modal-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    font-family: var(--font-family);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.delete-modal-actions .btn-secondary {
    background: var(--pure-white);
    color: var(--primary-dark);
    border: 1px solid var(--border-gray);
}

.delete-modal-actions .btn-secondary:hover {
    background: var(--form-bg);
    border-color: var(--warm-beige);
}

.delete-modal-actions .btn-accent {
    background: var(--terracotta);
    color: var(--pure-white);
    box-shadow: var(--shadow-sm);
}

.delete-modal-actions .btn-accent:hover {
    background: #B8684A;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Category Management System */
.category-management {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-height: 40px;
    padding: var(--space-2);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-lg);
    background: var(--form-bg);
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--sage-green);
    color: var(--pure-white);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-pill.selected {
    background: var(--terracotta);
}

.category-pill:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.category-pill-text {
    cursor: pointer;
}

.category-pill-actions {
    display: flex;
    gap: var(--space-1);
}

.pill-action-btn {
    background: none;
    border: none;
    color: var(--pure-white);
    cursor: pointer;
    padding: 2px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pill-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pill-action-btn .icon {
    width: 12px;
    height: 12px;
}

.category-pill-input {
    background: var(--pure-white);
    color: var(--primary-dark);
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 80px;
}

.category-pill-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.category-actions-row {
    display: flex;
    justify-content: flex-start;
}

.add-category-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--pure-white);
    color: var(--text-gray);
    border: 1px dashed var(--border-gray);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.add-category-btn:hover {
    background: var(--form-bg);
    border-color: var(--sage-green);
    color: var(--sage-green);
}

.add-category-btn .icon {
    width: 14px;
    height: 14px;
}

/* Empty state for category pills */
.category-pills:empty::before {
    content: "No categories selected. Click 'Add New Category' to get started.";
    color: var(--text-light);
    font-size: 0.75rem;
    font-style: italic;
    display: flex;
    align-items: center;
    height: 24px;
}

/* =================
   LOGIN PAGE STYLES
   ================= */

.login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('../images/home-hero-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(25, 25, 25, 0.7) 0%, 
        rgba(25, 25, 25, 0.4) 50%, 
        rgba(25, 25, 25, 0.6) 100%);
    backdrop-filter: blur(1px);
}

.login-container {
    position: relative;
    z-index: 2;
    background: var(--pure-white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
    margin: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.login-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.login-form .form-label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.login-form .form-input {
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    background: var(--input-bg);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.login-form .form-input:focus {
    outline: none;
    border-color: var(--sage-green);
    background: var(--pure-white);
    box-shadow: 0 0 0 3px rgba(135, 169, 107, 0.1);
}

.login-form .form-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.login-btn {
    background: var(--terracotta);
    color: var(--pure-white);
    border: none;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: var(--space-2);
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-sm);
}

.login-btn:hover {
    background: #B8684A;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-btn:disabled {
    background: var(--border-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-error {
    background: rgba(204, 120, 92, 0.1);
    color: var(--terracotta);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--terracotta);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Logout button in bottom nav - same style as other nav items */

/* Responsive login */
@media (max-width: 480px) {
    .login-container {
        margin: var(--space-2);
        padding: var(--space-6);
    }
    
    .login-title {
        font-size: 2rem;
    }
}

/* ===== RECIPE CARD CAROUSEL ===== */

/* Carousel Container */
.recipe-card-image.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Desktop Navigation Chevrons - Faint, Modern, Glassy Look */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.carousel-nav svg {
    width: 16px;
    height: 16px;
    color: var(--primary-dark);
    opacity: 0.8;
}

.carousel-nav.prev {
    left: 8px;
}

.carousel-nav.next {
    right: 8px;
}

/* Show navigation on hover (desktop) */
.recipe-card-image.carousel:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.carousel-nav:hover svg {
    opacity: 1;
}

/* Mobile Dots at Bottom */
.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot.active {
    background: var(--pure-white);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Hide navigation on mobile, show dots */
@media (max-width: 768px) {
    .carousel-nav {
        display: none;
    }
    
    .carousel-dots {
        opacity: 1;
    }
}

/* Show navigation on desktop, hide dots */
@media (min-width: 769px) {
    .carousel-dots {
        opacity: 0;
    }
    
    .recipe-card-image.carousel:hover .carousel-dots {
        opacity: 1;
    }
}

/* Ensure single photo cards maintain original styling */
.recipe-card-image.single-photo {
    /* Original recipe card image styles remain unchanged */
}

/* ===== RECIPE MODAL CAROUSEL ===== */

/* Modal Carousel Container */
.modal-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible !important; /* Changed to visible to prevent clipping dots */
}

.modal-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-carousel-track .carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-carousel-track .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Navigation Chevrons */
.modal-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-carousel-nav svg {
    width: 20px;
    height: 20px;
    color: var(--primary-dark);
    opacity: 0.8;
}

.modal-carousel-nav.prev {
    left: 16px;
}

.modal-carousel-nav.next {
    right: 16px;
}

/* Show navigation on hover (desktop) */
.recipe-hero:hover .modal-carousel-nav,
.modal-carousel-container:hover .modal-carousel-nav {
    opacity: 1;
}

/* Override hero button hiding for carousel navigation - FORCE VISIBILITY */
.recipe-hero .modal-carousel-nav,
.recipe-hero #carousel-prev,
.recipe-hero #carousel-next,
.recipe-hero button.modal-carousel-nav,
.recipe-hero button#carousel-prev,
.recipe-hero button#carousel-next,
.recipe-hero .modal-carousel-container .modal-carousel-nav {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute !important;
    z-index: 10 !important;
}

/* Hidden chevron class - higher specificity than the !important rules above */
.recipe-hero .modal-carousel-nav.hidden-chevron,
.recipe-hero #carousel-prev.hidden-chevron,
.recipe-hero #carousel-next.hidden-chevron {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.recipe-hero .modal-carousel-dots,
.recipe-hero #carousel-dots {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.recipe-hero .modal-carousel-dots .carousel-dot,
.recipe-hero #carousel-dots .carousel-dot,
.recipe-hero .carousel-dot {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-carousel-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.modal-carousel-nav:hover svg {
    opacity: 1;
}

/* Modal Dots at Bottom */
.modal-carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.modal-carousel-dots .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-carousel-dots .carousel-dot.active {
    background: var(--pure-white);
    transform: scale(1.3);
}

.modal-carousel-dots .carousel-dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Hide navigation on mobile, show dots */
@media (max-width: 768px) {
    .modal-carousel-nav {
        display: none;
    }
    
    .modal-carousel-dots {
        opacity: 1;
    }
}

/* Show navigation on desktop, hide dots */
@media (min-width: 769px) {
    .modal-carousel-dots {
        opacity: 0;
    }
    
    .recipe-hero:hover .modal-carousel-dots,
    .modal-carousel-container:hover .modal-carousel-dots {
        opacity: 1;
    }
}

/* Modal carousel dots - elegant styling */
.recipe-hero .modal-carousel-container .modal-carousel-dots,
.recipe-hero .modal-carousel-dots,
.recipe-hero #carousel-dots,
.modal-carousel-container .modal-carousel-dots,
.modal-carousel-dots,
div#carousel-dots {
    opacity: 1 !important;
    display: flex !important;
    visibility: visible !important;
    position: absolute !important;
    bottom: 16px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 100 !important;
    gap: 8px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    backdrop-filter: blur(4px) !important;
}

/* Modal carousel dots - individual dot styling */
.recipe-hero .modal-carousel-dots .carousel-dot,
.recipe-hero #carousel-dots .carousel-dot,
.modal-carousel-dots .carousel-dot,
#carousel-dots .carousel-dot,
div#carousel-dots > button,
div#carousel-dots > .carousel-dot,
div#carousel-dots > button.carousel-dot,
#recipe-modal #carousel-dots > button,
#recipe-modal .modal-carousel-dots > button,
.recipe-modal .modal-carousel-dots > button,
button.carousel-dot,
.carousel-dot {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: none !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: static !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
}

.recipe-hero .modal-carousel-dots .carousel-dot.active,
.modal-carousel-dots .carousel-dot.active,
#carousel-dots .carousel-dot.active {
    background: var(--pure-white) !important;
    transform: scale(1.3) !important;
}

.recipe-hero .modal-carousel-dots .carousel-dot:hover,
.modal-carousel-dots .carousel-dot:hover,
#carousel-dots .carousel-dot:hover {
    background: rgba(255, 255, 255, 0.9) !important;
}