* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --tlo: #0d1117; --panel: #161b22; --panel2: #1c2128; --bord: #30363d;
  --tekst: #c9d1d9; --jasny: #f0f6fc; --mut: #8b949e;
  --green: #3fb950; --amber: #f59e0b; --blue: #58a6ff; --red: #f85149; --fiolet: #a371f7;
}
html, body { height: 100%; overflow: hidden; background: var(--tlo); color: var(--tekst);
  font-family: 'Chakra Petch', sans-serif; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; touch-action: none; overscroll-behavior: none; }
#gra { position: fixed; inset: 0; display: block; width: 100%; height: 100%; }

#btnMute { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 10px; z-index: 60;
  width: auto; padding: 6px 10px; font-family: 'Chakra Petch'; font-weight: 700; font-size: .8rem;
  background: var(--panel); color: var(--tekst); border: 1px solid var(--bord); border-radius: 8px; cursor: pointer; }

.ekran { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(1000px 600px at 70% 10%, rgba(63,185,80,.10), transparent 60%),
              radial-gradient(800px 500px at 15% 92%, rgba(88,166,255,.06), transparent 60%), var(--tlo); }
.box { width: min(94vw, 440px); max-height: 92vh; overflow-y: auto; background: var(--panel);
  border: 1px solid var(--bord); border-radius: 16px; padding: 28px 24px; text-align: center;
  box-shadow: 0 10px 44px rgba(0,0,0,.5); }
h1 { font-family: 'Bungee', cursive; font-size: clamp(1.8rem, 7vw, 2.7rem); color: var(--jasny);
  line-height: 1.05; letter-spacing: .03em; text-shadow: 0 0 18px rgba(63,185,80,.45); }
h1 .z { color: var(--green); text-shadow: 0 0 20px rgba(63,185,80,.7); }
.mini-h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.sub { margin: 12px 0 20px; font-size: .9rem; color: var(--mut); }
input { width: 100%; padding: 13px; margin-bottom: 12px; background: #0d1117; color: var(--jasny);
  border: 1px solid var(--bord); border-radius: 10px; font: inherit; font-size: 16px; text-align: center; outline: none; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(63,185,80,.2); }
button { width: 100%; padding: 14px; margin-top: 6px; font-family: 'Bungee', cursive; font-size: 1.05rem;
  letter-spacing: .04em; color: #0d1117; background: var(--green); border: 0; border-radius: 10px; cursor: pointer;
  transition: transform .08s, filter .15s; }
button:hover { filter: brightness(1.1); }
button:active { transform: scale(.97); }
.wtorny { background: transparent; color: var(--tekst); border: 1px solid var(--bord); font-size: .9rem; }
.wtorny:hover { border-color: var(--green); filter: none; }

.wynik-box { font-family: 'Bungee', cursive; font-size: 3.4rem; color: var(--amber);
  text-shadow: 0 0 24px rgba(245,158,11,.5); margin: 6px 0; }
.miejsce { color: var(--green); font-weight: 700; margin-bottom: 14px; min-height: 1.2em; }
.ranking-lista { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 14px; text-align: left; max-height: 40vh; overflow-y: auto; }
.ranking-lista .rz { display: flex; align-items: center; gap: 8px; background: var(--panel2); border-radius: 8px; padding: 8px 12px; font-size: .88rem; }
.ranking-lista .rz .m { color: var(--mut); font-weight: 700; width: 2ch; }
.ranking-lista .rz .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-lista .rz .w { color: var(--amber); font-weight: 700; }
.ranking-lista .rz.ja { border: 1px solid var(--green); }
.ranking-lista .rz.top .m { color: var(--amber); }

.jak-tresc { text-align: left; font-size: .88rem; line-height: 1.6; color: var(--tekst); margin-bottom: 14px; }
.jak-tresc ul { list-style: none; display: flex; flex-direction: column; gap: 5px; margin: 8px 0; }
.jak-tresc b { color: var(--jasny); }

.powered { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: .74rem; color: var(--mut); text-decoration: none; }
.powered:hover { color: var(--jasny); }
.powered b { color: var(--green); font-weight: 700; }
.ba-mark { width: 16px; height: 16px; overflow: visible; }
.ba-mark path { fill: none; stroke: var(--green); stroke-width: 2.1; stroke-linecap: round; }
