:root {
  --bg-dark: #070a09;
  --bg-surface: #0e1411;
  --bg-card: #131b17;
  --bg-card-hover: #18221d;
  --border-color: rgba(16, 185, 129, 0.15);
  --border-highlight: rgba(16, 185, 129, 0.4);
  --text-main: #f0fdf4;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --brand-green: #10b981;
  --brand-emerald: #059669;
  --brand-light: #34d399;
  --brand-glow: rgba(16, 185, 129, 0.25);
  --brand-glow-subtle: rgba(16, 185, 129, 0.08);
  --accent-blue: #38bdf8;
  --accent-purple: #c084fc;
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Ambient glow & background grid */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 480px;
  background: radial-gradient(circle 800px at 50% -15%, rgba(16, 185, 129, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(16, 185, 129, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header & Nav */
.header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(7, 10, 9, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.1));
  border: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 15px var(--brand-glow);
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-title span {
  color: var(--brand-green);
  font-weight: 400;
}

.badge-chain {
  background: rgba(16, 185, 129, 0.12);
  color: var(--brand-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--brand-light);
}

.pulse-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-light);
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 8px var(--brand-green);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--brand-green); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Hero Search Area */
.hero-search-section {
  padding: 48px 0 24px;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand-green);
  margin-bottom: 12px;
}

.hero-heading {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.hero-heading .highlight {
  background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-box-wrap {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 6px 8px 6px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px var(--brand-glow-subtle);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
  border-color: var(--brand-green);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 25px var(--brand-glow);
}

.search-icon {
  font-size: 18px;
  color: var(--brand-green);
  margin-right: 12px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-btn {
  background: linear-gradient(135deg, var(--brand-emerald), var(--brand-green));
  color: #042f2e;
  border: none;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.search-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.search-hints {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
}

.search-hints code {
  color: var(--brand-light);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

/* Metrics Ribbon */
.metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 36px 0;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.metric-icon {
  font-size: 16px;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.metric-value.highlight {
  color: var(--brand-light);
}

.metric-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* 2-Column Live Feed Section */
.feed-section {
  margin-bottom: 60px;
}

.feed-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.feed-title-wrap h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.feed-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-toggle-stream {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border-color);
  color: var(--brand-light);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-toggle-stream:hover {
  background: rgba(16, 185, 129, 0.2);
}

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

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

/* Feed Column Card */
.feed-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.column-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(19, 27, 23, 0.5);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}

.column-count {
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--brand-light);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
}

/* Feed Items List */
.feed-list {
  display: flex;
  flex-direction: column;
  max-height: 620px;
  overflow-y: auto;
}

.feed-list::-webkit-scrollbar {
  width: 6px;
}
.feed-list::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.2);
  border-radius: 3px;
}

.feed-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: background 0.15s;
  cursor: pointer;
}

.feed-item:hover {
  background: var(--bg-card-hover);
}

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

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.item-info {
  min-width: 0;
}

.item-primary {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-primary a {
  color: var(--brand-light);
  text-decoration: none;
  font-family: var(--font-mono);
}

.item-primary a:hover {
  text-decoration: underline;
}

.item-secondary {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.item-right {
  text-align: right;
  flex-shrink: 0;
}

.badge-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.badge-transfer {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-shield {
  background: rgba(192, 132, 252, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.badge-unshield {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-faucet {
  background: rgba(16, 185, 129, 0.15);
  color: var(--brand-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.item-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.item-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px var(--brand-glow);
  position: relative;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

.detail-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-muted);
  font-weight: 600;
}

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

.detail-val.badge {
  font-family: var(--font-sans);
}

.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--brand-light);
  font-size: 12px;
}

.copy-chip:hover {
  background: rgba(16, 185, 129, 0.2);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 36px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--brand-light);
}
