@font-face {
    font-family: 'elsie';
    src: url('Fonts/ElsieSwashCaps-Regular.ttf') format('truetype');
}

body {
    font-family: 'elsie', Arial, Helvetica, sans-serif !important;
    margin: 0;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    background-image: url('img/mountain.png');
    background-size: cover;
    background-color: rgba(115, 180, 230, 0.7);
}


canvas {
    display: block;
    position: absolute;
    object-fit: contain;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.gamaContainer {
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
}

.startScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 720px;
    height: 480px;
    /* background-image: url('img/startscreen-background.png'); */
}

.startscreen-background {
    position: absolute;
    left: 0;
    right: 0;
    object-fit: contain;
    width: 100%;
}

#startButton {
    padding-left: 30px;
    padding-right: 30px;
    font-size: 20px;
    cursor: pointer;
    border: none;
    z-index: 10;
}

.overlay-center {
    position: relative;
    top: 0;
    left: 0;
    z-index: 4;
    width: 100%;
    /* height: 100%; */
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.overlay-top {
    z-index: 2;
}

.overlay-bottom {
    display: none;
    justify-content: space-around;
    width: 100%;
    z-index: 2;
}

.setting-buttons {
    border-radius: 100%;
    margin: 10px;
    background-color: rgba(0,0,0,0);
    border: none;
}

.img-settings-buttons {
    width: 40px;
    /* height: 40px; */
}

h1 {
    position: relative;
    top: -280px;
    margin-top: 0;
    font-size: 64px;
    letter-spacing: 4px;
    color: rgb(2, 11, 17);
    text-shadow: 2px 2px 4px rgba(3, 24, 34, 0.7);
}

.rotate-device-container {
    position: absolute;
    width: 70%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.rotate-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: rotateAnimation 4000ms infinite alternate;
}

.rotate-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: invert(1) brightness(2);
}

.image-description {
    margin-top: 50px;
    font-size: 32px;
    color: white;
    text-align: center;
}

.EndScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 20px;
    height: 20px;
    z-index: 3;
    background-color: rgb(0 0 0 / 30%);
    animation: expandAnimation 1s forwards;
    opacity: 0;
}

.youWonScreen {
    width: 20px;
    height: 20px;
    z-index: 3;
    background-color: rgb(0 0 0 / 30%);
    animation: expandAnimation 1s forwards;
    opacity: 0;
}

@keyframes expandAnimation {
    0% {
        width: 1px;
        height: 1px;
        top: 50%;
        left: 50%;
        transform: translate(0, 0);
        opacity: 0;
    }
    100% {
        width: 720px;
        height: 480px;
        top: 0;
        left: 0;
        transform: translate(0, 0);
        opacity: 1;
    }
}

.youLostImg {
    width: 100%;
    height: 80%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.youLostBtn {
    width: 30%;
    height: 15%;
    border-radius: 50%;
    color: white;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1.2rem;
    border: none;
    background-image: linear-gradient(47deg, mediumseagreen, #4889e8);
    box-shadow: rgba(56, 154, 23, 0.9) 2px 2px 2px;
}
.h2Endscreen {
    font-size: 5rem;
    background-image: linear-gradient(47deg, mediumseagreen, #4889e8);  
    color: transparent; 
    -webkit-background-clip: text;

}

@keyframes rotateAnimation {
    0% {
        transform: rotate(45deg);
    }
    50% {
        transform: rotate(-45deg);
    }
    100% {
        transform: rotate(-45deg);
    }
}

.fill {
    object-fit: fill;
}

.pointer:hover {
    scale: 1.2;
}

.pointer {
    cursor: pointer;
}

.d-none {
    display: none !important;
}

.height100 {
    height: 100dvh;
}

.width100 {
    width: 100dvw;
}

.instructionsContainer {
    padding: 10px;
    border: 1px solid #ccc;
    margin-top: 20px;
    border-radius: 5px;
    position: relative;
    bottom: -220px;
    width: 700px;
    color: white;
    background-color: transparent;
}

.desktopControls {
    display: flex;
    justify-content: space-between;
}

.control {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.control img, .control kbd {
    background-color: transparent;
}

kbd {
    padding: 2px 5px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    border-radius: 3px;
}


@media only screen and (max-width: 1025px) {
    canvas {
        border: none;
        box-shadow: none;
    }

    .overlay {
        height: 100dvh;
    }

    .gamaContainer {
        border: none;
        box-shadow: none;
    }

    .startScreen {
        border: none;
        box-shadow: none;
    }

    .startscreen-background {
        height: 100dvh;
    }

    h1 {
        font-size: 50px;
    }

    .instructionsContainer {
        display: none;
    }
    
    @keyframes expandAnimation {
        0% {
            width: 20px;
            height: 20px;
            top: 50%;
            left: 50%;
            transform: translate(0, 0);
            opacity: 0;
        }
        100% {
            width: 100dvw;
            height: 100dvh;
            top: 0;
            left: 0;
            transform: translate(0, 0);
            opacity: 1;
        }
    }
}

@media only screen and (max-width: 720px) {
    canvas {
        width: 100%;
        height: 100dvh;
    }

    .startScreen {
        width: 100%;
    }

    h1 {
        display: none;
    }

    .gamaContainer {
        width: 100%;
    }

    .h2Endscreen {
        font-size: 2.5rem;
    }

    .youLostBtn {
        width: 50%;
        height: 10%;
        font-size: 1rem;
    }    
}

.height-width100 {
    height: 100dvh !important;
    width: 100dvw !important;
}