html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}
* { box-sizing: border-box; }

:root {
  --bg: #1e1e1e;
  --fg: #f0f0f0;
  --accent-user: #8ae234;
  --accent-host: #729fcf;
  --accent-path: #ad7fa8;
  --accent-prompt: #87d7af;
}

html { -webkit-text-size-adjust: 100%; }
body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Ubuntu Mono', monospace;
  font-size: 16px;
  line-height: 1.3; 
}

#terminal {
  box-sizing: border-box;
  padding-top: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  padding-left: max(7px, env(safe-area-inset-left));
  padding-right: max(7px, env(safe-area-inset-right));
  min-height: calc(100dvh - 20px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.line,
.output {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: inherit;
}

.prompt-line {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0; 
}

.prompt {
  color: var(--accent-prompt);
  white-space: nowrap;
}

.prompt .user { color: var(--accent-user); }
.prompt .at   { color: var(--fg); }
.prompt .host { color: var(--accent-host); }
.prompt .path { color: var(--accent-path); }

#commandInput {
  background-color: transparent;
  border: none;
  color: var(--fg);
  font-family: 'Ubuntu Mono', monospace;
  font-size: 16px;
  flex-grow: 1;
  outline: none;
  padding-left: 5px;
}

.output a {
  color: inherit;
  text-decoration: none;
  border: 0;
}

@media (max-width: 600px) {
  body, #commandInput { font-size: 14px; }
  #terminal {
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    padding-left: max(7px, env(safe-area-inset-left));
    padding-right: max(7px, env(safe-area-inset-right));
  }
}
