*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:#343a40 ;
    padding: 20px;

}

.bmi_container{
    width: 750px;
    max-width: 100%;
    background: #84a98c;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0, 0.08);

    animation: card 1s ease-out;
}



.bmi-container:hover{
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0,20);;
}

.bmi_content{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:30px;
    align-items: start;
}

.bmi_form_section{
    width: 100%;
}

h1{
    text-align: center;
    font-size: 1.7rem;
    color: #003049;
    font-weight: bold;
    animation: texts 0.7s ease;
}

.sub_title{
    text-align: center;
    color: #00171f;
    margin-top: 8px;
    margin-bottom: 28px;
    font-weight: bold;
    font-size: 1.2rem;
    animation: texts 0.9s ease;
}

.input_grp{
    margin-bottom: 20px;
    animation: text 0.7s ease;
}

.input_grp label{
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #00171f;
}

.input_box{
    display: flex;
    align-items: center;
    border: 2px solid #003049;
    border-radius: 8px;
    overflow: hidden;
    background:white ;

    transition:  border-color 0.25s ease,
                 box-shadow 0.25s ease, 
                 transform 0.25s ease;
}

.input_box:hover{
    border-color: #00171f;
    transform:  translateY(-2px);
}

.input_box:focus-within{
    border-color: #00171f;
    box-shadow: 0 0 0 3px rgba(0 48, 73, 0.18);
}

.input_box input{
    width: 100%;
    padding: 13px;
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: bold;
}

.input_box span{
    padding: 0 14px;
    color: #003049;
    font-size: 14px;
    font-weight: bold;
}

button {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: #00171f;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease-in,
                background 0.3s ease,
                opacity 0.2s ease;

}

button:hover{
    background: #003049;
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0,2);
}

button:active{
    transform: translateY(1px);
    box-shadow: none;
}

.clear_btn{
    margin-top: 10px;
    color: white;
}

.result{
    margin-top: 25px;
    padding: 20px;
    text-align: center;
    background: #2f3e46;
    border-radius: 10px;
    font-weight: bold;

    animation: text 0.8s ease;
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.result:hover{
    transform: translateY(-3px);
    box-shadow: 0 7px 18px rgba(0,0,0, 0,18);
}



.result h2{
    font-size: 16px;
    color: #000814;

}

.bmi_value{
    margin: 8px 0;
    font-size: 28px;
    color: #0a0908;

    transition: transform 0.3s ease;
}

.result:hover .bmi_value{
    transform: scale(1.08);
}

.category{
    font-size: 15px;
    color: #00171f;
}

.bmi_info{
    width: 100%;
    padding: 20px;
    background: #84a98c;
    border-radius: 12px;

    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.bmi_info:hover{
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.bmi_info h3{
    margin-bottom: 12px;
    font-size: 17px;
    color: #00171f;
}

.category_row{
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #0a0908;
    font-size: 14px;
    color: #343a40;

    transition: padding_left 0.2s ease,
                color 0.25s ease;
}

.category_row:hover{
    padding-left: 6px;
    color: #00171f;
}

.category_row:last-child{
    border-bottom: none;
}


@keyframes card{
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.97);
    }

    to{
        opacity:1;
        transform: translateY(0) scale(1);
    }
}

@keyframes texts{
    from{
        opacity: 0;
        transform: translateY(-15px);
    }

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

@keyframes text{
    from{
        opacity: 0;
        transform: translatey(15px);
    }

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

@media (max-width: 700px){
    body{
        padding: 15px;
        align-items: flex-start;
        padding-top: 30px;
    }

    .bmi-container{
        width: 100%;
        padding: 22px 18px;
        border-radius: 14px;
    }

    .bmi_content{
        grid-template-columns: 1fr;
        gap: 20px;
    }

    h1{
        font-size: 25px;
    }

    .sub_title{
        font-size: 14px;
        margin-bottom: 22px;
    }

    .input_grp{
        margin-bottom: 17px;
    }

    .input_box input{
        padding: 12px;
        font-size: 16px;
    }

    .input_box span{
        padding:  0 12px;
    }

    button{
        padding:12px;
    }

    .result{
        margin-top: 20px;
        padding: 17px;
    }

    .bmi_value{
        font-size: 34px;
    }

    .bmi_info{
        margin-top: 20px;
    }

    .category_row{
        font-size: 13px;
    }
}