html {
  font-size: clamp(14px, 1.5vw, 18px);
  overscroll-behavior: none;
  position: fixed;
  overflow: hidden;
  min-width: 100vw;
  min-height: 100vh;
}

* {
  font-family: var(--font-family);
}

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;
  min-width: 100vw;
  min-height: 100vh;

  &.transparent-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2
  }
  &.transparent-bg.higher::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 4
  } 
}


.logo {
  display: block;
  margin: 0 auto 0.3125rem;
  width: 9.375rem;
}



*[attr="display=block"] {
  display: flex !important;
}



.game_board_wrap {
	flex-direction: column;
  position: relative;

}



#game_board {
  width: 250px;
  height: 500px;
  border: 5px solid #3e5eba;
  display: grid;
  grid-template-columns: repeat(10, 25px);
  grid-template-rows: repeat(20, 25px);
  position: relative;
  background: var(--main-bg-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  
}

#game_board.bouncedown {
  animation: bouncedown 150ms ease-in-out;
}
#game_board.bounceleft {
  animation: bounceleft 150ms ease-in-out;
}
#game_board.bounceright {
  animation: bounceright 150ms ease-in-out;
}
@keyframes bounceright {
  0% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(0px);
  }
}
@keyframes bounceleft {
  0% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0px);
  }
}
@keyframes bouncedown {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(3px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* TOP HEADER */


div.combo-counter.container {
  position: absolute;
  left: 0;
  transform: translateX(-100%);
  z-index: 1;
  font-size: 1.5rem;
  transition: 500ms ease-in-out 500ms; 
}  
div.combo-counter.container.slide-left {
  transition: 500ms ease-in-out;
  transform: translateX(0%);
}  

div.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;

  min-height: 3.5rem;

  /* width: 3rem;
  height: 2.5rem; */
  border: 3px solid #3e5eba;
  border-radius: 3px;
  background-color: var(--main-bg-color);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
  color: aliceblue;
  text-transform: uppercase;
  font-size: 1.25rem;


  & span {
    width: 100%;
    height: 100%;
    text-align: center;
    padding: 0.25rem;
    &:first-child {
      background-color: #3e5eba;

    }
  }
} 

div#top-header {
  position: absolute;
  top: -3px;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: space-evenly;
  
  rotate: -1deg;
  height: 5rem;
  width: 100vw;
  
  padding: 0.5rem;
  font-size: 1.25rem;

  background-color: var(--main-bg-color);
  border-bottom: 0.5rem solid var(--border-color);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
  color: aliceblue;

  & #pause {
    position: absolute;
    left: 0.5rem;
    bottom: -1.5rem;
    transform: translateY(100%);
    scale: 0.8;
  }

}

@media screen and (width >= 600px) {

  body {
    & div.combo-counter.container {
      font-size: 2rem;
    } 
  }

  div#top-header {
    top: unset;
    right: 0;
    
    justify-content: space-around;
    padding: 2rem;

    width: 5rem;
    height: 100vh;
    flex-direction: column;
    rotate: 0deg;
    border-bottom: unset;
    border-left: 0.5rem solid var(--border-color);

    font-size: 1.5rem;
    & div.container {
      min-width: 7rem;
    }

    & #shapeViev {
      grid-template-columns: repeat(4, 1rem);
      grid-template-rows: repeat(2, 1rem);
      padding : 0.5rem;
    }

    & div#pause {
      position: static;
      left: unset;
      bottom: unset;
      transform: translateY(0%);
      scale: 1;
    }

  }
  

}

div.button-action {

  background: var(--main-bg-color);	
  z-index: 3;

  & div.icon-box {
    border: 2px solid green;
    background: var(--main-bg-color);  
    & i {
      color: green;
      font-size: 1.25rem;
      margin: 0.5rem;
    }

    &.triggered {
      border: 2px solid crimson;
      background: var(--main-bg-color);  
      & i {
        color: crimson;
      }
    }  
  }

}

div.pause-caption {
  
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  transform: translate(-50%, -50%);
  width: 100%;
  
  & h1 {
    font-size: 3.625rem;
	  color: red;
  }

  & div#volume {

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    max-width: 300px;
    color: aliceblue;
    font-size: 1.5rem;

    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
    border: 3px solid #3e5eba;

    & div.input-group {

      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 0.5rem;

      padding: 0.25rem 0.75rem 0.5rem 0.75rem;

      & div.top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 2rem;
        & span {
          &:first-child,
          &:last-child {
            align-self: flex-end;
          }
   
        }
      }

      & input#volume-range {
        -webkit-appearance: none;
        height: 1rem;
        width: 100%;
        
        background: #3e5eba;
        outline: none;
        transition: 0.2s;

        &::-webkit-slider-thumb {
          -webkit-appearance: none;
          width: 1.5rem;
          height: 1.5rem;

          background: green;
          border-radius: 3px;
          border: 3px solid white;
          cursor: pointer;
        }
      }

    }

  }


}

/* SHAPEView */

#shapeViev {
  display: grid;
  grid-template-columns: repeat(4, 10px);
  grid-template-rows: repeat(2, 10px);
  padding : 0.25rem;
}

@media screen and (width < 500px) {
  body {
    gap: 0;
  }

  img.logo {
    display: none;
  }

}


/* floating-label Abweichung */ 

& div.floating-label { 
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: aliceblue;
  font-size: 2rem;
  & i {
    color: dodgerblue;
    font-size: 1.5rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
    margin-right: 0.5rem;
  }

  &.rise-fade {
    animation: rise-fade 1.5s ease-in-out;
  }
}

@keyframes rise-fade {
  0% {
    transform: translate(-50% , 0%) ;
    opacity: 1;
  }

  100% {
    transform: translate(-50% , -300%);
    opacity: 0;
  }
}

#game-over-window {
	position: fixed;
	left: 50%;
	bottom: 20%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	z-index: 5;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 3px solid #3e5eba;
  background: var(--main-bg-color);  
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.4);
  padding: 1rem;
}


#game-over-window * {
  font-size: 2rem;
  white-space: nowrap;
}

#game-over-window h1 {
	color: red;
  text-align: center;
}


#game-over-window button {
	text-align: center;
	border: 0.2rem solid #3e5eba;
  background: var(--main-bg-color);	
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.6);
	border-radius: 0.9375rem;
	color: aliceblue;
  padding: 0;
}

a {
  display: block;
  text-decoration: none;
  color: aliceblue;
  padding: 1rem;
}



/* ANY GRID-BLOCK-ELEMENT */


.ghost {
  border: 1px solid black;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.5);
  z-index: 0;
  background: rgba(255, 255, 255, 0.3);
}

.block,
.garbage {
  border: 1px solid black;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.5);
  z-index: 1;
}


@keyframes delete-row {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* Apply the animation to the row element */
.block.placed.row-deleted {
  --time: 600ms;
  animation: delete-row var(--time) ease forwards;
}


.block.placed.fastBlink {
  animation: fastBlink 0.3s ;
}

@keyframes fastBlink {
  0% {
    background: rgba(255, 255, 255, 1);
  }
  50% {
    background: rgba(255, 255, 255, 0.5);
  }
  100% {
    background: rgba(255, 255, 255, 1);
  }
}

.block.placed.slowBlink {
  animation: slowBlink 0.5s ; 
}

@keyframes slowBlink {
  0% {
    background: rgba(255, 255, 255, 1);
  }
  50% {
    background: rgba(255, 255, 255, 0.5);
  }
  100% {
    background: rgba(255, 255, 255, 1);
  }
}

