@media (max-width: 1366px) {
    .game-wrapper {
        width: calc(100% - 20px);
        max-width: none;
    }
}

@media (max-width: 1366px) and (hover: hover) {
    canvas {
        width: calc(100% - 0px) !important;
        height: auto !important;
    }
}

@media (max-width: 1024px) and (orientation: portrait) {
    .rotate-overlay {
        display: flex;
    }
}

/* Fullscreen View */

@media (max-width: 850px) {
    .beige-background {
        width: 85% !important;
    }

    .content-start h1,
    .content-winner h1,
    .content-game-over h1 {
        font-size: 28px;
    }

    .content-start p,
    .content-winner p,
    .content-game-over p {
        width: 225px;
        font-size: 15px;
    }

    .content-start span,
    .content-winner span,
    .content-game-over span {
        font-size: 15px;
    }

    .winner-button-area {
        gap: 12px;
    }

    .button,
    .button-game-information {
        margin-bottom: 8px;
    }

    .button img,
    .button-game-information img {
        width: 65px;
        height: auto;
        border-radius: 5px;
    }

    .beige-background-game-information {
        height: 165px !important;
        width: 565px !important;
    }

    .content-game-information {
        width: 570px;
        gap: 15px;
    }

    .left-area {
        width: 250px;
        margin-top: 27px;
    }

    .viking-icon-game-information {
        width: 50px;
        margin-top: -2px;
    }

    .content-game-information h2 {
        font-size: 20px;
    }

    .content-game-information p {
        font-size: 15px;
    }

    .button-game-information span {
        font-size: 15px;
    }

    table {
        width: 230px;
        margin-top: 18px;
    }

    td,
    th {
        font-size: 15px;
    }

    td:first-child {
        padding-right: 10px;
    }

    .link-area {
        width: 25%;
    }
}

@media (max-width: 650px) {
    .link-area {
        width: 32%;
    }

    table {
        display: none;
    }

    .beige-background-game-information {
        display: none !important;
    }

    .beige-background-game-information-small {
        display: block !important;
        height: 160px !important;
        width: 305px !important;
    }
}

@media (max-width: 550px) {
    .beige-background {
        width: 70% !important;
    }

    .content-start h1,
    .content-winner h1,
    .content-game-over h1 {
        font-size: 24px;
    }

    .content-start p,
    .content-winner p,
    .content-game-over p {
        width: 210px;
        font-size: 14px;
    }

    .content-start span,
    .content-winner span,
    .content-game-over span {
        font-size: 14px;
    }

    .winner-button-area {
        gap: 10px;
    }

    .button {
        margin-bottom: 8px;
    }

    .button img {
        width: 60px;
        height: auto;
        border-radius: 5px;
    }

    .link-area {
        width: 37%;
    }

    .link span {
        font-size: 16px;
    }

    dialog {
        width: 75%;
        padding: 30px 20px 30px 20px; 
    }

    .imprint-headline {
        font-size: 20px;
        margin-top: 0;
        margin-bottom: 20px;
    }

    .imprint-text {
        font-size: 16px;
    }
}

@media (max-width: 470px) {
    .button-area {
        padding: 8px 16px;
    }

    .link-area {
        width: 40%;     
    }

    .link-area img{
        width: 135%;     
    }

    .link span {
        font-size: 12px;
    }

    .beige-background {
        width: 50% !important;
    }

    .content-start h1,
    .content-winner h1,
    .content-game-over h1 {
        font-size: 18px;
        margin-top: 4px;
    }

    .content-start p,
    .content-winner p,
    .content-game-over p {
        width: 130px;
        font-size: 10px;
    }

    .content-start span,
    .content-winner span,
    .content-game-over span {
        font-size: 10px;
    }

    .winner-button-area {
        gap: 8px;
    }

    .button,
    .button-game-information {
        margin-bottom: 0px;
    }

    .button img,
    .button-game-information img {
        width: 40px;
        height: auto;
        border-radius: 3px;
    }

    .beige-background-game-information-small {
        height: 108px !important;
        width: 210px !important;
    }

    .left-area {
        width: 180px;
        margin-top: 20px;
        gap: 10px;
    }

    .viking-icon-game-information {
        width: 38px;
        margin-top: -2px;
    }

    .content-game-information h2 {
        font-size: 18px;
    }

    .content-game-information p {
        font-size: 10px;
    }

    .button-game-information span {
        font-size: 10px;
    }

    .imprint-headline {
        font-size: 18px;
        margin-top: 0;
        margin-bottom: 16px;
    }

    .imprint-text {
        font-size: 14px;
    }
}

/* Touch Devices */

.mobile-button-area {
    display: none !important;
}

@media (hover: none) and (pointer: coarse) {
    .mobile-button-area {
        display: flex !important;
    }

    body {
        overflow: hidden;
        min-height: 100svh;
    }

    .game-wrapper {
        width: auto !important;
        max-width: 100vw !important;
        height: 100svh !important;
        aspect-ratio: 16 / 9 !important;
        position: relative;
    }

    .startscreen {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: unset !important;
    }

    .canvas-wrapper,
    canvas {
        width: 100% !important;
        height: auto !important;
    }
}