body {
  margin: 40px auto;
  padding: 0 15px;
  max-width: 900px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: #333;
  background: #fff;
}

h1, h3 { margin-bottom: 0.3em; }

.layout {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  align-items: flex-start;
}

.editor-panel {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

textarea {
  font-family: monospace;
  font-size: 14px;
  padding: 0.5em;
  border: 1px solid #ccc;
  min-height: 20em;
  width: 100%;
  box-sizing: border-box;
}

.controls {
  display: flex;
  gap: 1em;
  align-items: center;
}

button {
  padding: 0.5em 1.5em;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #333;
}

#result {
  white-space: pre-wrap;
  font-size: 14px;
  padding: 0.5em;
  border: 1px solid #eee;
  background: #f9f9f9;
  min-height: 2em;
}

.viz-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
}

.circuit-container {
  position: relative;
  display: inline-block;
  max-width: 400px;
  width: 100%;
}

.circuit-container img {
  width: 100%;
  display: block;
}

#glow {
  position: absolute;
  left: 23%;
  top: 51%;
  width: 12%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,50,50,0.9) 0%, rgba(255,50,50,0.5) 40%, rgba(255,0,0,0) 70%);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

#status {
  font-family: monospace;
  font-size: 18px;
  font-weight: bold;
  padding: 8px;
  color: #999;
}

.promo {
  margin-top: 1.5em;
  font-size: 16px;
  color: #555;
}

.promo a {
  color: #6e4a9e;
  font-weight: bold;
  text-decoration: none;
}

.promo a:hover {
  text-decoration: underline;
}

.logs {
  display: flex;
  flex-direction: column;
  max-height: 15em;
  min-height: 2em;
  padding: 0.5em;
  margin: 0.5em 0;
  font-size: small;
  overflow: auto;
  border: 1px solid #ccc;
}
