/* Global Styles */

body {
    background-color: #2e3128;
    background-image: url(hydraBG.webp);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-flow: column;
  }

  
  .bottom{
    display: flex;
    justify-content: right;
    margin-right: 60px;
    margin-bottom: 60px;
    color: white;
  }

  .bottom h1{
    font-size: 20px;
    font-family: Roboto Condensed;
    font-weight: 400;
    text-align: center;
  }

  footer {
    display: flex;
    justify-content: right;
    margin-right: 60px;
    margin-top: 30px;
  }
  
  ::-webkit-scrollbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
  }
  
  ::-webkit-scrollbar-corner {
    background: transparent;
  }
  
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  }
  
  
  .arduinoProj {
    max-width: 800px;
    margin: 0 auto;
    margin-right: 30px;
    margin-top: 6px;
    float: right;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    display: block;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  }
  
  /* Header Section */
  
  .headache {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 2px solid #ccc;
    background: transparent;
    color: #fff;
  }
  
  .headache img {
    margin-right: 20px;
  }
  
  #changeable-image {
    height: 90px;
    width: auto;
  }
  
  .change-image {
    padding: 10px;
    border: solid white 1px;
    border-radius: 5px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.158);
    color: #fff;
    margin-right: -100px;
  }
  
  #page-dropdown {
    padding: 10px;
    border: solid white 1px;
    border-radius: 5px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.158);
    color: #fff;
  }
  
  #page-dropdown option {
    background-color: rgba(255, 255, 255, 0.158);
    color: black;
  }
  
  /* Code Container */
  
  #code-container {
    padding: 20px;
  }
  
  #toggle-button {
  background-color: #0e0a0a;
  color: #fff;
  font-weight: bold;
  padding: 10px 20px;
  border: solid #b2f02c 3px;
  cursor: pointer;
  font-size: 20px;
  box-shadow: inset 0 5px 10px -5px rgba(255, 255, 255, 0.432);
  transform: skewX(-8deg);
  width: 100%;
  height: 50%;
  display: inline-block;
  transition: all 0.3s ease;
  margin: 0 auto; 
  margin-bottom: 20px;
}
  #toggle-button:hover {
    box-shadow: #16150f 0px 7px 0px 0px;
    background-color: #89d835;
    color: black;
    border-color: #16150f;
  }
  

  /*=============================================*/
  .navbar {
    background-color: transparent;
    text-align: center;
  }
  
  .nav-links {
    list-style: none;
    margin: 0;
    margin-top: 0px;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
  }
  
  
  .nav-links a {
    color: #fff;
    text-decoration: none;
  }
  
  .nav-links a:hover {
    color: #ccc;
  }
  
  .fab {
    font-size: 18px;
  }

  /*=============================================*/
 /* Container Styles */

.container {
  margin: 40px auto;
  padding: 10px;
  background-color: transparent;
  border-radius: 10px;

  width: 90%;
  max-width: 500px;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center; /* added */
}

/* Calculator Styles */

.cal {
  display:block;
  background-color: #16150f7e;
  border-top: solid #b2f02c 2px;
  width: 95%;
  padding: 20px;
  border-radius: 10px;
}

#display {
  width: 100%;
  height: 30px;
  padding: 10px;
  margin: 0 auto;
  font-size: 24px;
  text-align: left; 
  border: none;
  border-radius: 2px;
  background-color: transparent;
  box-sizing: border-box;
  color: white;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px;
  justify-items: center; /* added */
}

.buttonc {
  background-color: #0e0a0a;
  color: #fff;
  font-weight: bold;
  padding: 10px 20px;
  border: solid #a0da2d 3px;
  border-radius: 0;
  cursor: pointer;
  font-size: 20px;
  box-shadow: inset 0 5px 10px -5px rgba(255, 255, 255, 0.432);
  transform: skewX(-8deg);
  width: 90px;
  height: 44px;
  display: inline-block;
  transition: all 0.3s ease;
  margin: 0 auto; /* added */
}

.buttonc:hover {
  box-shadow: #16150f 0px 7px 0px 0px;
  background-color: #8ae22d;
  color: black;
  border-color: #16150f;
}

.buttonc:active {
  background-color: #b2f02c;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Slope Styles */

.slope {
  width: 90%;
  margin-top: 10px;
  margin-bottom: -5px;
  display: none;
  flex-flow: column;
  justify-content: center;
  align-items: center; /* added */
  font-family: Arial, Helvetica, sans-serif;
  color: white;
}

.slope h1{
  margin-top: -30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.596);
}

/* Form Styles */

form {
  width: 100%;
  padding: 20px;
  background-color: #16150f7e;
  border-top: solid #b2f02c 2px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  text-align: left;
}

label {
  display: inline-block;
  width: 40px;
  margin-right: 5px;
  color: #fff;
  font-weight: bold;
}

input[type="number"] {
  display: inline-block;
  width: 80%;
  height: 30px;
  padding: 10px;
  font-size: 24px;
  border: none;
  background-color: transparent;
  color: white;
  border-bottom: solid white 1px;
}

input[type="number"]:focus {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border: solid #b2f02c 2px;
  color: white;
}

.buttonSlope {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.buttonSlope button {
  background-color: #0e0a0a;
  color: #fff;
  font-weight: bold;
  width: 100px;
  border: solid #b2f02c 2px;
  cursor: pointer;
  font-size: 15px;
  box-shadow: inset 0 5px 10px -5px rgba(255, 255, 255, 0.432);
  transform: skewX(-8deg);
  width: 90px;
  height: 44px;
  display: inline-block;
  vertical-align: middle;
  transition: all 0.3s ease;
}

.buttonSlope button:hover {
  box-shadow: #16150f 0px 7px 0px 0px;
  background-color: #8ae22d;
  color: black;
  border-color: #16150f;
}

.buttonSlope button:active {
  background-color: #b2f02c;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
/* Result Styles */

#result {
  font-size: 24px;
  font-weight: bold;
  margin-top: 20px;
  text-align: center; /* added */
}

/*===============================================*/
.mmm {
  width: 90%;
  margin-top: 10px;
  margin-bottom: -5px;
  display: none;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
  text-align: left;
}

.mmm h1{
  margin-top: -30px;
  text-align: center;
  font-size: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.596);
}

#bombaclat {
  width: 100%;
  padding: 20px;
  background-color: #16150f7e;
  border-top: solid #b2f02c 2px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}


.gyat{
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
}

input[type="text"] {
  display: inline-block;
  width: 80%;
  height: 30px;
  padding: 10px;
  font-size: 24px;
  border: none;
  background-color: transparent;
  color: white;
  border-bottom: solid white 1px;
  text-align: left;
}

input[type="text"]:focus {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border: solid #b2f02c 2px;
  color: white;
  text-align: left;
}

#resultMMM {
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  text-align: left;
}

.result-container {
  display: flex;
  flex-flow: column;
  flex-wrap: wrap;
  border-bottom: solid #8ae22d 1px;
  border-right: solid #b2f02c 1px;
  padding-top: 0;
}

.result-item {
  display: flex;
  align-items: center;
  margin-right: 20px; /* adjust the margin to your liking */
}

.result-item h4 {
  margin-right: 10px; /* adjust the margin to your liking */
  font-size: 20px;
  color: #f2bf30;
}

.result-item p {
  margin: 0;
  text-align: right;
}

/*===============================================*/
.triangle{
  width: 90%;
  margin-top: 10px;
  margin-bottom: -5px;
  display: none;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
  text-align: left;
}


.triangle form{
  justify-content: center;
  align-items: center;
}

.triangle h1{
  margin-top: -30px;
  text-align: center;
  font-size: 28px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.596);
}


/*===============================================*/
  
  /* For small screens (e.g. mobile devices) */
  @media only screen and (max-width: 768px) {
   .container {
      width: 100%; /* make container width 100% of screen */
      margin: 10px auto;
    }
    #display {
    font-size: 30px;
    height: 50px;
    padding: 10px;
    }
   .buttonc {
    padding: 10px 10px;
    font-size: 22px;
    transform: skewX(0deg); 
    width: 50px; 
    height: 54px;
    }

    .bottom{
      margin-right: 10px;
    }
  }
  
  /* For medium screens (e.g. tablets) */
  @media only screen and (min-width: 769px) and (max-width: 1024px) {
   .container {
      width: 80%; /* make container width 80% of screen */
      margin: 20px auto;
    }
    #display {
      font-size: 16px;
    }
   .buttonc {
      font-size: 12px;
    }
  }
  
  @media only screen and (min-width: 1025px) {
   .container {
      width: 90%; 
      margin: 40px auto;
      margin-top: 10px;
      margin-bottom: -5px;
    }
    #display {
      font-size: 30px;
      padding-top: 20px;
      padding-bottom: 20px;
      margin-bottom: 10px;
      border-bottom: solid white 2px;
    }
   .buttonc {
      font-size: 18px;
    }
  }
  /*=============================================*/
  /* Media Queries */
  
  @media (max-width: 500px) {
    #code-display {
        height: 50vh;
        font-size: 8px;
    }

    body{
        background-image: url(hydraEmblem.webp);
        background-position: center;
        background-size: contain;
        background-repeat: no-repeat;
        background-color: #444b33;
    }

    .headache button{
        width: 60px;
        overflow: hidden;
    }

    #changeable-image {
        height: 60px; 
        width: auto; 
      }
    
    #code-display {
        max-width: 100%;
        height: 40vh;
        overflow-y: scroll;
        padding: 16px;
        background: rgba(255, 255, 255, 0);
        color: white    ;
        border-radius: 5px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
      }

    .arduinoProj{
      max-width: 300px;
      margin-top: 30px;
      margin: 0 auto;
      float:unset;
    }

    footer{
    display: flex;
    justify-content: center ;
    margin-top: 30px;
    }

    footer img {
        width:380px;
        margin-left: 55px;
    }

    .change-image{
        margin-right: 10px;
      }
  }
  
