* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* Intro */

.intro {
  margin-bottom: 32px;
}

.intro h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
}

.intro p {
  margin: 0 0 8px;
  color: #444;
}

/* Example buttons */

.example-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.example-label {
  font-size: 14px;
  color: #666;
}

.example-button {
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 12px;
  color: #1a1a1a;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.example-button:hover {
  background: #ddd;
  border-color: #aaa;
}

.example-button:active {
  background: #ccc;
}

/* REPL panels */

.repl-panel {
  background: #1a1a1a;
  border: 1px solid #333;
  position: relative;
}

.repl-label {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  padding: 8px 12px 0;
}

.repl-output {
  height: 300px;
  overflow-y: auto;
  padding: 8px 12px;
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.repl-input-line {
  display: flex;
  align-items: center;
  padding: 4px 12px 8px;
  border-top: 1px solid #2a2a2a;
}

.repl-prompt {
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 13px;
  color: #888;
  white-space: pre;
  user-select: none;
}

.repl-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e0e0e0;
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 13px;
  caret-color: #e0e0e0;
}

.repl-submit-btn {
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 11px;
  color: #888;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 3px;
  padding: 2px 8px;
  cursor: pointer;
  margin-left: 8px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.repl-submit-btn:hover {
  color: #e0e0e0;
  border-color: #888;
}

/* Output lines */

.repl-line {
  margin: 0;
  padding: 0;
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #e0e0e0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.repl-echo {
  color: #888;
}

.repl-error {
  color: #f44747;
}

.repl-sql {
  color: #888;
  font-style: italic;
}

.repl-table {
  color: #e0e0e0;
}

.repl-success {
  color: #4ec9b0;
}

/* Connector between panels */

.repl-connector {
  display: flex;
  justify-content: center;
  gap: 64px;
  padding: 16px 0;
}

.connector-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.connector-arrow {
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  color: #555;
  transition: color 0.15s ease, text-shadow 0.15s ease;
  user-select: none;
  line-height: 1.4;
}

.connector-arrow.active {
  color: #2ee8a8;
  text-shadow: 0 0 12px rgba(46, 232, 168, 0.7), 0 0 24px rgba(46, 232, 168, 0.3);
}

/* Reference sections */

.reference {
  margin-top: 64px;
  border-top: 1px solid #e0e0e0;
  padding-top: 40px;
}

.reference h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.reference h2 + p {
  color: #555;
  font-size: 15px;
  margin: 0 0 16px;
}

.reference-code {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #e0e0e0;
  font-family: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 16px 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 0 0 40px;
}

/* Loading state */

.loading {
  color: #888;
  font-style: italic;
  padding: 12px;
  text-align: center;
}

/* Responsive */

@media (max-width: 640px) {
  .page {
    padding: 20px 16px 48px;
  }

  .repl-output {
    height: 240px;
  }
}
