
/* Custom Styles for NutriTrack Pro */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #10b981, #059669);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #059669, #047857);
}

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

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

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

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

.slide-up {
    animation: slideUp 0.4s ease-out;
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.35);
}

.btn-secondary {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(168, 85, 247, 0.35);
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

/* Nutrition fact item styling */
.nutrition-item {
    transition: all 0.25s ease;
}

.nutrition-item:hover {
    background-color: #f8fafc;
    border-color: #d1fae5;
    transform: translateY(-2px);
}

/* Input focus effects */
.input-focus:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

/* Database item styling */
.database-item {
    transition: all 0.25s ease;
    cursor: pointer;
}

.database-item:hover {
    transform: translateX(6px) translateY(-2px);
    background-color: #f0f9ff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Hero overlay enhancements */
.hero-overlay {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.85) 0%, rgba(16, 185, 129, 0.85) 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .grid {
        gap: 1.5rem;
    }
    
    .hero-overlay h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-overlay p {
        font-size: 1rem !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .shadow-xl {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}

/* Mifflin Modal Styles */
#mifflinModal {
    animation: fadeIn 0.3s ease-out;
}

#mifflinModal > div {
    animation: slideUp 0.3s ease-out;
}

/* Category icon styling */
.category-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: white;
    border: 2px solid #e2e8f0;
}

.category-icon.meat {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #fca5a5;
}

.category-icon.fruits {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
}

.category-icon.vegetables {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #6ee7b7;
}

.category-icon.grains {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
}

.category-icon.dairy {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
}

/* Hero image responsive */
.hero-image {
    max-height: 500px;
    object-fit: cover;
    width: 100%;
    border-radius: 1.5rem;
}

/* Section spacing for anchor links */
section[id] {
    scroll-margin-top: 100px;
}

/* Sticky header offset */
main {
    padding-top: 1rem;
}
