@font-face {
  font-family: prstart;
  src: url('../fonts/prstart.ttf');
  font-display: block;
}

body {
  font-family: prstart, monospace;
  font-size: 16px;
  background-color: #000;
  color: #fff;
  margin: 0;
  padding: 24px 12px;
}

#main {
  margin: 0 auto;
  width: 512px;
  max-width: 100%;
}

h1 {
  font-size: 20px;
  line-height: 1.6;
  text-align: center;
  color: #feac4e;
  margin: 0 0 20px;
}

h1 .sub {
  display: block;
  font-size: 10px;
  color: #808080;
  letter-spacing: 2px;
}

/* ---------------------------------------------------------------- комната */

.panel {
  border: 3px solid #808080;
  padding: 12px;
  margin-bottom: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.row:last-child { margin-bottom: 0; }

.label {
  font-size: 10px;
  color: #808080;
  width: 88px;
  flex-shrink: 0;
}

.room-id {
  font-size: 24px;
  color: #e8f860;
  letter-spacing: 6px;
}

#invite-link {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 9px;
  background: #000;
  color: #fff;
  border: 2px solid #808080;
  padding: 6px;
}

button {
  font-family: inherit;
  font-size: 10px;
  background: #000;
  color: #e8f860;
  border: 2px solid #e8f860;
  padding: 8px 12px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #e8f860;
  color: #000;
}

button:disabled {
  color: #555;
  border-color: #555;
  cursor: default;
}

/* Статусы двух игроков */

.slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px;
  font-size: 11px;
  border-bottom: 2px solid #202020;
}

.slot:last-child { border-bottom: none; }

.slot-name { color: #fff; }
.slot-status { font-size: 10px; }

.slot.absent  .slot-name,
.slot.absent  .slot-status { color: #555; }
.slot.waiting .slot-status { color: #feac4e; }
.slot.ready   .slot-status { color: #00b56e; }

.actions { text-align: center; }

#ready-btn {
  font-size: 14px;
  padding: 12px 32px;
}

.hint {
  font-size: 9px;
  color: #808080;
  line-height: 1.8;
  margin: 12px 0 0;
  min-height: 1.8em;
}

.help p { font-size: 10px; color: #808080; margin: 0 0 8px; }
.help table { font-size: 9px; color: #a0a0a0; border-spacing: 0 4px; }
.help td { padding-right: 16px; }
.help .note { margin-top: 10px; line-height: 1.8; color: #666; }

/* ---------------------------------------------------------------- игра */

#stage {
  position: relative;
  display: none;
  width: 512px;
  max-width: 100%;
}

#canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
  image-rendering: pixelated;   /* ретро-пиксели не должны замыливаться */
}

#overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.82);
  text-align: center;
  padding: 16px;
}

#overlay-title {
  font-size: 40px;
  color: #e8f860;
}

#overlay-text {
  font-size: 10px;
  color: #808080;
  line-height: 2;
  max-width: 420px;
}

/* Панель голосового чата */

#hud {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-top: 3px solid #808080;
  padding-top: 12px;
}

#mute-btn.muted {
  color: #e44437;
  border-color: #e44437;
}

#mute-btn.muted:hover { background: #e44437; color: #000; }

#peer-mic {
  font-size: 9px;
  color: #808080;
}
