body{
    background-color: #000;
}
.navbar {
    display: none;
}
#wraper{
    display: none;
}

    #speeding-alert,#moving,#not-moving{
        display: none;
        position: fixed;
        top: 30vh;
        left: 15vw;
        z-index: 4;
        transform: translate(35%, -15%);
    }
#loader {
    position: fixed;
    background-color: #000;
    width: 100%;
    height: 100vh;
    margin-top: 0px;
    z-index: 16;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.svg-container {
    margin:0 auto;
    background: #ffffff url(/public/icons/144.png) no-repeat center center;
    background-size: cover;
    border-radius: 50%; /* Adjust the radius value as needed */
    height: 200px;
    width: 200px;
    position: absolute; /* Fallback for iOS */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center element */
}

#device-instruction{
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  font-size: 20px;
}
.device{
  position: relative;
  width: 90%;
  color: #fff;
}

.device h2{
  margin: 0px 5px;
  padding: 5px;
  font-size: 19px;
  text-align: left;
  width: 100%;
}
h3{
    color: #fff;
    margin: 10px;
    padding: 10px;
}

#android{
  display: none;
}

#ios{
  display: none;;
}
#installApp {
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    height: 30%;
    width: 50%;
    position: fixed;
    top: 55%;
    left: 25%;
    z-index: 9999;
    color: #000;
    border-radius: 18px;
    display: none;
}
#installApp img{
    height: 300px !important;
    width: 300px !important;
    border-radius: 97px;
    margin-left: -43px;
    margin-top: -107px;
}
#installApp:hover {
    background-color: #111;
}

#installApp:active {
    transform: scale(0.95); /* Slight scaling effect for click feedback */
}

#installApp:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(21, 87, 21, 0.5); /* Focus outline for accessibility */
}

/* Ensure the button is centered on the screen */
#installAppContainer {
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    height: 10%;
    width: 50%;
    position: fixed;
    top: 69%;
    left: 25%;
    z-index: 9999;
    color: #000;
    border-radius: 18px;
    display: block;
}


.desktop_message{
    display: block;
    margin: 0 auto;
    width: 33%;
    background-color: #87838647;
    color: #fff;
    padding: 20px;
    margin-top: 15%;
}
#compass{
    position: absolute;
    left: 4%;
    top: 17%;
    height: 50px;
    width: 50px;
    background: #21252991;
    display: grid;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    z-index: 10;
    border-radius: 50%;
    color: #fff;
}
@media screen and (max-width: 1024px){
    .desktop_message{
        display: none;
    }
    #title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #000;
    color: white;
    padding: 0.5em;
}


#window-controls {
    display: flex;
    align-items: center;
}

    #wraper{
        display: block;
        margin: 0;
        padding: 0;
        height: 100%;
        width: 100%;
    }
    .navbar{
        width: 100%;
        position: absolute;
        top: 0px;
        z-index: 1;
        padding: 18px 15px;
        color: #fff;
        display: flex;
        background-color: #000;
    }



    .navbar ul a{
        text-decoration: none;
        color: #fff;
        margin-left: 0px;
    }
    .brand{
        margin: 0px auto;
        padding: 0px;
        color: #fff;
        font-size: 20px;
        margin-left: 0px;
        text-decoration: none;
        position: relative;
        left: 1vw;
    }

    .brand span{
        margin-left: 2vw;
        position: relative;
        top: -1vh;
    }
    .brand strong{
        font-size: 17px;
        margin-top: 0px;
        padding: 4px;
        position: relative;
        left: 3px;
        top: 0px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        width: 34px;
        height: 40px;
    }
    .nav-ul{
            margin: 0px auto;
            padding: 10px;
            color: #fff;
            display: none;
            position: fixed;
            left: 0;
            top: 0vh;
            width: 70%;
            border-radius: 2px;
            height: 100%;
            font-size: 17px;
            list-style: none;
            background-color: #111;
    }

    .nav-links{
        padding: 5px 10px;
        width: 100%;
        text-align: left;
    }

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;;
}


.show{
    padding: 30px;
    display: block;
}

.menu-toggle .bar {
    height: 3px;
    width: 25px;
    background-color: #000;
    margin: 4px 0;
}

.messagesContainer{
    margin: 0 auto;
    position: relative;
    top: 13%;
    width: 95%;
    background-color: #fff;
    border-radius: 20px;
}

#messageForm {
    margin-bottom: 20px;
}

input[type="text"] {
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 10px 20px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #004494;
}

#messages,#alerts {
        width: 95%;
        min-height: 100vh;
        max-height: 500px; /* Add a max-height */
        height: auto;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        color: #000;
        padding: 10px;
        position: relative;
        overflow-y: scroll;
        scrollbar-width: none; /* For Firefox */
        margin-top: 20px;
}
/* For WebKit-based browsers (Chrome, Safari, etc.) */
#messages,#alerts::-webkit-scrollbar {
    display: none; /* Hides scrollbar */
}

#messages,#alerts > :first-child{
    margin-top: 0px;
}
#messages .message-item:last-child{
    margin-bottom: 150px;
}

#messages,#alerts > :last-child{
    margin-bottom: 250px;
}
.messagesContainer h6{
    margin: 10px auto;
    width: 100%;
    color: #000;
    text-align: center;
    font-size: 1.2em;
    margin-top: 90px;
}

.message-item,.alert-item{
    margin: 20px auto;
    display: block;
    position: relative;
    width: 90%;
    padding: 10px 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 1px solid #000;
    font-size: 2em;
    background-color: #b33c3c;

    }
    .message-item{
        background-color: #fff;
        border: 1px solid;
        font-size: 18px;
    }

    .overlay {
        position: fixed;
        top: 244px;
        left: 0px;
        width: 100%;
        height: 38%;
        background: rgba(0, 0, 0, 0.8);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 20;
        color: #000;
    }
    .popup {
        background: white;
        padding: 20px;
        border-radius: 10px;
        max-width: 100%;
        height: 100%;
        position: relative;
    }
    .close-btn {
        position: absolute;
        top: -2px;
        right: -5px;
        cursor: pointer;
        background: red;
        color: white;
        border: none;
        padding: 8px 15px;
        border-radius: 5px;
    }

    #geoError{
        margin: 0 auto;
        width: 80%;
        display: none;
        color: red;
        font-size: 20px;
        position: relative;
        top: 30%;
        background-color: #fff;
        padding: 20px;
    }

    #speedingText{
        display: none;
        font-size: 25px;
        color: #ea4e4e;
        margin: 0 auto;
        position: relative;
        top: 38%;
        justify-content: center;
        align-items: center;
        max-width: 80vw;
    }

    #search{
       position: relative;
       right: 6%;
    }

      #driver_search{
        margin: 0 auto;
        display: none;
        position: absolute;
        top: 30%;
        right: 0;
        left: 0%;
        width: 95%;
      }

      #driver_search input {
        position: relative;
        left: 5px;
        border-radius: 3px;
        width: 70%;
        height: 45px;
        font-size: 18px;
        padding: 5px;
        box-sizing: border-box;
        color: #000;
        padding: 10px;
        border: 1px solid;
      }

      #driverContainer .content{
        margin: 0 auto;
        width: 100%;
        font-size: 20px;
        color: #fff;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
      }

      #driverContainer .content p{
        width: 50%;
        min-height: fit-content;
        padding: 20px;
        background-color: #3d3939;
        color: snow;
        border-radius: 20px;
        text-align: center;

      }

      #driver_search button{
        margin: 0 auto;
        position: relative;
        left: 2%;
        height: 46px;
        width: 25%;
        font-size: 17px;
      }

      iframe{
        display: none;
      }
      footer{
        height: 8vh;
        color: #fff;
        text-align: center;
        position: absolute;
        bottom: 0;
        width: 100%;
      }

      #searchContainer{
        margin: 0 auto;
        height: fit-content;
        color: #fff;
        font-size: 18px;
        width: 100%;
      }

      #searchContainer li {
        text-align: center;
        font-size: 18px;
        width: 45%;
        position: relative;
        left: 0%;
        padding: 3px 5px;
        margin: 10px 4px;
        background-color: #878386;
        list-style: none;
        border-radius: 8px;
      }

      #driverContainer{
        width: 100%;
        padding: 0;
        margin: 0 auto;
        color: #000;
        margin-top: 100px;
      }
      #track{ 
        list-style: none;
        height: auto;
        min-height: 30px;
        margin: 0 auto;
        margin-left: -27px;
        width: 95%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
        margin-bottom: 40px;
      }

    .driver{
        font-size: 20px;
        text-align: center;
        margin: 0px 5px;
        margin-left: 0px;
        min-height: 30px;
        padding: 5px 0px;
        background-color: ivory;
        border-radius: 5px;
        color: #000;
    }


    form  label{
        position: relative;
        left: 0%;
        font-size: 20px;
        top: 10px;
    }

      form .btn{
        margin: 0 auto;
        margin-top: 9px;
        position: relative;
        width: 30%;
        padding: 2px;
        font-size: 20px;
        height: 40px;
        left: 32%;
        top: 10px;
      }

    .go{
        margin: 0 auto;
        text-align: center;
        margin-left: 40%;
        position: absolute;
        z-index: 10;
        color: #fff;
        border-color: cornsilk;
        border-radius: 40px;
        top: 40vh;
        height: 60px;
        width: 150px;
        font-size: 2em;
        background-color: #26842a;
    }

    .speed-container{
        margin: 0 auto;
        position: relative;
        top: 27%;
        display: none;
        align-items: center;
        border-radius: 50%;
        border: 5px dotted #fff;
        justify-content: center;
        width: 65vw; /* 50% of the viewport width */
        aspect-ratio: 1 / 1; /* Makes height equal to width */
    }
    

    .person{
        margin: 0 auto; margin-top: -20px; width: 50%;
        float: left;
        position: absolute;
        left: 10%;
        font-size: 30px;
        color: #fff;
    }

    .person-image{
        font-size: 20px;
        margin-top: -20px;
        color: #fff;
        height: 50px;
    }

    .time{
        color: #fff;
        position: absolute;
        left: 61%;
        top: 20%;
        font-size: 30px;
    }

    #track-user{
        position: absolute;
        margin: 0;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        height: 100%;
        width: 100%;
        background-color: #050505fa;
    }

    #track-user strong{
        position: relative;
        left: 11%;
        top: 14%;
        color: #fff;
        font-size: 1.8em;
    }

    #info{
        margin: 0 auto;
        position: absolute;
        text-align: center;
        bottom: 8vh;
        left: 2vw;
        right: 0;
        width: 98vw;
        height: 7vh;
        display: inline-block;
        padding: 0px;
    }

    #hours-dreven, #km-dreven{
        position: absolute;
        font-size: 2em;
        color: #fff;
        right: 4vw;
    }
    
    #hours-dreven {
        left: 3vw;
        display: flex;
        flex-direction: row;
        gap: 9px;
    }

    .speed-container #speed {
        position: relative;
        top: 5vh;
        transform: translate(-50%, -50%);
        color: #fff;
        height: 100px;
        font-size: 8em;
        font-family: sans-serif;
        font-weight: bold;
    }

    .speed-container #kmh {
        margin: 0 auto;
        font-size: 20px;
        color: #fff;
        position: relative;
        font-size: 2em;
        top: 10px;
    }

    #speed-sign{
        position: fixed;
        left: 78%;
        height: 69px;
        width: 64px;
        background-color: red;
        top: 40%;
        border-radius: 50%;
        padding: 3px;
        display: none;
    }

    #speed-sign span{
        position: relative;
        font-size: 3.7em;
        padding: 0px;
        margin: 0px 2px;
        height: 100px;
        background-color: #fff;
        border-radius: 50%;
        display: none;
    }

    .speed-indicator{
        display: block;
        position: fixed;
        width: 100vw;
        height: 100vh;
        color: #fff;
    }

    #speeding-alert,#moving,#not-moving{
        display: none;
        position: fixed;
        top: 20vh;
        left: 20vw;
        z-index: 4;
    }

    #batteryPercentage{
        position: fixed;
        top: 46vh;
        left: 50vw;
        right: 2vw;
        z-index: 10;
        display: none;
    }



/* Apply the animation to the element */
#batteryPercentage {
  animation: flash 1s linear infinite;
}


    .speed-alert .span-group{
        width: 40%;
        position: absolute;
        height: 50%;
        right: -12%;
        top: 100%;
    }

    .speed-alert span{
        display: grid;
        height: 4px;
        margin: 9px 0px;
        position: static;
        right: 80%;
        border-radius: 5px;
    }

    #speeding-alert span{
        background-color: red;
    }

    #moving span{
        background-color: green;
    }

    .span-first,.span-fourth,.span-third{
        width: 60px;
    }
    #tryAgain{
        margin: 0 auto;
        width: 27%;
        position: relative;
        left: 30%;
        margin-top: 100px;
        top: 0%;
        background-color: #0a930a;
    }
}

/* Hide browser UI */ 
body{height: auto; margin: 0;padding: 0;width: 100vw;/* Optional: Hide scrollbars */}


@media screen and (max-width: 767px){  
    #wraper{
        margin: 0;
        padding: 0;
        height: 100%;
        width: 100%;
        color: #fff !!important;
    }
    .desktop_message{
        display: none;
    }
    .navbar{
        height: 6vh !important;
        top: 0px;
        z-index: 15;
        position: fixed;
    }



    .navbar ul a{
        text-decoration: none;
        color: #fff;
        margin-left: 0px;
    }
    .brand{
        margin: 0px auto;
        padding: 0px;
        color: #fff;
        font-size: 18px;
        margin-left: 0px;
        text-decoration: none;
        position: relative;
        left: 1vw;
    }

    .brand span{
        margin-left: 1vw;
        position: relative;
        top: -1.5vh;
    }
    .brand strong{
        font-size: 17px;
        margin-top: 0px;
        padding: 4px;
        position: relative;
        left: 3px;
        top: 0px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        margin-right: 8vw;
        width: 30px;
        height: 30px;
        padding: 3px 10px;
        background-color: #000;  
    }
    .nav-ul{
            margin: 0px auto;
            padding: 10px;
            color: #fff;
            display: none;
            position: fixed;
            display: none;
            left: 0;
            top: 0vh;
            width: 70%;
            border-radius: 2px;
            height: 100%;
            font-size: 17px;
            list-style: none;
    }
    .show {
        display: block; /* Show when active */
        background-color: #111;
        padding: 45px 20px;
    }

    .nav-links li {
        padding: 5px 10px;
        width: 100%;
        text-align: left;
    }

   .nav-links svg{
        margin-right: 10px;
    }

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;;
}


.menu-toggle .bar {
    height: 2.5px;
    width: 31px;
    background-color: #fff;
    margin: 4px 0;
}
#installApp{
    margin-top: 80px;
}

      #driver_search{
        margin: 0 auto;
        display: none;
        position: absolute;
        top: 10%;
        right: 0;
        left: 2%;
      }

      #driver_search button{
        margin: 0 auto;
        position: relative;
        left: 2%;
        height: 50px;
        width: 25%;
        font-size: 17px;
        border-radius: 10px;
        border-color: none;
        border: none;
        color: #fff;
      }

      iframe{
        display: none;
      }
      footer{
        height: 8vh;
        color: #fff;
        text-align: center;
        position: absolute;
        bottom: 0;
        width: 100%;
      }

      #searchContainer{
        margin: 0 auto;
        height: fit-content;
        color: #fff;
        font-size: 18px;
        width: 100%;
      }

      #searchContainer li {
        text-align: center;
        font-size: 18px;
        width: 45%;
        position: relative;
        left: 0%;
        padding: 3px 5px;
        margin: 10px 4px;
        background-color: ivory;
        list-style: none;
        border-radius: 8px;
      }

      #driverContainer{
        width: 100%;
        padding: 0;
      }

      .content{
        margin: 0 auto;
        font-size: 20px;
        margin: 0 auto;
        font-size: 20px;
        color: #fff;
        background-color: #3d3939;
        width: 95%;
        border-radius: 10px;
      }

    .content p{
        padding: 15px;
        text-align: left;
        width: 90%;
        margin: 0 10px;
        font-family: emoji;
        font-size: 18px;
      }



    #loginContainer{
      margin: 0;
      padding: 0;
      position: relative;
      width: 100%;
      height: 88%;
      top: 15%;
    }

    form .form-group{
        display: flex;
        width: 100%;
    }
    form label{
        width: 30%;
        font-size: 20px;
        margin-top: 7px;
    }

    form span{
        position: relative;
        left: 40%;
        padding: 5px;
        font-size: 18px;
    }
    form .btn{
        width: 42%;
        left: 43%;
        top: 0px;
    }

    .speed-container{
        margin: 0 auto;
        position: relative;
        top: 35%;
        align-items: center;
        justify-content: center;
    }
#speedLimitContainer{
        position: absolute;
        top: -59%;
        left: 33%;
        height: 80px;
        width: 100px;
        border-radius: 50%;
        color: #fff;
        background-color: #741010;
        font-size: 35px;
        display: flex;
        justify-content: center;
        display: none;
}

#speedLimitContainer #speedLimit{
        text-align: center;
        padding: 0px;
        background-color: #fff;
        width: 100%;
        height: 100%;
        color: #000;
        border-radius: 50%;
        border: 7px solid red;
        display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
}
}
    .speed-container #speed{
        position: relative;
        top: 60px;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 8em;
        font-family: sans-serif;
        font-weight: bold;
    }

    .speed-container #kmh{
        margin: 0 auto;
        top: -2px;
        color: #fff;
        position: relative;
        font-size: 2em;
    }


    .person{
        margin: 0 auto; margin-top: -20px; width: 50%;
        float: left;
        position: absolute;
        left: 10%;
        font-size: 30px;
        color: #fff;
    }

    .person-image{
        font-size: 20px;
        margin-top: -20px;
        color: #fff;
        height: 50px;
    }

    .time{
        color: #fff;
        position: absolute;
        left: 61%;
        top: 20%;
        font-size: 30px;
    }

    #track-user{
        position: absolute;
        margin: 0;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        height: 100%;
        width: 100%;
        background-color: #050505fa;

    }

    #track-user strong{
        position: relative;
        left: 11%;
        top: 14%;
        color: #fff;
        font-size: 1.8em;
    }

    #info{
        margin: 0 auto;
        position: absolute;
        text-align: center;
    }

    #hours-dreven, #km-dreven{
        font-size: 2em;
        gap: 9px;
        margin-top: 0px;
    }
    

    #speeding-alert,#moving,#not-moving{
        display: none;
        position: fixed;
        top: 30vh;
        left: 15vw;
        z-index: 4;
        transform: translate(35%, -15%);
    }

    #batteryPercentage{
        position: fixed;
        top: 46vh;
        left: 50vw;
        right: 2vw;
        z-index: 10;
        display: none;
    }



/* Apply the animation to the element */
#batteryPercentage {
  animation: flash 1s linear infinite;
}


    .speed-alert .span-group{
        width: 40%;
        position: absolute;
        height: 50%;
        right: -12%;
        top: 100%;
    }

    .speed-alert span{
        display: grid;
        height: 4px;
        margin: 9px 0px;
        position: static;
        right: 80%;
        border-radius: 5px;
    }

    #speeding-alert span{
        background-color: red;
    }

    #moving span{
        background-color: green;
    }

    .span-first,.span-fourth,.span-third{
        width: 60px;
    }
}

@media screen and (max-width: 600px){
        .go {margin-left: 30%;}
}
@media screen and (max-width: 500px){
    .go {margin-left: 25%;}
}

@media screen and (max-width: 320px){
        .go {margin-left: 30%;}
        .speed-container{
            width: 75vw;
        }
}

@media screen and (max-width: 280px){
    .go {margin-left: 30%;}
    .speed-container{width: 85vw;}
    #installApp{margin-top: 130px;}

}

