/* bangers-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bangers';
    font-style: normal;
    font-weight: 400;
    src: url('/src/fonts/bangers-v21-latin-regular.eot'); /* IE9 Compat Modes */
    src: url('/src/fonts/bangers-v21-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('/src/fonts/bangers-v21-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
         url('/src/fonts/bangers-v21-latin-regular.woff') format('woff'), /* Modern Browsers */
         url('/src/fonts/bangers-v21-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
         url('/src/fonts/bangers-v21-latin-regular.svg#Bangers') format('svg'); /* Legacy iOS */
  }

  #user.showcase {
    position: fixed;
    top: 50%;
    transform: scale(300%);
  }

  #oponnent.showcase {
    position: fixed;
    top: 50%;
    transform: scale(300%);
  }


  #joinGameForm {
    max-width: 33%;
  }
  #load {
    width: 300px;
  }

  :root {
    --primary: rgb(0, 153, 255);
    --secondary: rgb(182, 0, 121);
    --color-background: rgb(31, 31, 31);
  }

  #inner-container {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }

  #game-container {
    height: 0px;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    position: relative;
    z-index: 1;
  }
  #game-container.active {
    opacity: 1;
    pointer-events: all;
    height: 100%;
  }

  #game-container .inner {
    height: calc(100vh - 85px);
    height: calc(100dvh - 85px);
    width: 100%;
    position: relative;
  }

  

  header {
    background-color: var(--color-background);
    padding: 1rem 0;
    height: 80px;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  header p {
    color: white;
  }
  header > * {
    margin: 0;
    padding: 0;
    margin-bottom: 0;
    padding: 0 1rem;
  }

  #oponnent, #p-2-score {
    z-index: 3;
    color: var(--secondary);
    font-size: 2.3rem;
    transition: all 0.5s ease-in-out;
    margin: 0;
  }

  #user, #p-1-score {
    z-index: 3;
    color: var(--primary);
    font-size: 2.3rem;
    transition: all 0.5s ease-in-out;
    margin: 0;
  }




  .player-container {
    display: flex;
    flex: 1;
    justify-content: space-around;
    align-items: center;
  }


  footer {
    width: calc(100% - 2rem);
    text-align: center;
    height: 80px;
    background-color: var(--primary);
    color: white;
    font-family: "Bangers";
    letter-spacing: 1px;
    padding: 1rem 1rem;
  }



  .banger {
    font-family: "Bangers";
    letter-spacing: 1px;
  }
  @keyframes toRewards {
    from {
      transform: scale(100%) translateY(0);
    }
    to {
      transform: scale(30%) translateY(-100%);
    }
  }
  
  @keyframes fade-in {
    from {
      transform: translateY(-200%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @keyframes fade-out {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  }
  @keyframes kill-p2 {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(100%);
    }
  }
  @keyframes kill-p1 {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-100%);
    }
  }
  @keyframes die {
    from {
      transform: scale(100%);
    }
    to {
      transform: scale(0);
    }
  }
  @keyframes fillprogress {
    from {
      width: 0%;
    }
    to {
      width: 100%;
    }
  }

  body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    height: 100vh;
    height: 100dvh;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    overflow: hidden; 
  }

  input[type="text"] {
    padding: 10px;

    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;

    border: none;
    font-size: 4rem;
    border-bottom: solid 5px #1f1f1f;
    border-radius: 0;
    background: rgba(0,0,0,0.1);
  }

  input[type="submit"] {
    padding: 1rem 2rem;
    background-color: var(--primary);
    color: white;
    font-family: "Bangers";
    font-size: 2rem;
    border-radius: 5px;
    border-style: none;
    opacity: 1;
    pointer-events: all;
    cursor: pointer;
    margin-top: 2rem;
    width: 100%;
  }

  input[type="submit"]:hover {
    background-color: var(--primary);
  }

  #userlist {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    padding: 1rem;
    box-shadow: 1px 1px 10px rgba(0,0,0,0.1);
    background: white;
    gap: 0.5rem;
    border-radius: 10px;
    padding-top: 2rem;
    margin-top: -1rem;
  }
  .user {
    text-decoration: none;
    background: rgba(10,10,10, 0.1);
    padding: 2rem 4rem;
    color: black;
    font-size: 1.3rem;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 1px 1px 10px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    position: relative;
  }
  .user div {
    width: 100%;
    display: flex;
  }
  .user img {
    max-width: 35px;
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
    background: var(--secondary);
    padding: 0.5rem;
    border-radius: 25px;

  }

  .user.ingame {
    display: flex;
    cursor: not-allowed;
    opacity: 0.9;
  }

  #lobby-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: end;
    justify-content: space-around;
    flex-wrap: wrap;
    min-height: calc(100dvh - 85px);
    overflow-x: auto;
  }

  #background {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 0;
    z-index: -2;
  }

  #background img, #generell-bg img  {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom center;
    z-index: -2;
  }


  #generell-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 0;
    z-index: -1;
  }

  #generell-bg:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1f1f1f;
    opacity: 0.5;
    z-index: 1;
  }

  #versus {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #1f1f1f;
    pointer-events: none;
    opacity: 0;
    animation: fade-out 2s ease-in-out 2s;
    transition: opacity 0.2s ease-in-out;
  }

  #versus.active {
    opacity: 1;
  }

  #ready-button {
    padding: 1rem 2rem;
    background-color: var(--primary);
    color: white;
    font-family: "Bangers";
    font-size: 2rem;
    border-radius: 5px;
    border-style: none;
    opacity: 0.6;
    pointer-events: all;
    cursor: pointer;
  }

  #ready-button:focus {
    opacity: 1;
  }

  #ready-button:hover {
    opacity: 1;
  }

  #leave-button {
    padding: 1rem 2rem;
    background-color: var(--secondary);
    color: white;
    font-family: "Bangers";
    font-size: 2rem;
    border-radius: 5px;
    border-style: none;
    opacity: 0.6;
    pointer-events: all;
    cursor: pointer;
  }

  #leave-button:focus {
    opacity: 1;
  }

  #leave-button:hover {
    opacity: 1;
  }

  .buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
  }


  #rewards {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background-color: #1f1f1f;
    flex-direction: column;
    z-index: 1;
    transform: translateY(-200%);
    opacity: 0;
    transition: opacity 1s ease-in-out;
  }

  #rewards.active {
    animation: fade-in 1s ease-in;
    animation-fill-mode: forwards;
  }

  #rewards.active #counter:after {
    animation: fillprogress 5s ease;
    animation-fill-mode: forwards;
  }
  #rewards-user {
    color: var(--primary);
  }
  #progress {
    width: 300px;
    height: 10px;
    position: relative;
    background-color: rgba(255, 255, 255, 0.295);
  }
  #progress:after {
    content: "";
    width: 50%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary);
    margin-bottom: 1rem;
  }

  #counter {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.295);
  }

  #counter:after {
    content: "";
    width: 0%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--secondary);
  }

  #paper lottie-player, .paper {
    transform: scale(150%);
  }
  #rock lottie-player, .rock {
    transform: scale(125%);
  }
  #scissor lottie-player, .scissor {
    transform: rotate(45deg);
  }
  #rock, #paper, #scissor {
    transition: all 0.15s ease-in;
  }
  #rock h2, #paper h2, #scissor h2 {
    transition: all 0.15s ease-in;
  }

  #rock:hover, #paper:hover, #scissor:hover {
    opacity: 1;
    transform: scale(120%);
  }

  #rock:hover h2, #paper:hover h2, #scissor:hover h2 {
    color: var(--primary) !important;
  }

  #rock.active, #paper.active, #scissor.active {
    opacity: 1;
    transform: scale(120%);
  }

  #rock.active h2, #paper.active h2, #scissor.active h2 {
    color: var(--primary) !important;
  }




  #selection {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.886);
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
  }
  #selection.active {
    opacity: 1;
    pointer-events: all;
  }
  #selection .option {
    flex: 1;
    cursor: pointer;
    position: relative;

  }

  #selection .option lottie-player {
    pointer-events: none;
  }
  #interface {
    pointer-events: none;
    cursor: unset;
    width: 500px;
  }
  
  
  #selection div lottie-player:not(#countdown) {
    z-index: 1;
    position: relative;
  }

  #countdown {
    width: 200px;
    height: 200px;
    position: absolute;
    right: calc(50% - 100px);
    top: -150px;
  }

  #selection .title {
    text-align: center;
    font-family: "Bangers";
    font-size: 2rem;
    letter-spacing: 1px;
    opacity: 1;
    z-index: 2;
    margin: 0;
    color: white;
    margin-top: 1rem;
  }





  #selection div h2:not(.title) {
    font-family: "Bangers";
    font-size: 5rem;
    letter-spacing: 1px;
    position: absolute;
    height: 200px;
    top: calc(50% - 100px);
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    color: white;
    z-index: 0;
    transform: scale(130%);
  }


  .hover {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hover lottie-player {
    width: 300px;
    height: 300px;
  }

  #fight {
    width: 100%;
    height: 100%;

    position: absolute;
    top: 0;
    left: 0;

    display: flex;
    align-items: end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
  }
  #fight.active {
    opacity: 1;
    pointer-events: all;
  }

  #fight .rock {
    margin-bottom: -5rem;
  }
  #fight .scissor lottie-player {
    max-width: 300px;
  }
  #fight-p1, #fight-p2 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

  }
  #fight-p1 > lottie-player, #fight-p2 > lottie-player {
    z-index: 1;
  }
  #fight-p1.victory {
    animation: kill-p2 0.8s ease-in 2.5s 1;
    animation-fill-mode: forwards;
  }

  #fight-p2.victory {
    animation: kill-p1 0.8s ease-in 2.5s 1;
    animation-fill-mode: forwards;
  }

  #fight-p2.lose, #fight-p1.lose {
    animation: die 0.5s ease-out 3s 1;
    animation-fill-mode: forwards;
  }

  #fight-p2.draw, #fight-p1.draw {
    animation: die 0.5s ease-out 2.5s 1;
    animation-fill-mode: forwards;
  }

  #victory, #defeat, #draw {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
    transition: opacity 1s ease-in-out;
  }

  #victory.active, #defeat.active, #draw.active {
    opacity: 1;
    animation: toRewards 1s ease-out 3s 1;
    animation-fill-mode: forwards;
  }

  #end {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
  }

  #end.active {
    opacity: 1;
    pointer-events: all;
  }


  .container h2 {
    font-family: "Bangers";
    margin: 0;
    font-size: 2.5rem;
    margin-left: -2rem;
    transform: rotate(-3deg);
    color: var(--secondary);
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.288);
  }


  #ranking {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 225px;
    box-shadow: 1px 1px 10px rgba(0,0,0,0.1);
    background: white;
    padding: 2rem;
    padding-top: 4rem;
    margin-top: -2rem;
    width: calc(100% - 4rem);
    border-radius: 10px;
    pointer-events: none;
    cursor: not-allowed;
  }
  #ranking li {
    display: flex;
    color: var(--secondary);
    pointer-events: none;
    cursor: not-allowed;
  }

  .player {
    font-family: "Bangers";
    letter-spacing: 1px;
    font-size: 1.3rem;
    width: 150px;
    display: block;
    color: var(--primary);
  }


  #victory h2, #defeat h2, #draw h2 {
    font-family: "Bangers";
    font-size: 7rem;
    margin: 0;
    transform: translateY(-5rem) rotate(-3deg);
    text-align: center;
    text-shadow: 2px 2px 2px rgba(0,0,0,0.5);
  }

  #victory h2 {
    color: var(--primary);
  }

  #defeat h2 {
    color: var(--secondary);
  }

  #draw h2 {
    color: white;
  }

  .wins:before {
    content: "W";
  }

  .wins {
    margin-right: 1rem;
    color: var(--primary);
  }

  .loses:before {
    content: "L";
  }

  .loses {
    margin-right: 1rem;
    color: var(--secondary);
  }

  .draws:before {
    content: "D";
  }





  #load {
    position: relative;
  }
  #load lottie-player {
    z-index: 1;
    position: relative;
  }
  #load h2 span {
    font-family: "Bangers";
    font-size: 9rem;
    text-align: center;
    position: absolute;
    width: 100%;
    bottom: 0;
    z-index: 0;
    text-shadow: 2px 2px 2px rgba(0,0,0,0.5);
  }
  #load h2 span:nth-child(1) {
    color: #1f1f1f;
    transform: translateY(-14rem) rotate(-3deg);
  }
  #load h2 span:nth-child(2) {
    color: var(--secondary);
    transform: translateY(-7rem) rotate(3deg);
  }
  #load h2 span:nth-child(3) {
    color: var(--primary);
    transform: rotate(1deg);
  }
  @media screen and (max-width:600px) {

    #selection .option {
      width: 100%;
      height: calc(100% / 3.3);
    }
    #load {
      width: 100%;
      height: 200px;

    }
    #load h2 span {
      font-size: 4rem;
    }

    #load h2 span:nth-child(1) {
      transform: translateY(-6rem) rotate(-3deg);
    }
    #load h2 span:nth-child(2) {
      transform: translateY(-3rem) rotate(3deg);
    }
    #selection {
      flex-direction: column;
      gap: 1rem;
    }
    #selection div {
      max-height: 30%;
    }
    #lobby-container {
      min-height: 100%;
      padding: 1rem;
      width: calc(100% - 2rem) !important;
    }
    .container {
      width: calc(100% - 5rem);
      padding: 2.5rem;
    }
    #joinGameForm {
      padding: 2rem;
      max-width: unset !important;
    }
    #user, #oponnent {
      font-size: 1rem;
    }
    #user.showcase {
      top: 25%;
      transform: scale(360%);
      width: 100vw;
      text-align: center;
      left: 0;
    }
  
    #oponnent.showcase {
      top: 75%;
      transform: scale(360%);
      width: 100vw;
      text-align: center;
      left: 0;
    }
    #fight-p1, #fight-p2 {
      margin-bottom: 33%;
    }
    header {
      height: calc(85px - 2rem);
    }
  }
