@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: #090a0d;
  --card-bg: #111318;
  --card-border: #1f232b;
  --card-hover: #262b35;
  --text-main: #f2f4f8;
  --text-dim: #8a92a3;
  --lime: #ccff00;
  --lime-dim: rgba(204, 255, 0, 0.12);
  --lime-border: rgba(204, 255, 0, 0.35);
  --accent-blue: #4da6ff;
  --accent-red: #ff5252;
  --mono: ui-monospace, 'GeistMono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

a {
  color: var(--lime);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.mono {
  font-family: var(--mono);
}

/* Nav */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(9, 10, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

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

.office-tag {
  color: var(--text-dim);
}

.slash {
  color: var(--card-border);
}

.app-title {
  color: #fff;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #191c24;
  color: var(--text-dim);
  border: 1px solid var(--card-border);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.badge:hover {
  border-color: var(--lime);
  color: #fff;
  text-decoration: none;
}

.contract-badge {
  border-color: var(--lime-border);
  color: var(--lime);
}

/* Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--card-border);
}

.sub-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--lime);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: #fff;
}

.hero .lead {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 20px;
}

.contract-text {
  color: var(--lime);
  background: var(--lime-dim);
  padding: 2px 6px;
  border-radius: 4px;
}

.contract-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.75rem;
}

.meta-item {
  color: var(--text-dim);
  font-family: var(--mono);
}
.meta-item .lbl {
  color: #5d6575;
  font-weight: 600;
  margin-right: 4px;
}

.cover-art {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Lookup Card */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.card-head h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}

.card-head .hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
  margin-bottom: 18px;
}

.input-wrap label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  align-items: center;
  background: #090a0d;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 4px 6px 4px 12px;
  transition: border-color 0.2s;
}
.input-row:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime);
}

.prefix {
  font-family: var(--mono);
  color: var(--lime);
  font-size: 0.95rem;
  user-select: none;
  margin-right: 4px;
}

.input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: #fff;
  padding: 8px 4px;
}
.input-row input::placeholder {
  color: #434958;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn.primary {
  background: var(--lime);
  color: #090a0d;
}
.btn.primary:hover {
  background: #b8e600;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.input-note {
  display: block;
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.code-sm {
  background: #1f232b;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  color: #d1d5db;
}

.sample-hashes {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--card-border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-right: 4px;
}

.chip {
  background: #181b22;
  border: 1px solid var(--card-border);
  color: #9ba3b4;
  padding: 4px 10px;
  font-size: 0.74rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
  transition: all 0.15s;
}
.chip:hover {
  background: var(--lime-dim);
  color: var(--lime);
  border-color: var(--lime-border);
}

/* Status Panels */
.status-panel {
  background: var(--card-bg);
  border: 1px dashed var(--card-border);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 24px;
}

.status-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #fff;
}
.status-panel p {
  font-size: 0.86rem;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
}

.icon-circle {
  width: 48px;
  height: 48px;
  line-height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #181b22;
  border: 1px solid var(--card-border);
  font-size: 1.4rem;
  color: var(--lime);
}
.icon-circle.warn {
  color: var(--accent-red);
  border-color: rgba(255, 82, 82, 0.3);
  background: rgba(255, 82, 82, 0.08);
}
.icon-circle.ghost {
  color: #647087;
}

.suggestion-box {
  margin-top: 16px;
  display: inline-block;
  font-size: 0.76rem;
  padding: 6px 12px;
  background: #181b22;
  border-radius: 6px;
  color: var(--text-dim);
}

.hash-tag {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  background: #090a0d;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  word-break: break-all;
}

/* Loading Pulse */
.pulse-loader {
  width: 38px;
  height: 38px;
  margin: 0 auto 18px;
  border: 3px solid rgba(204, 255, 0, 0.15);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.mono-dim {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #555e70;
  margin-top: 10px;
}

/* Result Panel */
.result-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
  animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.verified-badge {
  background: var(--lime-dim);
  color: var(--lime);
  border: 1px solid var(--lime-border);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
}

.result-title-group h2 {
  font-size: 1.3rem;
  margin-top: 6px;
  color: #fff;
}

.timestamp-pill {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--text-dim);
  background: #181b22;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
}

.provenance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid-card {
  background: #0d0f14;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 14px 16px;
}
.grid-card.full {
  grid-column: 1 / -1;
}

.card-caption {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.val-strong {
  font-size: 0.95rem;
  color: #fff;
  word-break: break-all;
}

.sub-hint {
  display: block;
  font-size: 0.72rem;
  color: #5d6575;
  margin-top: 4px;
}

.hash-display {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--lime);
  background: rgba(204, 255, 0, 0.04);
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px dashed var(--lime-border);
  word-break: break-all;
}

.recipe-box {
  background: #13161d;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #e5e9f0;
  line-height: 1.5;
  border-left: 3px solid var(--lime);
  white-space: pre-wrap;
}

.raw-section details summary {
  cursor: pointer;
  font-size: 0.76rem;
  color: var(--text-dim);
  user-select: none;
  font-family: var(--mono);
}
.raw-section details summary:hover {
  color: #fff;
}

.raw-json {
  margin-top: 10px;
  padding: 10px;
  background: #050608;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #9ba3b4;
  overflow-x: auto;
  max-height: 200px;
}

/* Footer */
.app-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .provenance-grid {
    grid-template-columns: 1fr;
  }
  .input-row {
    flex-wrap: wrap;
  }
  .btn {
    width: 100%;
    margin-top: 8px;
  }
}