@font-face {
    font-family: fontwithserifs;
    src: url(../fonts/a_font_with_serifs.ttf) format('truetype');
  }


@font-face {
    font-family: filmgoerdemo;
    src: url(../fonts/filmgoer_demo.otf) format('opentype');
  }

:root {
    --lightGray: #98989e;
    --lightGray2: #8e8d92;
    --orange: #f76851;
    --darkPurple: #180f17;
    --purple1: #736061;
    --purple2: #604a4c;
    --purple3: #4e3f3e;
    --purple4: #352b34;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 25px;
    font-family: fontwithserifs;
    color: var(--darkPurple);
}

body {
    background-color: var(--lightGray);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* body::before {
    animation: grain 8s steps(10) infinite;
    background-image: url("/images/paperGrain.png");
    content: "";
    height: 300%;
    left: -50%;
    opacity: 0.8;
    position: fixed;
    top: -100%;
    width: 300%;
    mix-blend-mode: multiply;
} */

/* basic layout */ 

.title {
    /* font-size: 2.5em; */
    margin-top: 4vh;
    margin-bottom: -8vh;
    width: 30%;
    /* font-family: filmgoer demo; */
    animation: beginningAnimation 5s ease-out;
    z-index: 20;
}



.framImg {
    width: 900px;
    position: absolute;
}


footer {
    position: absolute;
    bottom: 2vh;
    z-index: 9;

}

.copyright {
    font-size: 2.5em; 
    position: relative; 
    top: 6px;
}

a, button {
    position: absolute;
    text-align: center;
    /* top: -2em; */
    background-color: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 100;
}

a:hover {
    cursor: pointer;
}

canvas {
    width: 100%;
    height: 100%;
    }

.canvasBgImg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

/* BUTTONS */ 

#startButton {
    position: absolute;
    text-align: center;
    bottom: 1em;
    z-index: 10;
    opacity: 0;
    animation: AnimationSlideInTop 2s 1 forwards, pulsing 2s infinite;;
    animation-delay: 4s; 
    /* transition-timing-function: cubic-bezier(.63,.01,.34,1);*/
}
 #startButton:hover {
    /* font-size: 1.8em; */
    opacity: 1;
    /* animation-delay: 0s;
    animation: pulsingHover 2s infinite */
} 

#restartButton {
    margin-top: 1em;
    position: absolute;
    top: 50%;
    z-index: 10;
    animation: pulsing 2s infinite;
}

#restartButton img {
    width: 30%;    
}

.icons {
    width: 40px;
}

#homeBtn {
    opacity: 0;
    top: 1em;
    right: 1em;
}

#rulesBtn {
    opacity: 0;
    bottom: 0.8em;
    right: 1em;
    animation: AnimationSlideInTop 2s forwards;
    animation-delay: 5s;
}

#soundBtn {
    opacity: 0;
    bottom: 2.5em;
    right: 1em;
    animation: AnimationSlideInTop 2s forwards;
    animation-delay: 5s;
}

.menuIcons {
    display: inherit;
}


/* ANIMATIONS */

.video {
    width: 100%;
}

#BuiltUpAnimation {
    animation: BuiltUpAnimation 5.3s;
    z-index: -1;
}

#startScreenAnimation {
    position: absolute;
    z-index: 0;
        /* animation-delay: 5s; */
}

#FleeingAnimation {
    transition: all 1s ease-in-out;
    display: none;
    position: absolute;
    z-index: 1;
    /* animation: AnimationFade 2s 1; */
}

/* #grayRect {
    transform:translate(-100%, 0%);
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    position: absolute;
    background-color: #98989e;
    background-image: url(../images/texturePaperWeb.png);
    background-size: 280%;
    
    /* animation: grayCurtain 2s 1; */

    
/* 
} */




/* EFFECTS */ 

.texture {
    position: fixed;
    z-index: 1;
    height: 100%;
    min-width: 100%;
}

/* Screen Switch */

.gameContainer {
    width: 900px;
    max-width: 95vw;
    height: auto;
    align-items: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* border: 1px solid #180f17; */
}

.gameContainerItem{
    align-items: center;
    flex-direction: column;
    
}

#beginScreen {
    display: flex;
    
}

#gameScreen {
    display: none;
    
}

/* GAME OVER SCREEN */

#endScreen {
    display: none;
    z-index: 2;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: -100px;
    animation: GameOverScreenAnimation 1s forwards ease-in-out;
}

#ruleScreen {
    display: none;
    z-index: 2;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: -30px;
    animation: GameOverScreenAnimation 1s forwards ease-in-out;
}

#controlsScreen {
    width: 80%;
    z-index: 10;
}

#gameOverFrame {
    width: 75%;
    position: absolute;
    top: 15%;
    z-index: 1;
}

.gameOverText {
    width: 35%;
    margin-top: 25vh;
    
    z-index: 2;
    position: absolute;
    top: 0;

}

#grayBackground {
    position: absolute;
    background-color: #8e8d92;
    background-image: url(../images/texturePaperWeb.png);
    background-size: 280%;
    width: 70%;
    top: 20%;
    height: 65%;
    opacity: 0.6;
    z-index: 1;
}



/* #endScreen::after {
    animation: grain 8s steps(10) infinite;
    background-image: url("/images/paperGrain.png");
    content: "";
    height: 300%;
    left: -50%;
    opacity: 0.8;
    position: fixed;
    top: -100%;
    width: 300%;
    mix-blend-mode: multiply;
    overflow: hidden;
} */


/* FOOTER */ 



