*{
    margin: 0;
    padding: 0;
    font-family: 'poppins', sans-serif;
    box-sizing: border-box;
}

html{
    scroll-behavior: smooth;
}

body{
    background: #16423C;
    color: #E9EFEC;
    height: 100%;
    overflow-x: hidden;
}

#header{
    width: 100%;
    height: 95vh;
    top: 0;
    background-position: center;
    background-color: #16423C;
    background-size: 50%;
    background-repeat: no-repeat;
    background-attachment: fixed;
}   

.fa-x {
    color: #16423C; /* Warna hitam */
}

.fa-bars{
    color: #16423C;
}
.container{
    margin-left: 9%;
    padding: 0;
    margin-right: 5%;
}
.navbar-brand {
    font-weight: bold;
    font-size: 25px;
    color: #16423C;
    text-decoration: none;
    transition: color 1s;
}

/* Override gaya hover bawaan */
.navbar-brand:hover {
    color: #ff004f; /* Tetap warna asli */
    text-decoration: none; /* Hindari garis bawah */
    transition: color 1s;
}
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: fixed; /* Makes the nav stick to the top */
    top: 0; /* Positions the nav at the top of the viewport */
    left: 0; /* Ensures the nav starts from the left edge */
    width: 100%; /* Makes the nav span the full width of the viewport */
    background: #E9EFEC; /* Background color to match your design */
    z-index: 1000; /* Ensures the nav is above other content */
    padding: 0px 5%; /* Adjust padding as needed */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Optional: Adds a shadow for better visibility */
}


.logo{
    width: 140px;
}

nav ul li{
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
    padding-top: 1%;

}

nav ul li a{
    color: #16423C;
    font-weight: bold;
    text-decoration: none;
    font-size: 18px;
    
}

nav ul li a {
    position: relative; 
}

nav ul li a::after {
    content: "";
    width: 0; 
    height: 3px;
    background: #ff004f;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: width 0.5s; 
}

nav ul li a:hover::after {
    width: 100%; 
}

nav .fa-solid{
    display: none;
}

.monitoring{
    margin-top: 50px;
    margin-right: 100px;
    margin-left: 400px;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: center;
    align-content: center;
    position: flex;
    text-align: center;
    background: rgba(255, 255, 255, 0.1); /* Warna transparan */
    border-radius: 10px;
    backdrop-filter: blur(10px); /* Efek blur pada background */
    -webkit-backdrop-filter: blur(10px); /* Kompatibilitas untuk Safari */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Bayangan untuk estetika */
}

input {
    width: 50%;
    padding: 10px;
    font-size: 18px;
    margin-bottom: 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    text-align: center;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.key {
    padding: 20px;
    font-size: 20px;
    border: 2px solid #ccc;
    background-color: #f0f0f0;  
    border-radius: 5px;
    cursor: pointer;
}

.key:hover {
    background-color: #e0e0e0;
}

#canvas {
    display: none;
}

#timer {
    font-size: 24px;
    margin-top: 10px;
    font-weight: bold;
  }
  #timerInput {
    font-size: 18px;
    padding: 5px;
    margin: 5px;
    width: 50px;
    text-align: center;
  }
  .input-box {
    width: 75px;
    font-size: 18px;
    font-weight: bold;
    padding: 5px;
    text-align: center;
    margin: 5px;
    color: #E9EFEC;
    background-color: #16423C;
  }

#startButton {
    font-weight: bold;
    color: #E9EFEC;
    background-color: #16423C;
    font-size: 18px;
    padding: 10px;
    margin-top: 10px;
  }

  #startButton:hover{
    background-color: #ff004f;
    font-weight: bold;
    transition: background-color 0.5s;  
}

#stopButton {
    font-weight: bold;
    color: #E9EFEC;
    background-color: #16423C;
    font-size: 18px;
    padding: 10px;
    margin-top: 10px;
  }

  #stopButton:hover{
    background-color: #ff004f;
    font-weight: bold;
    transition: background-color 0.5s;  
}
.kontrol{
    margin-top: 40px;
    margin-right: 100px;
    margin-left: 400px;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: center;
    align-content: center;
    display: flex;
    justify-content: space-evenly;
    position: flex;
    text-align: center;
}

.grapik{
    margin-top: 40px;
    margin-right: 100px;
    margin-left: 400px;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: center;
    align-content: center;
    position: flex;
    text-align: center;
    background: rgba(255, 255, 255, 0.1); /* Warna transparan */
    border-radius: 10px;
    backdrop-filter: blur(10px); /* Efek blur pada background */
    -webkit-backdrop-filter: blur(10px); /* Kompatibilitas untuk Safari */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Bayangan untuk estetika */
}

.TextSuhu, .TextKelembapan{
    font-size: 40px;
}

.kamera{
    margin-top: 80px;
    margin-right: 100px;
    margin-left: 400px;
    margin-bottom: 0;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: center;
    align-content: center;
    position: flex;
    text-align: center;
    background: rgba(255, 255, 255, 0.1); /* Warna transparan */
    border-radius: 10px;
    backdrop-filter: blur(10px); /* Efek blur pada background */
    -webkit-backdrop-filter: blur(10px); /* Kompatibilitas untuk Safari */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Bayangan untuk estetika */
}

.kamera2{
    margin-top: 10px;
    margin-right: 100px;
    margin-left: 400px;
    margin-bottom: 0;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: center;
    align-content: center;
    position: flex;
    text-align: center;
    background: rgba(255, 255, 255, 0.1); /* Warna transparan */
    border-radius: 10px;
    backdrop-filter: blur(10px); /* Efek blur pada background */
    -webkit-backdrop-filter: blur(10px); /* Kompatibilitas untuk Safari */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Bayangan untuk estetika */
}

.btn{
    position: relative;
    width: 7em;
    height: 7em;
    border-radius: 50%;
    outline: none;
    border: 4px #16423C solid;
    background-color: #16423C;
    box-shadow: inset 2px 2px 0px #7d7c7e, inset -2px -2px 0px #1c1c1c;
    color: #fff;
}

.btn .fa-solid, .fa-regular{
    font-size: 2.9em;
}

.button-clicked{
    background: #16423C;
    box-shadow: inset -2px -2px 0px #5e5e5e, inset 2px 2px 0px #1c1c1c;
}

.icon-clicked{
    color: #ff004f;
    text-shadow: 0px 0px 15px #fff;
}

.btn::before{
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%   , -50%);
    border-radius: inherit;
    background: #16423C;
    width: 7.25em;
    height: 7.25em;
    z-index: -1;
    box-shadow: 11px 11px 22px #141414, -11px -11px 22px #525252;
}

@media only screen and (width: 1024px) and (height: 600px){
    .kontrol {
        width: 100%;
        display: flex;
        flex-direction: row;        /* Susun elemen secara horizontal */
        flex-wrap: wrap;            /* Bungkus elemen ke baris baru jika melebihi lebar */
        justify-content: space-around;
        align-items: center;
        margin-left: 10%;
        margin-right: 5%;
        gap: 20px;
    }
    
    .kontrol > * {
        flex: 1 1 45%;              /* Setiap elemen mengambil sekitar 45% dari lebar container */
        max-width: 40%;             /* Batas maksimum untuk memastikan hanya ada dua kolom */
    }
}

@media only screen and (max-width: 1500px){
    *{
        width: auto;
    }
    #header{
        height: 100vh;
        background-attachment: scroll !important;   
    }
    nav{
        padding : 10px 5%
    }
    nav .fa-solid{
        display: block;
        font-size: 25px;
        }

    nav ul{
        background: #E9EFEC;
        position: fixed;
        top: 0;
        right: -200px;
        width: 200px;
        height: 100vh;
        padding-top: 50px;
        z-index: 2;
        transition: 0.5s;
    }
    nav ul li{
        display: block;
        margin: 25px;
    }

    nav ul .fa-solid{
        position: absolute;
        top: 25px;
        left: 25px;
        cursor: pointer;
    }
    .monitoring {
        width: 100%; /* Sesuaikan lebar */
        margin-top: 50px;
        margin-left: 0;
    }

    #webcam1, #webcam2{
        width: 100%;
        margin: 5px 0;
    }
    .kamera{
        width: 100%;
        margin-top: 100px;
        margin-left: 0;
    }

    .kamera2{
        width: 100%;
        margin-top: 50px;
        margin-left: 0;
    }


    .kontrol {
        width: 100%;
        display: flex;
        flex-direction: row;        /* Susun elemen secara horizontal */
        flex-wrap: wrap;            /* Bungkus elemen ke baris baru jika melebihi lebar */
        justify-content: space-around;
        align-items: center;
        margin-left: 0%;
        margin-right: 5%;
        gap: 60px;
    }
    
    .kontrol > * {
        flex: 1 1 50%;              /* Setiap elemen mengambil sekitar 45% dari lebar container */
        max-width: 40%;             /* Batas maksimum untuk memastikan hanya ada dua kolom */
    }
    
    
    .container{
        width: 80%;
    }
    .grapik{
        width: 100%;
        margin-top: 50px;
        margin-left: 0;
    }

    .btn {
        box-shadow: none;
        margin-top: 40px;
        width: 3em;
        height: 6em;
        border: none !important;
    }

    .btn::before{
        box-shadow: none;
    }

    .button-clicked{
        box-shadow: none;
    }

    .btn .fa-solid, .fa-regular {
        font-size: 2.5em;
    }
}

@keyframes move-down{

    0%{
        top:10%;
    }
    50%{
        top:35%;
    }
    100%{
        top:50%;
    }
}

