.terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.terminal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.terminal-modal {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 650px;
  max-height: 70vh;
  background: #0a0a10;
  border: 1px solid var(--accent-dim);
  border-radius: 12px;
  box-shadow: 0 0 40px var(--accent-glow);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s;
}

.terminal-overlay.active .terminal-modal {
  transform: scale(1) translateY(0);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.terminal-title {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.terminal-close:hover {
  color: var(--accent);
}

.terminal-body {
  flex: 1;
  min-height: 200px;
  max-height: 350px;
  overflow-y: auto;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

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

.terminal-line.command { color: var(--green); }
.terminal-line.error { color: var(--accent); }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.terminal-prompt {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--green);
}

.terminal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.terminal-run {
  padding: 0.3rem 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.3s;
}

.terminal-run:hover {
  background: var(--accent-bright);
}
