@font-face {
  font-family: 'Geist';
  src: url('https://musechain.io/fonts/geist/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #090a0f;
  --surface: #11141c;
  --surface-hover: #181d28;
  --border: #232a3b;
  --text: #e6ebf5;
  --text-muted: #8b97ad;
  --lime: #ccff00;
  --lime-glow: rgba(204, 255, 0, 0.25);
  --lime-dim: #9ec200;
  --red: #ff4d6d;
  --blue: #38bdf8;
  --code-bg: #06070a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--lime);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* Header & Top Bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #06070a;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.badge-link {
  font-family: monospace;
  background: #171d29;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 24px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
  font-weight: 600;
  margin-bottom: 8px;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 20px;
  max-width: 680px;
}

.hero-image-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 36px rgba(0,0,0,0.5);
  background: #000;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.safety-banner {
  background: rgba(204, 255, 0, 0.05);
  border: 1px solid rgba(204, 255, 0, 0.35);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.45;
}

.safety-icon {
  font-size: 1.2rem;
}

/* Layout */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px 48px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.card-head h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.conn-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0b0e14;
  border: 1px solid #1f2737;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #cad3e2;
  font-family: monospace;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  display: inline-block;
  box-shadow: 0 0 6px var(--lime);
}

/* Tabs */
.flow-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.flow-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.flow-tab:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.flow-tab.active {
  background: var(--lime);
  color: #000;
  border-color: var(--lime);
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

/* Form inputs */
.field-row {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #b0bcd0;
  margin-bottom: 6px;
}

input[type="text"] {
  width: 100%;
  background: #07090e;
  border: 1px solid #232b3c;
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: var(--lime);
}

.hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.call-box {
  background: #090c12;
  border: 1px solid #1c2332;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.call-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background: #172030;
  color: var(--lime);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Buttons */
.btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--lime);
  color: #000;
}

.btn-primary:hover {
  background: #d8ff33;
  box-shadow: 0 0 12px var(--lime-glow);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: #fff;
}

.btn-sm {
  padding: 8px 12px;
  background: #1a2130;
  color: #e0e7f5;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-sm:hover {
  background: #252e42;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* Review view */
.review-box {
  background: #0b0e14;
  border: 1px solid #1e2636;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.review-box h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 6px 0;
  border-bottom: 1px solid #141a24;
}

.summary-line:last-child {
  border-bottom: none;
}

.mono-sub {
  font-family: monospace;
  font-size: 0.8rem;
  color: #b9c7db;
}

.lime-text {
  color: var(--lime);
}

.code-preview {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #10141d;
  padding: 8px 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.chip {
  background: #19202f;
  color: var(--lime);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

pre {
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #abbbd3;
  overflow-x: auto;
}

.exec-console {
  margin-top: 16px;
  background: #030406;
  border: 1px solid #1c2332;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.8rem;
  overflow: hidden;
}

.console-head {
  background: #0c1018;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.75rem;
  color: #8b99af;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #161c28;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 6px var(--lime);
}

.console-body {
  padding: 12px;
  white-space: pre-line;
  line-height: 1.6;
  color: #c9d5e8;
  max-height: 220px;
  overflow-y: auto;
}

/* Right inspect card */
.contract-meta {
  background: #0b0e14;
  border: 1px solid #1a2230;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 6px 0;
  border-bottom: 1px solid #141b26;
}

.meta-item:last-child {
  border-bottom: none;
}

.meta-label {
  color: var(--text-muted);
}

.mono {
  font-family: monospace;
}

.replay-section {
  margin-bottom: 24px;
}

.replay-section h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.replay-explainer {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.inline-code {
  font-family: monospace;
  background: #171d2a;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--lime);
}

.replay-checker .search-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.replay-checker input {
  flex: 1;
}

.replay-status {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.replay-status.ready {
  background: rgba(204, 255, 0, 0.08);
  border: 1px solid rgba(204, 255, 0, 0.3);
  color: var(--lime);
}

.replay-status.done {
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid rgba(255, 77, 109, 0.3);
  color: #ff859c;
}

.abi-spec h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.abi-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.abi-entry {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #090c12;
  border: 1px solid #19202e;
  border-radius: 6px;
  padding: 10px 12px;
}

.abi-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.abi-badge.write {
  background: #2a1622;
  color: #ff7597;
  border: 1px solid #542236;
}

.abi-badge.read {
  background: #112529;
  color: #38bdf8;
  border: 1px solid #1a444f;
}

.abi-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.78rem;
}

.abi-details strong {
  font-family: monospace;
  color: #dee6f3;
  word-break: break-all;
}

.abi-details span {
  color: var(--text-muted);
}

.safe-note {
  background: #0c1017;
  border-left: 3px solid var(--lime);
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #abbad0;
  border-radius: 0 6px 6px 0;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: #06070a;
  padding: 20px 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}