﻿body {
    font-family: 'Custom-Font', serif;
    margin: 0;
    width: 100%;
    height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    overflow: hidden;
    touch-action: none;
    background: #ef8845;
    transform: translateZ(0);
    will-change: transform;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@font-face {
    font-family: 'Custom-Font';
    src: url('assets/SF-Pro-Rounded-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.a-enter-vr {
    display: none !important;
}

.video-plane {
    scale: 1 0.55 1;
}

div {
    display: flex;
    padding: 2px;
    gap: 10px;
    transition: opacity 2s ease;
}

div.inactive {
    opacity: 0;
    pointer-events: none;
}

label {
    color: antiquewhite;
    font-size: xx-large;
    text-shadow: 2px 2px 2px black;
}

#bar {
    position: fixed;
    display: flex;
    width: 84%;
    flex-direction: row;
    top: 10%;
    height: 40px;
    left: 8%;
    right: 8%;
    background-color: transparent;
    vertical-align: center;
    justify-content: space-between;
    z-index: 9001;
}

.win-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 8990;
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

#win {
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    gap: 10px;
    border-radius: 16px;
    padding-top: 31px;
    padding-right: 16px;
    padding-bottom: 31px;
    padding-left: 16px;
    box-shadow: 0px 4px 0px 0px #34C759;
    max-width: 480px;
    width: 110%;
}

h3 {
    text-align: center;
    font-size: xxx-large;
    color: #34C759;
}

p {
    text-align: center;
    font-size: xx-large;
}

#ar-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
}

#ar-overlay.hidden {
    display: none;
}

#ar-overlay img {
    width: 70vw;
    border: transparent;
}

#runButtonContainer {
    position: relative;
    order: -1;
    margin-bottom: 10px;
    width: 70%;
}

#hint {
    font-weight: 400;
    font-size: 20px;
    line-height: 25px;
    letter-spacing: -0.45px;
    vertical-align: middle;
    color: white;
    white-space: nowrap;
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
    z-index: 9960;
}

#hint.hint-active {
    opacity: 1;
    animation: 1.5s blink 1s infinite;
}

#hint.hint-inactive {
    opacity: 0;
    pointer-events: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#links {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background-color: transparent;
    padding: 14px 20px;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 9940;
}

#links .store-links {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 15px;
}

#links #runButton {
    margin-bottom: 0;
    z-index: 9950;
    height: auto;
    min-height: 44px;
    max-height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    gap: 12px;
}

#splash {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    min-height: -webkit-fill-available;
    opacity: 1;
    pointer-events: auto;
    z-index: 9800;
    background: #ef8845;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateZ(0);
    will-change: opacity;
}

#splash-logo {
    max-width: 80vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

#splash.inactive {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#quiz-container {
    position: fixed;
    top: 75%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 20%;
    background-color: transparent;
    visibility: visible;
    transition: opacity 0.3s ease;
    place-items: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9001;
}

#quiz-container.inactive {
    opacity: 0;
    pointer-events: none;
}

#quiz-view {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    z-index: inherit;
}
.bar-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    padding: 0;
}

.button-base {
    display: flex;
    padding: 12px 15px;
    margin-bottom: 10px;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex: 1 0 0;
    transition: opacity 1s ease;
    border: transparent;
    border-radius: 16px;
    font-size: 18px;
    letter-spacing: 0px;
    vertical-align: middle;
    line-height: 28px;
    font-weight: 500;
}
.button-base:active {
    transform: scale(0.95);
}

.quiz-button-base {
    background: #FFF;
    box-shadow: 0 4px 0 0 #B0B0B0;
}
.quiz-wrong{
    pointer-events: none;
    animation-name: fade-off;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-delay: 1s;
    background: linear-gradient(0deg, rgba(255, 56, 60, 0.10) 0%, rgba(255, 56, 60, 0.10) 100%), #FFF;
    box-shadow: 0 4px 0 0 #FF383C;
    color: #FF383C;
    font-size: 16px;
}

.quiz-right {
    background: linear-gradient(0deg, rgba(52, 199, 89, 0.10) 0%, rgba(52, 199, 89, 0.10) 100%), #FFF;
    box-shadow: 0 4px 0 0 #34C759;
    color: #34C759;
    font-size: 16px;
}

.quiz-right .quiz-right-title {
    color: #34C759;
    font-weight: 700;
    font-size: 32px;
    line-height: 40px;
    letter-spacing: 0px;
    text-align: center;
    vertical-align: middle;
    margin: 0;
}

.quiz-right .quiz-right-subtitle {
    color: #000;
    font-weight: 500;
    font-size: 18px;
    line-height: 28px;
    letter-spacing: 0px;
    text-align: center;
    vertical-align: middle;
    margin: 0;
    max-width: 300px;
}

.quiz-disabled {
    pointer-events: none;
    animation-name: disabled-fade-off;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-delay: 0.2s;
    background: #FFF;
    color: black;
    box-shadow: 0 4px 0 0 #B0B0B0;
}

@keyframes fade-off {
    0% {
        background: #FFF;
        box-shadow: 0 4px 0 0 #B0B0B0;
        background: linear-gradient(0deg, rgba(255, 56, 60, 0.10) 0%, rgba(255, 56, 60, 0.10) 100%), #FFF;
        box-shadow: 0 4px 0 0 #FF383C;
        color: #FF383C;
        font-size: 16px;
    }
    100% {
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 0 0 rgba(176, 176, 176, 0.10);
        pointer-events: none;
        color: rgba(255, 255, 255, 0.5);
        font-size: 18px;
    }
}

@keyframes disabled-fade-off {
    0% {
        background: #FFF;
        box-shadow: 0 4px 0 0 #B0B0B0;
        color: black;
    }
    100% {
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 4px 0 0 rgba(176, 176, 176, 0.10);
        pointer-events: none;
        color: rgba(255, 255, 255, 0.5);
    }
}

#timer {
    font-weight: 700;
    font-size: 34px;
    line-height: 41px;
    letter-spacing: 0.4px;
    vertical-align: middle;
}

@keyframes blink-timer {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

#timer.blinking {
    animation: blink-timer 1s infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

#question {
    font-weight: 700;
    font-size: 24px;
    line-height: 32px;
    letter-spacing: 0px;
    vertical-align: middle;
}

#video-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-overlay {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

#video-overlay-container.inactive {
    opacity: 0;
    pointer-events: none;
}

#camera-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 9801;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 0;
}

#camera-loader.active {
    opacity: 1;
    pointer-events: auto;
}

#loader {
    width: 48px;
    height: 48px;
    border: 5px solid #6ebeff;
    border-bottom-color: #337AB7;
    border-radius: 50%;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

#orientation-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    z-index: 9998;
    transition: background 0.5s ease-in-out;
}

#orientation-overlay.block {
    background: #000;
}

@media (min-width: 480px) {
    #links {
        flex-direction: row;
        justify-content: space-between;
        max-width: none;
        align-items: flex-start;
        width: 100%;
    }

    #links .store-links {
        justify-content: flex-start;
        width: auto;
    }

    #links #runButtonContainer {
        order: 0;
        margin-left: auto;
        margin-bottom: 0;
        width: auto;
    }

    #splash-logo {
        transform: translateY(-40px);
    }

    #hint {
        transform: translateX(-60%);
    }

    #video-overlay-container.inactive {
        opacity: 0;
        pointer-events: none;
    }

    #video-overlay-container:not(.inactive) {
        display: flex;
    }

    video::-webkit-media-controls {
        display: none !important;
    }

    video::-webkit-media-controls-enclosure {
        display: none !important;
    }

    video {
        pointer-events: none;
    }

    #video-overlay {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #000;
    }
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
} 