html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

/* Body zentriert den gesamten Game-Container */
body {
    background: #222;
    color: #eee;
    font-family: system-ui, sans-serif;

    display: flex;
    justify-content: center;   /* Horizontal */
    align-items: center;       /* Vertikal */

    margin: 0;
    padding: 0;
    height: 100vh;
}

/* Der Hauptcontainer des Spiels */
#gameContainer {
    position: relative;

    /* Basis-Größe – passt sich an den Viewport an */
    width: 100vw;
    height: 100vh;

    /* Mindestgrößen – Spiel muss bedienbar bleiben */
    min-width: 600px;
    min-height: 400px;

    /* maximale Skalierung – verhindert extremes in-die-Breite-Ziehen */
    max-width: 1200px;
    max-height: 900px;

    background: #333;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.7);
    overflow: hidden;
}

/* Canvas passt sich vollständig dem Container an */
canvas {
    background: #111;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
}

/* Deko oben links */
.decoration {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 64px;
    opacity: 0.5;
    pointer-events: none;
}

/* Start-Overlay */
.overlay {
    position: absolute;
    inset: 0;

    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 10;
}

/* Startmenü-Panel */
.panel {
    background: #222;
    padding: 20px 24px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    text-align: center;
}

.panel.wide {
    width: 460px;
    max-width: 90vw;
}

/* Difficulty-Options */
.options {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
}

.options label {
    cursor: pointer;
}

/* Einstellungsraster */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 18px;
    text-align: left;
}

.settings-grid label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;

    font-size: 13px;
    height: 24px;
    line-height: 24px;
    cursor: pointer;
}

.settings-grid label span:first-child {
    flex: 1;
}

.settings-grid input[type="number"] {
    width: 100px;
    height: 24px;
    line-height: 24px;
    box-sizing: border-box;
}

/* Checkbox-Reihe */
.checkbox-row {
    align-items: center;
}

/* Startbutton */
#startButton {
    padding: 0 20px;
    font-size: 15px;

    background: #4caf50;
    border: none;
    border-radius: 4px;

    cursor: pointer;
    color: #fff;

    height: 32px;
    line-height: 32px;
}

#startButton:hover {
    background: #66bb6a;
}



#info {
    top: 12px;
}

#status {
    bottom: 12px;
    text-align: right;
}


/* Hinweis- und Status-Container aktuell nicht sichtbar,
   da Hinweise und Statistiken im Canvas gerendert werden */
#info,
#status {
    display: none;
}

