/* The cabinet around the lane. Everything that matters is drawn in WebGL;
   this is the dark room it sits in. */
:root {
  --ink: #04030a;
  --dim: #6f6a9c;
  --uv: #9b7bff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--dim);
  font: 14px/1.5 "Consolas", ui-monospace, monospace;
  overflow: hidden;
}

#house {
  position: relative;
  width: 100%;
  height: calc(100% - 34px);
  background: radial-gradient(ellipse at 50% 40%, #0d0824 0%, #04030a 70%);
}

#screen { display: block; width: 100%; height: 100%; }

#loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  letter-spacing: 0.3em;
  color: var(--uv);
  text-shadow: 0 0 18px rgba(155, 123, 255, 0.8);
  pointer-events: none;
  transition: opacity 0.4s;
}
#loading.gone { opacity: 0; }

#hint {
  margin: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #4a4470;
  background: #06050f;
  border-top: 1px solid #141033;
}

/* ---- the monitor over the lane ---------------------------------------- */
#board {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  background: rgba(4, 3, 16, 0.76);
  border: 1px solid #221a52;
  border-radius: 4px;
  box-shadow: 0 0 26px rgba(80, 40, 180, 0.35);
  font-size: 12px;
  letter-spacing: 0.06em;
  pointer-events: none;
}
#board .row { display: flex; align-items: stretch; gap: 6px; opacity: 0.5; }
#board .row.up { opacity: 1; }
#board .who { width: 86px; align-self: center; font-weight: bold; }
#board .frames { display: flex; gap: 2px; }
#board .fr {
  width: 34px; height: 34px;
  border: 1px solid #241c58;
  background: #080620;
  display: flex; flex-direction: column; justify-content: space-between;
}
#board .fr.tenth { width: 46px; }
#board .fr.now { border-color: #19f0ff; box-shadow: inset 0 0 10px rgba(25, 240, 255, 0.25); }
#board .marks { font-size: 11px; line-height: 13px; text-align: right; padding: 0 3px; color: #cfe6ff; }
#board .sum { font-size: 13px; line-height: 16px; text-align: center; color: #fff; font-weight: bold; }
#board .total {
  width: 52px; align-self: center; text-align: right;
  font-size: 19px; font-weight: bold; color: #ffd34d;
}

/* what the house just called */
#call {
  position: absolute;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 0.26em;
  color: #cfe6ff;
  text-shadow: 0 0 24px rgba(120, 180, 255, 0.9);
  pointer-events: none;
  white-space: nowrap;
}
#call.big {
  font-size: 58px;
  color: #fff;
  text-shadow: 0 0 36px #ff2d95, 0 0 70px #19f0ff;
}

/* ---- the front desk ---------------------------------------------------- */
#lobby {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 45%, rgba(20, 8, 60, 0.92) 0%, rgba(3, 2, 10, 0.97) 70%);
  backdrop-filter: blur(2px);
  z-index: 5;
}
#lobby .card {
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow: auto;
  padding: 22px 26px 26px;
  border: 1px solid #2a2068;
  border-radius: 6px;
  background: rgba(6, 4, 20, 0.9);
  box-shadow: 0 0 60px rgba(110, 60, 220, 0.3);
  text-align: center;
}
#lobby h1 {
  margin: 0 0 2px;
  font-size: 34px;
  letter-spacing: 0.22em;
  color: #fff;
  text-shadow: 0 0 24px #ff2d95, 0 0 54px #19f0ff;
}
#lobby .sub { margin: 0 0 16px; font-size: 12px; letter-spacing: 0.2em; color: #6f6a9c; }
#lobby .foot { margin: 16px 0 0; font-size: 11px; color: #3f3a66; }
#lobby .err { margin: 10px 0 0; color: #ff6b8b; font-size: 12px; }
#lobby .label { font-size: 11px; letter-spacing: 0.2em; color: #5a5490; margin-bottom: 6px; }

#lobby .roster { margin: 14px 0; text-align: left; }
#lobby .bowler { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
#lobby .bowler .dot { width: 10px; height: 20px; border-radius: 2px; flex: none; }
#lobby .bowler .nm { flex: 1; color: #cfe6ff; letter-spacing: 0.1em; }
#lobby .tag { font-size: 10px; letter-spacing: 0.14em; color: #ffd34d; }
#lobby .tag.mic { color: #4de8a0; }

#lobby input {
  flex: 1;
  background: #0a0822;
  border: 1px solid #2a2068;
  color: #9ff2ff;
  font: inherit;
  letter-spacing: 0.12em;
  padding: 6px 9px;
  border-radius: 3px;
}
#lobby input.code { flex: none; width: 110px; text-align: center; letter-spacing: 0.4em; }
#lobby input:focus { outline: none; border-color: #19f0ff; box-shadow: 0 0 14px rgba(25, 240, 255, 0.3); }

#lobby button {
  background: #110c33;
  border: 1px solid #332a74;
  color: #cfe6ff;
  font: inherit;
  letter-spacing: 0.14em;
  padding: 9px 14px;
  border-radius: 3px;
  cursor: pointer;
}
#lobby button:hover { border-color: #19f0ff; color: #fff; }
#lobby button.go { background: #2a0f4e; border-color: #ff2d95; color: #fff; }
#lobby button.go:hover { box-shadow: 0 0 20px rgba(255, 45, 149, 0.5); }
#lobby button.drop { flex: none; padding: 5px 9px; color: #6f6a9c; }
#lobby button.add { width: 100%; margin-top: 6px; border-style: dashed; color: #6f6a9c; }
#lobby button.back { margin-top: 14px; border: none; color: #5a5490; }
#lobby .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
#lobby .waiting { align-self: center; font-size: 12px; color: #6f6a9c; letter-spacing: 0.14em; }

#lobby .choose { gap: 10px; }
#lobby .pick {
  flex: 1; min-width: 180px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 12px; text-align: left;
}
#lobby .pick strong { font-size: 16px; letter-spacing: 0.2em; }
#lobby .pick span { font-size: 11px; color: #6f6a9c; letter-spacing: 0.04em; }
#lobby .pick.on { border-color: #ffd34d; background: #1b1340; }
#lobby .pick.on strong { color: #ffd34d; }

#lobby .lanes { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
#lobby button.lane { display: flex; align-items: center; gap: 12px; text-align: left; }
#lobby button.lane strong { flex: 1; letter-spacing: 0.1em; }
#lobby button.lane .state { font-size: 11px; color: #4de8a0; }
#lobby button.lane .seats { font-size: 12px; color: #ffd34d; }
