/* Grundlayout */
/*html, body {
    height: 101vh;
    overflow-x: hidden;
    overflow-y: auto;
}*/
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    background: #000;
    font-family: Arial, sans-serif;
    color: #1B436D;
    display: flex;
    justify-content: center;
}

/* Wrapper für Canvas + Legenden */
.layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    max-width: 1600px;
    padding: 0 20px;
}

/* Canvas-Container */
.canvas-container {
    flex: 1;
    max-width: 1280px;
    aspect-ratio: 16 / 9;
    position: relative;

    /* aus deiner externen CSS-Version */
    margin-top: 6.5%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas selbst */
canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
  	touch-action: none;

    /* dein zusätzlicher Hintergrund */
    background-color: rgba(0, 0, 0, 0.8);
}

/* Legendentexte teilen sich viel Styling */
.legende,
.legend {
    position: absolute;
    top: 37%;
    height: auto;
    width: 13%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
    padding-left: 10px;
    text-align: start;

    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Linke Legende (deutsch) */
.legende {
    left: 1.5%;
}

/* Rechte Legende (englisch) */
.legend {
    left: 85%;
}

table {
    width: 100%;
    color: #1B436D;
}

h1 {
    margin: 0 0 10px 0;
    padding: 0;
}

/* Start-Overlay */
.tap-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: black;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    z-index: 2147483647; /* maximaler z-index */
    pointer-events: auto;
    cursor: pointer;
    transform: translateZ(0); /* wichtig für Firefox */
    isolation: isolate;       /* wichtig für Firefox */
}

/* Responsive Anpassungen */
@media (max-width: 1100px) {
    .layout {
        flex-direction: column;
        align-items: center;
    }

    .legende,
    .legend {
        position: static;
        width: 90%;
        max-width: 500px;
        margin-bottom: 10px;
        box-shadow: none;
    }
}

@media (max-width: 900px) {
    .legende,
    .legend {
        display: none;
    }

    .layout {
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: none;
    }

    .canvas-container {
        width: 100vw;
        height: 100vh;
        max-width: none;
        aspect-ratio: unset;
        position: relative;
        margin-top: 0;
    }

    canvas {
        width: 100vw;
        height: 100vh;
    }
}
/* Nur iPhone / iPad Safari */
@supports (-webkit-touch-callout: none) {
    html, body {
        height: 101vh;
        overflow-x: hidden;
        overflow-y: auto;
    }
}
