body {
    width: 100dvw;
    height: 100dvh;
    overflow: hidden;
}
span {
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}
#game {
    position: fixed;
    left: 0;
    top: 0;
    background: silver;
    background-image: 
    linear-gradient(335deg, #b00 23px, transparent 23px),
    linear-gradient(155deg, #d00 23px, transparent 23px),
    linear-gradient(335deg, #b00 23px, transparent 23px),
    linear-gradient(155deg, #d00 23px, transparent 23px);
    background-size: 58px 58px;
    background-position: 0px 2px, 4px 35px, 29px 31px, 34px 6px;
    width: 500dvw;
    height: 500dvh;
}
#player {
    position: fixed;
    height: 15dvh;
    aspect-ratio: 1;
    left: calc(calc(26dvh/16)*11)dvw;
    background: url(img/hush.png);
    background-size: cover;
    background-repeat: no-repeat;
    transition: all 0.1s ease-in-out; 
    image-rendering: pixelated;
    filter: drop-shadow(0px 0px 20px #000);
}

#noise {
    position: absolute;
    height: 100%;
    width: 100%;
    background: transparent  url(img/noise.png) repeat 0 0;
    background-repeat: repeat;
    background-size: 1000px 1000px;
    image-rendering: pixelated;
    z-index: 1;
}
.room, .hallway {
    position: absolute;
    background: #111;
}
.goal {
    position: absolute;
    background: url(img/chest.png);
    background-size: cover;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    width: 15dvh;
    aspect-ratio: 1/1;
    right: 0;
    bottom: 0;
    z-index: 2;
}
.arrow {
    position: absolute;
    margin: 40px;
    width: 40px;
    height: 20px;
    background-color: red; 
    transform-origin: center;
    border-right: 10px solid #fff;
}
#time {
    position: fixed;
    margin: 10px 60px;
    width: 80px;
    height: 40px;
    right: 0;
    z-index: 2;
    color: #fff;
    font-size: 2rem;
}
#ui {
    width: 100dvw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    color: #fff;
    flex-direction: column;
    z-index: 4;
}
#chooseCharacter {
    height: 40dvh;
    aspect-ratio: 1;
    background-repeat: no-repeat;
    background-size: cover;
    image-rendering: pixelated;
    margin-top: 30px;
    filter: drop-shadow(0px 0px 20px #000);
    cursor: pointer;
}
#chooseCharacter:hover {
    filter: drop-shadow(0px 0px 20px #d00);
}
#bg {
    width: 100%;
    height: 100%;
    transition: all 1s ease-in-out;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 3;
    background: #111 url(img/noise.png) repeat 0 0;
    background-repeat: repeat;
    background-size: 1000px 1000px;
    image-rendering: pixelated;
}
#txt {
    font-size: 4rem;
}
#coin-wrapper, #coin-wrapper2 {
    margin: 30px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
#coin-wrapper2 {
    display: none;
}
.coin {
    background-image: url(img/coin.png);
    background-size: cover;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    height: 3.5rem;
    aspect-ratio: 1;
}
#coins, #coins2 {
    font-size: 3rem;
    margin-right: 30px;
}
#button, #button2 {
    font-size: 2rem;
    z-index: 5;
    color: #fff;
    line-height: 50px;
}
button {
    position: absolute;
    font-size: 2rem;
    padding: 10px 20px;
    border: none;
    border-radius: 15px;
    background: #111 url(img/noise.png) repeat 0 0;
    background-size: 1000px 1000px;
    background-repeat: repeat;
    image-rendering: pixelated;
    height: 50px;
    width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
#button-wrapper, #button2-wrapper {
    position: relative;
    padding: 5px;
    border-radius: 20px;
    width: 200px;
    height: 50px;
    overflow: hidden;
    background: #111 url(img/noise.png) repeat 0 0;
    background-repeat: repeat;
    background-size: 1000px 1000px;
    image-rendering: pixelated;
    margin-bottom: 30px;
}
#button2-wrapper {
    display: none;
}
#button-wrapper::before, #button2-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    background:  conic-gradient(transparent 25%,#fff 0 75%,transparent 0);
    animation: rotateGradient 10s linear infinite;
    border-radius: inherit; /* Match the border-radius of the main element */
}

@keyframes rotateGradient {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(-540deg); }
    100% { transform: rotate(-1080deg); }
}