@font-face {
    font-family: 'rye';
    src: url('./fonts/rye.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url('./img/10_background/desert-1920.jpg');
    background-size: cover;
    height: 100vh;
    font-family: 'rye';
}

h1 {
    font-size: 64px;
    color: #FFD800;
    text-shadow: 5px 5px 7px rgba(0, 0, 0, 1);
}

.game-screen {
    position: relative;
    justify-content: center;
}

.fullscreen-active {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    background-color: black;
}

.gameover-overlay {
    position: absolute;
    top: 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.gameover-overlay img {
    width: 720px;
    height: 480px;
    object-fit: cover;
}

.gamewon-overlay {
    position: absolute;
    top: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.gamewon-overlay img {
    width: 480px;
}

.gameover-options {
    position: absolute;
    width: 100%;
    bottom: 64px;
    color: #fca822;
    font-size: 32px;
    display: flex;
    justify-content: space-around;
}

.gameover-options span:hover {
    cursor: pointer;
    color: #FFD800;
}

.gamewon-options {
    color: #fca822;
    font-size: 24px;
}

.gamewon-options:hover {
    cursor: pointer;
    color: #FFD800;
}

canvas {
    background-color: black;
    box-shadow: 8px 8px 24px 0px rgba(0, 0, 0, 1);
}

.fullscreen-active canvas {
    max-width: 1440px;
    max-height: 810px;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.screen {
    display: flex;
    max-width: 720px;
    height: 480px;
    position: relative;
    box-shadow: 8px 8px 24px 0px rgba(0, 0, 0, 1);
}

.screen img {
    max-width: 720px;
    height: 480px;
}

.play {
    position: absolute;
    top: 16px;
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    gap: 8px;

    width: 100%;
    justify-content: center;
}

.controls {
    position: absolute;
    width: 100%;
    top: 24px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.controls img {
    width: 32px;
    height: 32px;
}

.pause {
    cursor: pointer;
}

.mute {
    cursor: pointer;
}

.fullscreen {
    cursor: pointer;
}

.keyboard-settings {
    margin-left: -8px;
    cursor: pointer;
}

.play:hover {
    cursor: pointer;
}

.play img {
    width: 50px !important;
    height: 50px !important;
}

.mobile-controls-container {
    width: 100%;
    position: absolute;
    bottom: 8px;
    display: none;
    justify-content: space-between;
    touch-action: none;
}

.mobile-controls-split {
    display: flex;
    gap: 8px;
    padding: 0 32px;
}

.mobile-controls {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    border-style: solid;
    border-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.jump-button {
    width: 50px;
    padding-bottom: 32px;
}

.throw-button {
    width: 60px;
}

.info-container {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 1440px;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.controls-headline {
    color: white;
    font-size: 32px;
    padding-bottom: 8px;
}

.controls-container {
    width: 100%;
    display: flex;
    justify-content: space-around;
    color: white;
}

.controls-container img {
    width: 40px;
}

.keyboard-keys {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-to-game {
    color: white;
    font-size: 24px;
}

.back-to-game:hover {
    cursor: pointer;
    color: #FFD800;
}

.link-container {
    display: flex;
    gap: 8px;
    padding-top: 24px;
}

.link-container-mobile {
    display: none;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding-top: 24px;
    position: absolute;
    bottom: 12px;
}

a {
    color: #FFD800;
    text-decoration: none;
}

a:hover {
    color: #fca822;
}

.seperator {
    width: 2px;
    background-color: #FFD800;
}

.turn-device {
    position: absolute;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background-color: lightgray;
    width: 100%;
    height: 100vh;
}

@media (max-width: 1367px) and (orientation: landscape) {
    .mobile-controls-container {
        display: flex;
        width: 92%;
    }

    .keyboard-settings {
        display: none;
    }
}

@media (max-width: 1100px) {
    .mobile-controls-container {
        display: flex;
    }

    .keyboard-settings {
        display: none;
    }
}

@media (max-width: 1100px) and (orientation: portrait) {
    .turn-device {
        display: flex;
    }

    .screen {
        display: none;
    }

    .game-screen {
        display: none;
    }
}

@media (max-width: 950px) and (orientation: landscape) {
    body {
        background-size: auto;
        overflow: hidden;
    }

    h1 {
        display: none;
    }

    .screen {
        max-width: none;
        width: 100%;
        height: 100%;
    }

    .screen img {
        max-width: none;
        width: 100%;
        height: 100%;
    }

    .gameover-overlay img {
        width: 100vw;
        height: 100vh;
    }

    .link-container {
        display: none;
    }

    .link-container-mobile {
        display: flex;
    }
    
    canvas {
        width: 100vw !important;
        height: 100vh !important;
    }
}

@media (max-width: 728px) and (orientation: landscape) {
    .turn-device {
        display: none;
    }

    .screen {
        display: flex;
    }

    .game-screen {
        display: flex;
    }
}

@media (max-width: 667px) and (orientation: landscape) {
    .mobile-controls {
        width: 50px;
        height: 50px;
    }

    .jump-button {
        width: 42px;
    }

    .throw-button {
        width: 50px;
    }
}
  
@media (max-width: 580px) and (orientation: landscape) {
    .intro {
        width: 100%;
        height: auto;
    }

    canvas {
        width: 100%;
        height: auto;
    }

    .game-screen {
        width: 100%;
        height: auto;
    }

    .gameover-overlay {
        width: 100%;
        height: auto;
    }
    
    .screen {
        width: 100vw;
        height: auto;
    }

    .screen img {
        width: 100%;
        height: 100%;
    }
}
  