:root {
    --brand-primary: #2D6A4F; /* Deep Emerald Green */
    --brand-primary-hover: #1B4332;
    --brand-secondary: #D4A373; /* Warm Gold/Honey */
    --brand-accent: #E9C46A; /* Saffron */
    --brand-danger: #BC4749; /* Deep Earthy Red */
    --bg-main: #FDFBF7; /* Cream/Off-white */
    --text-main: #2D2D2D;
    --text-muted: #666666;
    --card-shadow: 0 12px 40px rgba(45, 106, 79, 0.08);
}

/* General Body Styles */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main) !important;
    font-weight: 700;
}

/* Buttons and Inputs */
input,
button,
.form-control,
.form-select {
    border-radius: 12px;
}

.btn {
    border-radius: 50px !important;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.3s ease;
}

/* Main Content */
.display-4 {
    font-weight: 700;
    color: var(--text-main);
}

.lead {
    color: var(--text-muted);
}

/* Cards */
.card {
    background-color: #ffffff;
    border: none;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-body {
    color: var(--text-main);
}

/* Forms */
.form-label {
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    background-color: #ffffff;
    border: 2px solid #F0F0F0;
    color: var(--text-main);
    padding: 12px 16px;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.1);
    color: var(--text-main);
}

.form-control::placeholder {
    color: #AAAAAA;
}

/* Buttons */
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 106, 79, 0.2);
}

.btn-outline-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    border-width: 2px;
}

.btn-outline-primary:hover {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

.text-primary {
    color: var(--brand-primary) !important;
}

.btn-danger {
    background-color: var(--brand-danger) !important;
    border-color: var(--brand-danger) !important;
    color: #ffffff !important;
}
/* ... rest of existing styles ... */
/* Feature Items */
.feature-item {
    background: transparent;
    border: none;
    padding: 8px 0 !important;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(8px);
}

.checkmark {
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

.feature-list h5 {
    color: #ffffff !important;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.btn-outline-secondary {
    border: 2px solid #EEEEEE;
    color: var(--text-muted);
}

.btn-outline-secondary:hover {
    background-color: #F8F8F8;
    color: var(--text-main);
    border-color: #DDDDDD;
}

.btn-secondary {
    background-color: #F0F0F0;
    border: none;
    color: var(--text-muted);
}

.btn-secondary:hover {
    background-color: #E0E0E0;
    color: var(--text-main);
}

/* Shopping List & Recipe Cards */
.recipe-card {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #F0F0F0;
}

#recipe-cards-container, #shopping-list-container {
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #DDDDDD;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-secondary);
}

/* Footer */
footer {
    border-top: 1px solid #EEEEEE;
    color: #999999;
    font-size: 0.9rem;
}

/* Shopping List Checkbox */
.list-group-item {
    background-color: transparent !important;
    border-bottom: 1px solid #F8F8F8 !important;
    padding: 15px 0 !important;
    color: var(--text-main) !important;
}

.list-group-item.checked .form-check-label {
    text-decoration: line-through;
    opacity: 0.5;
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
    border: 2px solid #DDDDDD;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* Unit buttons */
.unit-selector .btn {
    padding: 6px 12px !important;
    font-size: 0.85rem;
}

.unit-selector .btn-secondary {
    background-color: var(--brand-primary) !important;
    color: white !important;
}

/* Badges */
.bg-custom-green {
    background-color: #E9F5EF !important;
    color: var(--brand-primary) !important;
    font-weight: 700;
    border: 1px solid #D1EADE;
}

/* Quantity Modifiers */
.btn-quantity-modifier {
    width: 28px;
    height: 28px;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #F8F8F8;
    border: 1px solid #EEEEEE;
    color: var(--text-muted);
    padding: 0 !important;
}

.btn-quantity-modifier:hover {
    background-color: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

/* Modal Styles */
.modal-content {
    background-color: #ffffff;
    border: none;
    border-radius: 32px;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #F8F8F8;
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid #F8F8F8;
    padding: 20px 24px;
}

/* Recipe Card Selection */
.recipe-selection-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.recipe-selection-card.selected {
    border-color: var(--brand-primary);
    box-shadow: 0 15px 45px rgba(45, 106, 79, 0.15);
    background-color: #F7FAF9;
}

.recipe-selection-card .select-recipe:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.recipe-controls {
    border: 1px solid #EAEAEA;
    transition: all 0.3s ease;
}

.recipe-selection-card.selected .recipe-controls {
    background-color: #ffffff !important;
    border-color: var(--brand-primary);
}

.recipe-selection-card .form-check-input {
    width: 1.5em;
    height: 1.5em;
}

.recipe-selection-card .form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Category Label */
.recipe-category-label {
    background-color: #E9F5EF;
    color: var(--brand-primary);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Filters */
#category-filters .btn {
    border: 2px solid #F0F0F0;
    background-color: #ffffff;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 8px 16px !important;
}

#category-filters .btn.active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

/* Search Container */
#recipe-search {
    padding-left: 3rem;
    height: 54px;
    border-color: #F0F0F0;
}

.search-container .bi-search {
    left: 1.25rem;
    color: #AAAAAA;
    font-size: 1.1rem;
}

/* Recipe Card Image */
.card .card-img-top {
    height: 160px;
    width: 160px;
    object-fit: cover;
    border-radius: 50% !important;
    margin: 20px auto 10px auto;
    border: 5px solid #ffffff;
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.recipe-selection-card {
    border-radius: 40px !important;
    text-align: center;
    overflow: hidden;
    padding-bottom: 15px;
}

.card-body {
    padding: 1rem !important;
    color: var(--text-main);
}

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

.recipe-selection-card .selection-wrapper {
    justify-content: center;
}

.recipe-selection-card .form-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.recipe-selection-card .recipe-category-label {
    margin: 5px auto;
    display: inline-block;
}

.recipe-selection-card .card-text {
    margin-bottom: 1rem;
}

.recipe-controls {
    border: 1px solid #EAEAEA;
    transition: all 0.3s ease;
    padding: 10px !important;
    border-radius: 20px !important;
    margin: 0 10px 15px 10px;
}

.recipe-controls label {
    font-size: 0.75rem !important;
}

.recipe-controls .form-control-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* View Recipe Modal */
#view-recipe-ingredients {
    background-color: #FBFBFB;
    border-radius: 20px;
    padding: 20px;
}

#view-recipe-ingredients .list-group-item {
    border-bottom: 1px solid #F0F0F0 !important;
    padding: 10px 0 !important;
}

#view-recipe-ingredients .list-group-item:last-child {
    border-bottom: none !important;
}

/* Auth Screen Styles */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1050;
    background-color: #ffffff;
}

.auth-image-container {
    position: relative;
    overflow: hidden;
    background-color: #2D2D2D; /* Neutral dark fallback */
}

.auth-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.auth-image-overlay {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Animated decorative circles in background */
.auth-image-overlay::before,
.auth-image-overlay::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(45, 106, 79, 0.2);
    filter: blur(80px);
    z-index: 0;
}

.auth-image-overlay::before {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation: pulse 10s infinite alternate;
}

.auth-image-overlay::after {
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: -150px;
    animation: pulse 15s infinite alternate-reverse;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.2; }
    100% { transform: scale(1.2) translate(50px, 30px); opacity: 0.4; }
}

.auth-branding-content {
    background: rgba(45, 106, 79, 0.15);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 40px;
    max-width: 520px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.3);
    animation: slideUpFade 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

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

.floating-emoji {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(var(--rotate)); }
    50% { transform: translateY(-20px) rotate(calc(var(--rotate) + 10deg)); }
}

.auth-branding-content p.lead {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 1.15rem;
    line-height: 1.5;
    letter-spacing: -0.2px;
}

.feature-list h5 {
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.feature-list .bi {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-form-container {
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
    z-index: 2;
}

.auth-form-container h2 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -1px;
}

.auth-screen .form-control-lg {
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 14px;
    border: 2px solid #F5F5F5;
    background-color: #FAFAFA;
}

.auth-screen .form-control-lg:focus {
    background-color: #ffffff;
    border-color: var(--brand-primary);
}

#auth-nav.guest-nav {
    display: none !important;
}

body:has(#guest-view:not(.d-none)) .navbar {
    display: none !important;
}

/* Footer hidden on auth screen */
body:has(#guest-view:not(.d-none)) footer {
    display: none !important;
}

@media (max-width: 991.98px) {
    .auth-form-container {
        padding: 40px 20px !important;
    }
}

/* Modal Custom Styles */
.modal-content {
    border-radius: 28px !important;
}

.add-option-btn {
    border: 2px solid #F0F0F0 !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    background-color: #ffffff !important;
    color: var(--text-main) !important;
}

.add-option-btn:hover {
    border-color: var(--brand-primary) !important;
    background-color: #ffffff !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(45, 106, 79, 0.1) !important;
}

.add-option-btn i {
    color: var(--brand-primary);
    background: #F7FAF9;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1.5rem !important;
    transition: all 0.4s ease;
    border: 1px solid #E9F5EF;
}

.add-option-btn:hover i {
    background: var(--brand-primary);
    color: #ffffff;
    transform: rotate(10deg) scale(1.1);
}

.add-option-btn .fw-bold {
    color: var(--text-main);
    font-size: 1rem;
}

#take-photo-btn, #take-products-photo-btn {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%) !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(45, 106, 79, 0.2);
}

#take-photo-btn:hover, #take-products-photo-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(45, 106, 79, 0.3);
}

#upload-image-btn {
    border: 2px dashed var(--brand-primary) !important;
    background: #F7FAF9 !important;
    color: var(--brand-primary) !important;
}

#upload-image-btn:hover {
    background: #E9F5EF !important;
    transform: translateY(-5px);
}

#manual-ingredients-list {
    border-radius: 18px;
    padding: 15px;
    background-color: #F9F9F9;
}

/* Print Styles */
@media print {
    body { background-color: white; }
    .card { box-shadow: none; border: 1px solid #EEE; }
}

@media (max-width: 768px) {
    .display-4 { font-size: 2rem; }
}