/* baloo-2-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: 'Baloo 2';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/baloo-2-v23-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* baloo-2-700 - 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: 'Baloo 2';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/baloo-2-v23-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* luckiest-guy-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: 'Luckiest Guy';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/luckiest-guy-v25-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

.main-container{
    width: 100vw; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('image/5_background/layers/desert.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: hidden;
}

.title{
    font-family: 'Luckiest Guy', cursive;
    font-size: 3rem;
    color: #2b2a26;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.modal-title{
    font-family: 'Baloo 2';
    font-size: 2rem;
    color: #2b2a26;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.modal-body-title{
    font-family: 'Baloo 2';
    font-size: 1.5rem;
    color: #2b2a26;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.list-group-item{
    font-family: 'Baloo 2';
    font-size: 1.1rem;
    color: #2b2a26;
    font-weight: 400;
}

.impressum-body{
 background-image: url('image/5_background/layers/desert-5385998_1920.png');
    background-position: center;
    background-size: cover;
    margin: 0;
    overflow-y: auto;
    font-family: 'Baloo 2', cursive;
}

.impressum-body .container {
    max-width: 800px;
    margin: auto;
}

.main {
    width: 100%;
    min-height: 100svh;
    padding: 20px 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;    
}

.container {
    max-width: 800px; 
    width: 100%; 
}

#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

#rotate-warning {
    display: none;
    position: fixed;
    inset: 0;
    background: black;
    color: white;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 24px;
}

canvas {
    width: 100%;
    max-width: 720px;
    height: auto;
    background-image: url("image/9_intro_outro_screens/start/startscreen_1.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    object-fit: contain;
    animation: expand-fade-in 2s ease-out ;
    animation-fill-mode: both;
}

@keyframes expand-fade-in {
    from {opacity: 0%; width: 0%;}
    to {opacity: 100%; width: 100%;}
}

@keyframes fade-in {
    from {opacity: 0%; width: 0%;}
    to {opacity: 100%; width: 25%;}
}

#fullscreen-btn {
     position: absolute;
    top: 6px;
    right: 10px;
    z-index: 50;
}

#fullscreen-icon{
    font-size: 17px;
    display: none;
}

.mobil-icon-btn{
   width: 42px;
    height: 35px;
    border-radius: 50% !important;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.08s ease, background 0.1s ease;  
}

.mobil-icon-btn:active {
    transform: scale(0.9);
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

#btn-up {
    background: rgba(46, 204, 113, 0.45); 
    color: white;
    border: 1px solid white;
}

#btn-up-right {
    background: rgba(231, 76, 60, 0.45); 
    color: white;
    border: 1px solid white;
}

#btn-left, #btn-right{
    color: white;
    border: 1px solid white;
}

#mute-btn {
    position: absolute;
    top: 0px;
    right: 55px; 
    z-index: 50;
}

#mute-icon{
    display: none;
}

.btn-fullscreen{
    background-color: transparent;
    border: none;
    font-size: 25px !important;
    color: white !important;
}

.button-group{
    display: flex;
    justify-content: center;
    gap: 10px;  
    width: 100%;
}

.menu-btn {
    width: 160px;     
    font-size: 18px;     
    padding: 10px 0;
    animation: fade-in 1s ease-out 1.5s both;
}

#start-screen {
  height: 100%;
}

#win-screen, #gameover-screen, #start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 720px;   
    height: 480px;  
    display: flex;  
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    background-color: rgba(0,0,0,0.8); 
    z-index: 10;
}

#win-screen img, #gameover-screen img, #start-screen img {
    max-width: 80%;   
    max-height: 50%; 
}

#win-screen button, #gameover-screen button, #start-screen button {
    margin-top: 15px;
}

.modal-body{
    overflow-y: scroll;
    max-height: 385px;
}

#mobile-controls {
    position: absolute;
    bottom: 5%;           
    left: 50%;
    transform: translateX(-50%);
    display: none;      
    gap: 12px;
    z-index: 50;
    justify-content: space-between;
    width: auto;
    max-width: 90%;
    width: 100%;
}

#mobile-controls .left-controls,
#mobile-controls .right-controls {
    display: flex;
    gap: 10px;
}

#mobile-controls .mobile-btn {
 width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.08s ease, background 0.1s ease;
}

#game-wrapper:fullscreen {
     width: 100vw !important;
    height: 100vh !important;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-wrapper:fullscreen canvas {
    width: auto !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: contain !important; 
    background-image: none !important;
}

#game-wrapper:fullscreen #fullscreen-btn,
#game-wrapper:fullscreen #mute-btn {
    position: fixed;
    top: 15px;
    z-index: 999;
}

#game-wrapper:fullscreen #mobile-controls {
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    position: fixed;
    z-index: 999;
}

#game-wrapper:fullscreen #fullscreen-btn,
#game-wrapper:fullscreen #mute-btn {
    top: 15px;
}

@media screen and (min-width: 1200px){
    #game-wrapper:fullscreen #fullscreen-btn{
        top: 20px;
    }
    #mute-btn{
        top: 0px;
    }
} 

@media screen and (max-width: 1200px) {
    #mute-btn{
        right: 54px;
    }
}

@media screen and (max-width: 991px) and (orientation: landscape) {

  #mobile-controls {
    display: none;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    gap: 12px;
    z-index: 30;
    justify-content: space-between;
    padding: 0px 18px;
  }
}

@media screen and (min-width:1366px)  and (orientation: landscape){
    #mobile-controls{
        padding-bottom: 35px !important;
    }
}
@media screen and (min-width:1000px)  and (orientation: landscape){
    .container{
        max-width: 700px !important;
    }
    #mobile-controls{
        padding-bottom: 25px !important;
    }
}

@media screen and (min-width:900px)  and (orientation: landscape) {
    .container{
        max-width: 680px !important;
    }
    #mobile-controls{
        bottom: 20px !important;
    }
 
}

@media screen and (max-width: 991px) and (orientation: portrait) {
    #game-container {
        display: none;
    }
    #rotate-warning {
        display: flex;
    }
}

@media screen and (max-width: 991px) and (orientation: landscape) {
    #game-container {
        display: flex;
        padding: clamp(40px, 8vh, 75px) clamp(20px, 6vw, 45px);
        box-sizing: border-box;
    }
    .modal-body {
        max-height: 235px !important;  
        overflow-y: auto;  
  }
    #rotate-warning {
        display: none;
    }
     #mute-btn{
        top: 4px !important;
    }
    #fullscreen-btn{
        top: 9px !important;
    }
    .button-group{
        padding-bottom: 10px;
    }
}

@media screen and (max-width: 935px) and (orientation: landscape) {
    .title {
        display: none;
    }
}

@media screen and (max-width: 896px) {
    #mobile-controls {
        bottom: 18px; 
    }
    .container{
        max-width: 620px !important;
    }
}

@media screen and (max-width: 767px) and (orientation: landscape){
    #mute-btn{
        top: 0px !important;
    }
    #fullscreen-btn{
        top: 4px !important;
    }
}

@media screen and (max-width: 768px) {
    #mobile-controls {
        bottom: 10px; 
    }
}

@media screen and (max-width: 600px) and (orientation: landscape) {
    #mobile-controls {
        bottom: 20px !important;
    }
}

@media (max-width: 576px) {
    .main {
        padding-top: 15px;
    }
}

@media screen and (max-width: 548px) {
    .menu-btn {
    max-width: 100px;
    width: 100%;
    font-size: 14px !important;
    } 
    #fullscreen-btn{
        top: -3px;
    } 
    #mute-btn{
        top: 0px;
    }  
    #win-screen img, #gameover-screen img, #start-screen img {
    max-width: 60%;   
    max-height: 40%; 
    }
    #win-screen button, #gameover-screen button, #start-screen button {
    margin-top: 10px;
    }
    .button-group{
        padding-bottom: 25px;
    }
}

@media screen and (max-width: 350px) {
    .menu-btn {
        width: 111px;
    }  
        #fullscreen-btn{
        top: -12px;
    } 
    #mute-btn{
        top: -8px;
    }    
}

.top-right-icons {
    position: absolute;
    top: 0px;
    right: 10px;
    display: flex;
    gap: 8px; 
    z-index: 100;
    max-width: 150px;
    width: 100%;
}

.top-right-icons .btn-fullscreen {
    font-size: 20px;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-wrapper:fullscreen .fullscreen-buttons {
    position: fixed;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 10px;
    z-index: 9999;
}

#game-wrapper:fullscreen #fullscreen-btn,
#game-wrapper:fullscreen #mute-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
}