* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Playpen Sans", Tahoma, sans-serif;
    user-select: none;
}
:root {
    --button-text: clamp(1rem, 5vh, 2rem);
    --topic-text: clamp(1rem, 3vmin, 2rem);
    --button-color1: orange;
    --button-shadow1: 1px 1px 2px 1px darkorange;
    --button-shadow2: 1px 1px 3px 1px darkslategrey;
    --card-shadow: 1px 1px 3px 1px black;
    --light-background: lightblue;
}
html {
  height: 100vh;
  width: 100vw;
}

body {
  background: url("/assets/homebackground.png");
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.main-header {
height: 10%;
width: 100%;
padding-left: 5%;
padding-right: 5%;
display: flex;
justify-content: space-between;
align-items: center;
}
.plip-link {
height: 80%;
width: 15%;
min-width: 120px;
display: flex;
align-items: center;
text-align: center;
}
.plip-link img {
padding: 2px;
border-radius: 8px;
box-shadow: var(--card-shadow);
height: 100%;
width: auto;
margin-right: 5px;
}
.ingame-buttons {
width: 70%;
height: 100%;
min-width: 200px;
display: flex;
justify-content: space-around;
align-items: center;
}
.ingame-button {
width: 40%;
height: 90%;
box-shadow: var(--card-shadow);
border-radius: 8px;
background: rgba(255, 255, 255, 0.4);
display: flex;
justify-content: center;
align-items: center;
text-align: center;
font-size: var(--topic-text);
cursor: pointer;
}
.ingame-button:hover {
background-color: lightyellow;
}
.topic-filters {
  justify-content: space-around;
  padding-right: 2%;
  cursor: auto;
}
.topic-filters:hover {
  background: rgba(255, 255, 255, 0.4);
}
.topic-filters-text {
  width: 50%;
}
.topic-filter {
  width: 12%;
  border-radius: 10px;
  background-color: var(--button-col);
  height: 50%;
  box-shadow: var(--card-shadow);
  cursor: pointer;
}
.filter-unit {
  background-color: lightblue;
}
.filter-unit.active-filter {
  background-color: rgba(0, 0, 0, 0.5);
}
.filter-extra {
  background-color: rgba(252, 255, 96,0.5);
}
.filter-extra.active-filter {
  background-color: rgba(150, 100, 0, 0.5);
}
.filter-lt {
  background-color: rgb(255, 199, 96);
}
.filter-lt.active-filter {
  background-color: rgba(188, 138, 44, 0.8);
}
.topic-filter:hover {
  box-shadow: 1px 1px 3px 1px white;
}
.sound-control {
    height: 100%;
    width: 10%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.sound-button {
    height: 80%;
    max-height: 60px;
    min-height: 30px;
    width: auto;
    max-width: 60px;
    min-width: 30px;
    border-radius: 9999px;
    cursor: pointer;
}
.ingame-sound-control {
    width: 6vw;
    position: absolute;
    top: 55%;
    right: 1%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.menu-sound {
    box-shadow: 0 0 15px 15px white;
}
.menu-sound.available {
    animation: pulse 1000ms infinite ease-in-out;
}
@keyframes pulse {
    0% {
        scale: 1;
    }
    50% {
        scale: 1.2;
    }
    100% {
        scale: 1;
    }
}
.menu-sound-off {
    filter: grayscale(100);
    box-shadow: none;
}

.selection-mode-window {
    margin: 0 auto;
    width: 90%;
    height: 70%;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}
.selection-mode-button {
    height: 30%;
    width: 80%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    font-size: var(--button-text);
    background-color: lightblue;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
}
.pre-game-controls {
    margin: 0 auto;
    margin-top: 2%;
    height: 15%;
    width: 90%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.pre-game-control {
    width: 40%;
    height: 90%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    font-size: var(--topic-text);
}
.topic-select-window, .unit-select-window {
    padding: 15px;
    height: 70%;
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.topic-select-window {
    overflow-y: scroll;
    @supports not selector(::-webkit-scrollbar) {
        scrollbar-color: lightblue transparent;
    }
}
.topic-select-window::-webkit-scrollbar, .book-select-window::-webkit-scrollbar {
    background: transparent;
    width: 10px;
}
.topic-select-window::-webkit-scrollbar-thumb, .book-select-window::-webkit-scrollbar {
    background: lightblue;
    border-radius: 8px;
    opacity: .5;
}
.topic-select-button {
    height: 25%;
    width: fit-content;
    min-width: 75px;
    max-width: 30%;
    padding: 5px 15px 5px 15px;
    background-color: lightblue;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-wrap: balance;
    box-shadow: var(--card-shadow);
    border-radius: 8px;
    font-size: var(--topic-text);
    cursor: pointer;
}
.topic-select-button img {
    height: 75%;
    width: auto;
    max-width: 100%;
}
.topic-select-button:hover {
    background-color: lightyellow;
}
.book-select-window {
    margin: 0 auto;
    padding-top: 3px;
    width: 90%;
    height: 60%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    overflow-y: scroll;
    @supports not selector(::-webkit-scrollbar) {
        scrollbar-color: lightblue transparent;
    }
}
.book-select {
    height: 40%;
    width: 40%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    font-size: var(--topic-text);
    background: rgba(255, 255, 255, 0.4);
}
.number-select-window {
    height: 30%;
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
}
.number-select-number {
    width: 10%;
    height: 80%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--button-text);
    cursor: pointer;
}
.selected-book, .selected-unit {
    background: rgba(255, 255, 255, 0.8);
}
.book-select:hover, .number-select-number:hover {
    background-color: lightyellow;
}
.image-select-window {
    height: 80%;
    width: 90%;
    margin: 0 auto;
}
.image-select-buttons {
    height: 9%;
    margin-bottom: 1%;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.image-select-button {
    width: 30%;
    height: 100%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
}
.image-select-images {
    height: 90%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding-bottom: 50px;
    overflow-y: scroll;
    @supports not selector(::-webkit-scrollbar) {
        scrollbar-color: lightblue transparent;
    }
}
.image-select-images::-webkit-scrollbar {
    background: transparent;
    width: 10px;
}
.image-select-images::-webkit-scrollbar-thumb {
    background: lightblue;
    border-radius: 8px;
    opacity: .5;
}
.image-select-image {
    box-shadow: var(--card-shadow);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.4);
    width: 22%;
    height: 45%;
    min-width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.image-select-image img {
    height: 90%;
    width: auto;
    max-width: 90%;
    cursor: pointer;
}
.letstry-topic {
    background-color: rgb(255, 199, 96);
}
.extra-topic {
  background-color: rgba(252, 255, 96,0.5);
}
.selected {
    box-shadow: 0 0 15px 3px red;
    border-radius: 15px;
}
.game-window {
    margin: 0 auto;
    margin-top: 2%;
    width: 80%;
    display: flex;
    justify-content: center;
    height: 80%;
    position: relative;
}
.picture-window {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.picture-window img {
    height: 90%;
    width: auto;
    max-width: 90%;
}
canvas {
    position: absolute;
    /* background-color: blue; */
    touch-action: none;
}
.cover-grid-container {
    position: absolute;
    width: 80vw;
    height: 100%;
}
.game-buttons {
    width: 80%;
    height: 10%;
    margin: 0 auto;
    margin-top: 2%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.size-select {
    width: 10vw;
    height: 90%;
    border-radius: 8px;
    box-shadow: var(--button-shadow1);
    background-color: var(--button-color1);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--button-text);
    cursor: pointer;
}
.stay-on {
    width: 20vw;
}
.current-size, .stayon-on {
    background-color: lightgreen;
    box-shadow: 1px 1px 2px 1px green;
    color: green;
}
.game-control {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--button-text);
    color: white;
    width: 6vw;
    height: 18vh;
    top: 3%;
    right: 1%;
    background-color: var(--light-background);
    box-shadow: var(--button-shadow2);
    cursor: pointer;
    border-radius: 6px;
}
.game-control-back {
    left: 1%;
}
.game-control-answer {
    top: 30%;
}
.back-button-arrow {
    transform: rotateZ(270deg);
    width: 16vh;
    height: 8vh;
}
.reset-mark {
    height: 10vh;
    width: 10vh;
}
.game-root-game {
    height: 100%;
    width: 100%;
    padding-bottom: 2%;
}
.selected {
  box-shadow: 0 0 15px 3px red;
  border-radius: 15px;
}
.topic-selected, .topic-selected:hover {
  background-color: pink;
}

.prompt-background {
    position: absolute;
    top: 0%;
    z-index: 2;
    height: 100vh;
    width: 100vw;
    background-color: rgba(51, 50, 50, 0.5);
}
.game-over-dialog {
    position: absolute;
    border-radius: 10px;
    z-index: 3;
    top: 28%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--light-background);
    box-shadow: var(--card-shadow);
    height: 30vh;
    width: 30vw;
}
.dialog-text {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50%;
    font-size: var(--button-text);
}
.dialog-buttons {
    height: 50%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.dialog-button {
    background-color: var(--button-color1);
    height: 50%;
    width: 40%;
    border-radius: 8px;
    box-shadow: var(--button-shadow1);
    font-size: var(--topic-text);
    font-weight: bold;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.sounds-backdrop {
    position: absolute;
    height: 100vh;
    width: 100vw;
    top: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity ease-in-out 300ms;
}

.nobackdrop {
    opacity: 0;
    pointer-events: none;
}

.isolate-backdrop {
    z-index: 21;
}
.behind {
    display: none;
    z-index: -20;
}
span {
    width: fit-content;
    height: min-content;
    text-align: center;
}
.warning, .warning:hover {
    background-color: rgba(255, 0, 0, 0.8);
}