* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Nunito", sans-serif;
}
body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    background-color:#F6F4EB;
    padding: 2rem;
    scroll-behavior: smooth;
    overflow-y: auto;
}

.bmi-container {
    width: 100%;
    max-width: 600px;
}

p{
    margin: 0 5%;
    margin-bottom: 2rem;  /* DIUBAH: Tambahkan space antara introduction dan input */
    color: #F6F4EB;
    text-align: justify;
}

.card {
    padding: 1rem;
    background-color:#146c94;
    border-radius:0.5rem;
    box-shadow: 0 4px 8px rgba(20, 105, 148, 0.1);
}
  
.card h1 {
    color: #F6F4EB;
    text-align: center;
    margin-bottom: 5px;
    padding: 1em;
    border-radius: 0.325em;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
  
.input-container .input-group {
    display: flex;
    flex-direction: column;
    margin: 0 5%;
}
  
.input-container .input-group label {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: #F6F4EB;
}
  
.input-container .input-group input, .input-container .input-group select {
    outline:none;
    border: 2px solid #4682A9;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: border-color 0.3s ease;
}
  
.input-container .input-group input:focus {
    outline: 2px solid #91C8E4;
}
  
#calculate {
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    border: none;
    color: black;
    border-radius: 0.5rem;
    background-color: #91C8E4;
    margin: 1rem 5% 0;
    transition: all 0.3s ease;
}
  
#reset {
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    border: none;
    color: white;
    border-radius: 0.5rem;
    background-color: #4682A9;
    margin-top: 1rem;
    transition: all 0.3s ease;
}
  
#reset:hover {
    background-color: #749BC2;
    transform: translateY(-2px);
}
  
#reset:active {
    transform: translateY(2px);
    background-color: #19A7CE;
}
  
#calculate:hover{
    background-color: #749BC2;
    transform: translateY(-2px);
}
  
#calculate:active{
    transform:translateY(2px);
    background-color:#4682A9 ;
}
  
#result {
    margin-top:1rem;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #4682A9;
    font-size: 1.5rem;
    border:2px solid #19A7CE;
    margin: 1rem 5%;
    background-color: #F6F1F1;
    height:auto;
    min-height: 200px;
    border-radius: 0.5rem;
    padding: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#result.fade-in {
    opacity: 1;
    transform: translateY(0);
}

#score {
    font-size: 3rem;
    font-weight: 800;
}

#category{
    margin: 0.5rem 0 1rem;
}

#explanation{
    margin: 0 5%;
    font-size: 1rem;
    font-weight:normal;
    text-align: justify;
    color:#146c94;
}

@media (min-width: 768px) { /* Tablet */
    body {
        padding: 3rem;
    }
    .input-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    /* DIUBAH: Gender input full width agar terpisah dari weight dan height */
    .input-container .input-group:nth-child(1) {
        flex: 1 1 45%;
        margin: 0 2.5%;
    }
    /* DIUBAH: Weight dan height sejajar dengan flex 45% each */
    .input-container .input-group:nth-child(2),
    .input-container .input-group:nth-child(3) {
        flex: 1 1 45%;
        margin: 0 2.5%;
    }
    #calculate {
        margin-left: 5%;
        width: auto;
    }
    #result {
        margin: 1rem 5%;
    }
}

@media (min-width: 1024px) { /* Desktop */
    .card {
        padding: 2rem;
    }
    .input-container .input-group {
        flex: 1 1 30%;
    }
    #result {
        font-size: 1.8rem;
    }
    #score {
        font-size: 4rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}