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

:root {
  --bg: #10161a;
  --pn: #123d1f;
  --cl: #e9eef0;
  --ac: #f0b429;
  --ln: #22313a;
}

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, #1b262d, #0a0e11 70%);
  color: var(--cl);
  font: 15px/1.4 "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.oculto { display: none !important; }

#entrada {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  background: rgba(6, 9, 11, .82);
  backdrop-filter: blur(6px);
}

.cx {
  width: min(92vw, 360px);
  padding: 26px;
  border: 1px solid var(--ln);
  border-radius: 16px;
  background: #151d23;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.cx h1 {
  margin: 0 0 18px;
  font-size: 24px;
  letter-spacing: .5px;
  color: var(--ac);
}

.cx label {
  display: block;
  margin: 12px 0 5px;
  font-size: 12px;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .8px;
}

input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--ln);
  border-radius: 9px;
  background: #0e1418;
  color: var(--cl);
  font-size: 15px;
  outline: none;
}

input:focus { border-color: var(--ac); }

button {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 9px;
  background: var(--ac);
  color: #241a02;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button:active { transform: translateY(1px); }

#jogo {
  display: flex;
  flex-direction: column;
  height: 100%;
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--ln);
}

.pl {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pl.dir { justify-content: flex-end; }

.pl b {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl span {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #1d272e;
  opacity: .85;
}

.pl i {
  font-style: normal;
  font-weight: 700;
  color: var(--ac);
}

.pl.ativo b { color: var(--ac); }

.pl.ativo::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 10px var(--ac);
}

.pl.dir.ativo::before { order: 9; }

.meio { text-align: center; min-width: 190px; }
#sala { font-size: 12px; opacity: .5; letter-spacing: 1.4px; }
#msg { font-size: 14px; min-height: 20px; color: var(--ac); }

#palco {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  margin: 10px;
}

canvas#cv {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65);
  touch-action: none;
  cursor: crosshair;
}

footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--ln);
}

#efeito canvas {
  width: 62px;
  height: 62px;
  cursor: pointer;
}

#forca {
  width: 140px;
  height: 12px;
  border: 1px solid var(--ln);
  border-radius: 8px;
  background: #0e1418;
  position: relative;
}

#barra {
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #3ec46d, var(--ac), #e2483d);
  transition: width .05s linear;
}

#forca span {
  position: absolute;
  top: 14px;
  left: 0;
  font-size: 10px;
  opacity: .45;
  letter-spacing: 1px;
}

#chat { flex: 1; min-width: 0; }

#linhas {
  height: 46px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.35;
  padding-right: 6px;
}

#linhas b { color: var(--ac); }
#linhas .sis { opacity: .45; font-style: italic; }
#inChat { margin-top: 4px; padding: 6px 10px; font-size: 13px; }

#btRev { width: auto; margin: 0; padding: 10px 18px; }

@media (max-height: 720px) {
  header { padding: 4px 12px; }
  #msg { font-size: 13px; min-height: 16px; }
  #palco { margin: 6px; }
  footer { padding: 4px 12px 6px; gap: 10px; }
  #efeito canvas { width: 48px; height: 48px; }
  #linhas { height: 34px; font-size: 12px; }
}

@media (max-width: 720px) {
  header { flex-wrap: wrap; }
  .meio { order: 3; width: 100%; }
  footer { flex-wrap: wrap; }
  #chat { order: 4; width: 100%; flex: none; }
}
