:root{
    --bg0: #000;
    --bg1:  #eee;
    --c1: red;
    --c2: blue;
    --border-r: 16px;
}

body{
    font-family: 'Instrument Sans', sans-serif;
    font-size: 18px;
    background-color: var(--bg0);
    scroll-behavior: smooth;
}

#wrapper{
    display: block;
    margin: 0 auto;
    padding: 3vw;
    margin-top: 2vh;
    max-width: 1440px;
    line-height: 1.35em;
    scroll-behavior: smooth;
    background-color: var(--bg1);
    border-radius: var(--border-r);

}

h1,h2{
    text-align: center;
    line-height: 1.15em;
}

h1{
    font-size: clamp(2em, 2.5vw, 3em);
    margin-top: 0px;
}

#menu{
    position: fixed;
    z-index: 30;
    top: -2px;
    margin-left: calc(-3vw - 10px);
    background-color: var(--bg1);
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: space-around;
    border: 8px solid var(--bg0);
    width: max-content;
    height: max-content;
    border-radius: var(--border-r);
    box-shadow: 0px 0px 16px rgba(0,0,0,0.75);
    transition: width 300ms, height 300ms;
}

#h-hamburger-menu{
    border-radius: var(--border-r);
    display: grid;
    grid-template-columns: 1fr;
    background-color: var(--bg1);
    padding: 8px;
    border: none;
    top: 8px;
    cursor: pointer;
}

.hamburger-line{
    width: 40px;
    height: 6px;
    border-radius: 4px;
    margin: 4px;
    background-color: var(--bg0);
    transform-origin: center;
    transition: box-shadow 250ms, transform 300ms, width 200ms;
}

.h-line-top-open{
    transform: rotate(45deg) translate(10px, 10px);
}

.h-line-mid-open{
    width: 0px;
}

.h-line-bot-open{
    transform: rotate(-45deg) translate(10px, -10px);
}

nav{
    display: flex;
    width: max-content;
    padding: 16px;
    background-color: var(--bg1);
    flex-wrap: wrap;
    border-radius: var(--border-r);
    flex-direction: column;
    justify-content: space-around;
    transition: transform 300ms;
}

nav a{
    margin-bottom: 0.5em;
}

.h-menu-closed{
    display: none !important;
}

nav a{
    color: var(--bg0);
}

#main{
    max-width: 69ch;
    margin: 0 auto;
}

video{
    width: 100%;
    border-radius: var(--border-r);
    box-shadow: 0px 0px 16px rgba(0,0,0,0.75);
    display: block;
}

#video {
    position: relative; 
  }

#overlay{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

#counter{
    border-radius: var(--border-r);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    z-index: 3;
    padding: 8px;
    color: white;
    text-shadow: 0px 0px 6px rgba(0,0,0,0.75);
    float: left;
}

.points{
  font-weight: bold;
}

#playingField{
    z-index: 2;
  position: absolute;
  top: 8px;
  right: 16px;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 8px;
  border-radius: var(--border-r);
  background-color: white;
  color: black;
}

#titlePlayingField{
    background-color: white;
    color: black;
    padding: 8px;
    border-radius: var(--border-r);
    display: block;
    margin-bottom: 4px;
    box-shadow: 0px 0px rgba(0,0,0,0.75);
}

#centerImgContainer{
  position: absolute;
  width: 100%;
}

#centerImg{
  margin: 0 auto;
  width: 25%;
  margin-top: 4em;
  display: block !important;
}

#diceRollContainer{
  position: absolute;
  bottom: 80px;
  right: 20px;
}

#die{
  filter: drop-shadow(0px 0px 8px black);
  width: 80px;
}

#die, #card {
  transition: opacity 0.5s ease;
}

.team{
    padding: 8px;
}

#team1{
    background-color: var(--c1);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

#team2{
    background-color: var(--c2);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

#cardsContainer {
    position: absolute;
    left: 8px;
    bottom: 40px;
    z-index: 3;
  }
  
  #card {
    max-height: 75vh; 
    max-width: 35vw; 
    height: auto; 
    width: auto; 
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0px 0px 8px rgba(0,0,0,0.5);
  }

  #players{
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: max-content;
    grid-gap: 2vw;
    margin: 0 auto;
    color: var(--bg1);
    text-shadow: 0px 0px 4px rgba(0,0,0,0.5);
    align-items: center;
  }

  #players a{
    color: var(--bg1);
    font-size: 1.25em;
    font-weight: bold;
  }

  #players a:hover{
    text-decoration: none;
  }

  .playersTeamName{
    text-align: center;
    font-size: 1.5em;
    margin: 0px;
    padding: 1.5vw;
    background-color: var(--bg0);
    color: var(--bg1);
    border-top-right-radius: var(--border-r);
    border-top-left-radius: var(--border-r);
    align-self: baseline;
  }

  #PlayersTeam1{
    background-color: var(--c1);
  }

  #PlayersTeam2{
    background-color: var(--c2);
  }

  .playerTeams{
    border-radius: var(--border-r);
    display: grid;
    grid-gap: 1vw;
    box-shadow: 0px 0px 12px rgba(0,0,0,0.75);
  }

  .player{
    padding: 0px 1vw 1vw;
    display: flex;
    flex-flow: column;
    column-gap: 12px;
    text-align: center;
  }

  .playerPicture{
    width: 80px;
    align-self: center;
    border-radius: 40px;
    margin-bottom: 0.5em;
    box-shadow: 0px 0px 8px rgba(0,0,0,0.5);

  }

  .playerDescription a{
    font-size: 1em !important;
  }

  #boardImage{
    margin: 1em auto;
    max-width: 80%;
    max-height: 90vh;
    display: block;
    animation: rotate 40s linear infinite;
  }

  #boardImage:hover {
    animation-play-state: paused;
  }
  
  @keyframes rotate {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  /*
  #boardImage:hover{
    transform: scale(150%);
  }
  */

  #deckOfCards{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4vw;
    margin-top: 3em;
    margin-bottom: 3em;
    justify-items: center;
  }

  #friendLogos{
    width: 100%;
    mix-blend-mode: darken;
    margin-bottom: 6em;
  }

  .deck {
    position: relative;
    width: 25vw;
    height: 35vw;
    cursor: pointer;
    max-width: 400px;
  }
  
  .deck img {
    position: absolute;
    width: 100%;
    height: auto;
    transition: transform 0.2s;
    box-shadow: 0px 0px 6px rgba(0,0,0,0.5);
    border-radius: 8px;
}
  
  @media(max-width: 840px) {

    :root{
        --border-r: 8px;
    }

    #wrapper{
        padding: 1vw;
    }

    #overlay{
        position: initial;
    }

    #team1Name{
        display: none;
    }

    #team2Name{
        display: none;
    }

    #card{
        bottom: 30px;
    }

    .card {
        max-height: 90vh; 
        max-width: 50vw; 
        height: auto; 
        width: auto; 
        object-fit: contain;
      }

    #players{
        grid-template-columns: 1fr;
    }
    
    #deckOfCards{
        grid-template-columns: 1fr;
    }

    .deck {
        position: relative;
        width: 50vw;
        height: 75vw;
        cursor: pointer;
      }

    body{
        font-size: 18px;
    }
  }