/* --- Custom CSS for Professional UI/UX --- */

/* General Body Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* A clean, modern sans-serif font */
    background-color: #f4f7f6; /* Light background */
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes full viewport height */
    margin: 0;
}

/* Navbar Styling */
.navbar {
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(5px); /* For Safari compatibility */
    position: sticky; /* Make navbar sticky */
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}
/* Main Content Container */
.main-container {
    flex-grow: 1; /* Allows content to fill remaining space */
    padding: 2rem 0;
}

.row {
    justify-content: center; /* Center content horizontally */
}

.col-md-8 {
    display: flex;
    justify-content: center; /* Center the card within the column */
}

/* Card Styling */
.card {
    width: 100%; /* Take full width of its parent column */
    max-width: 500px; /* Max width for larger screens */
    border: none;
    border-radius: 12px; /* More rounded corners */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* Softer, larger shadow */
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 20px; /* Space from top */
}

.card:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card-header {
    background-color: #e9ecef; /* Light grey header */
    border-bottom: none;
    font-size: 1.4rem;
    font-weight: 600;
    color: #343a40;
    padding: 1.5rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.card-body {
    padding: 2rem;
}

/* Form Styling */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.75rem;
}

.form-control {
    border-radius: 8px; /* Slightly rounded input fields */
    padding: 12px 15px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Submit Button Styling */
.btn-primary {
    background-image: linear-gradient(to right, #007bff 0%, #0056b3 100%); /* Gradient */
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background-position: right center; /* Change gradient direction on hover */
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

/* Alert Messages */
.alert {
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Result Container */
.result-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #e9ecef; /* Light background for results */
    border-radius: 10px;
    border: 1px solid #dee2e6;
    animation: fadeIn 0.5s ease-out forwards; /* Fade in animation */
}

.result-container h3 {
    margin-bottom: 1rem;
    color: #0056b3;
}

.bmi-value {
    font-size: 3rem; /* Larger font for BMI value */
    font-weight: bold;
    margin-bottom: 0.75rem;
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block; /* Allows background to fit the text */
    transition: background-color 0.3s ease;
}

.bmi-category {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.result-container p {
    font-size: 0.95rem;
    color: #495057;
}

/* BMI Category Specific Styling */
.category-underweight {
    color: #ffffff;
    background-color: #6c757d; /* Grey */
}

.category-normal {
    color: #ffffff;
    background-color: #28a745; /* Green */
}

.category-overweight {
    color: #ffffff;
    background-color: #ffc107; /* Yellow */
}

.category-obese {
    color: #ffffff;
    background-color: #dc3545; /* Red */
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card {
        margin-top: 15px;
    }
    .card-header {
        font-size: 1.2rem;
        padding: 1rem;
    }
    .bmi-value {
        font-size: 2.5rem;
    }
    .bmi-category {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    .btn-primary {
        font-size: 1rem;
        padding: 10px 20px;
    }
}

/* Ensure footer is at the bottom when content is short */
html, body {
    height: 100%;
}
