nav {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  top: 0;
  font-family: "Montserrat", "sans-serif";
  height: 10vh;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 0 5%;
}

nav .logo {
  float: left;
  width: 40%;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 24px;
  color: #fff;
}

nav .links {
  float: right;
  padding: 0;
  margin: 0;
  width: 60%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

nav .links li {
  list-style: none;
}

nav .links a {
  display: block;
  padding: 1em;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  position: relative;
}

nav .links a:hover {
  color: white;
}

nav .links a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: white;
  visibility: hidden;
  transform: scaleX(0);
  transition: all 0.3s ease-in-out 0s;
}

nav .links a:hover::before {
  visibility: visible;
  transform: scaleX(1);
  color: white;
}

.dropdown {
  position: relative;
}

.rules-parent{
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

.hidden-checkbox {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  display: none;
  padding: 15px 0;
  margin: 0;
  min-width: 180px;
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.dropdown:hover .submenu {
  display: block;
  animation: fadeIn 0.3s ease;
}

.submenu li {
  padding: 8px 20px;
  white-space: nowrap;
}

.submenu a {
  font-size: 14px;
  padding: 8px 15px;
  text-align: center;
}


#nav-toggle {
  position: absolute;
  top: -100px;
}

nav .icon-burger {
  display: none;
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
}

nav .icon-burger .line {
  width: 30px;
  height: 5px;
  background-color: #fff;
  margin: 5px;
  border-radius: 3px;
  transition: all 0.5s ease-in-out;
}

::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(176, 196, 222, 0.4);
  border-radius: 4px;
}

@media screen and (max-width: 768px) {
 
  nav .icon-burger {
    display: block !important;
    right: 20px;
    z-index: 1000;
  }


  nav .links {
    position: fixed;
    right: -100%;
    width: 30%;
    height: 100vh;
    background: rgba(0,0,0,0.97);
    flex-direction: column;
    align-items: flex-end;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 25px 15px;
    margin: 0;
    overflow-y: visible;
  }


  #nav-toggle:checked ~ .links {
    right: 0;
    left: auto;
  }


  nav .links li {
    width: 100%;
    padding: 15px 0;
    text-align: center;
    position: relative;
  }


  .dropdown {
    position: static;
    display: block;
    overflow: visible; 
  }


  .submenu {
    position: absolute !important;
    left: -60% !important;     
    top: 0%;
    background: rgba(40,40,40,0.95);
    width: 30vw;
    box-shadow: -3px 3px 10px rgba(0,0,0,0.3);
    display: none;
  }

  nav .submenu a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80%;
    height: 2px;
    background-color: white;
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out 0s;
  }


  .dropdown:focus-within .submenu {
    display: block !important;
    animation: fadeIn 0.3s ease;
  }


  @keyframes slideFromLeft {
    from {
      opacity: 0;
      transform: translateY(-50%) translateX(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(-50%) translateX(0);
    }
  }


  #nav-toggle:checked ~ .icon-burger .line:nth-child(1) {transform: translateY(10px) rotate(45deg);}
  #nav-toggle:checked ~ .icon-burger .line:nth-child(2) {opacity: 0;}
  #nav-toggle:checked ~ .icon-burger .line:nth-child(3) {transform: translateY(-10px) rotate(-45deg);}


  .submenu li {
    white-space: normal;
    padding: 10px 25px !important;
  }

  .submenu a {
     text-align: left;
  }


  .links {
    z-index: 7;
  }
  
  .submenu {
    z-index: 6;
  }
}

::-webkit-scrollbar {
  width: 14px;
  height: 32px;
}

::-webkit-scrollbar-track {
  background: #0a0c12;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2c3e50, #000000);
  border-radius: 8px;
  border: 4px solid #0a0c12;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #3e5871, #1a1a1a);
  box-shadow: 0 
}