:root {
  color-scheme: dark;
  --demo-bg: #0d0f17;
  --demo-panel: #131722;
  --demo-border: #23283a;
  --demo-text: #e6e8ef;
  --demo-dim: #8f97ad;
  --demo-accent: #ff3d6c;
  --demo-blue: #4f8cff;
  --demo-green: #79d28a;
  --demo-yellow: #e7c567;
  --demo-red: #ff6f86;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--demo-bg);
  color: var(--demo-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
  min-height: 100%;
}

.demo-shell {
  width: 100%;
  height: 100%;
  padding: 0;
}

.demo-terminal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--demo-panel);
  border: 1px solid var(--demo-border);
  border-radius: 12px;
  overflow: hidden;
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--demo-border);
  background: #171c28;
}

.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.demo-dot.red {
  background: #ff5f57;
}

.demo-dot.yellow {
  background: #febc2e;
}

.demo-dot.green {
  background: #28c840;
}

.demo-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--demo-dim);
}

.demo-body {
  flex: 1 1 auto;
  min-height: 420px;
  padding: 18px 20px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.demo-body::-webkit-scrollbar {
  width: 8px;
}

.demo-body::-webkit-scrollbar-thumb {
  background: #2b3145;
  border-radius: 999px;
}

.demo-line {
  min-height: 1.65em;
}

.demo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--demo-border);
  background: #171c28;
}

.demo-progress {
  flex: 1;
  height: 4px;
  background: #23283a;
  border-radius: 999px;
  overflow: hidden;
}

.demo-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--demo-accent), #ff7c9a);
  transition: width 0.25s ease;
}

.demo-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-button {
  border: 1px solid #31384e;
  background: #202638;
  color: var(--demo-text);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
}

.demo-button:hover {
  border-color: var(--demo-accent);
}

.demo-button:disabled {
  opacity: 0.55;
  cursor: default;
  border-color: #31384e;
}

.demo-button--primary {
  border-color: var(--demo-accent);
}

.demo-button--primary:hover {
  background: #272032;
}

.demo-speed {
  font-size: 12px;
  color: var(--demo-dim);
}

.demo-card {
  padding: 22px 0 10px;
}

.demo-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--demo-accent);
  margin-bottom: 8px;
}

.demo-card-body {
  color: var(--demo-dim);
  max-width: 68ch;
}

.demo-card-body strong {
  color: var(--demo-text);
}

.prompt-user {
  color: var(--demo-accent);
  font-weight: 700;
}

.prompt-path {
  color: var(--demo-blue);
}

.prompt-dollar {
  color: var(--demo-dim);
}

.cmd {
  color: var(--demo-text);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 1px;
  background: var(--demo-accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.dim {
  color: var(--demo-dim);
}

.ok {
  color: var(--demo-green);
}

.warn {
  color: var(--demo-yellow);
}

.err {
  color: var(--demo-red);
}

.info {
  color: var(--demo-accent);
}

.hl {
  color: #d0b6ff;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
