/* Czcionka z grafik transmisji. Plik jest częścią strony, żeby widzowie widzieli to samo co prowadzący. */
@font-face {
  font-family: "Republic Gothic";
  src: url("czcionki/republic-gothic.ttf") format("truetype");
  font-display: swap;
}
:root {
  --naglowek: "Republic Gothic", "Segoe UI", system-ui, sans-serif;
  --bg: #0e0f14;
  --panel: #191b24;
  --panel2: #22242f;
  --line: #2c2f3d;
  --text: #f2efe6;
  --muted: #9a9cab;
  --gold: #f2b632;
  --hit: #1f7a45;
  --hit-line: #42d07f;
  --miss: #5a1f25;
  --miss-line: #c2515c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at top, #1d1a10 0%, var(--bg) 60%) fixed;
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}
.strona { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
header.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
h1 { margin: 0; font-family: var(--naglowek); font-weight: 400; font-size: clamp(26px, 4.4vw, 48px); letter-spacing: .03em; text-transform: uppercase; line-height: 1.05; }
h1 span, .zloty { color: var(--gold); }
h2 { margin: 0; font-family: var(--naglowek); font-weight: 400; font-size: 22px; letter-spacing: .03em; }
.cichy { color: var(--muted); }
.licznik { color: var(--muted); font-variant-numeric: tabular-nums; }
.licznik b { color: var(--text); }
a { color: var(--gold); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.rzad { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
label { color: var(--muted); font-size: 14px; }
input[type=text], input[type=number] {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font: inherit; min-width: 0;
}
input:focus-visible, button:focus-visible, .cell:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 16px; font: inherit; cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--muted); }
button:disabled { opacity: .5; cursor: default; }
button.glowny { background: var(--gold); border-color: var(--gold); color: #1a1403; font-weight: 700; }
button.maly { padding: 5px 10px; font-size: 13px; color: var(--muted); }
.komunikat { min-height: 1.4em; }
.komunikat.ok { color: var(--hit-line); }
.komunikat.blad { color: #ff8f99; }

/* Plansza 5×5 */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.cell {
  background: var(--panel); border: 2px solid var(--line); border-radius: 10px;
  padding: 10px 8px; min-height: 118px; cursor: pointer; user-select: none;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  gap: 6px; position: relative; overflow: hidden; color: inherit; font: inherit;
  transition: background .15s, border-color .15s, opacity .15s;
}
.cell:hover { border-color: var(--muted); }
.tylko-odczyt .cell { cursor: default; }
.tylko-odczyt .cell:hover { border-color: var(--line); }
.cat { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; line-height: 1.15; }
.pick { font-size: 17px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.cell.pusta .pick { color: var(--muted); font-weight: 400; font-size: 14px; }
.cell.center { border-color: var(--gold); background: linear-gradient(160deg, #3a2c0a, #1f1a0e); }
.cell.center .cat { color: var(--gold); }
.kroki { margin: 0; padding-left: 42px; display: flex; flex-direction: column; gap: 8px; font-family: var(--naglowek); font-size: 20px; letter-spacing: .02em; line-height: 1.25; }
.kroki b { color: var(--gold); font-weight: 400; }
.zasady h2 { color: var(--gold); text-transform: uppercase; margin-bottom: 10px; }
.zasady ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.zasady li b { color: var(--text); }
.pewniak-opis { margin: 0 0 12px; font-size: 13px; }
.cell.pewniak::before { content: "★ pewniak ×2"; position: absolute; top: 4px; left: 8px; font-size: 11px; color: var(--gold); letter-spacing: .04em; }
.cell.hit { background: var(--hit); border-color: var(--hit-line); }
.cell.hit .cat { color: #c9f2d8; }
.cell.hit::after { content: "✔"; position: absolute; top: 2px; right: 8px; font-size: 20px; color: #d9ffe6; }
.cell.miss { background: var(--miss); border-color: var(--miss-line); opacity: .65; }
.cell.miss .pick { text-decoration: line-through; }
.cell.miss::after { content: "✘"; position: absolute; top: 2px; right: 8px; font-size: 20px; color: #ffc9ce; }
.cell.line { box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(242,182,50,.55); border-color: var(--gold); }

/* Mini-mapa planszy (telefon) */
.mapa { display: none; grid-template-columns: repeat(5, 14px); gap: 3px; }
.mapa i { width: 14px; height: 14px; border-radius: 3px; background: var(--line); }
.mapa i.wybrane { background: var(--muted); }
.mapa i.hit { background: var(--hit-line); }
.mapa i.miss { background: var(--miss-line); }
.mapa i.line { outline: 2px solid var(--gold); }

.wynik { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: baseline; font-variant-numeric: tabular-nums; }
.wynik .duze { font-size: 28px; font-weight: 700; color: var(--gold); }

/* Okno wyboru nominowanego */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 18px; width: min(460px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0,0,0,.65); }
dialog h2 { color: var(--gold); text-transform: uppercase; margin-bottom: 12px; }
.nominowani { display: flex; flex-direction: column; gap: 8px; }
.nominowani button { text-align: left; }
.nominowani button.wybrany { border-color: var(--gold); background: #3a2c0a; }
.pewniak-wybor { display: flex; gap: 8px; align-items: center; margin: 0 0 4px; color: var(--gold); font-size: 15px; cursor: pointer; }
.pewniak-wybor input { width: 18px; height: 18px; accent-color: var(--gold); }

/* Ranking */
table.ranking { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ranking th { text-align: left; color: var(--muted); font-weight: 400; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px; }
.ranking td { padding: 8px 10px; border-top: 1px solid var(--line); }
.ranking td.l, .ranking th.l { text-align: right; }
.ranking tr.ja td { background: rgba(242,182,50,.12); }
.ranking tr.gospodarz .nick::after { content: " · prowadzący"; color: var(--gold); font-size: 13px; }
.ranking .pkt { font-weight: 700; color: var(--gold); font-size: 1.15em; }

/* Panel prowadzącego */
.kategoria { display: flex; flex-direction: column; gap: 8px; }
.kategoria .nominowani { flex-direction: row; flex-wrap: wrap; }
.kategoria button .ile { color: var(--muted); font-size: 13px; margin-left: 6px; }
.kategoria button.zwyciezca { background: var(--hit); border-color: var(--hit-line); }
.kategoria button.zwyciezca .ile { color: #c9f2d8; }
.siatka-kategorii { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }

/* Nagrody */
.pula { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pula button { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.pula button .tytul { font-weight: 700; }
.pula button .ile { color: var(--muted); font-size: 13px; }
.pula button:not(:disabled):hover { border-color: var(--gold); }
.pula button.zajeta .tytul { text-decoration: line-through; }
.laureat { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.laureat:first-of-type { border-top: 0; }
.laureat input[type=text] { flex: 1 1 260px; font-size: 13px; padding: 6px 8px; }
.laureat .gry { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; gap: 6px; }
  .cell { min-height: 0; flex-direction: row; justify-content: space-between; text-align: left; padding: 12px 34px 12px 12px; gap: 12px; }
  .cell .cat { flex: 0 0 38%; }
  .cell .pick { text-align: right; font-size: 15px; }
  .cell.pewniak::before { content: "★"; position: static; font-size: 16px; order: -1; }
  .cell.hit::after, .cell.miss::after { top: 50%; transform: translateY(-50%); }
  .mapa { display: grid; }
  .siatka-kategorii { grid-template-columns: 1fr; }
}
