/* Zemsta Rzeczniczki — style strony */
:root {
  --bg: #181425;
  --panel: #262b44;
  --panel-hi: #3a4466;
  --text: #ffffff;
  --muted: #c0cbdc;
  --gold: #feae34;
  --accent: #b55088;
  --danger: #e43b44;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", ui-monospace, monospace;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at center, #262b44 0%, #181425 70%);
}

#game {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  outline: none;
  cursor: default;
}

/* ---------- ekran ładowania ---------- */
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 10;
  transition: opacity 0.4s;
}
#loading.done { opacity: 0; pointer-events: none; }
.loading-box { text-align: center; }
.loading-title {
  font-weight: bold;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--gold);
  text-shadow: 3px 3px 0 #68386c;
  margin-bottom: 16px;
}
.loading-bar {
  width: 240px;
  height: 14px;
  border: 3px solid var(--text);
  padding: 2px;
  margin: 0 auto 10px;
  image-rendering: pixelated;
}
#loading-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s steps(8);
}
#loading-text { color: var(--muted); font-size: 13px; }

/* ---------- wpisywanie imienia ---------- */
#name-entry {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  background: var(--panel);
  border: 4px solid var(--text);
  box-shadow: 0 0 0 4px var(--bg), 8px 8px 0 4px rgba(0, 0, 0, 0.5);
  padding: 16px 18px;
  width: min(92vw, 360px);
  text-align: center;
}
#name-entry.hidden { display: none; }
#name-entry label {
  display: block;
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 10px;
  font-size: 15px;
}
#name-input {
  width: 100%;
  font: bold 20px "Courier New", ui-monospace, monospace;
  text-align: center;
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  border: 3px solid var(--panel-hi);
  outline: none;
  -webkit-user-select: text;
  user-select: text;
  text-transform: uppercase;
}
#name-input:focus { border-color: var(--gold); }
.name-buttons { display: flex; gap: 10px; margin-top: 12px; }
.name-buttons button {
  flex: 1;
  font: bold 15px "Courier New", ui-monospace, monospace;
  padding: 9px 6px;
  border: 3px solid var(--text);
  background: var(--accent);
  color: var(--text);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--bg);
}
.name-buttons button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--bg); }
#name-skip { background: var(--panel-hi); }
