@font-face {
  font-family: "OstrichSans";
  src: url("/OstrichSans-Heavy_90.otf");
}

:root {
  --bg-colour: white;
  --bg-backing: #555;
  --text-colour: black;
}

body {
  color: var(--text-colour);
}

body.dark {
  --bg-colour: #212121;
  --bg-backing: #ccc;
  --text-colour: #ddd;
}

module {
  display: block;
  width: 500px;
  height: 500px;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  position: relative;
}

module backing {
  display: block;
  background: var(--bg-backing);
  width: 100%;
  height: 100%;
  border-radius: 20px;
}

module led {
  display: block;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  position: absolute;
  top: 10px;
  right: 10px;
  background: black;
}

module led[c="0"] {
  background-color: red;
}

module led[c="1"] {
  background-color: green;
}

module led[c="2"] {
  background-color: orange;
}

module led[c="3"] {
  background-color: blue;
}

module led[c="4"] {
  background-color: yellow;
}

module led[c="5"] {
  background-color: purple;
}

module buttons {
  position: absolute;
  top: 200px;
  left: 25px;
  right: 25px;
  height: 275px;
  width: calc(100% - 25px * 2);
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

module buttons button {
  width: 25%;
  height: 25%;
}

module fruits {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 370px;
  height: 100px;
  display: flex;
  justify-content: space-evenly;
}

module fruits fruit {
  width: 80px;
  height: 80px;
  background-size: cover;
}

module fruits fruit::before {
  position: absolute;
  display: block;
  top: 35px;
  margin-left: 90px;
  text-align: left;
  content: attr(q);
}

module fruits fruit::after {
  display: block;
  position: absolute;
  top: 85px;
  text-align: center;
  width: 80px;
  font-family: "OstrichSans";
  font-size: 25px;
}

module fruits fruit[f="0"] {
  background-image: url(/fruits/apple.png);
}

module fruits fruit[f="1"] {
  background-image: url(/fruits/melon.png);
}

module fruits fruit[f="2"] {
  background-image: url(/fruits/orange.png);
}

module fruits fruit[f="3"] {
  background-image: url(/fruits/pear.png);
}

module fruits fruit[f="4"] {
  background-image: url(/fruits/pineapple.png);
}

module fruits fruit[f="5"] {
  background-image: url(/fruits/strawberry.png);
}

module fruits fruit[t="0"]::after {
  content: "Apple";
}

module fruits fruit[t="1"]::after {
  content: "Melon";
}

module fruits fruit[t="2"]::after {
  content: "Orange";
}

module fruits fruit[t="3"]::after {
  content: "Pear";
}

module fruits fruit[t="4"]::after {
  content: "Pineapple";
}

module fruits fruit[t="5"]::after {
  content: "Strawberry";
}

module fruits fruit[c="0"]::after {
  color: red;
}

module fruits fruit[c="1"]::after {
  color: green;
}

module fruits fruit[c="2"]::after {
  color: orange;
}

module fruits fruit[c="3"]::after {
  color: blue;
}

module fruits fruit[c="4"]::after {
  color: yellow;
}

module fruits fruit[c="5"]::after {
  color: purple;
}

module screen {
  background: #0E1019;
  color: #ddd;
  width: calc(500px - 20px);
  height: 70px;
  position: absolute;
  top: 120px;
  left: 10px;
  line-height: 70px;
  font-size: 60px;
}

/* Other display screens */
connecting,
disconnected,
puzzleinvalid,
puzzledisconnected,
puzzlecomplete,
twitchplays {
  position: fixed;
  z-index: 995;
  top: 0px;
  left: 0px;
  height: 100%;
  width: 100%;
  background: var(--bg-colour);
}

connecting {
  z-index: 994;
}

puzzleinvalid {
  z-index: 998;
}

puzzledisconnected {
  z-index: 996;
}

puzzlecomplete {
  z-index: 997;
}

twitchplays {
  z-index: 995;
}

disconnected center,
connecting center,
puzzleinvalid center,
puzzledisconnected center,
puzzlecomplete center,
twitchplays center {
  left: 0px;
  width: 100%;
  font-size: 30px;
  color: var(--text-colour);
}

connecting center #inputcode {
  font-size: 20px;
  max-width: 100%;
}
