@font-face {
    font-family: myFont1;
    src: url("Splatch.ttf");
}

@font-face {
    font-family: myFont2;
    src: url("OpenSans.ttf");
}

body {
    display: flex;
    align-items: center;
    flex-direction: column;
    background-image: url('img/3. Background/Dark/completo.png');
}

canvas {
    background-color: black;
    display: block;
}

.d-none {
    display: none;
}

.d-flex {
    display: flex;
}

.logo {
    width: 500px;
}

.instructions {
    margin-top: 25px;
    width: 720px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.instructions img {
    width: 200px;
}

.button {
    cursor: pointer;
    transition: all 80ms ease-in-out;
}

.button:hover {
    transform: scale(1.05);
    filter: brightness(200%);
}

.start-screen {
    width: 720px;
    height: 480px;
    background-image: url('img/startscreen.png');
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center; 
}

.game-container {
    position: relative;
    width: 720px;
    height: 480px;
    margin: auto;
}

#joystick-container {
    position: absolute;
    bottom: 5%;
    left: 10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 0, 166, 0.6);
    border-radius: 50%;
    touch-action: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#joystick-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: rgba(66, 1, 52, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#button-container {
    position: absolute;
    bottom: 5%;
    right: 10%;
    flex-direction: column;
    gap: 20px;
}

#button-container button {
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, rgba(235, 14, 255, 0.7), rgba(72, 36, 233, 0.8));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-family: 'myFont1', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#button-container button:hover {
    background: linear-gradient(145deg, rgba(72, 36, 233, 0.8), rgba(235, 14, 255, 0.7));
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

#button-container button:active {
    background: rgba(72, 36, 233, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
}

.action-buttons {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resize-canvas {
    width: 100%;
    height: 100%;
}

.action-buttons img:hover {
    cursor: pointer;
    filter: brightness(150%);
}

#mute-image , #fullscreen {
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.impressum {
    text-align: center;
    font-family: myFont2;
    color: white;
    text-shadow: 2px 5px 5px black;
    padding: 20px;
    margin-top: 75px;
}

.rotate-device {
    display: none;
    width: 200px;
}

.a-index {
    position: absolute;
    bottom: 10px;
    text-decoration: none;
    font-family: myFont2;
    color: white;
    text-shadow: 2px 2px 2px black;
    margin-top: 50px;
}

a:hover {
    filter: brightness(40%);
}

.a-impressum {
    text-decoration: none;
    font-family: myFont2;
    color: white;
    text-shadow: 2px 5px 5px black;
    margin-top: 50px;
}

@media only screen and (max-width: 1400px) {
    #joystick-container {
        display: flex;
    }
    #button-container {
        display: flex;
    }
    .instructions {
        display: none;
    }
    #fullscreen {
        display: none;
    }
    #canvas {
        width: 60vw;
        height: 60vh;
    }
    .logo {
        width: 330px;
    }
    .game-container {
        margin: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .action-buttons {
        bottom: 200px;
        left: 15px;
    }
    body {
        height: 90vh;
    }
}

@media only screen and (max-width: 935px) {
    #canvas {
        width: 100vw;
    }
    .game-container {
        width: 100vw;
        margin: unset;
    }
    #joystick-container {
        width: 100px;
        height: 100px;
    }
    #joystick-handle {
        width: 50px;
        height: 50px;
    }
    #mute-image {
        width: 30px;
    }
    .start-screen {
        width: 500px;    
        height: 300px;
    }
}

@media only screen and (max-height: 480px) {
    #canvas {
        height: 100vh;
    }
    body {
        margin: 0px;
    }
}

@media only screen and (max-height: 428px) {
    .action-buttons {
        bottom: 150px;
    }
}

@media only screen and (max-height: 390px) {
    .start-screen {
        width: 450px;    
        height: 250px;
    }
}