:root{
  --bg:#0f1115;
  --card:#171a21;
  --muted:#aab2c0;
  --text:#eef1f6;
  --accent:#7c4dff;
  --danger:rgb(255, 0, 153);
  --line: rgba(255,255,255,.08);
  --radius: 18px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: linear-gradient(200deg, rgb(12, 0, 245), rgb(0, 12, 59));
  color:var(--text);
}

.topbar{
  position:sticky; top:0;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  background: rgba(15,17,21,.75);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar h1{ margin:0; font-size:18px; letter-spacing:.2px; }

.topActions{
  display:flex;
  align-items:center;
  gap:8px;
}

.pill{
  font-size:12px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
}

.container{
  padding:16px;
  max-width:520px;
  margin:0 auto;
}

.card{
  background:rgba(23,26,33,.92);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  width:100%;
}

.hidden{ display:none; }

.field{ display:block; margin:12px 0; }
.field span{ display:block; font-size:12px; color:var(--muted); margin-bottom:6px; }

input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
   font-size: 16px;
}
input:focus{ border-color: rgba(124,77,255,.6); }

.btn{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color:var(--text);
  font-weight:600;
}
.btn.small{ width:auto; padding:10px 12px; border-radius:12px; font-size:13px; }
.btn.primary{
  background: linear-gradient(200deg, rgba(0, 79, 249, 0.95), rgba(0, 19, 93, 0.79));
  border-color: rgba(124,77,255,.35);
}
.btn.danger{
  background: rgb(255, 0, 153);
  border-color: rgba(255,77,109,.35);
}
.btn.ghost{ background: transparent; }
.btn:active{ transform: scale(.99); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }

.divider{
  height:1px; background:var(--line);
  margin:14px 0;
}

.hint{ margin: 8px 0 16px; color:var(--muted); font-size:12px; }
.sub{ margin:4px 0 0; color:var(--muted); font-size:12px; }

.playersBox{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  margin:10px 0 14px;
}

.row{ display:flex; gap:10px; align-items:center; }
.between{ justify-content:space-between; }

.playersTable{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.playerCard{
  border:1px solid var(--line);
  border-radius: 16px;
  padding:12px;
  background: rgba(0,0,0,.18);
}
.playerTop{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:10px;
}
.playerName{ font-weight:800; }
.playerTotal{ color:var(--muted); font-size:13px; }
.crown{ margin-left:6px; }

.tagsRow{
  display:flex; gap:8px; flex-wrap:wrap;
  margin-top:10px;
}

.chip{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  font-size:13px;
}
.chip:active{ transform: scale(.99); }

.chip.active{
  border-color: rgb(0, 26, 255);
  background: rgb(8, 0, 125);
  box-shadow: 0 0 0 2px rgb(4, 0, 90) inset;
  color: white  ;
}

.roundPreview{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:10px 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.roundPreview b{
  color: var(--text);
  font-size: 16px;
}

.roundsList{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height: 320px;
  overflow:auto;
  padding-right:4px;
}

.roundItem{
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(0,0,0,.14);
  font-size:13px;
  color:var(--muted);
}

.roundTitle{
  color: var(--text);
  font-weight: 800;
  margin-bottom: 10px;
}

.roundRows{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.roundRow{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:8px;
  align-items:center;
}

.roundPts{
  color: var(--text);
  font-weight: 800;
}

.roundPills{
  grid-column: 1 / -1;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.pillMini{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 12px;
}

/* Sticky buttons */
.stickyBar{
  position: sticky;
  bottom: 12px;
  margin-top: 14px;
  display:flex;
  gap:10px;
}
.stickyBar .btn{
  width: 100%;
}

.logo{
    width: 150px;
}

h2{
    margin-top: 12px;
 font-family: domine, serif;
    font-weight: 700;
    font-size: 20px;
}

h6{
    text-align: center;
    color: rgba(255, 255, 255, 0.279);
    font-weight: normal;
    margin-top: 24px;
    margin-bottom: 16px;
    font-size: 14px;
}   


h3{
     margin-bottom: 4px;
}   

#gameTitle {
  color: #EEF1F6;
  margin-bottom: 2px;
}

#btnLoadLast.btn.ghost {
  color: #7aa6f3;
  font-size: 14px;
  border: none;
  margin-top: 12px;
}

#btnCreate.btn.primary {
  height: 64px;
  border-radius: 10px;
  font-size: 14px;
  border: none;
}

#btnFinishGame.btn.danger {
  height: 64px;
  border-radius: 10px;
  font-size: 14px;
  border: none;
  background-color: rgb(255, 0, 153);
  font-family: domine, serif;
  font-weight: 800;
}

#btnCloseRound.btn.primary {
  height: 64px;
  border-radius: 10px;
  font-size: 14px;
  border: none;
  font-family: domine, serif;
}

.triomino{
    width: 32px;
    vertical-align: middle;
    margin-right: 8px;
}

html, body {
  touch-action: manipulation;
}
