body {
    height: 100dvh;
    min-height: 100dvh;
    background-image: url('../img/10_startscreen/first_half_background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100dvh - 220px);
}

.portrait__screen {
    position: fixed;
    inset: 0;
    background-image: url('../img/10_startscreen/Rotate.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    z-index: 50;
    height: 100dvh;
    width: 100dvw;
}

.portraitScreen__content {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

header {
    width: 100%;
    text-align: center;
    height: 120px;
}

footer {
    width: 100%;
    height: 100px;
}

button {
    cursor: pointer;
}

h1 {
    padding: 30px;
    font-size: 40px;
    color: rgb(227, 236, 236);
}

h2 {
    color: #A0220A;
    font-size: 32px;
    padding: 16px;
}

h3 {
    font-size: 24px;
    padding: 16px;
}

h4 {
    font-size: 20px;
    padding: 20px;
}

a {
    text-decoration: none;
    color: #A0220A;
}

.canvas__content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 720px;
    height: 480px;
    z-index: 0;
    transform-origin: center center;
    transform: translate(-50%, -50%);
    margin: 0 auto;
}

canvas,
.startscreen,
.endscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.startscreen {
    z-index: 1;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 15px;
    }
}

.start {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
    cursor: pointer;
}

.canvas__content:fullscreen {
    width: 100dvw;
    height: 100dvh;
}

.canvas__content:fullscreen canvas {
    width: 100%;
    height: 100%;
    border-radius: 0px;
}

canvas {
    background-color: black;
}

.ui__overlay {
    position: absolute;
    top: 10px;
    right: 10px;
}

.ui__button {
    background: none;
    border: none;
    padding: 0 4px;
    filter: opacity(60%);
}

.ui__button img {
    filter: invert(1);
}

.ui__button.active {
    filter: opacity(100%);
}

.game__buttons {
    filter: invert(1);
    padding: 0 8px;
}

.controls__overlay {
    position: absolute;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.left__overlay {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 120px;
    margin-left: 20px;
}

.right__overlay {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 120px;
    margin-right: 20px;
}

.controls__button {
    background: rgba(255, 255, 255, 0.7);
    filter: opacity(60%);
    border: none;
    border-radius: 10px;

}

.controls__button:hover {
    filter: opacity(100%);
}

.controls__image {
    width: 40px;
    height: 40px;
}

.buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    padding: 0 0 8px 0;
}

.button__dialog {
    width: 120px;
    font-size: 16px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.8);
    font-weight: bold;
    border: none;
    border-radius: 10px;
    border: 1px solid rgb(0, 104, 55);
    color: rgb(0, 104, 55);
}

.button__dialog:hover {
    background: rgba(0, 104, 55, 0.8);
    color: white;
}

dialog {
    overflow: auto;
    border: 1px solid #A0220A;
    background-image: url('../img/7_background/layers/air.png');
    background-position: center;
    background-size: cover;
    scrollbar-width: none;
    color: #A0220A;
}


dialog.out-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transform: translate(-50%, -50%);
}

dialog.in-canvas {
    z-index: 5;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 720px;
    height: 480px;
    transform-origin: center center;
    transform: translate(-50%, -50%);
    border-radius: 15px;
}

dialog:not(.in-canvas) {
    z-index: 9999;
}


.close__button {
    color: #A0220A;
    background: none;
    padding: 4px 8px 4px 8px;
    border: none;
    font-size: 24px;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: end;
    width: 100%;

}

.dialog__header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.instructions__content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
}

.imprint__content {
    padding: 16px 0;
}

.img__dialog {
    width: 48px;
    height: 48px;
}

.list__gamebuttons {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.list__images {
    display: flex;
}

li {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px;
}

p {
    padding: 8px 20px;
    line-height: 1.5;
}

.endscreen {
    background-image: url('../img/7_background/layers/air.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.endscreen__image {
    max-width: 100%;
    max-height: 80%;
    width: auto;
    height: auto;
}

.endscreen__buttons {
    display: flex;
    justify-content: space-between;
    padding: 24px 0 0 0;
    width: 60px;
}

.restart__button {
    background: none;
    border: none;

}

.home__button {
    background: none;
    border: none;
}

.restart__button img {
    filter: invert(0.5) sepia(1) saturate(200%) hue-rotate(150deg);
    width: 20px;
    height: 20px;
}

.home__button img {
    filter: invert(0.5) sepia(1) saturate(200%) hue-rotate(150deg);
    width: 24px;
    height: 24px;
}

.d-none {
    display: none;
}

.rotate__overlay {
    position: fixed;
    top: 0;
    left: 0;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    color: white;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
    padding: 20px;
}

.rotate__overlay p {
    font-family: 'Sancreek';
    line-height: 1.5;
}


.rotate__overlay.d-none {
    display: none;
}

@media (hover: hover) {
    .ui__button:hover {
        filter: opacity(100%);
    }
}

@media (max-width: 768px) {

    header,
    footer {
        display: none;
    }

    .endscreen__buttons {
        padding: 0;
    }
}

@media (max-width: 500px) {
    li {
        gap: 8px;
        padding: 8px 0;
    }

    .game__buttons {
        width: 20px;
        height: 20px;
    }

    .img__dialog {
        height: 40px;
        width: 40px;
    }
}