@font-face {
    font-family: 'Kanit';
    src: url('assets/Kanit-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kanit';
    src: url('assets/Kanit-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue: 209, 45%, 62%;
    --orange: 31, 89%, 49%;
    --black: 0, 0%, 0%;
    --white: 0, 0%, 100%;
    --green: 141, 71%, 48%;
    --red: 348, 83%, 47%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 3rem;
    font-family: 'Kanit', sans-serif;
    color: hsl(var(--white));
    line-height: 1.1;
    width: 100%;
    text-align: center;
    -webkit-highlight-color: transparent;
    -moz-highlight-color: transparent;
    -ms-highlight-color: transparent;
    -o-highlight-color: transparent;
    -webkit-tap-highlight-color: transparent;
    -webkit-tap-highlight-color: transparent;
}

*::selection {
    background: transparent;
    color: inherit;
}

*::-moz-selection {
    background: transparent;
    color: inherit;
}

.start-button, .quiz, .final {
    scale: 1;
    opacity: 1;
    transition: opacity .3s cubic-bezier(.35,0,0,1), scale .3s cubic-bezier(.35,0,0,1),
        display .3s cubic-bezier(.35,0,0,1) allow-discrete;
}

#gadget {
    opacity: 1;
    transition: opacity 1s cubic-bezier(.35,0,0,1),
        display .3s cubic-bezier(.35,0,0,1) allow-discrete;
}


@starting-style {
    .start-button, .quiz, .final {
      opacity: 0;
      scale: 0.8;
    }

    #gadget {
        opacity: 0;
      }
}

body, html {
    background: hsl(var(--black));
    -webkit-tap-highlight-color: transparent;
    height: 100%;
    width: 100%;
    overflow: hidden;
    transition: none;
}

html {
    font-size: 4px;
}

.hidden {
    opacity: 0;
    scale: 0.8;
    display: none !important;
}

h1, .start-button * {
    font-size: 10rem;
    text-transform: uppercase;
    font-weight: 700;
}

h2 {
    font-size: 8rem;
    font-weight: 700;
}

p {
    font-size: 5rem;
    font-weight: 300;
}

strong {
    font-size: 5rem;
    font-weight: 700;
}

.main {
    height: 100%;
    width: 100%;
    overflow: hidden;    
    transition: none;
}

.main video {
    height: 100%;
    width: auto;
    position: fixed;
    top: auto;
    bottom: 0;
    right: -10%;
    left: auto;
}

.flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    animation: flashAnimation 2s cubic-bezier(0,0,0,1);
    animation-play-state: paused;
}

@keyframes flashAnimation {
    0% {
        opacity: 0;
    }

    0.1% {
        opacity: 1;
    }

    1% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.app {
    position: fixed;
    top: 0;
    left: 10%;
    height: 100%;
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    transition: none;
}



/* start */

.start-button {
    position: relative;
    border-radius: 5rem;
    overflow: hidden;
    padding-block: 5rem;
    filter: drop-shadow(0 0 20rem hsla(var(--orange), 0.7));
    animation: shadow 3s linear alternate infinite;
}

@keyframes shadow {
    0% {
        filter: drop-shadow(0 0 20rem hsla(var(--orange), 0.7));
    }
    100% {
        filter: drop-shadow(0 0 20rem hsla(var(--blue), 0.7));
    }
}

.start-button_gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 200%;
    aspect-ratio: 1/1;
    background: conic-gradient(from 90deg, hsl(var(--blue)), hsl(var(--orange)), hsl(var(--blue)));
    animation: gradient 3s linear infinite;
}

@keyframes gradient {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.start-button_cover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 2rem);
    height: calc(100% - 2rem);
    background: hsla(var(--black), 0.8);
    z-index: 1;
    border-radius: 4rem;
}

.start-button span {
    position: relative;
    z-index: 2;
}



/* quiz */

.quiz, .answers {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.quiz {
    gap: 20rem;
}

.answers {
    gap: 5rem;
}

.answer {
    font-size: 5rem;
    font-weight: 300;
    padding-block: 4rem;
    border-radius: 3rem;
    background: hsla(var(--white), 0.1);
    border: solid 0.5rem hsla(var(--white), 1);
    transition: border .3s cubic-bezier(.35,0,0,1);
}

.answer:first-of-type {
    border-color: hsla(var(--blue), 1);
}

.answer:last-of-type {
    border-color: hsla(var(--orange), 1);
}

.answer.correct {
    border-color: hsla(var(--green), 1);
}

.answer.wrong {
    border-color: hsla(var(--red), 1);
}




/* final */

.final {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20rem;
    height: 100%;
}

.final .upper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.final .lower, .final .lower-arrow, .final .qr-code-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 7rem;
}

.final .upper h1, .final .lower p span {
    background: linear-gradient(135deg, hsl(var(--blue)) 30%, hsl(var(--orange)) 80%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.final .lower p, .final .lower p strong {
    font-size: 4rem;
}

.final .lower p span {
    text-align: left;
    font-size: 6rem;
    font-weight: 700;
    line-height: 0.8;
}

.final .lower img, .final .qr-code-container img {
    width: 40rem;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    padding: 2rem;
    background: hsla(var(--white), 1);
    border-radius: 2rem;
}

.final .qr-code-container p {
    text-align: left;
}

.final .lower p {
    text-align: center;
}

.final .lower-arrow {
    margin-top: -15rem;
    align-items: flex-end;
}

.final .lower-arrow svg {
    width: 30rem;
    height: auto;
    margin-left: 20rem;
}

.final .lower-arrow p {
    background: hsl(var(--orange));
    border-radius: 3rem;
    padding: 2rem 4rem;
    width: fit-content;
    white-space: nowrap;
}

.final .lower-arrow p, .final .lower-arrow p strong {
    text-align: left;
    font-size: 3.5rem;
}




/* gadget */

#gadget {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 50% 50%;
    height: 70vh;
    aspect-ratio: 1/1;
    width: auto;
    animation: gagdetAnimation 25s linear infinite;
}

@keyframes gagdetAnimation {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

#gadget img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: 50% 50%;
    width: 50rem;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 100%;
    overflow: hidden;
    animation: gagdetAnimationImg 25s linear infinite;
}

@keyframes gagdetAnimationImg {
    0% {
        transform: translate(-50%, -50%) var(--img-position, translate(0px, 0px)) rotate(360deg);
    }
    100% {
        transform: translate(-50%, -50%) var(--img-position, translate(0px, 0px)) rotate(0deg);
    }
}



/* legal */

.legal {
    position: fixed;
    bottom: 3vh;
    left: 15%;
    width: 70%;
    opacity: 0.2;
    z-index: 1000;
}

.legal p {
    font-size: 3.5rem;
    font-weight: 300;
    text-align: center;
}