:root{
  --base-color: white;
  --base-variant: #e8e9ed;
  --text-color: #111528;
  --label-color: black;
  --modal-background:#f8fafc;
  --modal-color: rgba(0,0,0,.6);
  --secondary-text: #232738;
  --primary-color: #3a435d;
  --accent-color: #0071ff;
  --copyr-color: black;
}
.darkmode{
  --base-color: #070b1d;
  --base-variant: #101425;
  --text-color: #ffffff;
  --label-color: white;
  --modal-background:rgba(0,0,0,.6);
  --modal-color: white;
  --secondary-text: #a4a5b8;
  --header-color:rgb(3, 0, 7);
  --header-color:pink;
  /* --primary-color: #3a435d; */
  --primary-color: yellow;

  --accent-color: #88ff00;
  --copyr-color: white;
}
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}
/* notes */
body{
    /* margin-top: -50px; */
    background:linear-gradient(135deg,#0f172a,#1e293b);
    min-height:100vh;
    display:flex;
    justify-content:center;
    /* align-items:self-start */
    padding:20px;
}
header{
    top: 65px;
  /* display: flex; */
    direction: rtl;
    position: fixed;
}
.container{
    width:100%;
    max-width:550px;
    background:var(--base-color);
    border-radius:20px;
    padding:30px;
    box-shadow:0 15px 40px rgba(0,0,0,.25);
}

h1{
    text-align:center;
    margin-bottom:20px;
    color:var(--header-color);
   
}

/* Online help */

.help-icon{
    margin-right: 30px;
    margin-top: 40px;
    display:inline-block;
    width:25px;
    height:25px;
    /* padding-top: 5px; */
    border-radius:50%;
    background:#0078d7;
    color:white;
    text-align:center;
    cursor:pointer;
    font-size:20px;
}
/* .tooltip{s
    display:none;
    position:absolute;
    background:#333;
    color:white;
    padding:10px;
    border-radius:6px;
    max-width:250px;
    text-align: right;
} */
.help-btn{
    padding:10px 20px;
    cursor:pointer;
}

.modal{
    margin-top: -40px;
    max-width:250px;
    display:none;
    position:relative;
    left:0;
    top:0;
    /* width:100%;
    height:100%; */
    background:rgba(0,0,0,.6);
    z-index:9999;
}

.modal-content{
    /* margin-top: 10px; */
    direction: rtl;
    background:var(--modal-background);
    color: var(--modal-color);
    width:100%;
    max-width:250px;
    margin:50px auto;
    padding:15px;
    padding-top: 5px;
    border-radius:8px;
    position:relative;
    text-align: right;
    animation:fadeIn .3s;
}

.close{
    /* margin-bottom: 5px; */
    position:absolute;
    left:15px;
    padding-top: 0;
    /* top:10px; */
    font-size:30px;
    cursor:pointer;
    color:#777;
}

.close:hover{
    color:red;
}

@keyframes fadeIn{
    from{opacity:0;transform:translateY(-20px);}
    to{opacity:1;transform:translateY(0);}
}
#mybmi{
    color: #3b82f6;
    font-weight: 550;
}
.input-group{
    margin-bottom:20px;
}
.gender{
    margin-bottom: 15px;
    direction: rtl;
    display:flex;
    justify-content: center;
    gap:20px;
}

label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
    text-align: center;
    color: var(--label-color);
}

.range-value{
    float:right;
    color:#2563eb;
}

input[type=range]{
    width:100%;
    cursor:pointer;
}

.result{
    text-align:center;
    margin-top:10px;
}

.bmi-value{
    font-size:60px;
    font-weight:bold;
    margin:0px 0;
}

.category{
    font-size:24px;
    font-weight:bold;
}

.scale{
    margin-top:30px;
}

.scale-bar{
    height:25px;
    border-radius:30px;
    background:
    linear-gradient(
        to right,
        #3b82f6 0%,
        #3b82f6 35%,
        #22c55e 18.5%,
        #22c55e 50%,
        #f59e0b 50%,
        #f59e0b 30%,
        #ef4444 75%,
        #ef4444 100%
    );
    position:relative;
}

.pointer{
    position:absolute;
    top:-8px;
    width:10px;
    height:40px;
    background:#111827;
    border-radius:5px;
    transition:.3s;
}

.legend{
    display:flex;
    justify-content:space-evenly;
    font-size:12px;
    margin-top:8px;
      
}
#underweight {
    color: #3b82f6;
}
#normal{
    color: #22c55e;
}
#overweight{
    color: #f59e0b;
}

#obese{
    color: #ef4444;
}
.stats{
    direction: rtl;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
    margin-top:10px;
}
.box{
    background:rgba(255,255,255,0.08);
    padding:5px;
    border-radius:15px;
    text-align:center;
}

.box h3{
    margin-bottom:8px;
    color:#38bdf8;
}
#bmr,#ideal{
    color: var(--text-color);
}
.info{
    text-align: right;
    margin-top:20px;
    background:#f8fafc;
    padding:15px;
    border-radius:10px;
}

.info ul{
    padding-right:20px;
}

/* THEME */
#theme-switch{
    height: 30px;
    width: 30px;
    padding: 0;
    border-radius: 50%;
    background-color: var(--base-variant);
    display: flex;
    justify-content: center;
    align-items: center;
    /* position: relative; */
    position: absolute ; 
    cursor: pointer;
    /* right: 20px; */
    /* top: 20px;
    right: 20px; */
}
#theme-switch svg{
    fill: var(--primary-color);
}
#theme-switch svg:last-child{
  display: none;
}
.darkmode #theme-switch svg:first-child{
  display: none;
}
.darkmode #theme-switch svg:last-child{
  display: block;
}footer{
    background:rgba(255,255,255,0.08);
    color: var(--copyr-color);
    padding: 10px;
}

@media(max-width:600px){
    body{
        margin-top: -25px;
        padding: 0;

    }
    header{
        top: 41px;
    }
    .container {
        /* width: 95%; */
        /* background: #111827; */
        /* margin-top: 5px; */
    }
    .category{
        font-size:20px;
    }
    .bmi-value{
        font-size:30px;
    }
    /* label{
        color: white;
    }  */
    h1{
        font-size: 20px;
    }
    h3{
        font-size: 16px;
    }
    /* #bmr,#ideal{
    color: #f8fafc;
    } */
}
@media(max-width:331px){
    body{
        margin-top: -25px;
        padding: 0;

    }
    header{
        top: 41px;
    }
    .container {
        /* width: 95%; */
        /* background: #111827; */
    }
    .category{
        font-size:14px;
    }
    .bmi-value{
        font-size:26px;
    }
    /* label{
        color: white;
    }  */
    h1{
        font-size: 16px;
    }
    h3{
        font-size: 14px;
    }
    /* #bmr,#ideal{
    color: #f8fafc;
    }    */
}