@font-face {
    font-family: "Press Start 2P";
    src: url("PressStart2P-Regular.ttf") format("truetype");
    font-display: block;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
    background: #000;           /* vollflächig schwarz */
    overscroll-behavior: none;
    touch-action: none;
}

/* ------------------------------------------------------------ Spielfläche */
#layout {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

#gameContainer {
    position: relative;
    container-type: size;       /* Schriftgröße im Ladekreis relativ zur Spielfläche */
    background: #000 url("LoadingBackground.png") center / contain no-repeat;
    image-rendering: pixelated;
}

#gameContainer.loaded {
    background-image: none;
}

#gameContainer canvas {
    position: absolute;
    inset: 0;
    display: block;
}

#gameContainer canvas[data-pixel-art="true"] {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
}

/* Ladekreis: mittig zwischen den beiden Logos des Lade-Hintergrunds */
#loadingContainer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* Prozentanzeige mittig im Ladekreis */
#loaderCircle {
    position: relative;
    width: 26%;
}

#roundProgressBar {
    display: block;
    width: 100%;
    image-rendering: pixelated;
}

#loadingText {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 0.15em;       /* optischer Ausgleich für das %-Zeichen */
    color: #6b6868;
    font-family: "Press Start 2P", monospace;
    font-size: 2vh;             /* Fallback */
    font-size: 4cqw;
    line-height: 1;
}

/* ------------------------------------------------------------ Hinweise (Desktop / Querformat) */
.notice {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10;
    background: #0d0d0d;
    justify-content: center;
    align-items: center;
    padding: 0 8vw;
}

.notice p {
    max-width: 60rem;
    margin: 0;
    color: #6b6868;
    font-family: "Press Start 2P", monospace;
    font-size: clamp(16px, 2.2vw, 50px);
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
}

/* Desktop: nur der Hinweis, das Spiel wird nicht geladen */
.is-desktop #desktopNotice {
    display: flex;
}

.is-desktop #layout {
    display: none;
}

/* Mobil im Querformat: Dreh-Hinweis über dem Spiel */
@media (orientation: landscape) {
    .is-mobile #rotateNotice {
        display: flex;
    }

    .is-mobile #rotateNotice p {
        font-size: clamp(12px, 3.2vh, 28px);
    }
}

/* ------------------------------------------------------------ nicht markierbar */
.unselectable,
.unselectable img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
