:root{
  --bg:#0f0f16;
  --card:#171724;
  --text:#f6f6fb;
  --muted:#b9b9d6;
  --accent:#ff4d7d;
  --accent2:#ffd166;
}

*{ box-sizing:border-box; }
html,body{
  margin:0;
  height:100%;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background: radial-gradient(1200px 600px at 50% 0%, #24102a, var(--bg));
  color:var(--text);
  overscroll-behavior: none;
  touch-action: manipulation;
}
#app{ height:100%; display:flex; }

.screen{ display:none; width:100%; height:100%; padding:16px; }
.screen.active{ display:flex; align-items:center; justify-content:center; }

.card{
  width:min(560px, 100%);
  background: linear-gradient(180deg, rgba(255,77,125,0.10), rgba(255,77,125,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

h1,h2,h3{ margin:0 0 10px; }
.subtitle{ color:var(--muted); margin:0 0 14px; line-height:1.35; white-space:pre-line; }
.tiny{ color:var(--muted); font-size:12px; margin-top:14px; }

.label{ display:block; margin:10px 0 6px; color:var(--muted); font-size:13px; }
.input{
  width:100%;
  padding:12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
  color: var(--text);
  outline:none;
  font-size:16px;
}
.input:focus{ border-color: rgba(255,77,125,0.5); }

.btn{
  width:100%;
  border:0;
  padding:12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size:16px;
  margin-top:10px;
}
.btn:active{ transform: translateY(1px); }
.btn.primary{ background: linear-gradient(90deg, var(--accent), #ff2f65); }
.btn.ghost{ background: transparent; border: 1px solid rgba(255,255,255,0.14); }

.menuGrid{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-top:10px; }
.menuGrid .btn{ margin-top:0; }

.error{
  color: #ffd1dc;
  background: rgba(255,90,95,0.12);
  border:1px solid rgba(255,90,95,0.25);
  padding:10px;
  border-radius:12px;
  margin-top:10px;
}

.hidden{ display:none !important; }

/* GAME */
#screen-game{ padding:0; display:none; }
#screen-game.active{ display:block; }

.hud{
  position:fixed; top:10px; left:10px; right:10px;
  background: rgba(0,0,0,0.30);
  border:1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 10px 12px;
  backdrop-filter: blur(6px);
  z-index: 3;
}

.hudRow{ display:flex; justify-content:space-between; gap:10px; font-weight:600; align-items:center; }
.hudRow2{ margin-top:8px; align-items:flex-end; }

.progressWrap{ flex:1; }
.progressLabel{ color:var(--muted); font-size:12px; display:flex; justify-content:space-between; margin-bottom:6px; }
.progressBar{ height:10px; background: rgba(255,255,255,0.10); border-radius:999px; overflow:hidden; }
.progressFill{ height:100%; width:0%; background: linear-gradient(90deg, var(--accent2), var(--accent)); }

.hudActions{ display:flex; gap:10px; }
.iconBtn{
  width:44px; height:44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.20);
  color: rgba(255,255,255,0.92);
  font-size:18px;
}

/* Mini pasek pauzy/wyjścia — BEZ overlay */
.pauseBar{
  margin-top:10px;
  display:none;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,15,22,0.55);
}

.pauseBar.show{
  display:flex;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}


.pauseText{
  font-size:12px;
  color: rgba(255,255,255,0.92);
  line-height:1.2;
  margin-right:8px;
}

.pauseActions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.chipBtn{
  border: 0;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size:13px;
  line-height:1;
}
.chipBtn:active{ transform: translateY(1px); }
.chipBtn.primary{ background: linear-gradient(90deg, var(--accent), #ff2f65); }
.chipBtn.ghost{ background: transparent; border: 1px solid rgba(255,255,255,0.14); }

/* Canvas */
#gameCanvas{
  width:100vw; height:100vh;
  display:block;
  touch-action: none;
  position:relative;
  z-index:2;
}

/* LISTS */
.list{ margin: 10px 0 0; padding: 0; }
.list li{
  list-style:none;
  padding: 10px 10px;
  margin: 8px 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.08);
  color: var(--text);
}

.lbRow{
  padding:10px 10px;
  margin:8px 0;
  border-radius:12px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.08);
}
