* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #0b0f0d;
  color: #c8ffd4;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.crt {
  width: 100%;
  max-width: 760px;
  background: #0e1512;
  border: 1px solid #1f3d2c;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(50, 255, 130, 0.08), inset 0 0 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

header {
  padding: 20px 24px;
  border-bottom: 1px solid #1f3d2c;
  background: linear-gradient(180deg, rgba(60, 255, 140, 0.06), transparent);
}

.title {
  font-size: 20px;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.prompt {
  color: #5dffa0;
}

.cursor {
  animation: blink 1s step-start infinite;
}

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

.stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5c8f70;
}

.stat-value {
  font-size: 15px;
  color: #eaffef;
  font-weight: 600;
}

main {
  padding: 20px 24px 24px;
}

.terminal {
  background: #060a08;
  border: 1px solid #1a2e21;
  border-radius: 6px;
  padding: 14px 16px;
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.65;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-line.muted {
  color: #5c8f70;
}

.tag {
  display: inline-block;
  min-width: 46px;
  text-align: center;
  border-radius: 3px;
  padding: 0 4px;
  margin-right: 8px;
  font-size: 11px;
  font-weight: 700;
}

.tag.ok {
  background: rgba(93, 255, 160, 0.15);
  color: #5dffa0;
}

.tag.fail {
  background: rgba(255, 93, 93, 0.18);
  color: #ff7373;
}

.tag.wait {
  background: rgba(255, 220, 93, 0.15);
  color: #ffdc5d;
}

.controls {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

button {
  font-family: inherit;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid #2a5c3e;
  background: #133622;
  color: #c8ffd4;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover:not(:disabled) {
  background: #1c4c31;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

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

button.secondary {
  background: transparent;
  color: #7fd99a;
}

button.secondary:hover {
  background: rgba(127, 217, 154, 0.08);
}

.history {
  margin-top: 20px;
  border-top: 1px solid #1f3d2c;
  padding-top: 16px;
}

.history h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5c8f70;
  margin: 0 0 10px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.history-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding: 6px 10px;
  background: #0d1512;
  border: 1px solid #17301f;
  border-radius: 4px;
}

.history-row .ok-badge {
  color: #5dffa0;
}

.history-row .fail-badge {
  color: #ff7373;
}

footer {
  text-align: center;
  font-size: 11px;
  color: #3f6b50;
  padding: 12px;
  border-top: 1px solid #1f3d2c;
}
