*:not(dialog) {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    border: unset;
}

a {
    text-decoration: none;
    color: black;
}

img {
    max-width: 100%;
    height: auto;
}

.d_none {
    display: none;
}

@font-face {
    font-family: 'Kablammo';
    src: url(./assets/fonts/kablammo.ttf);
}

@font-face {
    font-family: 'Boogaloo';
    src: url(./assets/fonts/Boogaloo.ttf);
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    background-image: url(./assets/img/body-background.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-family: 'Kablammo', Arial, Helvetica, sans-serif;
}

h1 {
    text-align: center;
    font-family: 'Kablammo', Arial, Helvetica, sans-serif;
    font-size: 3rem;
    letter-spacing: 3px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

p {
    font-family: 'Boogaloo', Arial, Helvetica, sans-serif;
}

.canvas-container {
    position: relative;
}

.mute-btn {
    position: absolute;
    top: 20px;
    right: 5px;
    z-index: 9000;
    background: transparent;
    cursor: pointer;
}

.mute-btn img {
    width: 48px;
}

canvas {
    display: block;
    width: 720px;
    height: 480px;
    background-color: black;
}

#player,
#air,
#clouds,
#layer_three,
#layer_two,
#layer_one,
#regular_chicken,
#small_chicken,
#salsa_statusbar,
#health_statusbar,
#coin_statusbar,
#salsa_bottle_ground,
#salsa_bottle_air,
#bottle_spritesheet,
#coin,
#boss,
#boss_statusbar {
    display: none;
}

.start-menu {
    width: 720px;
    height: 480px;
    background-image: url(./assets/img/startscreen/startscreen_2.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.btn-container {
    position: absolute;
    left: 0;
    right: 0;
    top: 24px;
    margin-inline: auto;
    /* margin-top: 24px; */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.start-menu button,
.impressum {
    background-color: rgb(255, 191, 0);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 10px 15px;
    font-weight: 700;
    font-size: 24px;
    font-family: 'Kablammo', Arial, Helvetica, sans-serif;
    cursor: pointer;
    transition: transform 100ms ease-in-out, background-color 100ms ease-in-out;
}

.start-menu button:hover,
.impressum:hover {
    transform: scale(1.1);
    background-color: hsl(45, 100%, 60%);
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.25);
}

body:has(dialog[open]) {
    overflow: hidden;
}

dialog {
    padding: 0;
    outline: none;
    width: 720px;
    border: none;
    border-radius: 15px;
    background-color: #dba801;
    box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.16);
    scrollbar-width: none;
}

dialog .wrapper {
    padding-inline: 15px;
    padding-block: 10px
}

.dialog-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dialog-header h2 {
    text-align: center;
    flex: 1;
    font-size: 2rem;
}

.dialog-header button {
    cursor: pointer;
    background-color: #dba801;
}

.dialog-header img {
    width: 32px;
}

.control-keys-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 50px;
    align-items: center;
    flex-wrap: wrap;
}

.control-keys {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.control-keys p {
    font-size: 1.5rem;
}

.control-img {
    width: 60px;
}

.game-explanation-container {
    margin-top: 50px;
}

.game-explanation-container h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.game-explanation-container p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.end-screen {
    width: 720px;
    height: 480px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    background-color: black;
}

.win {
    background-image: url(./assets/img/win_loose/You\ Won\ B.png);
}

.loose {
    background-image: url(./assets/img/win_loose/Game\ Over.png);
}

.end-screen-container {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.end-screen button {
    background-color: rgb(255, 191, 0);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 10px 15px;
    font-weight: 700;
    font-size: 24px;
    font-family: 'Kablammo', Arial, Helvetica, sans-serif;
    cursor: pointer;
    transition: transform 100ms ease-in-out, background-color 100ms ease-in-out;
}

.end-screen button:hover {
    transform: scale(1.1);
    background-color: hsl(45, 100%, 60%);
}

.device-orientation {
    background-color: #dba801;
    padding-inline: 15px;
    padding-block: 10px;
    border-radius: 15px;
    width: 720px;
    height: 480px;
}

.device-orientation-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.device-orientation h2 {
    font-size: 48px;
}

.device-orientation img {
    width: 120px;
    margin-top: 24px;
}

.device-orientation p {
    margin-top: 24px;
    font-size: 24px;
}

.mobile-control-keys {
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-inline: 32px;
}

.mobile-btn-space {
    display: flex;
    align-items: center;
    gap: 40px;
}

.mobile-control-keys button {
    background-color: transparent;
    cursor: pointer;
    border: none;
}

.move-left-btn, .move-right-btn, .move-up-btn, .throw-bottle-btn {
    width: 48px;
}

.throw-btn { 
   margin-left: auto;
}

.tabasco-icon-link {
    position: absolute;
    bottom: 0;
    text-align: center;
    left: 0;
    right: 0;
}

@media only screen and (max-width: 720px) {
    canvas, .start-menu, dialog, .device-orientation, .end-screen {
        width: 100%;
    }

    h1 {
        display: none;
    }
}

@media (max-width: 540px) {

    .start-menu button,
    .start-menu a {
        padding: 10px 15px;
        font-size: 20px;
    }
}

@media (max-width: 465px) {
    .start-menu button,
    .start-menu a {
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .start-menu button,
    .start-menu a {
        padding: 5px 5px;
    }
    .btn-container {
        gap: 8px;
    }
    .end-screen button {
        font-size: 20px;
        padding: 10px 10px;
    }
}

@media only screen and (max-height: 480px) {
    canvas, .start-menu, dialog, .device-orientation, .end-screen {
        height: 100dvh;
    }
}

@media only screen and (max-height: 550px) {
    h1 {
        display: none;
    }
}