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

canvas {
    display: block;
    margin: 0 auto;
    background-color: black;
    box-shadow: 0px 0px 10px rgb(0 0 0 / 95%);
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

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

@font-face {
    font-family: 'PlayChickens';
    src: url('./fonts/Play\ Chickens.ttf') format('truetype');
}  

h1 {
    font-size: 72px;
    letter-spacing: 3px;
    text-shadow: 1px 1px 12px rgb(255 255 255 / 98%);
}

.main-container{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    width: 100%;
    max-width: 720px;
}

.start-screen-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hidden {
    display: none;
}

.start-screen-img{
    width: 100%;
    height: 100%;
    display: block;
}

/* Bild an Größe anpassen, hier aufgrund der Canvas-Größe nicht umsetzbar. */
/* .start-screen-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('/img/9_intro_outro_screens/start/startscreen_2.png');
    background-size: cover;
    background-position: center;
    z-index: 2;
    display: none;
} */

#startGame {
    position: absolute;
    top: 54%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 34px;
    font-family: 'Zabars', Arial, Helvetica, sans-serif;
    letter-spacing: 3px;
    color: #f19f1f;
    background-color: black;
    padding: 12px;
    border-radius: 20px;
    border-color: orange;
}

#startGame:hover,
#restartGame:hover,
#home:hover {
    cursor: pointer;
    font-size: 35px;
    box-shadow: 0 0 5px 2px rgb(225 117 24 / 46%);
}

.control-panel {
    position: absolute;
    z-index: 10;
    bottom: 12px;
    right: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: right;
    gap: 8px;
}

.move-control,
.option-control,
.action-control{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row !important;
}

.touch{
    display: none !important;
}

.ctrl-panel-icon {
    display: flex;
    align-content: center;
    padding: 8px;
    background-color: black;
    border-radius: 50%;
    border: 1px solid orange;
    border-width: 2px;
    border-style: outset;
    margin-right: 8px;
}

.ctrl-panel-icon:hover {
    cursor: pointer;
    box-shadow: 0 0 5px 2px rgb(225 117 24 / 46%);
}

.ctrl-panel-img {
    height: 30px;
}

.ctrl-panel-img:hover {
    transform: scale(1.15);
    transition: transform 0.2s ease-in-out;
}

.info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 3;
    display: none;
}

.further-info {
    display: flex;
    flex-direction: column;
    background-color: black;
    align-items: center;
    padding: 20px;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    border-radius: 24px;
}

#legalNotice {
    font-size: 20px;
    font-family: 'PlayChickens', Arial, Helvetica, sans-serif;
    letter-spacing: 2px;
    color: black;
    background-color: #f19f1f;
    padding: 8px;
    border-radius: 20px;
    border-color: #e57640;
    margin: 36px 0px 8px 0px;
}

#legalNotice:hover {
    cursor: pointer;
    font-size: 21px;
    box-shadow: 0 0 5px 6px rgb(225 117 24 / 46%);
}

a {
    text-decoration: none;
    color: black;
}

.instructions {
    display: flex;
    flex-direction: column;    
}

h2{
    font-family: 'PlayChickens', Arial, Helvetica, sans-serif;
    letter-spacing: 2px;
    font-size: 26px;
    margin: 12px 4px;
    color: #f19f1f;
}

.instructions span {
    font-family: 'PlayChickens';
    font-size: 20px;
    font-weight: 100;
    margin: 6px 4px;
    color: #f19f1f;
    letter-spacing: 1px;
}

.close {
    display: flex;
    justify-content: right;
}

.close-img {
    height: 30px;
}

.close-img:hover {
    transform: scale(1.15);
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 3;
    display: none;
}

.game-result{
    height: 300px;
}

.game-over-content {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
}

#restartGame,
#home {
    /* position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%); */
    font-size: 34px;
    font-family: 'Zabars', Arial, Helvetica, sans-serif;
    letter-spacing: 3px;
    color: #f19f1f;
    background-color: black;
    padding: 12px;
    border-radius: 20px;
    border-color: orange;
}

.game-over-buttons{
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
    gap: 20px;
}

/* Canvas und Container im Vollbildmodus */
.main-container:fullscreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background-color: black;
}

canvas {
    display: block;
    margin: 0 auto;
}

#portrait-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.959);
    color: white;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
}

@media screen and (max-width: 1023px) and (orientation: portrait) {
    #portrait-warning {
        display: flex;
    }
}

@media (max-width: 1024px) {
    .control-panel {
        justify-content: space-between;
        position: fixed;
        bottom: 30px;
    }
    .touch{
        display: flex !important;        
    }
    .move-control{
        margin-left: 60px;
    }
    .action-control{
        margin-right: 60px;
    }
}

@media (max-width: 1023px) {
    h1{
        display: none;
    }
    .control-panel {
        justify-content: space-between;
    }
    .touch{
        display: flex !important;
    }
    .ctrl-panel-img{
        height: 24px;

    }
    .game-result {
        height: 200px;
    }
    #restartGame,
    #home{
        top: 70%;
        font-size: 24px;
    }
 
}

@media (max-height: 480px) {
    canvas {
        height: 100vh;
        width: inherit;
    }
    #fullScreenMode,
    #infoScreen{
        display: none;
    }
}

@media (max-height: 375px) {
    .game-over-buttons {
        top: 70%;
    }
}