/* Optional: Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    /* Smooth scrolling if needed */
    /* scroll-behavior: smooth; */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1; /* Ensures footer stays at the bottom */
}

/* Style the fixed navbar placeholder */
.navbar-brand {
    font-weight: 600;
}

/* --- Dark Mode --- */
[data-bs-theme="dark"] body {
    background-color: #212529; /* Dark background */
    color: #dee2e6; /* Lighter text */
}

[data-bs-theme="dark"] .card {
    background-color: #343a40; /* Darker card background */
    border-color: #495057;
}

[data-bs-theme="dark"] .form-control {
    background-color: #495057;
    color: #fff;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #adb5bd;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #495057;
    color: #fff;
    border-color: #80bdff; /* Bootstrap's focus color */
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #495057;
    color: #adb5bd;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important; /* Override Bootstrap's muted */
}

[data-bs-theme="dark"] .bg-light {
     background-color: #343a40 !important; /* Dark navbar/footer */
}

[data-bs-theme="dark"] .navbar-light .navbar-brand,
[data-bs-theme="dark"] .navbar-light .navbar-nav .nav-link {
    color: #f8f9fa; /* Light text for dark navbar */
}
[data-bs-theme="dark"] .navbar-light .navbar-brand:hover{
     color: #dee2e6;
}

[data-bs-theme="dark"] footer a {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] footer a:hover {
    color: #f8f9fa !important;
}

/* --- Animations --- */
#resultsArea {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    opacity: 0;
    transform: translateY(20px); /* Start slightly lower */
}

#resultsArea.result-visible {
    opacity: 1;
    transform: translateY(0); /* Move to final position */
}

/* Hide initial state visually but keep for transitions */
.result-hidden {
    opacity: 0;
    transform: translateY(20px);
    max-height: 0; /* Collapse space */
    overflow: hidden;
     transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, max-height 0.5s ease-in-out;
}

.result-visible {
    opacity: 1;
    transform: translateY(0);
    max-height: 500px; /* Allow space to expand (adjust if needed) */
}

/* Style the alert based on category (optional, can be done via JS) */
.alert-underweight { background-color: #cfe2ff; border-color: #b6d4fe; color: #ad0909; }
.alert-healthy { background-color: #d1e7dd; border-color: #badbcc; color: #0f5132; }
.alert-overweight { background-color: #fff3cd; border-color: #ffecb5; color: #664d03; }
.alert-obese { background-color: #f8d7da; border-color: #f5c2c7; color: #842029; }

[data-bs-theme="dark"] .alert-underweight { background-color: #031633; border-color: #052c65; color: #6ea8fe; }
[data-bs-theme="dark"] .alert-healthy { background-color: #051b11; border-color: #0c3b2a; color: #75b798; }
[data-bs-theme="dark"] .alert-overweight { background-color: #332701; border-color: #664d03; color: #ffda6a; }
[data-bs-theme="dark"] .alert-obese { background-color: #2c0b0e; border-color: #58151c; color: #ea868f; }