*,*::after,*::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Playpen Sans", Tahoma, sans-serif;
    user-select: none;
}
:root {
    --card-shadow: 1px 1px 3px 1px black;
    --topic-text: clamp(1rem, 3vh, 2rem);
    --button-text: clamp(1rem,4vh,3rem);
    --small-text: clamp(0.8rem,2vh,1.5rem);
    --button-col: palegoldenrod;
    --hover-color: lightgreen;
    --heavy-shadow: 1px 1px 15px 10px black;
    --wordbox-font: clamp(0.8rem, 5vh, 1.5rem);
    --highlight-low: rgba(255,255,255,0.2);
    --highlight-mid: rgba(255,255,255,0.5);
    --highlight-high: rgba(255,255,255,0.8);
    --lowlight-mid: rgba(0,0,0,0.2);
    --lowlight-low: rgba(0,0,0,0.5);
}

html {
    height: 100vh;
    width: 100vw;
}

body {
    background: url("/assets/homebackground.png");
    height: 100%;
    width: 100%;
}
.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;
}
@media (orientation:portrait) {
    .ingame-button {
        font-size: var(--small-text);
    }
}
.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;
    cursor: pointer;
    border-radius: 9999px;
    box-shadow: 0 0 15px 15px white;
}
.sound-button.available {
    animation: pulse 800ms infinite ease-in-out;
}
.sound-off {
    filter: grayscale(100);
    box-shadow: none;
}
@keyframes pulse {
    0% {
        scale: 1;
    }
    50% {
        scale: 1.2
    }
    100% {
        scale: 1;
    }
}
.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;
}
.topic-selected, .topic-selected:hover {
    background-color: pink;
}

.game-container {
    height: 90%;
    width: 100%;
}

.outer-box {
    margin: 0 auto;
    height: 50%;
    width: 90%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 5%;
}

.image-box {
    width: 50%;
    min-width: 320px;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid black;
    background-color: palegreen;
    box-shadow: var(--card-shadow);
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
@media (orientation:portrait) {
    .image-box {
        width: 100%;
        min-width: auto;
    }
}

.quiz-display-image {
    height: 90%;
    width: auto;
    max-width: 100%;
    transition: transform 300ms ease-in-out;
}
.quiz-display-image.offset-right {
    transform: translateX(200%);
}
.quiz-display-image.offset-left {
    transform: translateX(-200%);
}
.answer-buttons-container {
    height: 20%;
    display: flex;
    justify-content: center;
    gap: 5%;
}
.answer-button {
    width: 30%;
    box-shadow: var(--card-shadow);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.answer-button:hover {
    background-color: var(--highlight-mid);
}
.answer-button > img {
    height: 95%;
    width: auto;
    max-width: 95%;
}
.answered-correct, .answer-button:hover.answered-correct {
    background-color: rgba(252, 255, 96,0.5);
}
.answered-incorrect, .answer-button:hover.answered-incorrect {
    background-color: rgba(255, 0, 0, 0.8);
}
.no-touch {
    pointer-events: none;
}
.no-touch.overrule {
    pointer-events: all;
}

.game-over-dialog {
    position: absolute;
    z-index: 3;
    top: 28%;
    left: 50%;
    transform: translateX(-50%);
    height: 40vh;
    width: 40vw;
    min-width: 500px;
    max-width: 95vw;
    border: none;
    background-color: transparent;
    border-radius: 10px;
}

.game-over-dialog-interior {
    height: 100%;
    background-color: rgba(119, 248, 255, 0.9);
    box-shadow: var(--card-shadow);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 300ms ease-in-out;
}
.game-over-dialog-interior.show {
    opacity: 1;
}
.dialog-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-wrap: balance;
    height: 50%;
    font-size: var(--topic-text);
}

.dialog-buttons {
    height: 50%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.dialog-button {
    background-color: var(--dark-button);
    height: 50%;
    width: 40%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    font-size: var(--small-text);
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.sounds-backdrop, .dialog-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;
}
.warning, .warning:hover {
    background-color: rgba(255, 0, 0, 0.8);
}
