:root {
  --bg: #0b0f10;
  --panel: #11181b;
  --text: #d7ffe0;
  --muted: #7fa18a;
  --accent: #59ffa0;
  --danger: #ff7b7b;
  --border: #1f2a2e;
}

* {
  box-sizing: border-box;
}

html {
  background: #0b0f10;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(circle at top, #122025 0%, var(--bg) 45%);
  color: var(--text);
  font-family: Consolas, Monaco, "Courier New", monospace;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.terminal {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: rgba(17, 24, 27, 0.98);
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #0f1518;
  flex-shrink: 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}

.dot.yellow {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.terminal-title {
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
}

.terminal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px;
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}

.line {
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 1px;
  font-size: 14px;
}

.prompt {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.error {
  color: var(--danger);
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #0d1315;
  flex-shrink: 0;
}

.label {
  color: var(--accent);
  user-select: none;
  white-space: nowrap;
  font-size: 14px;
}

.cmd-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 8px 0;
}

.hint {
  padding: 0 16px calc(12px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 12px;
  background: #0d1315;
  flex-shrink: 0;
}

::selection {
  background: rgba(89, 255, 160, 0.25);
}

@media (min-width: 768px) {
  body {
    padding: 24px;
    align-items: center;
  }

  .terminal {
    width: min(900px, 100%);
    height: min(620px, 85vh);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  }

  .terminal-body {
    padding: 18px;
  }

  .line {
    font-size: 16px;
  }

  .input-row {
    padding: 16px 18px;
  }

  .hint {
    padding: 0 18px 16px;
    font-size: 13px;
  }
}