html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#score {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 2em;
  font-weight: 900;
  z-index: 3;
}

#playerBadge {
  position: absolute;
  top: 32px;
  left: 30px;
  z-index: 3;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: #111;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

#leaderboard {
  position: absolute;
  right: 24px;
  top: 82px;
  z-index: 3;
  width: 190px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  color: #111;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

#leaderboard strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

#leaderboard ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#leaderboard li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 7px;
  font-weight: 800;
}

#leaderboard .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#introduction {
  width: 200px;
  height: 150px;
  position: absolute;
  font-weight: 600;
  font-size: 0.8em;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  transition: opacity 2s;
}

#restart {
  width: 120px;
  height: 120px;
  position: absolute;
  border-radius: 50%;
  color: white;
  background-color: red;
  border: none;
  font-weight: 700;
  font-size: 1.2em;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: none;
  cursor: pointer;
}

#perfect {
  position: absolute;
  opacity: 0;
  transition: opacity 2s;
}

.stick-connection,
.stick-phone-status,
.stick-show-qr {
  position: fixed;
  z-index: 10;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.stick-connection {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.stick-connection.hidden {
  display: none;
}

.stick-connection .panel {
  width: min(330px, 92vw);
  padding: 20px;
  border-radius: 8px;
  background: #fff8e8;
  color: #111;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.stick-connection h2,
.stick-connection p {
  margin: 0 0 10px;
}

.stick-connection .qr img {
  width: 210px;
  height: 210px;
}

.stick-connection .room {
  display: block;
  margin: 5px 0 12px;
  font-size: 24px;
}

.stick-connection a,
.stick-connection button,
.stick-show-qr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: white;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.stick-phone-status {
  left: 24px;
  bottom: 22px;
  padding: 9px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: #111;
  font-size: 12px;
  font-weight: 900;
}

.stick-phone-status.connected {
  color: #0d6b27;
}

.stick-show-qr {
  right: 24px;
  bottom: 18px;
}

@media (max-width: 700px) {
  #leaderboard {
    display: none;
  }

  #score {
    top: 18px;
    right: 18px;
  }

  #playerBadge {
    top: 20px;
    left: 18px;
  }
}
