/* Color Palette */
:root {
    --primary-color: #7B1FA2; /* Deep Purple */
    --secondary-color: #E1BEE7; /* Light Lavender/Light Purple */
    --background-color: #F5F5F5; /* Off-White */
    --text-color: #333;
    --green: #4CAF50;
    --yellow: #FFC107;
    --red: #F44336;
    --disclaimer-color: #6A1B9A; /* Slightly lighter primary */
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: var(--text-color);
    padding: 10px;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px; /* Slightly wider for the new fields */
    text-align: center;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.6em;
    text-align: center;
}

/* Input Styles */
.input-group {
    text-align: left;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.95em;
}

input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s;
    appearance: none; /* Remove default select styling */
}

input[type="number"]:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Button Style */
#calculate-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    margin-top: 15px;
    transition: background-color 0.3s, transform 0.1s;
}

#calculate-btn:hover {
    background-color: #9C27B0;
}

/* Result Area */
.result-area {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--secondary-color);
}

#bmi-result-display {
    min-height: 80px; 
}

#bmi-value {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

#bmi-status {
    display: block;
    font-size: 1.2em;
    font-weight: 600;
}

/* BMI Meter Styles (Green, Yellow, Red) - Unchanged from previous version */
.meter-container {
    margin-top: 20px;
    width: 100%;
}

.meter-bar {
    display: flex;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.color-segment {
    flex-grow: 1;
    height: 100%;
}

.green { background-color: var(--green); flex-basis: 33%; } 
.yellow { background-color: var(--yellow); flex-basis: 33%; } 
.red { background-color: var(--red); flex-basis: 34%; } 

#meter-pointer {
    position: absolute;
    width: 4px; 
    height: 30px;
    background-color: var(--primary-color);
    top: -5px;
    left: 0%; 
    border-radius: 2px;
    transition: left 0.8s ease-out;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    z-index: 10;
    transform: translateX(-50%); 
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    margin-top: 5px;
    padding: 0 5px;
}
/* Center label adjustments for aesthetics */
.meter-labels span:nth-child(2) { margin-left: -25px; }
.meter-labels span:nth-child(3) { margin-right: -25px; }

/* Disclaimer/Interpretation Styles */
.disclaimer-title {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 5px;
}

.disclaimer {
    font-size: 0.9em;
    color: var(--disclaimer-color);
    line-height: 1.4;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 20px;
        box-shadow: none; 
        border-radius: 0;
    }

    h1 {
        font-size: 1.4em;
    }
}
