#hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 8px;
  min-height: 48px;
}

.hud-box {
  text-align: center;
  min-width: 70px;
}

.hud-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b93b8;
}

.hud-value {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#grid-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

#grid {
  display: grid;
  gap: 4px;
}

.cell {
  width: var(--cell, 34px);
  height: var(--cell, 34px);
  border-radius: 6px;
  background: #1c2340;
  border: 1px solid #2a3358;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: calc(var(--cell, 34px) * 0.55);
  text-transform: uppercase;
  color: #e7eaf3;
  transition: background 0.2s;
}

.cell.revealed {
  background: #2a3560;
  border-color: #4da3ff;
  animation: flip 0.3s ease;
}

.cell.revealed.flash {
  background: #2d5d3f;
  border-color: #4ade80;
}

.cell.hinted {
  color: #ffe066;
  border-color: #ffe066;
}

@keyframes flip {
  from {
    transform: rotateY(90deg);
  }
  to {
    transform: rotateY(0);
  }
}

#current-word {
  height: 44px;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffe066;
}

#current-word.shake {
  animation: shake 0.3s;
  color: #ff5d6c;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

#ring-wrap {
  position: relative;
  flex: 0 0 45%;
  min-height: 240px;
}

#ring-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
}

#ring-btns {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 28px;
  pointer-events: none;
}

#ring-btns .tb-btn {
  pointer-events: auto;
  font-size: 18px;
}
