/* peralta-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Peralta';
    font-style: normal;
    font-weight: 400;
    src: url('./fonts/peralta-v19-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    background-image: url('./img/desert.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    font-family: Peralta, Arial, Helvetica, sans-serif;
}

h1 {
    font-size: 60px;
    margin-bottom: 0;
    margin-top: 24px;
}

.game-container {
    position: relative;
    /* width: min(720px, 100%); */
    height: min(480px, 100vh);
    aspect-ratio: 720/480;
}

.start-screen {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
}

.start-screen img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.volume-hud {
    width: 100%;
    height: 50px;
    padding: 8px;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
}

.expand-hud {
    width: 100%;
    height: 50px;
   
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 12px;
}

.expand-hud svg {
    height: 32px;
    width: 32px;
    cursor: pointer;
}

.mobile-hud {
    width: 100%;
    padding: 8px;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    display: none;
    padding: 12px;
}
.mobile-keys {
    display: flex;
    gap: 8px;
}

.mobile-control {
    height: 40px;
    width: 40px;
    border-radius: 100vh;
    padding: 8px;
    background-image: linear-gradient(180deg, rgb(255, 161, 0), rgb(255, 222, 58), rgb(255, 161, 0));
    box-shadow: 2px 2px 5px rgb(154, 58, 23);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.mobile-control img {
    height: 32px;
    width: 32px;
    pointer-events: none;
}

.volume-hud svg {
    height: 100%;
    cursor: pointer;
}

.start-control {
    position: absolute;
    width: 100%;
    left: 0;
    top: 50px;
    display: flex;
    justify-content: center;
}

.start-button {
    width: auto;
    border: 1px solid rgb(154, 58, 23);
    box-shadow: 2px 2px 5px rgb(154, 58, 23);
    background-image: linear-gradient(180deg, rgb(255, 161, 0), rgb(255, 222, 58), rgb(255, 161, 0));
    padding: 12px;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    transition: all 75ms ease-in-out;
}
.start-button:hover {
    transform: scale(1.1);
}

.game-controls {
    max-width: 80%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.game-controls span {
    margin-right: 24px;
    font-size: 20px;
}

#canvas {
    position: absolute;
    left: 0;
    top: 0;
    background-color: rgb(20, 20, 20);
}

.turn-device {
    position: fixed;
    inset: 0;
    background-color: black;
    z-index: 50;
    display: flex;
    flex-direction: column;
    padding-top: 150px;
    align-items: center;
    display: none;
}

.turn-device span {
    margin-top: 50px;
    color: white;
    font-size: 24px;
    text-align: center;
}

.d-none {
    display: none;
}

.desktop-texts{
    position: absolute;
    left: 0;
    top: 25%;
    z-index: 5;
    margin-left: 8px;
}

@media (max-width: 720px) {
    #canvas {
        width: 100%;
    }
    .game-container {
        width: 100%;
    }
    .desktop-texts{
        display: none;
    }
  
}




@media (max-width: 700px){
    .turn-device{
        display: flex;
    }
}

@media (orientation: landscape){
    .turn-device{
        display: none;
    }
   
}

@media (max-height: 420px) {
    #canvas {
        height: 100vh;
        margin: 0;
    }
    h1 {
        display: none;
    }
    .game-controls{
        display: none;
    }
    body {
        height: 100%;
    }
    .game-container {
        height: 100vh;
        margin: 0;
    }
    .mobile-hud{
        display: flex;
    }
    .desktop-texts{
        display: none;
    }
}
