:root{
  --bg:#0b0b0b;
  --card:#141414;
  --line:#242424;
  --text:#ffffff;
  --muted:#cfcfcf;
  --primary:#39ff14;
  --danger:#ff3b30;
}

*{ box-sizing:border-box; }

html, body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

.app{
  width:100%;
  max-width:none;
  padding:12px;
}

.header{ margin-bottom:12px; }

.title{
  font-size:28px;
  font-weight:900;
  letter-spacing:0.3px;
}

.subtitle{
  margin-top:6px;
  color:var(--muted);
  line-height:1.35;
  font-size:14px;
}

.meta{
  margin-top:6px;
  color:var(--muted);
  font-weight:700;
  font-size:13px;
}

.dot{ margin:0 8px; opacity:0.8; }

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
  margin-bottom:14px;
}

.hidden{ display:none !important; }

h2{
  margin:0 0 10px 0;
  font-size:18px;
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
}

.wrap{ flex-wrap:wrap; }

.input{
  flex:1;
  background:#111;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 12px;
  color:white;
  outline:none;
  font-size:16px;
}

.input:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(57,255,20,0.15);
}

.input.small{
  width:140px;
  flex:0 0 auto;
}

.btn{
  padding:10px 14px;
  border-radius:10px;
  border:1px solid transparent;
  background:#1a1a1a;
  color:white;
  font-weight:800;
  font-size:14px;
}

.btn:active{ transform: translateY(1px); }

.btn--primary{
  background:var(--primary);
  color:#000;
}

.btn--ghost{
  background:transparent;
  border-color:var(--line);
}

.chip{
  border:1px solid var(--line);
  background:#101010;
  color:white;
  padding:8px 12px;
  border-radius:999px;
  font-weight:800;
}

.chip--active{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(57,255,20,0.12);
}

.chip--ghost{ background:transparent; }

.list{ margin-top:10px; }

.playerItem{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  background:#101010;
  border:1px solid var(--line);
  border-radius:10px;
  margin-bottom:8px;
}

.playerItem .name{ font-weight:800; }

.playerItem .x{
  background:transparent;
  border:1px solid var(--line);
  color:white;
  border-radius:10px;
  padding:6px 10px;
  font-weight:900;
}

.hint{
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
}

.switch{
  position:relative;
  width:46px;
  height:26px;
  display:inline-block;
}

.switch input{ display:none; }

.slider{
  position:absolute;
  inset:0;
  background:#333;
  border-radius:999px;
  transition:0.2s;
  border:1px solid var(--line);
}

.slider:before{
  content:"";
  position:absolute;
  width:20px;
  height:20px;
  left:3px;
  top:2px;
  background:white;
  border-radius:50%;
  transition:0.2s;
}

.switch input:checked + .slider{
  background:rgba(57,255,20,0.35);
  border-color:rgba(57,255,20,0.6);
}

.switch input:checked + .slider:before{ transform: translateX(20px); }

.switchLabel{
  color:var(--muted);
  font-weight:700;
  font-size:14px;
}

.scoreTable{ margin-bottom:12px; }

.scoreRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  background:#101010;
  border:1px solid var(--line);
  border-radius:10px;
  margin-bottom:8px;
  font-weight:800;
}

.scoreRow--active{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(57,255,20,0.12);
}

.turnTitle{
  font-weight:900;
  font-size:16px;
}

.turnMeta{
  margin-top:4px;
  color:var(--muted);
  font-weight:800;
  font-size:13px;
}

.throws{
  margin-top:12px;
  border-top:1px solid var(--line);
  padding-top:12px;
}

.throwRow{
  display:flex;
  justify-content:space-between;
  padding:6px 0;
  font-weight:800;
}

.throwSum{
  margin-top:6px;
  font-weight:900;
}

.turnActions .btn{
  min-width:140px;
}

.boardWrap{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  padding:14px 0 18px 0;
}

.board{
  display:block;
  margin:0 auto;
  touch-action:none;
  width:96vw;
  height:auto;
  max-width:760px;
}

/* iPad Air 1 pionowo (768x1024) — duża tarcza */
@media screen and (width:768px) and (height:1024px){
  .board{
    width:700px;
    max-width:700px;
  }
}

/* hit badge (nie skacze layout) */
.hitBadge{
  position:absolute;
  top:10px;
  left:50%;
  transform:translateX(-50%);
  background:#0f0f0f;
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;
  font-size:13px;
  color:white;
  opacity:0;
  pointer-events:none;
}

.hitBadge.show{ opacity:1; }

.history, .podium{
  color:var(--muted);
  font-weight:700;
  line-height:1.35;
}

/* MODAL */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  display:flex;
  justify-content:center;
  align-items:center;
  padding:16px;
}

.modalCard{
  width:100%;
  max-width:520px;
  background:#0f0f0f;
  border:1px solid rgba(57,255,20,0.35);
  border-radius:14px;
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,0.6);
}

.modalTitle{
  font-weight:900;
  font-size:18px;
}

.modalBody{
  margin-top:8px;
  color:var(--muted);
  font-weight:700;
  line-height:1.35;
}