*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  text-align: center;
}

video {
  display: none;
}

.options {
  display: flex;
  flex-direction: column;
  width: 250px;
  text-align: left;
  margin-bottom: 20px;
}

.options-info {
  color: #333;
  font-size: 18px;
  width: 600px;
  margin: 20px auto;
}

label {
  margin: 4px 0;
}

#canvasWrapper {
  position: relative;
  width: 640px;
  margin: 0 auto;
  outline: 10px solid #eee;
}

canvas {
  display: block;
}

.centroid {
  position: absolute;
  padding: 5px;
  color: magenta;
  font: 30px monospace;
  font-weight: bold;
  text-shadow: 1px 1px 1px white, -1px -1px 1px white, 1px -1px 1px white,
    -1px 1px 1px white;
  border: 3px solid magenta;
  opacity: 0.5;
}

#opencvInitInfo {
  position: absolute;
  top: 15px;
  left: 15px;
  pointer-events: none;
  color: blueviolet;
  font-size: 20px;
  font-variant: small-caps;
  z-index: 100;
}

#start {
  display: block;
  position: absolute;
  top: 0;
  width: 100%;
  bottom: 0;
  left: 0;
  padding: 20px;
  font-size: 16px;
  color: #9400d3;

  background: #00ff0088;
  transition: background-image ease-in 0.3s;
  border: 10px outset #9400d3;
  font-variant: small-caps;
  font-size: 36px;
  cursor: pointer;
}

#start:after {
  position: absolute;
  content: "";
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0;
  transition: opacity ease-in 0.1s;
  z-index: -1;
  background: repeating-radial-gradient(
    circle,
    #00ff0088,
    #00ff0088 10px,
    #00ff00 10px,
    #00ff00 20px
  );
}

#start:hover:after {
  opacity: 1;
}

#optionsSelector {
  display: none;
  width: 660px;
  height: 80px;
  margin: 0 auto;
  padding: 0;
  background: #eee;
  margin-top: 10px;
}

#optionsSelector div {
  position: relative;
  list-style: none;
  height: 100%;
  --color: black;
  border: 5px solid var(--color);
  flex-grow: 1;
  flex-basis: 0;
  display: flex;
  justify-content: center;
  text-transform: uppercase;
  color: var(--color);
  font-size: 16px;
}

#optionsSelector div span {
  align-self: center;
}

#optionsSelector div:before,
#optionsSelector div:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color);
}

#optionsSelector div:before {
  transition: opacity ease-in 1s;
  opacity: 0;
}

#optionsSelector div.active:before {
  opacity: 0.2;
}

#optionsSelector div:after {
  opacity: 0.3;
  height: 0%;
}

#optionsSelector div.active:after {
  transition: height linear 1s;
  height: 100%;
}

#optionsSelector > :nth-child(1) {
  --color: #9400d3;
  text-shadow: 1px 1px 1px #00ff00, -1px -1px 1px #00ff00, -1px 1px 1px #00ff00,
    1px -1px 1px #00ff00;
  font-size: 18px;
}

#optionsSelector > :nth-child(2) {
  --color: #4b0082;
  text-shadow: 1px 1px 1px #ff7f00, -1px -1px 1px #ff7f00, -1px 1px 1px #ff7f00,
    1px -1px 1px #ff7f00;
  font-size: 18px;
}

#optionsSelector > :nth-child(3) {
  --color: #0000ff;
  text-shadow: 1px 1px 1px #ff000055, -1px -1px 1px #ff000055,
    -1px 1px 1px #ff000055, 1px -1px 1px #ff000055;
  font-size: 19px;
}

#optionsSelector > :nth-child(4) {
  --color: #00ff00;
  text-shadow: 1px 1px 1px #9400d3, -1px -1px 1px #9400d3, -1px 1px 1px #9400d3,
    1px -1px 1px #9400d3;
  font-size: 22px;
}

#optionsSelector > :nth-child(5) {
  --color: #ffff00;
  text-shadow: 1px 1px 1px #4b0082, -1px -1px 1px #4b0082, -1px 1px 1px #4b0082,
    1px -1px 1px #4b0082;
}

#optionsSelector > :nth-child(6) {
  --color: #ff7f00;
  text-shadow: 1px 1px 2px #0000ff, -1px -1px 2px #0000ff, -1px 1px 2px #0000ff,
    1px -1px 2px #0000ff, 1px 1px 1px white, -1px -1px 1px white,
    -1px 1px 1px white, 1px -1px 1px white, 1px 1px 1px white,
    -1px -1px 1px white, -1px 1px 1px white, 1px -1px 1px white;
  font-size: 18px;
}

#optionsSelector > :nth-child(7) {
  --color: #ff0000;
  text-shadow: 1px 1px 1px #ffff00, -1px -1px 1px #ffff00, -1px 1px 1px #ffff00,
    1px -1px 1px #ffff00;
  font-size: 18px;
}
