@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
  --primary: #0A1931;
  --secondary: #1A3D63;
  --accent: #4A7FA7;
  --light: #B3CFE5;
  --bg: #F6FAFD;
  --text-light: #FFFFFF;
  --text-dark: #0A1931;
  --par-light:#ebf4fc;
}

* {
    margin: 0;
    padding: 0;
    font-size: 14px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.main{
    background-color: var(--light);
    min-height: 100vh;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header{
    padding: 1px;
    margin-bottom: 10px;
    border-radius: 88px;
    max-width: 100%;
    background-color: var(--primary);
    width: 100%;
}
.header h1 {
    color: var(--bg);
    margin-top: 18px;
    margin-left: 15px;
    font-size: xx-large;
}
.header h4 {
    color: var(--bg);
    margin-left: 55px;
    font-size: smaller;
    margin-bottom: 10px;
}

.container{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 90%;
    max-width: 1000px;
    margin-top: 15px;
    order: 1;
}

.paragraph{
    padding: 15px;
    margin: 4px 20px;
    box-shadow: 0px 6px 10px  #000000e6;
    background-color: var(--par-light);
    border-radius: 12px;
    width: 100%;
    order: 1;
}
.par{
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.5;
    text-align: center;
}

.input, .result {
    background-color: var(--secondary);
    box-shadow: 0px 6px 10px  #000000e6;
    border-radius: 12px;
    padding: 30px;
    min-height: 380px;

    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
}

.input {
    order: 2;
}


.result {
    order: 3;
}

.input h3{
    font-size: 24px;
    color: var(--light);
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 3px solid #ffffff33;
}

.input form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex-grow: 1;
    margin-top: 12px;
}

.inputW, .inputH {
    display: flex;
    flex-direction: column;
}
.inputW label, .inputH label {
    font-weight: 600;
    font-size: 16px;
    color: var(--light);
    text-align: center;
    width: 100%;
}

.inputW input, .inputH input {
    padding: 10px;
    border: 2px solid var(--text-light);
    border-radius: 22px;
    font-size: 16px;
    background-color: white;
    color: var(--text-dark);
    max-width: 100%;
    margin:auto;
}

.buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: auto;
    padding: 20px 10px 0 10px;
}
button {
    background-color: var(--accent);
    color: var(--light);
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    min-width: 120px;
    margin-bottom: 22px;
}
button:hover {
    background-color: #3A6F97;
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    width: 100%;
}

.bmi-visual {
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

.bmi-visual img {
    width: 100%;
    max-width: 200px;
    height: 310px;
    border-radius: 12px;
    object-fit:scale-down; 
    background-color: #ffffff1a;
    margin: 20px 50px;
}

.bmi-result-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: auto;
    width: 100%;
}

#bmiValue {
    font-size: 28px;
    font-weight: bold;
    color: var(--bg) ;
    min-width: 120px;
    text-align:center;
    justify-content: end;
}

.category-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#bmiCategory {
    font-size: 18px;
    color: var(--light);
    font-weight: 500;
    padding: 8px 20px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

@media (max-width: 767px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    .input, .result {
        width: 100%;
        min-height: 350px;
    }
    
    .inputW input, .inputH input {
        width: 100%;
        max-width: 250px;
    }
    
    .buttons {
        flex-direction: column;
        padding: 20px 20px 0 20px;
    }
    button {
        width: 100%;
    }
    
    .bmi-result-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .bmi-visual img {
        height: 120px;
        max-width: 200px;
    }
}