* {
  box-sizing: border-box;
}

html, body {
  background-color: white;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
}

textarea {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  resize: vertical;
  line-height: 1.5;
}

textarea:focus {
  outline: none;
  border-color: #1a3a52;
  box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.1);
}

textarea::placeholder {
  color: #999;
}

.btn-primary {
  padding: 12px 24px;
  background-color: #1a3a52;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  align-self: center;
  min-width: 200px;
}

.btn-primary:hover {
  background-color: #142d40;
}

.btn-primary:active {
  transform: scale(0.98);
}

.stale {
  display: none;
  color: #999;
  font-style: italic;
}

.processing {
  display: none;
  margin: 20px;
  padding: 20px;
  background-color: #e8f4f8;
  border-left: 4px solid #0066cc;
  border-radius: 4px;
}

.processing h2 {
  color: #0066cc;
  margin: 0;
}

.output {
  display: none;
  margin: 20px;
}

.output h2 {
  color: #1a3a52;
  margin-top: 0;
}

.output ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.output li {
  padding: 10px;
  background-color: #f9f9f9;
  margin-bottom: 8px;
  border-radius: 4px;
  border-left: 4px solid #0066cc;
}

.output a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

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

.error {
  display: none;
  margin: 20px;
  padding: 20px;
  background-color: #ffebee;
  border-left: 4px solid #d32f2f;
  border-radius: 4px;
}

.error h2 {
  color: #d32f2f;
  margin-top: 0;
}

.error pre {
  background-color: #fff;
  padding: 12px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 12px;
}

div:has(.stale[style*="inline"]) {
  opacity: 0.6;
}

.version {
  position: fixed;
  bottom: 10px;
  right: 10px;
  color: #999;
  font-size: 12px;
  font-family: Arial, sans-serif;
}