body {
    height: 100vh;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    background-image: url(./img/background.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Dimbo', Arial, Helvetica, sans-serif;
}

@font-face {
    font-family: 'Dimbo';
    src: url('./fonts/Dimbo\ Regular.ttf') format('truetype');
}

#content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

#top {
    height: 64px;
    font-size: 32px;
    letter-spacing: 4px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

#top h1 {
    margin: 0;
}

#bottom {
    height: 64px;
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#settings_button {
    font-family: 'Dimbo', Arial, Helvetica, sans-serif;
    font-size: 32px;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    transition: all ease-in-out 125ms;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

#settings_button:hover {
    scale: 0.95;
    cursor: pointer;
    border: 3px solid black;
}

#start_button {
    font-family: 'Dimbo', Arial, Helvetica, sans-serif;
    font-size: 40px;
    background: radial-gradient(circle, rgba(255,160,0,1) 0%, rgba(255,222,1,1) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    transition: all ease-in-out 125ms;
    border: 3px solid white;
}

#start_button:hover {
    scale: 0.95;
    cursor: pointer;
    animation: tilt-n-move-shaking 0.25s infinite;
}

#restart_button {
    font-family: 'Dimbo', Arial, Helvetica, sans-serif;
    font-size: 40px;
    background: radial-gradient(circle, rgba(255,160,0,1) 0%, rgba(255,222,1,1) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    transition: all ease-in-out 125ms;
    border: 3px solid white;
    display: none;
}

#restart_button:hover {
    scale: 0.95;
    cursor: pointer;
    animation: tilt-n-move-shaking 0.25s infinite;
}


@keyframes tilt-n-move-shaking {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(5px, 5px) rotate(5deg); }
    50% { transform: translate(0, 0) rotate(0eg); }
    75% { transform: translate(-5px, 5px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

#bottom img {
    height: 24px;
}

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

#dialog_bg {
    height: 100vh;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 3;
    display: none;
}

#dialog {
    box-sizing: border-box;
    width: 880px;
    height: 560px;
    background: transparent;
    background-image: url(./img/old_paper.png);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    padding: 32px 160px;
    font-size: 32px;
    display: none;
    flex-direction: column;
    justify-content: center;
}

.dialog_top {
    display: flex;
    justify-content: space-between;
    padding: 16px 0px;
}

.dialog_top div {
    display: flex;
    align-items: center;
    gap: 32px;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    outline: none;
    background-image: url('./img/checkbox.png');
    background-size: 32px 32px;
}

input[type="checkbox"]:checked {
    background-image: url('./img/checkbox_checked.png'); /* Bild für die markierte Checkbox */
}

.partingLine {
    height: 2px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.1);
}

.dialog_center {
    padding: 16px 0px;
}

.dialog_center table {
    width: 100%;
    border-collapse: collapse;
}

.dialog_center th {
    font-weight: unset;
    text-align: left;
    padding-bottom: 16px;
}

.dialog_center td {
    width: 50%;
    height: 48px;
    text-align: center;
}

.dialog_center tr:nth-child(even){
    background-color: rgba(0, 0, 0, 0.1);
}

.dialog_bottom {
    display: flex;
    justify-content: space-between;
    padding: 16px 0px;
}

.dialog_bottom span:hover {
    cursor: pointer;
    text-decoration: underline;
}

#dialog_privacy_policy {
    box-sizing: border-box;
    width: 880px;
    height: 560px;
    background: transparent;
    background-image: url(./img/old_paper.png);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    padding: 32px 160px;
    font-size: 32px;
    display: none;
    flex-direction: column;
    justify-content: center;
}

.privacy_policy {
    padding: 16px 0px;
    margin-top: -48px;
}

.privacy_policy h4 {
    margin: 0;
    font-weight: unset;
    font-size: 32px;
    padding-bottom: 16px;
}

.privacy_policy h5 {
    margin: 0;
    font-weight: unset;
    font-size: 24px;
    padding-bottom: 4px;
}

.privacy_policy p {
    margin: 0;
    font-size: 18px;
    padding-bottom: 8px;
}

#dialog_legal_notice {
    box-sizing: border-box;
    width: 880px;
    height: 560px;
    background: transparent;
    background-image: url(./img/old_paper.png);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    padding: 32px 160px;
    font-size: 32px;
    display: none;
    flex-direction: column;
    justify-content: center;
}

.legal_notice {
    padding: 16px 0px;
    margin-top: -48px;
}

.legal_notice h4 {
    margin: 0;
    font-weight: unset;
    font-size: 32px;
    padding-bottom: 16px;
}

.legal_notice h5 {
    margin: 0;
    font-weight: unset;
    font-size: 24px;
    padding-bottom: 4px;
}

.legal_notice p {
    margin: 0;
    font-size: 18px;
    padding-bottom: 8px;
}

.partingLine2 {
    height: 2px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.left_arrow_dialog {
    height: 32px;
    margin-left: -64px;
    padding: 8px;
    border-radius: 50%;
}

.left_arrow_dialog:hover {
    background-color: rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

#rotate_screen {
    background-color: black;
    color: white;
    font-size: 32px;
    width: 100%;
    height: 100vh;
    position: absolute;
    z-index: 7;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

#mobile_buttons {
    box-sizing: border-box;
    height: 100vh;
    width: 100vw;
    position: absolute;
    padding: 32px;
    display: none;
    justify-content: space-between;
    align-items: flex-end;
}

#mobile_buttons img {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    height: 64px;
    transition: all ease-in-out 125ms;
    position: relative;
    z-index: 2;
}

#mobile_buttons img:hover {
    scale: 0.88;
    cursor: pointer;
    border: 4px solid white;
}

#mobile_buttons_left {
    display: flex;
    gap: 16px;
}

#mobile_buttons_right {
    display: flex;
    gap: 16px;
}

#start_screen {
    width: 720px;
    height: 480px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: url(./img/9_intro_outro_screens/start/startscreen_1.png);
    background-size: cover;
    background-position: center;
}

#lose_screen {
    width: 720px;
    height: 480px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: url(./img/9_intro_outro_screens/game_over/you\ lost.png);
    background-size: cover;
    background-position: center;
    display: none;
}

#win_screen {
    width: 720px;
    height: 480px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 160px;
    color: white;
}


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

    #top {
        display: none;
    }

    #bottom {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 6;
    }

    #settings_button {
        display: none;
    }

    #rotate_screen {
        display: flex;
    }

    #mobile_buttons {
        display: flex;
    }

    #start_screen, #lose_screen, #win_screen {
        width: 100vw;
    }
}


@media(max-height: 480px) {
    canvas, #start_screen, #lose_screen, #win_screen {
        height: 100vh;
    }
}


@media screen and (orientation:landscape) and (max-width: 932px) { 
    #rotate_screen {
        display: none;
    }

    #mobile_buttons {
        display: flex;
    }

    #top {
        display: none;
    }

    #bottom {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 6;
    }

    #settings_button {
        display: none;
    }
}

