/* Yahtzee — lobby, room, and hot-seat pages share this sheet.
   Cell colours match the hot-seat game: yellow = scoring option,
   muted blue = open cell worth zero (still clickable as a scratch),
   plain = already scored. */

body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0 auto;
  padding: 0 16px 40px;
  max-width: 900px;
}

.Centered {
  text-align: center;
  margin: auto;
}

h1 {
  margin: 16px 0 4px;
}

.Tagline {
  color: #666;
  margin: 0 0 12px;
}

.Panel {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px auto;
  max-width: 640px;
}

.Panel h2 {
  margin: 4px 0 10px;
  font-size: 1.1em;
}

.Hint {
  color: #777;
  font-size: 0.9em;
}

.ErrorNote {
  color: #b00000;
  font-weight: bold;
}

.CreateForm label {
  display: inline-block;
  margin-right: 8px;
}

input[type="text"], select {
  font-size: 1em;
  padding: 4px 6px;
}

button {
  font-size: 1em;
  padding: 5px 14px;
  cursor: pointer;
}

.RoomList {
  margin: 8px auto;
  border-collapse: collapse;
}

.RoomList th, .RoomList td {
  border: 1px solid #ddd;
  padding: 4px 12px;
}

.RoomCode {
  font-family: Consolas, monospace;
  font-weight: bold;
  letter-spacing: 2px;
}

.JoinLink {
  font-weight: bold;
}

/* ---------- room page ---------- */

#StatusLine {
  min-height: 1.4em;
  font-weight: bold;
  margin: 6px 0;
}

.PlayerChip {
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 2px 10px;
  margin: 2px 4px;
  background: #f7f7f7;
}

.PlayerChip.Active {
  background: #d9edf7;
  border-color: #5bc0de;
}

.PlayerChip.Winner {
  background: #fff3cd;
  border-color: #e0a800;
}

.ComputerMark, .WinnerMark, .CreatorMark {
  margin-left: 2px;
}

.Offline {
  color: #999;
  font-size: 0.85em;
}

#DiceArea {
  text-align: center;
  margin: 10px 0;
}

#DiceSVG {
  width: 500px;
  height: 120px;
}

#DiceSVG.Mine {
  opacity: 1;
}

#DiceSVG.Theirs {
  opacity: 0.55;
}

.DieGroup {
  cursor: pointer;
}

.Dots {
  fill: #000000;
}

.Die {
  fill: #ffffff;
  stroke: #000000;
  stroke-width: 1;
}

.HoldButton {
  fill: #ffff99;
  stroke: #000000;
  stroke-width: 1;
}

.HoldText {
  font-size: 14px;
  font-family: Arial, sans-serif;
  text-anchor: middle;
}

#Actions {
  margin: 6px 0;
}

#RollButton {
  font-size: 1.1em;
  padding: 6px 30px;
}

#ComputerCountLabel {
  margin-left: 14px;
}

/* ---------- scorecard ---------- */

.ScoreTable {
  margin: 0 auto;
  border-collapse: collapse;
}

.ScoreTable td, .ScoreTable th {
  border: 1px solid #bbb;
  padding: 3px 14px;
  text-align: right;
  min-width: 64px;
}

.ScoreTable th.HeaderCategory,
.ScoreTable td.CategoryName {
  text-align: left;
  min-width: 150px;
}

 th.HeaderColumn {
  text-align: right;
  white-space: nowrap;
}

th.HeaderColumn.Active {
  background: #d9edf7;
}

th.HeaderColumn.Winner {
  background: #fff3cd;
}

td.Cell.Clickable {
  cursor: pointer;
}

td.Cell.Potential {
  background: #fff8c4;
  color: #0066cc;
  font-weight: bold;
}

td.Cell.Potential:hover {
  background: #ffee99;
}

/* Open but worth zero: still clickable as a scratch, just muted. */
td.Cell.Open {
  background: #e8f2fb;
  color: #999999;
}

td.Cell.Open.Clickable:hover {
  background: #d5e8f7;
}

td.Scored.ScoredYahtzee {
  font-weight: bold;
  color: #b8860b;
}

.SubtotalRow td {
  background: #f7f7f7;
}

.TotalRow td {
  font-weight: bold;
  background: #efefef;
}

#WinnerMessage {
  font-size: 1.2em;
  font-weight: bold;
  margin: 12px 0;
  color: #b8860b;
}

/* ---------- toast + name overlay ---------- */

#ErrorToast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #b00000;
  color: #fff;
  border-radius: 6px;
  padding: 8px 18px;
  z-index: 20;
}

#NameOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#NameOverlay[hidden] {
  display: none;
}

#NameOverlay .Panel {
  background: #fff;
  max-width: 360px;
}

#NameOverlay form label {
  display: block;
  margin-bottom: 6px;
}

#NameOverlay form input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}
