* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Consolas, 'Lucida Console', 'Courier New', monospace;
  font-size: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #000;
  color: #c0c0c0;
}

/* ---- Output area ---- */
#output {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.3;
  user-select: text;
  cursor: text;
}

#output .line {
  display: block;
}

/* ---- Input line ---- */
#input-line {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 6px 4px;
  flex-shrink: 0;
  background: inherit;
}

#prompt {
  white-space: pre;
  flex-shrink: 0;
  user-select: none;
}

#input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.3;
  padding: 0;
  caret-color: currentColor;
  border-radius: 0;
}

/* ---- Blinking block cursor ---- */
@keyframes blink-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

#input:focus {
  caret-color: transparent;
}

#cursor-block {
  position: absolute;
  width: 8px;
  height: 1.3em;
  background: currentColor;
  animation: blink-cursor 1s step-end infinite;
  pointer-events: none;
  display: none;
}

#cursor-measure {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.3;
  pointer-events: none;
  top: -9999px;
  left: 0;
}

/* ---- Scrollbar styling ---- */
#output::-webkit-scrollbar {
  width: 14px;
}

#output::-webkit-scrollbar-track {
  background: #1a1a1a;
}

#output::-webkit-scrollbar-thumb {
  background: #444;
  border: 2px solid #1a1a1a;
}

#output::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ---- Shell selector bar ---- */
#shell-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px;
  background: var(--sz-color-button-face);
  border-bottom: 1px solid var(--sz-color-button-shadow);
  flex-shrink: 0;
  user-select: none;
  position: relative;
  z-index: 10;
}

#shell-bar label {
  color: var(--sz-color-button-text);
  font-size: 12px;
}

#shell-select {
  font-family: inherit;
  font-size: 12px;
  padding: 1px 4px;
  outline: none;
  cursor: pointer;
}

/* ---- Bash prompt color ---- */
.bash-prompt {
  color: #00ff00;
}

.bash-prompt-path {
  color: #5599ff;
}

.bash-prompt-user {
  color: #00ff00;
}

.bash-prompt-dollar {
  color: #c0c0c0;
}
