

html {
  font-size: clamp(14px, 1.5vw, 17px);
  overscroll-behavior: none;
}

body {
  height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	flex-wrap: wrap-reverse;
	background: linear-gradient(0deg, #6139a5 0%, #4570df 100%);
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  &.bg:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
  }
  
}


* {
  font-family: 'VT323', monospace;
  box-sizing: border-box;
}

  & div.button-wrapper {
    height: 2.25rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    & .icon-box {
      height: 100%;
      width: 1.75rem;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #3e5eba;
      border-right:  0.3125rem solid #3e5eba;
      border-top-right-radius: 0.9375rem;
      border-bottom-right-radius: 0.9375rem;
      & i {
        color: aliceblue;
      }
    }

    & button, & a, & input {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
      height: 100%;
    }

  }

.startBox {
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  max-height: 90vh;
  min-width: 20rem;
  padding: 1rem 3.5rem;
  gap: 1.5rem;
  border: 0.3125rem solid #3e5eba;
  background: var(--main-bg-color);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
  & .logo {
    display: block;
    margin: 0 auto 0.3125rem;
    width: 9.375rem;
  }


  
  & * {
    font-size: 1.125rem;

  }
  & .wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: -1rem;

    & .input-group {
      position: relative;
      width: 100%;
      margin-top: 1.5rem;
  
      & i {
        position: absolute;
        top: 50%;
        right: 0.2rem;
        border-top-right-radius: var(--border-radius);
        border-bottom-right-radius: var(--border-radius);
        transform: translateY(-50%);
        color: var(--main-bg-color);
        background-color: var(--border-color);
        padding: 0.3rem;
        font-size: 100%;
        transition: all 0.2s ease-in-out;
      }
      & label {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        pointer-events: none;
        transition: all 0.2s ease-in-out;
      }
      & input::placeholder {
        color: transparent;
      } 
      &:focus-within label,
        input:not(:placeholder-shown) + label {
          transform: translate(-50%, -2.5rem) 
      }
      
    }
  }

  & input:hover + i,
    input:focus + i {
     color: var(--font-color);
     text-shadow: 1px 1px 0.25rem #000000;
  }
  & label {
    color: aliceblue;
  }


}
 
button,
input,
a {
  background: var(--main-bg-color);  
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
  border: 0.3125rem solid #3e5eba;
  color: aliceblue;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease-in-out;
  border-radius: 0.9375rem;
  width: 100%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

button.highlight {
  animation: highlight 1s infinite alternate ease-in-out;
}

@keyframes highlight {
  0% {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
  }
  100% {
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.6);
  }
}

a {
  text-decoration: none;
  color: aliceblue;
}



button:hover,
input:hover,
a:hover,
button:focus,
input:focus,
a:focus {
  background: var(--hover-bg-color) !important;
  color: var(--hover-font-color) !important;
}

button:hover,
input[type="submit"]:hover,
a:hover,
button:focus,
input[type="submit"]:focus,
a:focus {
  text-shadow: 1px 1px 0.25rem #000000 !important;
}

.auth {
  padding: 0.25rem 0;
}

button.hide {
  display: none;
}


.onlineScoreBoard,
.keyboard-layout,
#achiv-table,
#patchnotes-table {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  /* width: 50%; */
  height: 85%;
  border: 0.3125rem solid #3e5eba;
  background: var(--main-bg-color);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 1);
  font-size: 1.1875rem;
  color: cornflowerblue;
  text-align: center;

  span.player-name-achiv {
    cursor: pointer;
    &:hover {
      text-decoration: underline;
    }
  }

}

.table-wrapper {
  overflow-y: auto;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: cornflowerblue white;
}



.keyboard-layout form {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;

  & .inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    height: 100%;
  }

  & input, button {
    font-size: 1rem;
    border: 2px solid #3e5eba;
    border-radius: 10px;
    padding: 5px;
  }
  & button {
    border: 3px solid #3e5eba;
    padding: 10px;
    
  }
}



.onlineScoreBoard {

  & table {
    height: 100%;

    & tr.highlight  {
      background-color: #f2f2f2;

      & > i {
        display: flex;
        position: absolute;
        top: 50%;
        right: -2.5rem;
        cursor: pointer;
        color: #ffffff;
        font-size: 1.375rem;
        padding: 0.3125rem;
        border-bottom-right-radius: 0.3125rem;
        border-top-right-radius: 0.3125rem;
        transform: translateY(-50%);
      }
    }
    & tr:not(.highlight) > i {
      display: none;
    }
  }
}


table {
  border-collapse: collapse;
  min-width: 20rem;
  height: 100%;
  & thead {
    background-color: #3e5eba;
    color: white;
  
    & th {
      background-color: #3e5eba;
      color: white;
      position: -webkit-sticky;
      position: sticky;
      top: 0;
      z-index: 2;
    }
  }
  & tr {
    border-bottom: 1px solid #3e5eba;
    & td {
      color: cornflowerblue;

    }

  }
  & td,th {
    padding: 0.625rem;
    text-align: left;
  }
}



.onlineScoreBoard tbody tr td:first-child {
  text-align: center;
}


.onlineScoreBoard div#scoreboard-close-btn ,
#achiv-table div#achiv-close-btn,
#patchnotes-table div#patch-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3rem;
  color: aliceblue;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
  font-size: 1.375rem;
  z-index: -5;
  background: #3e5eba;
  border-top: 2px solid aliceblue ;
  border-radius: 20px 20px 0 0;
  & i {
    color: brown;
    margin-bottom: 0.5rem;
  }
}


/* div:hover > i.fa-circle-xmark
div:focus > i.fa-circle-xmark {
  color: rgb(25, 211, 40);
  transition: color 0.3s ease-in-out;
}  */

/* .loadingIndicator {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 0.25em solid #3e5eba;
  border-top: 0.25em solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-top: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
} */



#player-info-box {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 1rem;

  min-width: 40%;

  border: 0.3125rem solid #3e5eba;
  border-top: none;
  background: var(--main-bg-color);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
  color: #f2f2f2;
  padding: 1rem 1.5rem;
 


  & h4 {
    text-align: center;
  }

}




/* #goal {
  display: flex;
  align-items: center;
  justify-content: center;
	border: 0.3125rem solid #3e5eba;
  background: var(--main-bg-color);  
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
	position: absolute;
	top: 1rem;
	left: 1rem;
  color: #f2f2f2;
  padding: 1rem;
  
} */



div.wrapper.rename {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 300px;
  & > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1rem;
    border: 0.3125rem solid #3e5eba;
    background: var(--main-bg-color);  
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    & input {
      text-align: center;
    }
    & .rename-icons {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 2rem;
      padding: 0 2rem ;
      width: 100%;
      & > * {
        width: 100%;
      }
    }
    
  }
}



@media screen and (width <= 750px) {
  .onlineScoreBoard {
    font-size: 1.2rem;
  }

  #player-info-box {
    width: 100%;
    border-left: none;
    border-right: none;


  }

}

@media screen and (width <= 450px) {

  table {
    & td {
      &:first-child,
      &:nth-child(2) {
        hyphens: auto;
      }
    }

  }
}

@media screen and (width <= 400px) {
  
  .onlineScoreBoard td,
  .onlineScoreBoard th {
    padding: 0.4rem;
  }




  #player-info-box {
    padding: 0.75rem;
    justify-content: space-between;
    gap: 0.5rem;
  }

}

