.screen {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-family: var(--agc-font-family);
  text-align: center;
}

.screenVisible {
  display: flex;
}

/* Nad .screen (MENU je při zobrazení grafiky pořád vykreslené vespod), blokuje klik skrz. */
.intro {
  z-index: 25;
  pointer-events: auto;
}

.introImage {
  max-width: 80%;
  max-height: 80%;
}

/* MENU je jediná obrazovka s pozadím na celou plochu (.menuBackground) — overflow:hidden,
   aby object-fit:cover obrázek nepřetekl přes hranice .screen. */
.menuScreen {
  overflow: hidden;
}

.menuBackground {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.gameOverImage {
  max-width: 220px;
  max-height: 220px;
  margin: 0 auto 20px;
}

.gameCompleteImage {
  max-width: 220px;
  max-height: 220px;
  margin: 0 auto 20px;
}

.screenContent {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: fit-content;
  margin: 0 auto;
}

.screenContent h2 {
  margin-bottom: 20px;
  font-family: var(--agc-font-family);
}

.screenContent p {
  margin-bottom: 20px;
  font-size: 14px;
  font-family: var(--agc-font-family);
}

.screenContent button {
  width: 100%;
  padding: 14px 28px;
  font-size: 16px;
  background: #1976d2;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02857em;
  font-family: var(--agc-font-family);
  font-weight: 500;
  border: none;
  border-radius: 4px;
  box-shadow:
    0px 3px 1px -2px rgba(0, 0, 0, 0.2),
    0px 2px 2px 0px rgba(0, 0, 0, 0.14),
    0px 1px 5px 0px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s, box-shadow 0.2s;
}

.screenContent button:hover,
.screenContent button:focus-visible {
  background: #1565c0;
  box-shadow:
    0px 2px 4px -1px rgba(0, 0, 0, 0.2),
    0px 4px 5px 0px rgba(0, 0, 0, 0.14),
    0px 1px 10px 0px rgba(0, 0, 0, 0.12);
}

.screenContent button + button {
  margin-top: 12px;
}

.hiddenButton {
  display: none;
}
