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

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    font-family: 'metrosant', Arial, Helvetica, sans-serif;
    background-image: url('./assets/images/img/desert.jpg');
    background-position: center;  
    background-repeat: no-repeat; 
    overflow: hidden;
}

h1 {
    font-size: 56px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 2px rgba(0,0,0,0.5);
    background-color: #692424;
    color: #ff9c1d;
    padding: 2px 15px;
    border: 1px solid #540903;
    text-align: center;
}

#playButton:hover {
    background-color: #692424;
    color: white;
}

canvas {
    background-color: black;
    border-radius: 10px;
}

#playButton {
    display: flex;
    letter-spacing: 3px;
    align-items: center;
    position: absolute;
    top: 220px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 20px;
    padding: 10px 35px;
    cursor: pointer;
    background-color: #efc700;
    color: whitesmoke;
}

.impressum-content {
    max-height: 400px; 
    overflow-y: auto;  
    padding: 10px;    
    border: 1px solid #ccc;
}

#gameOverOverlay, #youWinOverlay {
    display: none;
    position: absolute;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    width: 725px; 
    height: 485px;
    background-color: rgba(0, 0, 0, 0.5); 
    text-align: center;
    z-index: 100;
    border-radius: 12px;
    overflow: hidden;
}

#gameOverOverlay img, #youWinOverlay img {
    width: 724px;
    height: 485px;
    border-radius: 14px;
}

.button-line {
    background-color: transparent;
    top: 160px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 6px;
    cursor: pointer;
    background: rgba(128, 128, 128, 0.247);   
    border: 1px solid rgba(0, 0, 0, 0.164);   
}

#soundIcon, .size {
    height: 24px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.93);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.container {
    position: relative;
}

.overlay-content {
    text-align: center;
    font-size: 20px;
}

.overlay-content button {
    margin-top: 20px;
    padding: 10px 20px;
    cursor: pointer;
    background-color: #ff9c1d;
}

.overlay-content button:hover {
    background-color: #ffad41;
}

#overlayImpressum:hover {
    background-color: #efc700;
}

.button-gameover, .btn {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, 12%);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.button-gameover button, .btn, .btn-impressum {
    font-size: 20px;
    background-color: #efc700;
    color: whitesmoke;
    padding: 15px 0;
    width: 150px;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.button-gameover button:hover{
    background-color: #692424;
    color: white;
}

#fullscreen {
    position: relative;
}

#fullscreen:fullscreen {
    width: 100vw;
    height: 100vh;
    background: black;
}

#fullscreen:fullscreen #canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1000;
}

#fullscreen {
    position: relative;
}

#fullscreen:fullscreen .button-line {
    position: absolute;
    top: 20px;          
    left: 50%;      
    transform: translateX(-50%); 
    display: flex;
    gap: 10px;
    z-index: 1001;
}

#fullscreen:fullscreen #playButton {
    position: absolute;
    left: 50%;
    top: 90px;
    transform: translateX(-50%);
    z-index: 1002;
}

#fullscreen:fullscreen #overlayImpressum {
    display: none;
}

#impressumOverlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh; 
    background-image: url(./assets/images/img/desert.jpg);
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.impressum-content {
    background-color: rgba(0,0,0,0.6);
    padding: 30px;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    min-height: 600px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;     
    justify-content: center;
    align-items: center;
    color: white;           
}    

.overlay.hidden {
    display: none;
}

.impressum-content h2 {
    margin-top: 100px;
    margin-bottom: 20px;
    font-size: 24px;
}

.impressum-content ul {
    text-align: left;
    margin-bottom: 20px;
    padding-left: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
}

#impressumButton {
    display: flex;
    letter-spacing: 2px; 
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 280px;             
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 18px;           
    padding: 8px 25px;         
    cursor: pointer;
    background-color: #efc700; 
    color: whitesmoke;
    border-radius: 10px;        
    border: none;
    transition: all 0.3s ease;
}

#overlayImpressum {
    display: flex;
    letter-spacing: 2px;
    align-items: center;
    position: absolute;
    top: 580px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 10px;
    cursor: pointer;
    background-color: #692424; 
    color: whitesmoke;
}
body.impressum-open #overlayImpressum {
    display: none !important; 
}

#rotateMessage {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    color: white;
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.rotate-box {
    text-align: center;
}

.phone {
    width: 60px;
    height: 100px;
    border: 4px solid white;
    border-radius: 15px;
    margin: 0 auto 20px;
    position: relative;
    animation: rotatePhone 2s infinite ease-in-out;
}

.phone::after {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.rotate-box p {
    font-size: 20px;
}

#mobileControls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    justify-content: space-around;
    padding: 10px;
    z-index: 1000;
    gap: 70px;
}

#mobileControls .left-side,
#mobileControls .right-side {
    display: flex;
    gap: 15px;    
}   

#mobileControls button {
    width: 60px;
    height: 60px;
    font-size: 24px;
    border-radius: 50%;
    border: none;
    background-color: rgba(239, 199, 0, 0.8);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

#youWinOverlay .overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.overlay-img {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 780px;
    max-width: 100%;
    z-index: 1001;
    filter: brightness(25%);
}

.overlay-text {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 80px;
    color: yellow;
    text-shadow: 2px 2px 10px black;
    z-index: 1002;
}

.overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
}

.button-youwin {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
}

.impressum-open #overlayImpressum {
    display: none !important;
}

.cursor {
    cursor: pointer;
}
