* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 18pt;
  line-height: 1.5;
}

html, body {
  height: 100%;
}

header {
  position: fixed;
  top: 1em;
  left: 1em;
  font-family: monospace;
  color: rgba(0, 48, 94, 1);
  z-index: 10;
}

button {
  padding: 0.5em 1em;
  border: 0;
  border-radius: 8px;
  background-color: rgba(0, 48, 94);
  color: white;
  cursor: pointer;
  font-size: 0.9em;
}

button:disabled {
  background-color: rgba(0, 48, 94, 0.3);
  cursor: not-allowed;
}

button.muted {
  background-color: rgba(0, 48, 94, 0.3);
}

small {
  font-size: 0.8em;
}

input[type="text"],
input[type="password"],
input[type="number"] {
  padding: 0.5em;
  border-radius: 8px;
  border: 1px solid rgba(0, 48, 94, 0.2);
  font-size: 0.9em;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
  background-color: rgba(255, 255, 255, 1);
  outline: 2px solid rgba(0, 48, 94, 0.4);
}

.hidden {
  display: none;
}

p {
  white-space: pre-line;
}

#app-root,
#qm-root {
  min-height: 100dvh;
  width: 100dvw;
}

.view {
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: center;
  width: 100dvw;
  min-height: 100dvh;
  padding: 4em 2em 2em 2em;
  gap: 1em;
}

.view h1 {
  font-size: 1.6em;
  color: rgba(0, 48, 94, 1);
}

.view h2 {
  font-size: 1.2em;
  color: rgba(0, 48, 94, 1);
  margin-top: 0.5em;
}

.error-msg {
  color: #b00020;
  font-size: 0.9em;
}

.team-list,
.scoreboard-list,
.final-list {
  list-style: none;
  padding: 0;
  width: 100%;
  max-width: 600px;
}

.team-list li,
.scoreboard-list li,
.final-list li {
  padding: 0.4em 0.6em;
  border-bottom: 1px solid rgba(0, 48, 94, 0.1);
}

.team-list li.done {
  color: #006a23;
}

.kicked {
  text-decoration: line-through;
  opacity: 0.5;
}

.signup-form,
.guess-form,
.qm-login-form {
  display: flex;
  gap: 0.5em;
  width: 100%;
  max-width: 480px;
  flex-flow: row wrap;
  justify-content: center;
}

.signup-form input,
.qm-login-form input {
  flex: 1 1 240px;
}

/* round view */
.view-round {
  padding: 0;
  width: 100dvw;
  height: 100dvh;
  position: relative;
}

.map-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.round-overlay {
  position: fixed;
  top: 1em;
  right: 1em;
  z-index: 5;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 0.4em 0.8em;
  border-radius: 8px;
  display: flex;
  flex-flow: column nowrap;
  gap: 0.2em;
  font-size: 0.8em;
  font-family: monospace;
  color: rgba(0, 48, 94, 1);
}

.round-overlay .round-timer {
  font-weight: bold;
}

.guess-form {
  position: fixed;
  z-index: 5;
  bottom: 2em;
  left: 50%;
  transform: translateX(-50%);
  width: min(90dvw, 520px);
  background-color: rgba(255, 255, 255, 0.7);
  padding: 0.4em;
  border-radius: 12px;
}

.guess-form input {
  flex: 1 1 200px;
  background-color: rgba(255, 255, 255, 0.9);
}

.view-round .error-msg {
  position: fixed;
  bottom: 7em;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.4em 0.8em;
  border-radius: 8px;
}

/* waiting view */
.waiting-msg {
  font-size: 1.1em;
}

.waiting-progress {
  font-family: monospace;
  font-size: 1.1em;
  color: rgba(0, 48, 94, 1);
}

.waiting-timer {
  font-family: monospace;
}

/* scoreboard view */
.scoreboard-meta {
  font-size: 0.9em;
  color: rgba(0, 48, 94, 0.7);
}

.scoreboard-round-title {
  text-align: center;
}

.scoreboard-hint {
  font-size: 0.85em;
  color: rgba(0, 48, 94, 0.7);
  margin-top: 1em;
}

/* finished view */
.round-block {
  margin-top: 1em;
  width: 100%;
  max-width: 600px;
}

.round-block h3 {
  font-size: 1em;
  color: rgba(0, 48, 94, 1);
  margin-bottom: 0.3em;
}

.round-block ol {
  padding-left: 1.4em;
}

/* quizmaster panel */
.view-qm-panel {
  align-items: stretch;
  max-width: 900px;
  margin: 0 auto;
}

.qm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: static;
  margin-bottom: 1em;
}

.qm-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5em;
  background: rgba(0, 48, 94, 0.05);
  padding: 1em;
  border-radius: 8px;
  font-size: 0.9em;
}

.qm-controls {
  display: flex;
  flex-flow: row wrap;
  gap: 0.5em;
  align-items: center;
  margin: 1em 0;
}

.qm-tl-label {
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-left: auto;
}

.qm-tl-input {
  width: 80px;
}

.qm-teams {
  list-style: none;
  padding: 0;
}

.qm-teams li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4em 0.6em;
  border-bottom: 1px solid rgba(0, 48, 94, 0.1);
}

.qm-kick {
  background-color: #b00020;
  font-size: 0.8em;
}

.muted-text {
  color: rgba(0, 48, 94, 0.5);
  font-style: italic;
}

.qm-timer-live {
  font-family: monospace;
  font-weight: bold;
  color: #b00020;
}
