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

html,
body {
  margin: 0;
  height: 100%;
  background: #2b2b2b;
  color: #c8c8c8;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
}

.terminal {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  height: 100%;
  margin: 0 auto;
  padding: 1rem;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #444;
  color: #9a9a9a;
  font-size: 12px;
}

.hint {
  text-align: right;
}

.nav-link {
  color: #9a9a9a;
  text-decoration: none;
  font-size: 12px;
}

.nav-link:hover {
  color: #c8c8c8;
}

.terminal-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.line {
  margin: 0 0 0.75rem;
}

.line.user {
  color: #e0e0e0;
}

.line.assistant {
  color: #b0b0b0;
}

.line.system {
  color: #888;
  font-style: italic;
}

.line.debug {
  color: #6a8f6a;
  font-size: 12px;
}

.line.error {
  color: #c97a7a;
}

.label {
  color: #777;
  user-select: none;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #444;
}

.prompt-char {
  color: #777;
  user-select: none;
}

#prompt {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid #555;
  border-radius: 2px;
  background: #333;
  color: #e0e0e0;
  font: inherit;
}

#prompt:focus {
  outline: none;
  border-color: #777;
}

#prompt:disabled {
  opacity: 0.6;
}

button,
.upload-btn {
  padding: 0.4rem 0.65rem;
  border: 1px solid #555;
  border-radius: 2px;
  background: #3a3a3a;
  color: #c8c8c8;
  font: inherit;
  cursor: pointer;
}

button:hover:not(:disabled),
.upload-btn:hover {
  background: #454545;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upload-btn {
  display: inline-block;
}

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