:root {
  /* COLORS */
  --color-card: #FFF5DC;
  --color-card-dark: rgba(92, 66, 14, 0.36);
  --color-mainLight: #F5F5F5;
  --color-mainDark: #676E63;
  --color-border: var(--color-mainDark);

  /* IMAGES */
  --background-img-front: url(/images/game/background/default_background.jpg);
  --background-img-back: url(/images/game/background/default_background.jpg);
  --element-symbol: url('/images/icons/earth.png');
  --element-symbol-atk: url('/images/icons/earth.png');
  --card-shadow: #B8AA86;

  font-size: 20px;
}

.screen,.window_card{
  filter: brightness(1.09);

  &::after {
    content: "";
    background-image: url('/images/game/old_computerscreen.svg');
    background-size: cover;
    background-position: bottom;
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    opacity: 0.10; 
    display: block;
    pointer-events: none;
    z-index: 1000;

    mix-blend-mode: multiply;

    animation: computer 1s infinite;
  }

}

#squad .window_content{
  padding: 3rem;

  background:  var(--background-img-back);
  background-size: cover;
  background-position: center;

  font-family: 'FedraEleven', serif;
  height: 100%;

  &.game-element-earth {
    --color-mainLight: #7CC655;
    --color-mainDark: #3D6528;
    --color-border: var(--color-mainDark);


    --background-img-back: url('/images/game/background/earth_background.jpg');
    --background-img-front: url('/images/game/background/earth_front.jpg');
  }

  &.game-element-water {
    --color-mainLight: #7EF7E9;
    --color-mainDark: #156969;
    --color-border: var(--color-mainDark);


    --background-img-back: url('/images/game/background/Underwater\ world_background.jpg');
    --background-img-front: url('/images/game/background/earth_front.jpg');
  }
  &.game-element-fire {
    --color-mainLight: #FFD869;
    --color-mainDark: #842800;
    --color-border: var(--color-mainDark);


    --background-img-back: url('/images/game/background/fire-background.jpg');
    --background-img-front: url('/images/game/background/earth_front.jpg');
  }
  &.game-element-wind {
    --color-mainLight: #FFE1F0;
    --color-mainDark: #725B84;
    --color-border: var(--color-mainDark);


    --background-img-back: url('/images/game/background/wind_background.jpg');
    --background-img-front: url('/images/game/background/earth_front.jpg');
  }


    /* CHARACTER SELECTOR */
    .character_grid {
      display: flex;
      flex-direction: column;
      gap: .5rem;
      /* margin-left: 9rem; */

      h1 {
        padding: 0 .25em;
        font-size: 1.6rem;
        text-transform: uppercase;
        color: var(--color-mainDark);

        background-color: var(--color-mainLight);
        
        height: 2rem;
      }

      .character_grid_characters {
        height: 100%;
        /* display: block; */
        --color-border: var(--card-shadow);
        background-color: var(--color-card);
      }
    }


    .squad_filter {
      /* margin-right: 3em; */
      display: flex;
      flex-direction: column;
      h2 {
        color: var(--color-card);
      }
    }

    .squad_filter_box {
      height: 50%;
      width: 100%;
      display: flex;
      flex-direction: column;

      background-color: var(--color-mainLight);

    }

    /* &::after {
      content: "";
      background-image: url('/images/game/old_computerscreen.svg');
      background-size: cover;
      background-position: bottom;
      position: absolute;
      top: 0px;
      right: 0px;
      bottom: 0px;
      left: 0px;
      opacity: 0.20; 
      display: block;
      pointer-events: none;
      z-index: 1000;

      mix-blend-mode: multiply;

      animation: computer 1s infinite;
    } */

    /* CHARACTER SELECTED */
    .selected_character{
      display: grid;
      margin-bottom: 1em;
      grid-template-columns: 1fr 1fr 1fr 1fr;
      grid-template-areas: "card name name name";
      
  
      /* background-color:  rebeccapurple; */

      .character_card {
        --color-border: var(--card-shadow);
        color: var(--color-mainDark);
        background-color: var(--color-card);
        position: absolute;
        width: 18rem;

        padding: 1rem;
        transform: rotate(-10deg);
        margin-left: 2rem;

        animation: card 1s forwards;

        header {
          display: flex;
          justify-content: space-between;
          /* background-color: #3D6528; */

          p {
            background-color: var(--color-card);
            margin: -.8em;
            padding: 1em;
            font-weight: 800;
            font-size: larger;
          }
        }

        div:nth-of-type(1) {
          background-image: var(--background-img-front);
          background-size: cover;
          background-position: center;
          width: 100%;
          height: 10rem;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        div:nth-of-type(2) {
          width: 100%;
          height: 10rem;
          background-color: var(--card-shadow);
        }
        
      }

      div {
        grid-area: card;
        margin-right: 3em;
      }
      ul {
        grid-area: name;
        display: flex;
        flex-direction: column;
        margin-left: 3em;
        padding: 1rem;
        background-color: rgba(0, 0, 0, 0.55);
        color: var(--color-card);
        li {
          outline: none;
        }
        li:nth-of-type(1) {
          display: flex;
          justify-content: space-between;

          .pixel-corners {
            background-color: var(--color-mainLight);
            padding: .5em;
          }
        }
        .stats {
          flex-direction: row;
          height: 100%;
          margin: 0;
          padding: 0;
          gap: .5em;
          li {
            align-items: center;
            display: flex;
            justify-content: space-between;
            width: fit-content;
            padding: .5em;
            
            
            background-color: var(--color-mainDark);
          }
        }
        h2 {
          color: var(--color-mainLight);
          font-size: 2rem;
          font-weight: 800;
        }
      }
    }

    
}

@keyframes computer {
  0% {
    top: 0px;
  }

  50% {
    top: 0px;
  }
  51% {
    top: -8px;
  }

  80% {
    top: -8px;
  }
  81% {
    top: 0px;
  }

  100% {
    top: 0px;
  }
}

@keyframes card {
  0% {
    margin-top: 1000px;
    transform: rotate(0deg);
  }

  100% {
    margin-bottom: 0;
    transform: rotate(-10deg);
  }
}



/* PIXEL BORDERS */
.pixel-corners,
.pixel-corners--wrapper {
  clip-path: polygon(0px calc(100% - 16px),
    8px calc(100% - 16px),
    8px calc(100% - 8px),
    16px calc(100% - 8px),
    16px 100%,
    calc(100% - 16px) 100%,
    calc(100% - 16px) calc(100% - 8px),
    calc(100% - 8px) calc(100% - 8px),
    calc(100% - 8px) calc(100% - 16px),
    100% calc(100% - 16px),
    100% 16px,
    calc(100% - 8px) 16px,
    calc(100% - 8px) 8px,
    calc(100% - 16px) 8px,
    calc(100% - 16px) 0px,
    16px 0px,
    16px 8px,
    8px 8px,
    8px 16px,
    0px 16px);
  position: relative;
}
.pixel-corners {
  border: 8px solid transparent;
  border-radius: 3px;
}
.pixel-corners--wrapper {
  width: fit-content;
  height: fit-content;
}
.pixel-corners--wrapper .pixel-corners {
  display: block;
  clip-path: polygon(8px 16px,
    16px 16px,
    16px 8px,
    calc(100% - 16px) 8px,
    calc(100% - 16px) 16px,
    calc(100% - 8px) 16px,
    calc(100% - 8px) calc(100% - 16px),
    calc(100% - 16px) calc(100% - 16px),
    calc(100% - 16px) calc(100% - 8px),
    16px calc(100% - 8px),
    16px calc(100% - 16px),
    8px calc(100% - 16px));
}
.pixel-corners::after,
.pixel-corners--wrapper::after {
  content: "";
  position: absolute;
  clip-path: polygon(0px calc(100% - 16px),
    8px calc(100% - 16px),
    8px calc(100% - 8px),
    16px calc(100% - 8px),
    16px 100%,
    calc(100% - 16px) 100%,
    calc(100% - 16px) calc(100% - 8px),
    calc(100% - 8px) calc(100% - 8px),
    calc(100% - 8px) calc(100% - 16px),
    100% calc(100% - 16px),
    100% 16px,
    calc(100% - 8px) 16px,
    calc(100% - 8px) 8px,
    calc(100% - 16px) 8px,
    calc(100% - 16px) 0px,
    16px 0px,
    16px 8px,
    8px 8px,
    8px 16px,
    0px 16px,
    0px 50%,
    8px 50%,
    8px 16px,
    16px 16px,
    16px 8px,
    calc(100% - 16px) 8px,
    calc(100% - 16px) 16px,
    calc(100% - 8px) 16px,
    calc(100% - 8px) calc(100% - 16px),
    calc(100% - 16px) calc(100% - 16px),
    calc(100% - 16px) calc(100% - 8px),
    16px calc(100% - 8px),
    16px calc(100% - 16px),
    8px calc(100% - 16px),
    8px 50%,
    0px 50%);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-border);
  display: block;
  pointer-events: none;
}
.pixel-corners::after {
  margin: -8px;
}



.pixel-corners-no-border {
  clip-path: polygon(
    0px calc(100% - 8px),
    8px calc(100% - 8px),
    8px 100%,
    calc(100% - 8px) 100%,
    calc(100% - 8px) calc(100% - 8px),
    100% calc(100% - 8px),
    100% 8px,
    calc(100% - 8px) 8px,
    calc(100% - 8px) 0px,
    8px 0px,
    8px 8px,
    0px 8px
  );
}
