* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0b0f16;
  color: #e8eef7;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  min-height: 100vh;
}

#app { max-width: 860px; margin: 0 auto; padding: 18px 12px 30px; text-align: center; }

header h1 { font-size: 42px; letter-spacing: 6px; font-weight: 800; }
header h1 span { color: #ffb020; }
.subtitle { color: #8fa3bd; margin: 4px 0 16px; font-size: 14px; }

.screen.hidden { display: none; }

.panel {
  background: #131b29;
  border: 1px solid #26344a;
  border-radius: 14px;
  padding: 26px 24px;
  max-width: 560px;
  margin: 0 auto;
}

.panel h2 { font-size: 22px; letter-spacing: 2px; margin-bottom: 12px; }
.instructions { color: #b9c7da; line-height: 1.6; margin-bottom: 20px; font-size: 15px; }

.btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e8eef7;
  background: #22304a;
  border: 1px solid #3a4f70;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: #2c3f5f; }
.btn:active { transform: scale(.97); }
.btn.primary { background: #ffb020; color: #1a1200; border-color: #ffb020; }
.btn.primary:hover { background: #ffc44d; }
.btn.small { padding: 6px 10px; font-size: 14px; }

.board { margin-top: 22px; text-align: left; }
.board h3 { font-size: 13px; letter-spacing: 2px; color: #8fa3bd; margin-bottom: 8px; }
.board ol { list-style: none; }
.board li {
  display: flex; justify-content: space-between;
  padding: 7px 10px; border-radius: 6px;
  background: #0e1622; margin-bottom: 5px; font-size: 14px;
}
.board li.me { background: #3a2f10; border: 1px solid #ffb020; }
.board li .empty { color: #5c6d85; }

#hud {
  display: flex; justify-content: center; align-items: center;
  gap: 26px; margin: 6px 0 8px; flex-wrap: wrap;
}
.hud-item { font-size: 13px; letter-spacing: 1px; color: #8fa3bd; }
.hud-item b { color: #fff; font-size: 18px; margin-left: 4px; }

#round-bar { height: 8px; background: #1a2436; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
#round-bar-fill { height: 100%; width: 100%; background: #ffb020; transition: width .1s linear; }

#utility-row { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.btn.util { font-size: 14px; padding: 9px 14px; }
.btn.util .util-sub { display: block; font-size: 11px; font-weight: 400; color: #9db0c8; letter-spacing: 0; margin-top: 2px; }
.btn.util.selected { background: #ffb020; color: #1a1200; border-color: #ffb020; }
.btn.util.selected .util-sub { color: #5c4300; }
#round-hint { color: #b9c7da; font-size: 14px; margin-left: 6px; }

canvas#game {
  display: block; margin: 0 auto;
  width: 100%; max-width: 800px; height: auto;
  border: 2px solid #26344a; border-radius: 12px;
  background: #0e1420; cursor: crosshair;
}
.hint-line { color: #5c6d85; font-size: 12px; margin-top: 8px; }

#score-big { font-size: 64px; font-weight: 800; color: #ffb020; margin: 6px 0 10px; }
#score-stats { color: #b9c7da; line-height: 1.9; font-size: 15px; margin-bottom: 16px; }
#score-stats b { color: #fff; }

#save-row { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
#save-row label { font-size: 13px; letter-spacing: 1px; color: #8fa3bd; }
#input-name {
  width: 70px; text-align: center; font-size: 18px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 3px;
  background: #0e1622; color: #fff; border: 1px solid #3a4f70;
  border-radius: 8px; padding: 9px 6px;
}
#save-msg { min-height: 18px; font-size: 13px; color: #7ee2a0; margin-bottom: 8px; }

#btn-again { margin-top: 18px; }
footer { color: #4c5d76; font-size: 12px; margin-top: 22px; }
