/* press-start-2p-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: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/press-start-2p-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

body{
    font-family: 'Press Start 2P', sans-serif;
    background-image: url('../images/space-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100%;
    min-height: 100vh;
}

.game-title {
    color: #fff;
    font-size: 60px;
    line-height: 1em;
    margin: 0;
    text-align: center;
    text-shadow: 0 1px 0 #dba1a1, 
                0 2px 0 #d89999, 
                0 3px 0 #d59292, 
                0 4px 0 #d28a8a, 
                0 5px 0 #cf8383, 
                0 6px 0 #cd7c7c, 
                0 7px 0 #ca7474, 
                0 8px 0 #c76d6d, 
                0 0 5px rgba(230, 139, 139, 0.05), 
                0 -1px 3px rgba(230, 139, 139, 0.2), 
                0 9px 9px rgba(230, 139, 139, 0.3), 
                0 12px 12px rgba(230, 139, 139, 0.3), 
                0 15px 15px rgba(230, 139, 139, 0.3);
}

#current-round {
    position: relative;
}

#current-round .this-round {
    color: #fff;
    font-size: 32px;
    line-height: 1em;
    margin: 0;
    text-shadow: 0 1px 0 #dba1a1, 
                0 2px 0 #d89999, 
                0 3px 0 #d59292, 
                0 4px 0 #d28a8a, 
                0 5px 0 #cf8383, 
                0 6px 0 #cd7c7c, 
                0 7px 0 #ca7474, 
                0 8px 0 #c76d6d, 
                0 0 5px rgba(230, 139, 139, 0.05), 
                0 -1px 3px rgba(230, 139, 139, 0.2), 
                0 9px 9px rgba(230, 139, 139, 0.3), 
                0 12px 12px rgba(230, 139, 139, 0.3), 
                0 15px 15px rgba(230, 139, 139, 0.3);
}

#current-round #timer {
    position: absolute;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

#current-round #timer #countdown-timer {
    color: #fff;
    font-size: 80px;
    line-height: 1em;
    margin: 0;
    text-shadow: 0 1px 0 #dba1a1, 
                0 2px 0 #d89999, 
                0 3px 0 #d59292, 
                0 4px 0 #d28a8a, 
                0 5px 0 #cf8383, 
                0 6px 0 #cd7c7c, 
                0 7px 0 #ca7474, 
                0 8px 0 #c76d6d, 
                0 0 5px rgba(230, 139, 139, 0.05), 
                0 -1px 3px rgba(230, 139, 139, 0.2), 
                0 9px 9px rgba(230, 139, 139, 0.3), 
                0 12px 12px rgba(230, 139, 139, 0.3), 
                0 15px 15px rgba(230, 139, 139, 0.3);
}

/* Tooltip style for hover */
.choice-btn span {
    visibility: hidden;
    position: absolute;
    background: black;
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
}
.choice-btn:hover span {
    visibility: visible;
}

#prompt {
    font-size: 20px;
    margin: 10px 0;
}

.choice-container {
    display: inline-block;
    margin: 10px;
    text-align: center;
    position: relative;
}

.choice-container img {
    width: 64px;
    height: 64px;
}

#cpu-choice {
    margin-top: 20px;
}

#winner-banner {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    display: none;
}

#play-again {
    display: none;
    margin-top: 20px;
}

#start-screen,
#menu-screen,
#game-screen {
    height: 100%;
    position: relative;
    min-height: 100vh;
    padding: 1.5rem 2rem;
}

#start-screen #game-credits-modal {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 1150px;
    width: 100%;
    padding: 1.5rem;
    background-color: #FFF;
    display: none;
}

#start-screen #game-credits-modal .close-banner {
    text-align: right;
    padding: 0 0 0.75rem;
}

#start-screen #game-title,
#menu-screen #game-title {
    padding: 0 0 2.5rem;
}

#start-screen #start-wrap,
#menu-screen #player-options,
#menu-screen #avatar-selector {
    padding: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 750px;
}

#start-screen #start-button {
    height: 324px;
    box-sizing: border-box;
    padding: 2rem 0 0;
}

#start-screen #start-button button {
    display: block;
    margin: 0 auto;
}

#start-screen #start-button #start-game {
    font-size: 3rem;
    padding: 1rem 2rem;
    margin: 2rem auto;
}

#menu-screen #player-options .options-container {
    background-color: #FFFFFF;
}

#menu-screen #player-options .options-wrap {
    display: flex;
    gap: 2.25rem;
    flex-wrap: wrap;
}

#menu-screen #player-options .avatar-select {
    width: 104px;
}

#menu-screen #player-options .avatar-select .gravatar {
    margin: 0;
}

#menu-screen #player-options .player-details {
    flex: 1;
}

#menu-screen #player-options .player-details .kassify-check {
    padding: 1rem 0;
    margin-left: -15px;
}

#menu-screen #player-options #startBtn {
    width: 100%;
    margin: 1.5rem 0 0;
}

#menu-screen #avatar-selector {
    z-index: 5;
    max-width: 800px;
    width: 100%;
}

#menu-screen #avatar-selector .nes-container {
    background-color: #FFFFFF;
    padding: 1.5rem 5rem;
}

#menu-screen #avatar-selector .instructions{
    text-align: center;
}

#menu-screen #avatar-selector .slider {
    padding: 0 0 2rem;
    margin: 0 -6px 30px;
}

#menu-screen #avatar-selector .slider .character {
    margin: 0 6px;
}

#menu-screen #avatar-selector .slider .character .select-avatar {
    border: solid 8px transparent;
    display: block;
    padding: 0.5rem;
    width: 90px;
    box-sizing: content-box;
}

#menu-screen #avatar-selector .slider .character .select-avatar:hover {
    border-color: #000;
}

#menu-screen #avatar-selector .slider .character img{ 
    width: 90px;
    height: auto;
}

#menu-screen #avatar-selector .slick-dots {
    bottom: -15px;
}

#menu-screen #avatar-selector .slick-dots li.slick-active button:before {
    content: "";
    width: 2px;
    height: 2px;
    color: rgb(33, 37, 41);
    box-shadow: 8px 2px, 10px 2px, 6px 4px, 8px 4px, 10px 4px, 12px 4px, 4px 6px, 6px 6px, 8px 6px, 10px 6px, 12px 6px, 14px 6px, 4px 8px, 6px 8px, 8px 8px, 10px 8px, 12px 8px, 14px 8px, 6px 10px, 8px 10px, 10px 10px, 12px 10px, 8px 12px, 10px 12px;
    opacity: 1;
}

#menu-screen #avatar-selector .slick-dots li button:before {
    content: "";
    width: 2px;
    height: 2px;
    color: rgb(33, 37, 41);
    box-shadow: 8px 2px, 10px 2px, 6px 4px, 8px 4px, 10px 4px, 12px 4px, 4px 6px, 6px 6px, 12px 6px, 14px 6px, 4px 8px, 6px 8px, 12px 8px, 14px 8px, 6px 10px, 8px 10px, 10px 10px, 12px 10px, 8px 12px, 10px 12px;
}

#menu-screen #avatar-selector .slick-arrow {
    width: 24px;
    height: 44px;
}

#menu-screen #avatar-selector .slick-arrow::before {
    content: "";
    width: 24px;
    height: 44px;
    display: block;
    background-size: cover;
}

#menu-screen #avatar-selector .slick-arrow.slick-prev {
    left: -45px;
}

#menu-screen #avatar-selector .slick-arrow.slick-prev::before {
    background-image: url('../images/arrow-left.svg');
}

#menu-screen #avatar-selector .slick-arrow.slick-next {
    right: -45px;
}

#menu-screen #avatar-selector .slick-arrow.slick-next::before {
    background-image: url('../images/arrow-right.svg');
}

#game-screen .wrap {
    display: flex;
    flex-direction: column;
}

#game-screen #hearts {
    display: flex;
    justify-content: space-between;
    padding: 0 0 1.3rem;
}

#game-screen #hearts .player-display {
    display: flex;
    gap: 1rem;
}

#game-screen #hearts #cpu-hearts.player-display {
    flex-direction: row-reverse;
}

#game-screen #hearts .player-display .gravatar img{
    width: 80px;
    height: 80px;
    vertical-align: baseline;
    margin: 0;
    border: solid 4px #CCC;
}

#game-screen #hearts .player-display .gravatar {
    border: solid 4px #000;
    background-color: #FFF;
    margin: 0;
    padding: 0;
    line-height: 0%;
    width: 80px;
    height: 80px;
    box-sizing: content-box;
}

#game-screen #hearts .player-name {
    padding: 0.25rem 0;
    color: #FFFFFF;
    width: fit-content;
    margin: 0 0 0.75rem;
}

#game-screen #hearts #cpu-hearts .player-name {
    margin-left: auto;
}

#game-screen #hearts .hearts .heart-track {
    display: flex;
    gap: 0.75rem;
    min-width: 250px;
}

#game-screen #hearts #cpu-hearts .heart-track {
    flex-direction: row-reverse;
}

#game-screen #gameplay {
    padding: 100px 0 0;
    flex: 1;
}

#game-screen #gameplay #countdown {
    max-width: 650px;
    width: 100%;
    text-align: center;
    margin: 0 auto 2rem;
    padding: 0.85rem 1.25rem;
    background-color: #FFF;
}

#game-screen #gameplay #players {
    display: flex;
    justify-content: space-between;
}

#game-screen #gameplay #players .pc-player {
    width: 250px;
    position: absolute;
    z-index: 5;
    bottom: 120px;
}

#game-screen #gameplay #plyers .pc-player .character {
    margin: 0;
    position: relative;
    max-height: 275px;
}

#game-screen #gameplay #plyers .pc-player .character img {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 1;
}

#game-screen #gameplay #players #player {
    left: 200px;
}

#game-screen #gameplay #players #player .character.animated img {
    animation: playerJump 2.35s steps(1, end) 4;
}

#game-screen #gameplay #players #cpu {
    right: 200px;
}

#game-screen #gameplay #players #cpu .character.animated img {
    animation: cpuJump 2.35s steps(1, end) 4;
}

#game-screen #gameplay #players #cpu #cpu-choice #hourglass {
    background-image: url('../images/hourglass-sprite.svg');
    background-size: cover;
    background-position: 0% top;
    width: 96px;
    height: 96px;
    display: none;
    background-repeat: no-repeat;
    margin: 0;
}

#game-screen #gameplay #players #cpu #cpu-choice #hourglass.animated {
    animation: cpuHourglass 1s steps(1, end) 1;
}

#game-screen #gameplay #players #gm {
    width: 100%;
}

#game-screen #gameplay #players #gm #gm-banner{
    min-height: 110px;
    min-width: 1px;
    width: fit-content;
    margin: 0 auto;
}

#game-screen #gameplay #players #gm #ready-banner .janken-text {
    color: #FFFFFF;
    font-size: 1.5rem;
    line-height: 1em;
    margin: 0;
}

#game-screen #gameplay #players #gm #ready-banner.show-janken .janken-text {
    color: #800;
    text-shadow: 0 1px 0 #dba1a1, 
                0 2px 0 #d89999, 
                0 3px 0 #d59292, 
                0 4px 0 #d28a8a, 
                0 5px 0 #cf8383, 
                0 6px 0 #cd7c7c, 
                0 7px 0 #ca7474, 
                0 8px 0 #c76d6d, 
                0 0 5px rgba(230, 139, 139, 0.05), 
                0 -1px 3px rgba(230, 139, 139, 0.2), 
                0 9px 9px rgba(230, 139, 139, 0.3), 
                0 12px 12px rgba(230, 139, 139, 0.3), 
                0 15px 15px rgba(230, 139, 139, 0.3);
}

#game-screen #gameplay #players #gm #gm-image {
    position: relative;
    height: 300px;
    margin: 0;
}

#game-screen #gameplay #players #gm #gm-image img {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
}

#game-screen #gameplay #players #gm #gm-image.animated img {
    animation: gmJump 1.175s steps(1, end) 8;
}

@keyframes gmJump {
    0% {
        transform: translate(-50%, 0);
    }
    25% {
        transform: translate(calc(-50% - 90px), -30px);
    }
    50% {
        transform: translate(-50%, 0);
    }
    75% {
        transform: translate(calc(-50% + 90px), -30px);
    }
    100% {
        transform: translate(-50%, 0);
    }
}

@keyframes playerJump {
    0%, 50%, 100% {
        transform: translate(0, 0);
    }
    12.5%, 37.5% {
        transform: translate(-30px, -10px);
    }
    25% {
        transform: translate(-60px, 0);
    }
    62.5%, 87.5% {
        transform: translate(30px, -10px);
    }
    75% {
        transform: translate(60px, 0);
    }
}

@keyframes cpuJump {
    0%, 50%, 100% {
        transform: translate(0, 0);
    }
    12.5%, 37.5% {
        transform: translate(30px, -10px);
    }
    25% {
        transform: translate(60px, 0);
    }
    62.5%, 87.5% {
        transform: translate(-30px, -10px);
    }
    75% {
        transform: translate(-60px, 0);
    }
}

@keyframes cpuHourglass {
    0% {
        background-position: 0% top;
    }
    25% {
        background-position: 33.3% top;
    }
    50% {
        background-position: 66.6% top;
    }
    75%, 100% {
        background-position: 100% top;
    }
}

#game-screen #gameplay #players #gm #gm-image * {
    margin: 0 auto;
}

#game-screen #player-controls {
    position: absolute;
    bottom: 100px;
    left: 50%;
    z-index: 10;
    transform: translateX(-50%);
    background-color: #FFF;
    min-height: 124px;
}

#game-screen #player-controls .choices {
    display: flex;
    gap: 0.75rem;
}

#game-screen #player-controls .waiting {
    line-height: 76px;
    text-align: center;
}

#game-screen #player-controls #player-buttons button{
    margin: 0 auto;
    line-height: 48px;
    font-style: 1.65rem;
    padding: 6px 1.5rem;
}

#game-screen #moon {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    height: 200px;
}

#game-screen #moon img {
    width: 100%;
}