#mobile-warning {
  display: none; /* Standardmäßig ausblenden */
}
@media (max-width: 768px) {
#mobile-warning {
  display: flex;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 2rem;
  font-weight: bold;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
}
body > *:not(#mobile-warning) {
  display: none !important; /* Alles andere ausblenden */
  }
}
@font-face {
  font-family: 'Fraunces V35 Latin 800italic';
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url('https://privat.kumhofer.at/fonts/font.php?file=fraunces/fraunces-v35-latin-800italic.woff2') format('woff2');
}
body {
  margin: 70px;
  background-color: #d8f3dc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 140px); /* wegen margin 70px oben + unten */
  /* overflow: visible oder kein overflow:hidden */
}
h1 {
  text-align: center;
  margin-bottom: 0;
  font-family: 'Fraunces V35 Latin 800italic';
  font-size: 2.2em;
}
#copyright {
  font-size: 0.9rem;
  color: #666666;
  /* Optional: Abstand zum unteren Rand vom Container */
  margin-bottom: 10px;
}
:root {
  --border-color: #38a3a5;
  --border-size: 1px;
  --border-wh: 100%;
  --cell-size: 20px;
}
button {
  background: #38a3a5;
  border: 2px solid #57cc99;
  color: #d8f3dc;
  padding: 5px;
  font-size: large;
}
input#size {
  border: 1px solid #57cc99;
  padding: 5px;
  background: #ffffff;
  color: #38a3a5;
}
label {
  color: #38a3a5;
}
.cell.start {
  background-color: green;
}

.cell.end {
  background-color: red;
}

.cell.player {
  background: radial-gradient(circle at center, black 0.25rem, transparent 0);
}

.cell.solution {
  background-color: #57cc99;
}

#controls {
  margin: 20px;
}

#maze-container {
  display: grid;
  gap: 0;
  margin-left: auto;
  margin-right: auto;
  
  max-width: 90vw;      /* max Breite 90% des Viewports */
  max-height: 80vh;     /* max Höhe 80% des Viewports */
  
  overflow-x: auto;     /* horizontale Scrollbar */
  overflow-y: auto;     /* vertikale Scrollbar */
  
  /* Optional: zentrieren des Grids */
  justify-content: center;
}

.cell {
  position: relative;
  width: var(--cell-size);
  height: var(--cell-size);
  background-color: white;
}

.cell::before,
.cell::after {
  content: "";
  position: absolute;
  background-color: var(--border-color);
  z-index: 1;
}

.cell.top::before {
  width: var(--border-wh);
  height: var(--border-size);
  /* top: -10px;
  left: -10px; */
  top: 0;
  left: 0;
}

.cell.right::after {
  width: var(--border-size);
  height: var(--border-wh);
  top: 0px;
  right: 0px;
}

span {
  font-size: xx-small;
}
span.right-hand::before {
  content: "";
  display: block;
  background: black;
  width: 50%;
  height: 2px;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(0%, -50%);
}
span.left-hand::before {
  content: "";
  display: block;
  background: black;
  width: 50%;
  height: 2px;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(0%, -50%);
}
span.bottom-hand::before {
  content: "";
  display: block;
  background: black;
  width: 2px;
  height: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0%);
}
span.top-hand::before {
  content: "";
  display: block;
  background: black;
  width: 2px;
  height: 50%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0%);
}

span.to-left::after {
  content: "";
  display: block;
  background: black;
  width: 50%;
  height: 2px;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(0%, -50%);
}
span.to-right::after {
  content: "";
  display: block;
  background: black;
  width: 50%;
  height: 2px;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(0%, -50%);
}
span.to-top::after {
  content: "";
  display: block;
  background: black;
  width: 2px;
  height: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0%);
}
span.to-bottom::after {
  content: "";
  display: block;
  background: black;
  width: 2px;
  height: 50%;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0%);
}

#controls2 {
  position: absolute;
  top: 50%;
  left: 100px;
  transform: translate(-50%, -50%);
}