/*
 * Cymbergaj — nadpisania nad wspólnym assets/css/game.css
 *
 * Boisko jest pionowe (68 × 100 cm modelu, 408 × 600 jednostek kanwy), więc
 * wspólna reguła `canvas` zakładająca kwadrat musi zostać nadpisana. Logika
 * liczy w CENTYMETRACH; przeliczenie na piksele robi wyłącznie `rysuj()`.
 */

body {
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

* { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }

/* .ekran to sekcja strony (ustawienia albo mecz); .ekran-plansza obejmuje samą
   kanwę i jest kotwicą dla nakładki. */
.ekran {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ekran-plansza { position: relative; }

.karta {
  width: 100%;
  max-width: 432px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.karta__tytul {
  margin: 0;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.parametry {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: .88rem;
}

.parametry dt {
  color: var(--muted);
  white-space: nowrap;
}

.parametry dd { margin: 0; }

.btn[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #0b0f1a;
  border-color: transparent;
}

@media (max-width: 420px) {
  .parametry { grid-template-columns: 1fr; gap: 2px; }
  .parametry dt { margin-top: 6px; }
}

canvas {
  display: block;
  width: 100%;
  max-width: 432px;
  aspect-ratio: 432 / 624;
  height: auto;
  background: #14301c;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  /* `none`, nie `manipulation`: celowanie to ciągnięcie palcem po planszy,
     więc przewijanie strony w trakcie gestu musi być zablokowane. */
  touch-action: none;
  outline: none;
  cursor: pointer;
}

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

.status--ty { color: #93c5fd; }
.status--on { color: #fca5a5; }
.status--info { color: var(--muted); }
.status--gol { color: #4ade80; }
.status--faul { color: #fbbf24; }

/* barwy boksów idą od drużyny, nie od położenia — tak jak w warcabach */
.stat--g1 { border-color: rgba(96, 165, 250, .5); }
.stat--g2 { border-color: rgba(217, 83, 79, .5); }
.stat--g1 .stat__label { color: #93c5fd; }
.stat--g2 .stat__label { color: #fca5a5; }

.stat.jest-tura.stat--g1 { box-shadow: 0 0 0 1px #60a5fa inset; border-color: #60a5fa; }
.stat.jest-tura.stat--g2 { box-shadow: 0 0 0 1px #d9534f inset; border-color: #d9534f; }

.przyciski {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.overlay { border-radius: 16px; }

.overlay .przyciski { margin-top: 4px; }

@media (max-width: 480px) {
  .hint { font-size: .84rem; }
}

/* ================= tryb na dwa urządzenia ================= */

.wznow {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.wznow__tekst { margin: 0; font-size: .9rem; }

.kod {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-align: center;
  color: #e8ecf6;
}

.kod-input {
  width: 100%;
  max-width: 260px;
  padding: 10px 12px;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
  color: #e8ecf6;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (max-width: 420px) {
  .kod { font-size: 1.8rem; }
}
