/* Piłkarzyki — style specyficzne dla gry */

.stage--pilkarzyki { width: min(760px, 100%); }

.ekran {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ekran[hidden] { display: none; }

.ekran__tytul {
  margin: 6px 0 0;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}

/* --- wybór trybu --- */

.tryby {
  display: grid;
  gap: 12px;
  width: min(440px, 100%);
}

.tryb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s;
}

.tryb:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, .55);
  background: var(--surface-hi);
}

.tryb:disabled { opacity: .45; cursor: not-allowed; }
.tryb__nazwa { font-weight: 700; font-size: 1.05rem; }
.tryb__opis { color: var(--muted); font-size: .9rem; }

.etykieta { align-self: center; color: var(--muted); font-size: .9rem; }

.uwaga {
  max-width: 52ch;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.55;
}

/* --- tablica wyników --- */

.tablica {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tablica__gracz {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .2s, background .2s;
}

/* obwódka pokazuje, czyja jest tura — bez czytania statusu */
.tablica__gracz.jest-tura { border-color: currentColor; background: var(--surface-hi); }
.tablica__gracz--ty { color: #6d9bff; }
.tablica__gracz--on { color: #ff7b6b; }

.tablica__kto {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tablica__gole {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.tablica__kreska { font-size: 1.5rem; color: var(--muted); }

.status {
  margin: 0;
  min-height: 1.5em;
  font-weight: 600;
  text-align: center;
}

.status--ty { color: #6d9bff; }
.status--on { color: #ff7b6b; }

/* --- boisko --- */

.boisko-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}

/*
 * Wspólny arkusz narzuca canvasowi kwadrat i szerokość 100% — tu rozmiar wynika
 * z atrybutów width/height, które zmieniają się przy obrocie boiska, więc oba
 * te założenia trzeba wyłączyć.
 */
#boisko {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62vh;
  aspect-ratio: auto;
  background: #fdfbf3;                 /* ciepła biel kartki */
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  cursor: pointer;
  touch-action: manipulation;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  text-align: center;
  padding: 22px;
  background: rgba(11, 15, 26, .84);
  backdrop-filter: blur(4px);
  border-radius: 10px;
}

.overlay[hidden] { display: none; }

.overlay__title {
  margin: 0;
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.overlay__text { margin: 0; color: var(--muted); max-width: 34ch; }

@media (orientation: landscape) and (max-height: 560px) {
  body > .game-bar { padding: 6px 14px; }
  body > .game-bar h1 { font-size: .95rem; }
  .stage { padding-bottom: 8px; }
  .ekran { gap: 8px; }
  .tablica__gole { font-size: 1.4rem; }
  .tablica__gracz { padding: 4px 12px; min-width: 78px; }
  #boisko { max-height: 74vh; }
  .hint { display: none; }
}
