:root {
    --clr-dark: #3e403d;
}

* {
    font-family: "Open sans", sans-serif;
    user-select: none;
}

body {
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game {
    width: 100vw;
    height: 100vh;
    display: grid;
    align-items: center;
    height: 100vh;
    margin: 0;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, 1fr);
}

.license {
    margin: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

img {
    vertical-align: middle;
}

.logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
}

.logo img {
    width: 10vmin;
}

#prompt {
    grid-column: 2 / span 2;
    grid-row: 1;
    width: 100vw;
    text-align: center;
    justify-self: center;
    font-size: 4vw;
    transform: scale(0);
    transition: all 0.2s ease;
}

#prompt.active {
    transform: scale(1);
}

/************************
********* WHEEL *********
************************/

.wheelContainer {
    grid-column-start: 1;
    grid-column-end: 5;
    grid-row-start: 2;
    grid-row-end: 6;
    justify-self: center;
    position: relative;
}

#wheel {
    transition: transform cubic-bezier(0.21, -0.36, 0, 1.01);
    width: min-content;
    height: 100%;
}

.wheelImg {
    width: 66vmin;
}

.wheelContainer .arrow {
    position: absolute;
    top: 50%;
    transform: translate(-80%, -50%);
    width: 10vmin;
}

.wheelSegment {
    width: 8vmin;
    position: absolute;
    top: 50%;
    transform-origin: 33vmin 0%;
}

#spin {
    width: 16vmin;
    position: absolute;
    top: calc(50% - 8vmin);
    left: calc(50% - 8vmin);
    transition: all 0.2s ease-in-out;
    transform: scale(0);
    cursor: pointer;
}

#spin.idle {
    transform: scale(1);
    animation: pulsate 2s ease-in-out infinite;
}

@keyframes pulsate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/************************
****** PLAYER BAR *******
************************/

.playerBar {
    display: flex;
    align-items: center;
    grid-row: 6;
    place-self: center center;
}

.playerBar img {
    width: 5vmin;
    border: 1vmin solid var(--clr-dark);
    background-color: white;
    border-radius: 50%;
    padding: 0.5vmin;
    transform-origin: right center;
}

.playerBar .bar {
    width: 30vmin;
    border: 1vmin solid var(--clr-dark);
    height: min-content;
    transform: translateX(-3vmin);
    border-radius: 2.5vmin;
    z-index: -1;
}

.playerBar .progress {
    height: 3vmin;
    border-radius: 1.5vmin;
    width: 0;
    transition: width 0.5s ease-in;
}

#redProgress {
    background-color: #c60003;
}

#blueProgress {
    background-color: #230f88;
}

#redPlayerBar {
    grid-column: 1 / span 2;
}

#bluePlayerBar {
    grid-column: 3 / span 2;
}

/************************
***** QUESTION BOX ******
************************/

#questionBox {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 100vh);
    width: 90vmin;
    min-height: 60vmin;

    background-color: white;
    border: 2vmin solid var(--clr-dark);
    border-radius: 4vmin;

    flex-direction: column;
    justify-content: space-evenly;

    transition: all 0.2s ease-in-out;
    opacity: 0;

    display: flex;
}

#questionBox.visible {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%);
}

#questionBox .topic {
    display: flex;
    align-items: center;
    margin-top: 5vmin;
}

#topicImg {
    width: 10vmin;
    margin-left: 5vmin;
}

#topicName {
    font-size: 5vmin;
    margin-left: 2vmin;
}

#topicName::after {
    content: ":";
}

#questionBox .text {
    font-size: 3vmin;
    margin: 5vmin;
    text-align: justify;
}

#questionBox .options {
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin-bottom: 5vmin;
}

#questionBox .option {
    background-color: rgb(247, 247, 247);
    padding: 2vmin;
    border-radius: 2vmin;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    font-size: 2vmin;
}

#questionBox .option * {
    pointer-events: none;
}
#questionBox .option img {
    width: 12vmin;
}

#questionBox .option span {
    margin-top: 2vmin;
}

#pageMask {
    background-color: black;
    position: fixed;
    inset: 0;
    opacity: 0%;
    overflow: hidden;
    max-height: 0;
    transition: opacity 0.5s ease-in;
}

#questionBox .option.wrongAnswer {
    background-color: rgb(255, 149, 149);
}

#questionBox .option.rightAnswer {
    background-color: rgb(175, 218, 127);
}

#questionBox .option.active {
    cursor: pointer;
    background-color: rgb(202, 202, 202);
}

#questionBox .option.active:hover {
    background-color: rgb(175, 175, 175);
}

/************************
******** WIN BOX ********
************************/

#winBox {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 100vh);
    width: 90vmin;
    min-height: 50vmin;

    background-color: white;
    border: 2vmin solid var(--clr-dark);
    border-radius: 4vmin;

    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;

    transition: all 0.2s ease-in-out;
    opacity: 0;

    display: flex;
}

#winBox img {
    width: 10vmin;
}

#winMessage {
    font-size: 5vmin;
}

#playAgain {
    font-size: 3vmin;
    padding: 2vmin;
    border: 0.5vmin solid var(--clr-dark);
    background-color: white;
    border-radius: 1vmin;
    cursor: pointer;
}

#playAgain:hover {
    outline: 0.5vmin solid var(--clr-dark);
}

#winBox.visible {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.logoprojekt {
    width: min(50rem, 90%);
}
