*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 40vh;
}

/* navbar */
nav{
    width: 100%;
    height: 9vh;
    background-color: white;
}

.navbar{
    height: 9vh;
    transform: translateY(-100%);
    transition: ease 0.3s;
}

nav:hover .navbar{
    transform: translateY(0%);
    cursor: pointer;
    text-decoration: underline;
}

.navbar ul{
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 15px;
}

.navbar li{
    font-size: 1.15rem;
    font-weight: 500
}

main{
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    padding-top: 25px;
}

.main-container{
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    animation: slideRight 0.6s ease-in;
}

/* This will create a smooth animation when page loads */
@keyframes slideRight {
    from{
        opacity: 0;
        transform: translateX(-35px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

.box{
    background-color: white;
    width: 90%;
}

.header{
    text-align: center;
    margin-bottom: 40px;
}

.header h1{
    color: #333;
    font-size: 2.5rem;
    font-weight: 450;
    margin-bottom: 10px;
}

.header p{
    color: #666;
    font-size: 1.1rem;
    font-weight: 350;
}

/* form section */
.input-group{
    margin-bottom: 25px;
}

.input-group label{
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
}

.input-group input{
    width: 100%;
    padding: 15px 20px;
     border: 2px solid #e1e5e9;
     border-radius: 12px;
     font-size: 1.1rem;
     transition: all 0.3s ease;
     background: #fafbfc;
}

.input-group input:focus{
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group label:hover{
    cursor: pointer;
    transform: scale(1.02);
    filter: brightness(0);
}

/* error if invalid height or weight is entered */
.error-message{
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}
.input-group input.error{
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

/* page toggle (unit) */
.unit-toggle{
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 25px;
}

.unit-toggle button{
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.unit-toggle button:active{
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sub-button{
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transform: all 0.3s ease;
    margin-bottom: 30px;
}

.sub-button:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.sub-button:active{
    transform: translateY(0);
}

/* Top right box of the page  */

.right-box{
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.categories{
    background-color: white;
    width: 100%;
    max-width:500px;
    min-width: 300px;
    border-radius: 20px;
    animation: slideLeft 0.6s ease-in;
}

.categories .category-header h1{
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 10px 0px;
    text-align: center;
}


.categories .category-header p{
    color: #666;
    font-size: 0.78rem;
    font-weight: 450;
    text-align: center;
    padding-bottom: 10px;
}

table{
    border-collapse: collapse;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
}

table th,td{
    border: 1px solid #ddd;
    padding: 10px 0px;
    text-align: center;
    font-size: 0.98rem;
}

table td{
    text-align: center;
}

.bmi-result{
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bmi-result2{
    width: 60%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    text-align: center;
}

.empty-div{
    height: 5px;
}

.bmi-info{
    width: 100%;
    max-width:500px;
    min-width: 300px;
    background-color: white;
    border-radius: 20px;
    padding: 11.5px;
    text-align: left;
    color: #666;
    font-weight: 500;
    font-size: 1rem;
    animation: slideLeft 0.6s ease-in;
    display: flex;
    justify-content: center;
}

@keyframes slideLeft{
    from{
        opacity: 0;
        transform: translateX(35px);
    }
    to{
        opacity: 1;
        transform: translateX(0);
    }
}

.bmi-info span{
    font-size: 1rem;
    font-weight: bold;
    text-decoration: underline;
}

.bmi-info div{
    width: 90%;
    background-color: #fafbfc;
    text-align: black;  
    border-radius: 15px;
}

/* javascript classes styling */
/* Container paragraph */
.bmi-message {
    margin-top: 12px;
    padding: 12px;
    background: #f9f9ff;   /* light background */
    border-left: 4px solid #4a90e2;  /* blue accent line */
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
    width: 100%;
    max-width:500px;
    min-width: 300px;
}

/* Title (highlighted advice heading) */
.bmi-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
    text-decoration: underline;
}

/* Tips list */
.bmi-tips {
    font-size: 0.85rem;
    margin: 0;
    padding-left: 20px;   /* indentation for list */
    list-style-type: disc; /* or "circle" / "square" */
}

/* Style list items */
.bmi-tips li {
    margin-bottom: 6px;
}
