* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(circle at top left, #4f46e5, transparent 35%),
        radial-gradient(circle at bottom right, #06b6d4, transparent 35%),
        #0f172a;

    color: #fff;
    padding: 20px;
}


/* Container */

.container {
    width: 100%;
    display: flex;
    justify-content: center;
}


/* Main Card */

.bmi-card {
    width: 100%;
    max-width: 500px;

    padding: 35px;

    border: 1px solid rgba(255, 255, 255, 0.15);

    background: rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(20px);

    border-radius: 25px;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4);
}


/* Heading */

h1 {
    text-align: center;
    font-size: 35px;
    margin-bottom: 8px;
}

.subtitle {
    text-align: center;
    color: #cbd5e1;
    margin-bottom: 30px;
}


/* Inputs */

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    color: #e2e8f0;
}


.input-box {
    display: flex;
    align-items: center;

    background: rgba(255, 255, 255, 0.1);

    border: 1px solid rgba(255, 255, 255, 0.15);

    border-radius: 12px;

    overflow: hidden;
}


.input-box input {
    width: 100%;

    padding: 15px;

    border: none;
    outline: none;

    background: transparent;

    color: #fff;

    font-size: 16px;
}


.input-box input::placeholder {
    color: #94a3b8;
}


.input-box span {
    padding: 0 18px;

    color: #cbd5e1;

    font-weight: bold;
}


/* Buttons */

.buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}


button {
    flex: 1;

    padding: 15px;

    border: none;
    border-radius: 12px;

    background: #6366f1;

    color: white;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.3s;
}


button:hover {
    transform: translateY(-2px);

    background: #818cf8;

    box-shadow:
        0 10px 25px rgba(99, 102, 241, 0.35);
}


.reset {
    background: rgba(255, 255, 255, 0.1);
}


.reset:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* Error */

#error {
    text-align: center;

    color: #fca5a5;

    font-size: 14px;

    margin-top: 15px;

    min-height: 18px;
}


/* Result */

.result {
    text-align: center;

    margin-top: 25px;

    padding: 25px;

    background: rgba(255, 255, 255, 0.08);

    border-radius: 18px;

    border: 1px solid rgba(255, 255, 255, 0.1);
}


.result p:first-child {
    color: #cbd5e1;
}


#bmiValue {
    font-size: 55px;

    margin: 5px 0;

    font-weight: 700;
}


#bmiCategory {
    font-size: 20px;

    margin-bottom: 8px;
}


#message {
    color: #cbd5e1;

    font-size: 14px;

    line-height: 1.5;
}


/* BMI Scale */

.scale {
    margin-top: 30px;
}


.scale h3 {
    margin-bottom: 12px;
}


.scale-bar {
    width: 100%;

    height: 12px;

    display: flex;

    overflow: hidden;

    border-radius: 20px;
}


.scale-bar div {
    height: 100%;
}


.underweight {
    width: 25%;
    background: #38bdf8;
}


.normal {
    width: 25%;
    background: #22c55e;
}


.overweight {
    width: 25%;
    background: #facc15;
}


.obesity {
    width: 25%;
    background: #ef4444;
}


/* Scale labels */

.scale-labels {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 5px;

    margin-top: 10px;
}


.scale-labels span {
    display: flex;

    flex-direction: column;

    font-size: 10px;

    color: #cbd5e1;
}


.scale-labels b {
    font-size: 10px;
}


.scale-labels small {
    margin-top: 3px;
    color: #94a3b8;
}


/* Healthy range */

.healthy-range {
    margin-top: 25px;

    padding: 18px;

    border-radius: 15px;

    background: rgba(34, 197, 94, 0.1);

    border: 1px solid rgba(34, 197, 94, 0.2);

    text-align: center;
}


.healthy-range h3 {
    font-size: 15px;

    margin-bottom: 5px;
}


.healthy-range p {
    font-size: 20px;

    font-weight: bold;

    color: #86efac;
}


/* Mobile */

@media (max-width: 500px) {

    body {
        padding: 15px;
    }

    .bmi-card {
        padding: 25px 20px;
    }

    h1 {
        font-size: 28px;
    }

    .buttons {
        flex-direction: column;
    }

    #bmiValue {
        font-size: 45px;
    }

    .scale-labels {
        grid-template-columns: repeat(2, 1fr);

        row-gap: 10px;
    }
}