body {
    font-family: 'Inter', sans-serif;
}

.cta-button {
    transition: all 0.3s ease;
}

.benefit-card {
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

@keyframes progress-bar-fill {
    from { width: 0%; }
    to { width: 100%; }
}

.progress-bar-fill {
    animation: progress-bar-fill 3s ease-out forwards;
}

.risk-score-meter-bg {
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: meter-fill 1.5s ease-out forwards;
    animation-delay: 0.2s;
    transition: stroke 0.5s ease;
}

@keyframes meter-fill {
    to { stroke-dashoffset: var(--stroke-offset, 283); }
}

#hero {
    background: radial-gradient(circle at 50% 30%, #ffffff, #f9fafb 80%);
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #16a34a; /* brand-green */
    animation: spin 1s ease infinite;
}

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

.step-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.step-icon-wrapper {
    position: relative;
    display: inline-block;
}

.step-number {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #f97316;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.testimonial-card, .benefit-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

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

.benefit-card:nth-child(1) { animation-delay: 0.1s; }
.benefit-card:nth-child(2) { animation-delay: 0.15s; }
.benefit-card:nth-child(3) { animation-delay: 0.2s; }
.benefit-card:nth-child(4) { animation-delay: 0.25s; }
.benefit-card:nth-child(5) { animation-delay: 0.3s; }
.benefit-card:nth-child(6) { animation-delay: 0.35s; }


.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #10b981);
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -50px;
    animation: float 15s ease-in-out infinite reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: -50px;
    left: 30%;
    animation: float 18s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.cta-pattern {
    background-image: repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.05) 35px, rgba(255,255,255,.05) 70px);
}

html { scroll-behavior: smooth; }

#hero h1, #hero p, #hero .cta-button, #onboarding, #upload-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}
#hero h1 { animation-delay: 0.2s; }
#hero p { animation-delay: 0.4s; }
#hero .cta-button { animation-delay: 0.6s; }
#onboarding { animation-delay: 0.8s; }
#upload-section { animation-delay: 1s; }

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

/* --- FAQ Accordion Animation (Corrected) --- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding-bottom 0.3s ease-out;
    padding-bottom: 0;
}

.faq-item.open .faq-answer {
    max-height: 20rem; /* A large enough value to show any answer */
    padding-bottom: 1.25rem; /* Corresponds to Tailwind's 'pb-5' */
    transition: max-height 0.4s ease-in, padding-bottom 0.4s ease-in;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

/* --- New Modal Styles --- */
#details-modal-content {
    display: flex;
    flex-direction: column;
}

.modal-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dish-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.dish-card p:first-child {
    font-weight: 600;
    color: #111827;
}

.dish-card p:last-child {
    font-size: 0.875rem;
    color: #4b5563;
}


/* --- Accordion Styles --- */
.accordion-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.accordion-button {
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1f2937;
    background-color: white;
    transition: background-color 0.2s ease;
}
.accordion-button:hover {
    background-color: #f9fafb;
}

.accordion-button .lucide-chevron-down {
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 1rem;
}

.accordion-item.open .accordion-button .lucide-chevron-down {
    transform: rotate(180deg);
}

.accordion-item.open .accordion-content {
    max-height: 20rem; /* A fixed, scrollable height (approx. 320px) */
    overflow-y: auto;   /* Add a scrollbar only when needed */
    padding: 0 1rem 1rem;
    transition: max-height 0.4s ease-in, padding 0.4s ease-in;
}

body.modal-open {
    overflow: hidden;
}

/* Hide the "Score 18/100" block in the details modal summary */
#modal-summary-card .flex.items-center.gap-4 > div:nth-child(2) {
    display: none !important;
  }
  
/* Styles for the accordion on the profile page */
.profile-accordion {
    background-color: white;
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* shadow-lg */
    border: 1px solid rgba(229, 231, 235, 0.8); /* border-gray-200/80 */
    overflow: hidden;
}

.profile-accordion .accordion-button {
    padding: 1.5rem; /* p-6 */
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 400; /* Resetting button font-weight */
}

.profile-accordion.open .accordion-button {
    border-bottom: 1px solid #f3f4f6; /* border-gray-100 */
}

.profile-accordion .accordion-content {
    padding: 0 1.5rem; /* px-6 */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.profile-accordion.open .accordion-content {
    max-height: 100rem; /* Adjust as needed */
    transition: max-height 0.4s ease-in;
}

.profile-accordion .accordion-content > div {
    padding-bottom: 1.5rem; /* pb-6, for the inner container */
}

.profile-accordion.open .accordion-button i {
    transform: rotate(180deg);
}

.profile-accordion .accordion-button i {
    transition: transform 0.3s ease-out;
}