:root {
  --cb-cyan: #00cccc;
  --cb-bright: #00ffff;
  --cb-ink: #05090b;
  --cb-bone: #e5d9bd;
  --cb-violet: #8c54c7;
}

[hidden] { display: none !important; }

.subtitle {
  color: #aefefe;
  margin: .25rem 0 1rem;
  text-align: center;
  letter-spacing: .08em;
}

.cryptball-machine {
  width: min(100%, 760px);
  margin: 1rem auto 0;
  padding: 10px;
  border: 2px solid #008b8b;
  background: linear-gradient(#091317, #020607);
  box-shadow: 0 0 24px rgba(0, 204, 204, .28), inset 0 0 22px #000;
}

.score-strip {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) repeat(3, minmax(75px, .6fr));
  gap: 8px;
  margin-bottom: 8px;
}

.score-strip > div,
.keeper-field {
  min-height: 54px;
  padding: 6px 8px;
  border: 1px solid #096b70;
  background: #03090b;
  color: #84bfc0;
  text-align: center;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .08em;
}

.score-strip strong {
  display: block;
  color: var(--cb-bright);
  font-size: 1.2rem;
  text-shadow: 0 0 8px #00cccc;
}

.keeper-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.keeper-field input {
  width: 100%;
  min-width: 0;
  margin-top: 3px;
  border: 0;
  border-bottom: 1px solid #00cccc;
  background: transparent;
  color: #fff;
  text-align: center;
  font: inherit;
  text-transform: none;
}

.table-wrap {
  position: relative;
  overflow: hidden;
  border: 3px solid #171e23;
  background: #020405;
  touch-action: none;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  image-rendering: pixelated;
  background: #05090b url("/minigames/cryptball/assets/cryptball-playfield.png") center/100% 100% no-repeat;
}

.table-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: rgba(1, 5, 7, .78);
  text-align: center;
}

.table-message strong {
  color: var(--cb-bright);
  font-size: clamp(2rem, 9vw, 5rem);
  letter-spacing: .12em;
  text-shadow: 3px 3px #003b3b, 0 0 18px #00cccc;
}

.table-message span { color: var(--cb-bone); }

.table-message button,
.touch-controls button {
  border: 1px solid #00cccc;
  background: #071416;
  color: #d8ffff;
  padding: .72rem 1rem;
  font: 700 .9rem Cinzel, serif;
  text-transform: uppercase;
  cursor: url('/images/cursors/hover.cur') 11 0, url('/images/cursors/hover.png') 11 0, pointer;
}

.table-message button:hover,
.touch-controls button:hover {
  background: #0d2d30;
  box-shadow: 0 0 12px rgba(0, 255, 255, .35);
}

.touch-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  margin-top: 8px;
}

.touch-controls button {
  min-height: 54px;
  user-select: none;
  touch-action: none;
}

#launchButton { color: var(--cb-bone); }
.status-line { min-height: 1.5em; margin: .55rem 0 0; color: #a4c9ca; text-align: center; }
.game-divider { margin: 2rem 0 1.25rem; border: 0; border-top: 1px solid rgba(0, 204, 204, .4); }
.leaderboard h2 { color: #aefefe; text-align: center; }

#lbTable {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #008b8b;
  background: rgba(1, 8, 10, .8);
}

#lbTable th,
#lbTable td {
  padding: .6rem;
  border: 1px solid #008b8b;
  text-align: left;
}

#lbTable th { background: rgba(0, 204, 204, .14); color: #aefefe; }
#lbTable td:first-child { width: 3rem; text-align: center; }
#lbTable td:last-child { text-align: right; }
.empty-cell { color: #78999a; font-style: italic; text-align: center !important; }

@media (max-width: 600px) {
  .cryptball-machine { width: 100%; padding: 5px; }
  .score-strip { grid-template-columns: 1fr repeat(3, 58px); gap: 4px; }
  .score-strip > div, .keeper-field { min-height: 46px; padding: 4px; font-size: .61rem; }
  .score-strip strong { font-size: .9rem; }
  .touch-controls button { min-height: 62px; padding: .5rem; }
}
