@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-primary: #0a0a0c;
  --bg-card: #121216;
  --bg-card-hover: #181820;
  --border-color: #24242c;
  --border-highlight: #3a3a46;
  --text-main: #f0f0f4;
  --text-muted: #8b8b9e;
  --text-dim: #5c5c6e;
  --lime: #ccff00;
  --lime-glow: rgba(204, 255, 0, 0.15);
  --lime-border: rgba(204, 255, 0, 0.35);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background-color: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.brand-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

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

.author-badge, .office-pill {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.author-badge:hover, .office-pill:hover {
  color: #fff;
  border-color: var(--lime);
  background-color: var(--lime-glow);
}

/* Hero Section */
.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  max-width: 1240px;
  margin: 36px auto 20px auto;
  padding: 0 24px;
  align-items: center;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: #1a1a22;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.tag.lime {
  background-color: var(--lime-glow);
  color: var(--lime);
  border-color: var(--lime-border);
}

.hero-heading {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: #ffffff;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.notice-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background-color: #121218;
  border-left: 3px solid var(--lime);
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.notice-box strong {
  color: #fff;
}

.notice-box svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--lime);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.cover-art {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Filter & Sync Bar */
.filter-bar {
  max-width: 1240px;
  margin: 16px auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background-color: #0d0d10;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-btn {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.filter-btn:hover {
  color: #fff;
  border-color: var(--border-highlight);
}

.filter-btn.active {
  background-color: #1a1a24;
  color: var(--lime);
  border-color: var(--lime-border);
}

.stream-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

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

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.refresh-action {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.refresh-action:hover {
  color: #fff;
  border-color: var(--lime);
}

/* Gallery Grid */
.gallery-wrapper {
  max-width: 1240px;
  margin: 20px auto 40px auto;
  padding: 0 24px;
  flex: 1;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

/* Card Styling */
.receipt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.receipt-card:hover {
  transform: translateY(-2px);
  border-color: var(--lime-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.receipt-card.verified::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.app-badge-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.app-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-tag {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge.success {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.fn-banner {
  background: #0d0d12;
  border: 1px solid #1a1a24;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.fn-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.fn-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--lime);
  font-weight: 600;
}

.receipt-details {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-row .lbl {
  color: var(--text-dim);
}

.detail-row .val {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.caller-link, .contract-link {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px dashed var(--border-highlight);
  transition: color 0.15s ease;
}

.caller-link:hover, .contract-link:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.privacy-pill {
  background-color: #16161f;
  border: 1px solid #20202c;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.privacy-pill svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.card-footer {
  border-top: 1px solid #1a1a24;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.time-stamp {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.btn-explorer {
  font-size: 12px;
  font-weight: 600;
  color: var(--lime);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: transparent;
  transition: background-color 0.15s ease;
}

.btn-explorer:hover {
  background-color: var(--lime-glow);
}

/* Skeleton Loading State */
.loading-state {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sk-line {
  background: linear-gradient(90deg, #181822 25%, #252535 50%, #181822 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sk-title { height: 22px; width: 60%; }
.sk-half { height: 16px; width: 45%; }
.sk-full { height: 38px; width: 100%; }
.sk-third { height: 16px; width: 80%; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  max-width: 600px;
  margin: 40px auto;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #fff;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.action-btn {
  background-color: var(--lime);
  color: #000;
  border: none;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.action-btn:hover {
  opacity: 0.9;
}

.hidden {
  display: none !important;
}

/* Footer Documentation */
.footer-docs {
  background-color: #08080a;
  border-top: 1px solid var(--border-color);
  padding: 40px 24px 24px 24px;
  margin-top: auto;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-col p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-col code {
  background-color: #161620;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--lime);
  font-size: 12px;
}

.footer-col a {
  color: var(--lime);
  text-decoration: none;
}

.spec-list {
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-list strong {
  color: #fff;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #161620;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-bottom a {
  color: var(--lime);
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 840px) {
  .hero-container {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }
  .hero-visual {
    order: -1;
  }
  .cover-art {
    max-height: 180px;
  }
  .topbar {
    padding: 12px 16px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}