body {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    background-image: url('img/3. Background/Mesa de trabajo 1.png');
    background-position: center;
    background-size: cover;
    min-height: 100vh;
    margin: 0;
    font-family: 'LuckiestGuy', sans-serif;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999; 
}

.overlay-message {
    color: #fff;
    font-size: 32px;
}

.d-none {
    display: none !important;
}

header {
    position: absolute;
    top: 0;
}

h1 {
    font-size: 64px;
    background: linear-gradient(0deg, rgb(14, 11, 54) 0%, rgb(87, 155, 237) 100%);
    -webkit-background-clip: text;
    color: transparent;
}

h2 {
    font-size: 40px;
}

h3 {
    margin: 0;
    color: white;
}

canvas {
    background-color: black;
    border-radius: 24px;
    border: 1px solid white;
    box-shadow: 5px 5px 10px rgb(0 0 0);
    display: block;
}

.canvasFullscreen {
    height: 100vh;
    width: 100%;
}

.content {
    background-image: url('img/3. Background/Mesa de trabajo 1.png');
    background-position: center;
    background-size: cover;
    border-radius: 24px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 5px 5px 10px rgb(0 0 0);
    position: relative;
}

.menuButton {
    margin: 200px 92px;
    padding: 8px 0 0 0;
    height: 80px;
    width: 176px;
    border-radius: 24px;
    background-color: yellow;
    font-size: 20px;
    font-family: 'LuckiestGuy', sans-serif;
    cursor: pointer;
    word-wrap: break-word;
    border: none;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 1);
    transition: 0.2s;
}

.panelTop {
    position: absolute;
    top: 5px;
    right: 5px;
}

.panelBottom {
    display: none;
    justify-content: space-between;
    align-items: end;
    position: absolute;
    width: 100%;
    height: 85px;
    bottom: 0;
}

.arrowsBox {
    margin-left: 4px;
}

.arrowsTop {
    display: flex;
    justify-content: center;
}

.smallActionButton {
    font-family: 'LuckiestGuy', sans-serif;
    padding: 0;
    padding-block: 0;
    background-position: center;
    background-size: cover;
    height: 40px;
    width: 40px;
    border-radius: 20px;
    margin: 0;
    background-color: lightblue;
    cursor: pointer;
    border: none;
}

button:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

button:active {
    background-color: #1c6da8;
}

.pause {
    background-image: url('img/6.Botones/Buttons/pause.png');
}

.play {
    background-image: url('img/6.Botones/Buttons/buttonRight.png') !important;
}

.mute {
    background-image: url('img/6.Botones/Buttons/mute3.png') !important;
}

.volume {
    background-image: url('img/6.Botones/Buttons/volume1.png');
}

.homeButton {
    background-image: url('img/6.Botones/Buttons/home-button.png');
}

.fullScreen {
    background-image: url('img/6.Botones/Buttons/full-screen.png');
}

.buttonUp {
    background-image: url('img/6.Botones/Buttons/buttonUp.png');
}

.buttonDown {
    background-image: url('img/6.Botones/Buttons/buttonDown.png');
}

.buttonLeft {
    background-image: url('img/6.Botones/Buttons/buttonLeft.png');
}

.buttonRight {
    background-image: url('img/6.Botones/Buttons/buttonRight.png');
}

.buttonSpace {
    background-color: rgb(53, 145, 247);
    width: 160px;
    margin-bottom: 2px;
    margin-right: 80px;
}

.buttonD {
    background-color: rgb(53, 145, 247);
    margin-bottom: 2px;
    margin-right: 4px;
}

#gameoverOverlay {
    background-image: url('img/6.Botones/Tittles/Game Over/Recurso 12.png');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    height: 90px;
    width: 0%;
    position: absolute;
    transition: 0.5s;
}

#winningOverlay {
    background-image: url('img/6.Botones/Tittles/You win/Mesa de trabajo 1.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    height: 100%;
    width: 0%;
    border-radius: 24px;
    position: absolute;
    transition: 0.5s;
}

#tryAgain {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    border-radius: 24px;
    height: 0;
    z-index: -1;
    cursor: pointer;
    bottom: -144px;
}

#backToMenu {
    height: 0;
    margin: 0 !important;
    position: absolute;
    border-radius: 24px;
    bottom: 64px;
    z-index: -1;
    cursor: pointer;
}

.zoomEffectGameover {
    width: 100% !important;
}

.zoomEffectTryAgain {
    width: 30% !important;
    z-index: 0 !important;
    height: 53px !important;
}

.instructionContent {
    background-color: rgb(216 112 243 / 30%);
    width: 720px;
    height: 480px;
    border-radius: 20px;
    display: grid;
    justify-content: center;
    align-items: center;
}

.keyImage {
    background-size: contain;
    width: 240px;
    height: 50px;
    background-repeat: no-repeat;
}

.arrowKeyImage {
    background-image: url('img/6.Botones/Key/arrow keys.png');
}

.spaceKeyImage {
    background-image: url('img/6.Botones/Key/Space Bar key.png');
}

.dKeyImage {
    background-image: url('img/6.Botones/Key/D key.png');
}

.instructionRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
}

.instructionContent a {
    color: black;
    text-align: center;
    transition: transform 0.3s
}

.instructionContent a:hover {
    transform: scale(1.05);
}

/* responsive */

@media (max-height: 480px) {
    canvas {
        height: 100vh;
    }

    .content {
        height: 100vh;
    }

    .panelBottom {
        display: flex;
    }
    
    .instructionContent {
        height: 100vh;
    }
}

@media (max-width: 720px) {
    canvas {
        width: 100%;
    }

    .content {
        width: 100%;
    }

    .menuButton {
        margin: 200px 10px;
    }

    .instructionContent {
        width: 100%;
    }

    h2 {
        font-size: 32px;
    }

    .keyImage {
        height: 40px;
    }

    .instructionContent {
        padding: 50px;
    }
}

@media (max-width: 600px) {
    h2 {
        font-size: 24px;
    }

    .keyImage {
        height: 32px;
    }
}

@media (max-width: 400px) {
    .menuButton {
        height: 54px;
        width: 136px;
        font-size: 16px;
    }
}

@media (max-height: 550px) {
    .panelBottom {
        display: flex;
    }

    h2 {
        font-size: 24px;
    }

    .keyImage {
        height: 32px;
    }

    .instructionContent {
        padding: 0px 32px;
    }

    .instructionContent a {
        margin-top: -34px;
    }
}