/* Mortals and Monsters — browser telnet client (gothic on black). */
:root {
  --bg: #0a0a0a;
  --rule: #5a5a5a;
  --silver: #e8e8e8;
  --teal: #7ec8a8;
  --muted: #8a8a8a;
  --gold: #c9a227;
  --crimson: #8b2942;
  --prompt: #b8b8b8;
  --input-bg: #121212;
  --input-border: #333;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--silver);
  font-family: Consolas, "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.35;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  flex: 0 0 auto;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
}

header h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--silver);
  letter-spacing: 0.02em;
}

header .meta {
  color: var(--muted);
  font-size: 0.85rem;
}

header .meta a {
  color: var(--teal);
}

#status {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

#status.connected {
  color: var(--teal);
}

#status.error {
  color: #e07070;
}

#output {
  flex: 1 1 auto;
  margin: 0;
  padding: 1rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 12rem;
}

#output .ansi-reset {
  color: var(--silver);
}

#input-row {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--rule);
  background: #080808;
}

#cmd {
  flex: 1 1 auto;
  background: var(--input-bg);
  color: var(--silver);
  border: 1px solid var(--input-border);
  border-radius: 3px;
  padding: 0.5rem 0.65rem;
  font: inherit;
}

#cmd:focus {
  outline: 1px solid var(--teal);
  border-color: var(--teal);
}

#cmd:disabled {
  opacity: 0.5;
}

#send {
  background: #1a1a1a;
  color: var(--silver);
  border: 1px solid var(--input-border);
  border-radius: 3px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  cursor: pointer;
}

#send:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
}

#send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
