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

:root {
    --white: #FFFFFF;
    --bright-blue: #00A7E1;
    --dark-navy: #00171F;
    --dark-blue: #003459;
    --medium-blue: #007EA7;
    
    /* Gradient backgrounds */
    --primary-gradient: linear-gradient(135deg, var(--bright-blue) 0%, var(--medium-blue) 100%);
    --dark-gradient: linear-gradient(135deg, var(--dark-navy) 0%, var(--dark-blue) 100%);
    --light-gradient: linear-gradient(135deg, #f8fbff 0%, var(--white) 100%);
    
    /* Shadows */
    --shadow-light: 0 2px 10px rgba(0, 167, 225, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 167, 225, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 167, 225, 0.2);
    --shadow-dark: 0 4px 15px rgba(0, 23, 31, 0.3);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gradient);
    color: var(--dark-navy);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Import Inter font for modern typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Footer Styles */
.app-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    width: 100%;
    box-sizing: border-box;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--medium-blue);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

.footer-separator {
    color: #ccc;
    font-size: 12px;
}

.footer-text {
    color: #666;
    font-size: 14px;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-gradient);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    font-size: 18px;
    color: var(--white);
}

.toast-message {
    font-size: 14px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-separator {
        display: none;
    }
    
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        transform: translateY(100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Modern Header Design */
header {
    background: var(--white);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(0, 167, 225, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 20px 20px 0 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(var(--shadow-light));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

.brand-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.brand-text h2 {
    color: var(--medium-blue);
    font-weight: 500;
    font-size: 1.1rem;
    opacity: 0.9;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.account-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 167, 225, 0.1);
    border: 1px solid rgba(0, 167, 225, 0.2);
    border-radius: 12px;
    padding: 8px 12px;
}

.user-email {
    font-size: 0.8rem;
    color: var(--medium-blue);
    margin-left: 0.5rem;
    font-weight: 500;
}

.sync-btn, .save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
}

.sign-in-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.sync-btn:hover, .save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 167, 225, 0.3);
}

.sign-in-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.sync-btn {
    background: linear-gradient(135deg, var(--medium-blue) 0%, var(--dark-blue) 100%);
}

.save-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

/* Enhanced Button Styles */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.share-btn::before,
.clear-btn::before,
.sign-in-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.share-btn:hover::before,
.clear-btn:hover::before,
.sign-in-btn:hover::before {
    left: 100%;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.share-btn:active,
.clear-btn:active,
.sign-in-btn:active {
    transform: translateY(0);
}

.customize-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--white);
    color: var(--bright-blue);
    border: 2px solid var(--bright-blue);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-light);
}

.customize-btn:hover {
    background: var(--bright-blue);
    color: var(--white);
    transform: rotate(90deg) scale(1.1);
    box-shadow: var(--shadow-medium);
}

/* Add Week Button Wrapper */
.add-week-button-wrapper {
    /* Ensure wrapper spans all grid columns and centers content */
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Add Week Button */
.add-week-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 200px;
    padding: 12px 20px;
    background: var(--white);
    color: var(--deep-blue) !important;
    border: 2px solid var(--bright-blue);
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-light);
}

.add-week-button span {
    color: var(--deep-blue) !important;
    font-weight: 600 !important;
}

.add-week-button i {
    color: var(--bright-blue) !important;
    font-size: 18px;
}

.add-week-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    background: linear-gradient(135deg, var(--deep-blue), var(--bright-blue));
}

.add-week-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

/* Enhanced Grid Layout */
.week-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

/* Advanced Mode Grid Layouts */
.week-container.week-7-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
}

.week-container.week-5-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Monthly View Grid Layout */
.week-container.month-view {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0, 167, 225, 0.1);
}

/* Modern Day Cards */
.day-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    padding: 24px;
    min-height: 320px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 167, 225, 0.1);
    position: relative;
    overflow: hidden;
}

.day-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 16px 16px 0 0;
}

.day-card:hover::before {
    transform: scaleX(1);
}

.day-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--bright-blue);
}

.day-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 167, 225, 0.1);
    position: relative;
}

.day-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 4px;
}

.day-date {
    font-size: 0.875rem;
    color: var(--medium-blue);
    font-weight: 500;
}

.meals-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Enhanced Meal Items */
.meal-item {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.meal-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.meal-item.breakfast {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #e65100;
    border-color: #ffb74d;
}

.meal-item.lunch {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: var(--dark-blue);
    border-color: var(--bright-blue);
}

.meal-item.dinner {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #ad1457;
    border-color: #ec407a;
}

.meal-item .remove-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.meal-item:hover .remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.meal-item .remove-btn:hover {
    background: #ff4444;
    transform: translateY(-50%) scale(1.1);
}

/* Enhanced Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 23, 31, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    box-shadow: var(--shadow-dark);
    border: 1px solid rgba(0, 167, 225, 0.2);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    background: var(--primary-gradient);
    color: var(--white);
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-header h2 {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

.close {
    color: var(--white);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

/* Enhanced Form Elements */
.meal-type-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    background: rgba(0, 167, 225, 0.05);
    padding: 8px;
    border-radius: 12px;
}

.meal-type-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid transparent;
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--dark-navy);
}

.meal-type-btn.active {
    background: var(--primary-gradient);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.meal-type-btn:hover:not(.active) {
    border-color: var(--bright-blue);
    color: var(--bright-blue);
    transform: scale(1.02);
}

.input-section {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

#mealInput {
    flex: 1;
    padding: 16px;
    border: 2px solid rgba(0, 167, 225, 0.2);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
}

#mealInput:focus {
    outline: none;
    border-color: var(--bright-blue);
    box-shadow: 0 0 0 3px rgba(0, 167, 225, 0.1);
}

#addMealBtn {
    padding: 16px 24px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-medium);
    white-space: nowrap;
}

#addMealBtn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.past-meals-section h3 {
    margin-bottom: 15px;
    color: var(--dark-navy);
    font-weight: 600;
    font-size: 1.1rem;
}

.past-meals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(0, 167, 225, 0.05);
    border-radius: 12px;
}

.past-meal-pill {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.past-meal-pill:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: var(--shadow-light);
}

.past-meal-pill.breakfast {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #e65100;
    border-color: #ffb74d;
}

.past-meal-pill.lunch {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: var(--dark-blue);
    border-color: var(--bright-blue);
}

.past-meal-pill.dinner {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #ad1457;
    border-color: #ec407a;
}

/* Enhanced Share Options */
.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.share-option-btn {
    padding: 16px 20px;
    border: 2px solid rgba(0, 167, 225, 0.2);
    background: var(--white);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    color: var(--dark-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-option-btn:hover {
    border-color: var(--bright-blue);
    color: var(--bright-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.share-preview h3 {
    margin-bottom: 15px;
    color: var(--dark-navy);
    font-weight: 600;
}

#shareText {
    width: 100%;
    height: 200px;
    padding: 16px;
    border: 2px solid rgba(0, 167, 225, 0.2);
    border-radius: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    resize: vertical;
    background: rgba(0, 167, 225, 0.05);
    color: var(--dark-navy);
    transition: border-color 0.3s ease;
}

#shareText:focus {
    outline: none;
    border-color: var(--bright-blue);
    box-shadow: 0 0 0 3px rgba(0, 167, 225, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .week-container.week-7-days {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .week-container.week-5-days {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .logo-section {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .brand-text h1 {
        font-size: 2rem;
    }
    
    .controls {
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        width: 100%;
    }
    
    .week-container,
    .week-container.week-7-days,
    .week-container.week-5-days {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .week-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .meal-type-selector {
        flex-direction: column;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .week-container,
    .week-container.week-7-days,
    .week-container.week-5-days {
        grid-template-columns: 1fr;
    }
    
    .logo {
        width: 110px;
        height: 110px;
    }
    
    .brand-text h1 {
        font-size: 1.75rem;
    }
}

/* Customize Modal Styles */
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 167, 225, 0.1);
    text-align: right;
    background: rgba(0, 167, 225, 0.05);
}

.save-btn {
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-medium);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.save-btn i {
    font-size: 16px;
}

/* Customize Modal Content */
.customize-section {
    margin-bottom: 25px;
}

.customize-section h3 {
    color: var(--dark-navy);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 167, 225, 0.1);
    position: relative;
}

.customize-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 167, 225, 0.1);
}

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

.setting-item label {
    font-weight: 600;
    color: var(--dark-navy);
    flex: 1;
    font-size: 15px;
}

.setting-item select {
    padding: 10px 16px;
    border: 2px solid rgba(0, 167, 225, 0.2);
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
    min-width: 140px;
    font-family: inherit;
    color: var(--dark-navy);
    transition: border-color 0.3s ease;
}

.setting-item select:focus {
    outline: none;
    border-color: var(--bright-blue);
    box-shadow: 0 0 0 3px rgba(0, 167, 225, 0.1);
}

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

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 167, 225, 0.2);
    border-radius: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(0, 167, 225, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: var(--white);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-light);
}

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

input:checked + .toggle-slider:before {
    transform: translateX(32px);
    box-shadow: var(--shadow-medium);
}

/* View Mode Toggle Styling */
.view-mode-toggle {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(0, 167, 225, 0.2);
    background: var(--white);
}

.view-mode-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--dark-navy);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.view-mode-btn.active {
    background: var(--primary-gradient);
    color: var(--white);
}

.view-mode-btn:hover:not(.active) {
    background: rgba(0, 167, 225, 0.1);
    color: var(--bright-blue);
}

/* Advanced Mode Section Visibility */
.advanced-mode-section {
    display: none;
}

.advanced-mode-section.show {
    display: block;
}

.basic-mode-section.hide {
    display: none;
}

/* Empty Day Slots */
.day-card.empty-day {
    background: rgba(0, 167, 225, 0.05);
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
    border-color: rgba(0, 167, 225, 0.1);
}

.day-card.empty-day:hover {
    transform: none;
    box-shadow: var(--shadow-light);
}

.day-card.empty-day .day-name {
    color: rgba(0, 167, 225, 0.6);
}

/* Animation Control */
.animations-disabled *,
.animations-disabled *:before,
.animations-disabled *:after {
    animation-duration: 0.01ms !important;
    animation-delay: -0.01ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
}

/* Loading States and Micro-interactions */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 167, 225, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced Scroll Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 167, 225, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gradient);
}

/* HOME PAGE STYLES */

/* Home Header */
.home-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    margin-bottom: 40px;
}

.home-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(var(--shadow-light));
    transition: transform 0.3s ease;
}

.home-logo:hover {
    transform: scale(1.05);
}

/* Home Main Content */
.home-main {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    background: var(--white);
    padding: 60px 50px;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
}

.hero-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 20px;
    line-height: 1.2;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--dark-blue);
    margin-bottom: 40px;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-primary, .cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 32px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.cta-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: var(--shadow-medium);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.cta-secondary {
    background: var(--white);
    color: var(--bright-blue);
    border: 2px solid var(--bright-blue);
}

.cta-secondary:hover {
    background: var(--bright-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.cta-primary.large {
    padding: 22px 40px;
    font-size: 1.2rem;
}

/* Mock Planner Preview */
.mock-planner {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.mock-day {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    min-width: 140px;
    box-shadow: var(--shadow-light);
    border: 2px solid rgba(0, 167, 225, 0.1);
    transition: all 0.3s ease;
}

.mock-day:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.mock-day h4 {
    color: var(--dark-navy);
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1rem;
}

.mock-meal {
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.mock-meal.breakfast {
    background: rgba(255, 193, 7, 0.2);
    color: #8b6914;
}

.mock-meal.lunch {
    background: rgba(0, 167, 225, 0.2);
    color: var(--medium-blue);
}

.mock-meal.dinner {
    background: rgba(233, 30, 99, 0.2);
    color: #ad1457;
}

/* Features Section */
.features-section {
    background: var(--white);
    padding: 60px 50px;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
}

.features-section h3 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 167, 225, 0.02) 0%, rgba(0, 167, 225, 0.08) 100%);
    border: 2px solid rgba(0, 167, 225, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(0, 167, 225, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 50%;
    box-shadow: var(--shadow-light);
}

.feature-icon i {
    font-size: 2rem;
    color: var(--white);
}

.feature-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--dark-blue);
    line-height: 1.7;
    font-size: 1rem;
}

/* How It Works Section */
.how-it-works-section {
    background: var(--white);
    padding: 60px 50px;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
}

.how-it-works-section h3 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 50px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: var(--shadow-light);
}

.step-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 10px;
}

.step-content p {
    color: var(--dark-blue);
    line-height: 1.6;
}

/* Examples Section */
.examples-section {
    background: var(--white);
    padding: 60px 50px;
    border-radius: 25px;
    box-shadow: var(--shadow-light);
}

.examples-section h3 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 50px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.example-card {
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 167, 225, 0.02) 0%, rgba(0, 167, 225, 0.08) 100%);
    border: 2px solid rgba(0, 167, 225, 0.1);
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.example-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 20px;
    text-align: center;
}

.example-meals {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.example-day {
    padding: 12px 16px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--bright-blue);
}

.example-day strong {
    color: var(--dark-navy);
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: var(--primary-gradient);
    color: var(--white);
    padding: 60px 50px;
    border-radius: 25px;
    box-shadow: var(--shadow-medium);
}

.cta-section h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-section .cta-primary {
    background: var(--white);
    color: var(--bright-blue);
}

.cta-section .cta-primary:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-3px);
}

/* Navigation Link Styling */
.home-link {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.home-link:hover {
    transform: translateY(-2px);
}

.home-link:hover .logo {
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 30px;
        text-align: center;
    }
    
    .hero-content h3 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .mock-planner {
        gap: 15px;
    }
    
    .mock-day {
        min-width: 120px;
        padding: 15px;
    }
    
    .features-section,
    .how-it-works-section,
    .examples-section,
    .cta-section {
        padding: 40px 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .home-main {
        gap: 40px;
        padding: 0 15px;
    }
    
    .home-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .home-logo {
        width: 100px;
        height: 100px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h3 {
        font-size: 1.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-primary,
    .cta-secondary {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }
}

/* Star Button and Favorites Styling */
.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #888;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.star-btn:hover {
    background-color: rgba(255, 215, 0, 0.1);
    transform: scale(1.1);
}

.star-btn.favorited {
    color: #FFD700;
}

.past-meal-pill {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.past-meal-pill.favorite {
    order: -1; /* Show favorites first */
    background-color: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.past-meal-pill .meal-name {
    flex: 1;
}