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

:root {
  --bg: #090a0d;
  --surface: #12141a;
  --surface-border: #232733;
  --surface-hover: #191c24;
  --lime: #ccff00;
  --lime-glow: rgba(204, 255, 0, 0.16);
  --lime-dark: #a6d400;
  --text-main: #f3f4f6;
  --text-muted: #949eb2;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --radius: 12px;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--lime);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover {
  text-decoration: underline;
}

.header {
  border-bottom: 1px solid var(--surface-border);
  background: rgba(18, 20, 26, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--lime);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--lime-glow);
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-pill {
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-main);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-pill:hover {
  border-color: var(--lime);
  text-decoration: none;
  color: var(--lime);
}

.container {
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 4rem;
  flex: 1;
}

.hero-card {
  background: linear-gradient(180deg, rgba(26, 30, 40, 0.7) 0%, rgba(18, 20, 26, 0.5) 100%);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--lime-glow);
  color: var(--lime);
  border: 1px solid rgba(204, 255, 0, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.lead {
  font-size: 0.96rem;
  color: var(--text-muted);
  max-width: 800px;
}

.lead code {
  color: var(--lime);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88rem;
}

.account-selector-bar {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.selector-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

select {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-main);
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
select:focus {
  border-color: var(--lime);
}

.btn-refresh, .btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--lime);
  color: #0b0c10;
  border: none;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-refresh:hover, .btn-retry:hover {
  background: var(--lime-dark);
}

.receipts-grid {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.receipt-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}
.receipt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(204, 255, 0, 0.4);
}

.receipt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-badge {
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.function-tag {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--lime);
  background: rgba(204, 255, 0, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(204, 255, 0, 0.2);
}

.status-badge {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.status-badge.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-badge.failed {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.receipt-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  margin-bottom: 1.1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.detail-value {
  font-family: monospace;
  font-size: 0.85rem;
  color: #e5e7eb;
  word-break: break-all;
}

.receipt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.calldata-omitted-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: #8b949e;
}

.calldata-omitted-notice svg {
  color: var(--lime);
}

.explorer-btn {
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--lime);
  font-weight: 600;
}
.explorer-btn:hover {
  text-decoration: underline;
}

/* States */
.state-panel {
  background: var(--surface);
  border: 1px dashed var(--surface-border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.state-panel h3 {
  font-size: 1.2rem;
  font-weight: 700;
}
.state-panel p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 500px;
}

.state-error {
  border-color: rgba(239, 68, 68, 0.4);
}
.error-badge {
  color: var(--danger);
  background: var(--danger-bg);
  padding: 0.8rem;
  border-radius: 50%;
  margin-bottom: 0.25rem;
}

.empty-badge {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.8rem;
  border-radius: 50%;
  margin-bottom: 0.25rem;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(204, 255, 0, 0.15);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

.security-banner {
  margin-top: 2.5rem;
  border-top: 1px solid var(--surface-border);
  padding-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.sec-item {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(18, 20, 26, 0.6);
  border: 1px solid var(--surface-border);
  padding: 0.9rem 1rem;
  border-radius: 8px;
}
.sec-item strong {
  color: #fff;
  display: block;
  margin-bottom: 0.25rem;
}

.footer {
  border-top: 1px solid var(--surface-border);
  background: var(--surface);
  padding: 1.4rem 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-wrap {
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-meta {
  font-size: 0.78rem;
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  .account-selector-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .account-actions {
    width: 100%;
  }
  select {
    flex: 1;
  }
}