/* ══════════════════════════════════════════
   QBit Chain Explorer — Styles
   ══════════════════════════════════════════ */

:root {
  --bg-primary: #0a0b14;
  --bg-secondary: #12131f;
  --bg-card: #161827;
  --bg-card-hover: #1c1e33;
  --border: rgba(99, 102, 241, 0.12);
  --border-hover: rgba(99, 102, 241, 0.3);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-2: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-3: linear-gradient(135deg, #f59e0b, #ef4444);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ Background effects ═══ */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: float 20s ease-in-out infinite;
}

.bg-glow-1 {
  width: 600px;
  height: 600px;
  background: rgba(99, 102, 241, 0.08);
  top: -200px;
  right: -100px;
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: rgba(139, 92, 246, 0.06);
  bottom: -200px;
  left: -100px;
  animation-delay: -10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, 20px);
  }
}

/* ═══ Header ═══ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-icon {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.6));
  }
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: blink 2s ease-in-out infinite;
}

.status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.header-rpc {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 4px;
}

/* ═══ Main ═══ */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

/* ═══ Stats Grid ═══ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-primary);
  transition: color 0.3s;
}

.stat-value.updated {
  color: var(--accent-light);
}

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

.stat-progress {
  height: 4px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 2px;
  transition: width 0.5s ease;
  width: 0%;
}

.stat-sparkline {
  height: 30px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.stat-sparkline .bar {
  flex: 1;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.stat-sparkline .bar:last-child {
  opacity: 0.8;
}

/* ═══ Supply Overview ═══ */
.supply-overview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.supply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.supply-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.supply-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.supply-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.supply-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.supply-total::before {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.supply-circulating::before {
  background: linear-gradient(90deg, #22c55e, #10b981);
}

.supply-staked::before {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.supply-inflation::before {
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
}

.supply-apy::before {
  background: linear-gradient(90deg, #a855f7, #ec4899);
}

.supply-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.supply-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.supply-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-primary);
  transition: color 0.3s;
}

.supply-value.updated {
  color: var(--accent-light);
}

.supply-unit {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

@media (max-width: 1100px) {
  .supply-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .supply-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ═══ Search ═══ */
.search-section {
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--mono);
  font-size: 0.9rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
  font-family: var(--font);
}

.search-box button {
  padding: 14px 20px;
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.search-box button:hover {
  background: var(--accent-light);
}

/* ═══ Search Results ═══ */
.search-results {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-close {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.btn-close:hover {
  background: rgba(239, 68, 68, 0.2);
}

.result-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.result-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.result-value {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  word-break: break-all;
}

.result-value.accent {
  color: var(--accent-light);
}

/* ═══ Panels ═══ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}

.panel.full-width {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.live-badge {
  font-size: 0.7rem;
  color: var(--success);
  font-weight: 500;
  animation: blink 1.5s ease-in-out infinite;
}

/* ═══ Block list ═══ */
.block-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  border-bottom: 1px solid rgba(99, 102, 241, 0.05);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.block-item:hover {
  background: rgba(99, 102, 241, 0.05);
}

.block-slot {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-light);
  min-width: 60px;
}

.block-hash {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-txs {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(99, 102, 241, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.block-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ═══ Validator list ═══ */
.validator-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid rgba(99, 102, 241, 0.05);
  transition: background 0.2s;
}

.validator-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.validator-item:hover {
  background: rgba(99, 102, 241, 0.05);
}

.validator-details {
  display: flex;
  gap: 16px;
  padding-left: 20px;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.validator-detail-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.validator-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.validator-status.active {
  background: var(--success);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.validator-status.delinquent {
  background: var(--danger);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.validator-pubkey {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.validator-stake {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-light);
  white-space: nowrap;
}

.validator-commission {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  white-space: nowrap;
}

.validator-vote-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.validator-vote-tag.ok {
  background: var(--success-bg);
  color: var(--success);
}

.validator-vote-tag.bad {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ═══ Transaction list ═══ */
.tx-item {
  display: grid;
  grid-template-columns: 80px 1fr 60px 110px 60px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid rgba(99, 102, 241, 0.05);
  transition: background 0.2s;
  animation: fadeIn 0.3s ease;
}

.tx-item:hover {
  background: rgba(99, 102, 241, 0.05);
}

.tx-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
}

.tx-slot {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-light);
}

.tx-sig {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-clickable {
  cursor: pointer;
  transition: color 0.2s;
}

.tx-clickable:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* ═══ Transaction Detail Sections ═══ */
.result-section {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.result-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ix-item {
  display: grid;
  grid-template-columns: 30px 1fr 80px;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.ix-item:hover {
  background: rgba(99, 102, 241, 0.06);
}

.ix-index {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.ix-program {
  font-family: var(--mono);
  color: var(--accent-light);
  font-size: 0.7rem;
}

.ix-accounts {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
}

.bal-change-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.bal-addr {
  font-family: var(--mono);
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.bal-diff {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.7rem;
}

.tx-logs {
  margin-top: 12px;
}

.tx-logs summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 6px 0;
}

.tx-logs summary:hover {
  color: var(--text-primary);
}

.log-content {
  font-family: var(--mono);
  font-size: 0.62rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 10px;
  overflow-x: auto;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
}

.tx-status {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
}

.tx-status.success {
  background: var(--success-bg);
  color: var(--success);
}

.tx-status.error {
  background: var(--danger-bg);
  color: var(--danger);
}

.tx-fee {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
}

/* ═══ Loading ═══ */
.loading-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-size: 0.85rem;
}

/* ═══ Footer ═══ */
footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tx-item {
    grid-template-columns: 60px 1fr 60px;
  }

  .tx-fee {
    display: none;
  }

  .header-rpc {
    display: none;
  }
}

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

  main {
    padding: 12px;
  }
}

/* ═══ Utilities ═══ */
.text-success {
  color: var(--success);
}
.text-danger {
  color: var(--danger);
}
.text-warning {
  color: var(--warning);
}
.text-accent {
  color: var(--accent-light);
}
.text-mono {
  font-family: var(--mono);
}

/* Tooltip */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  z-index: 10;
  border: 1px solid var(--border);
}

/* ═══ Epoch Rewards Chart ═══ */
.reward-chart {
  padding: 12px 0;
}

.reward-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  padding: 0 8px;
}

.reward-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.reward-bar {
  width: 100%;
  max-width: 32px;
  background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
  min-height: 4px;
}

.reward-bar-wrap:hover .reward-bar {
  background: linear-gradient(180deg, #818cf8 0%, #a78bfa 100%);
  transform: scaleY(1.05);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.reward-bar-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ═══ Reward List ═══ */
.reward-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.reward-total {
  color: var(--success);
  font-weight: 600;
  font-family: var(--mono);
}

.reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  transition: background 0.2s;
}

.reward-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

.reward-epoch {
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.reward-amount {
  color: var(--success);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
}

/* ═══ Pool Status ═══ */
.pool-info {
  padding: 4px 0;
}

.pool-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

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

.pool-label {
  color: var(--text-secondary);
}

.pool-value {
  color: var(--text-primary);
  font-family: var(--mono);
  font-weight: 500;
}

.pool-value.accent {
  color: var(--accent-light);
}

.pool-progress-wrap {
  padding: 16px 12px;
}

.pool-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.pool-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #6366f1);
  border-radius: 6px;
  transition: width 1s ease;
  min-width: 2px;
}

.pool-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.pool-estimate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(34, 197, 94, 0.06);
  border-radius: 6px;
  margin: 4px 12px 8px;
  font-size: 0.8rem;
}

/* ═══ Error Banner ═══ */
.error-banner {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 16px;
  color: var(--danger);
  font-size: 0.8rem;
  align-items: center;
  gap: 8px;
  animation: slideDown 0.3s ease;
}

.error-banner.visible {
  display: flex;
}

.error-banner-text {
  flex: 1;
}

.error-banner-retry {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  transition: background 0.2s;
}

.error-banner-retry:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ═══ Footer Enhanced ═══ */
.footer-chain-info {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.footer-chain-info span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ═══ Mobile Responsive ═══ */
@media (max-width: 768px) {
  main {
    padding: 12px;
  }

  .header-inner {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-rpc {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 1.2rem;
  }

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

  .supply-overview {
    padding: 14px;
  }

  .supply-value {
    font-size: 1.1rem;
  }

  .search-box input {
    padding: 12px 14px;
    font-size: 0.8rem;
  }

  .panel {
    padding: 14px;
  }

  .section-header h2 {
    font-size: 0.9rem;
  }

  .block-item {
    gap: 8px;
    padding: 8px 10px;
  }

  .block-hash {
    display: none;
  }

  .block-slot {
    font-size: 0.75rem;
  }

  .tx-item {
    grid-template-columns: 65px 1fr 50px 85px;
    gap: 6px;
    padding: 8px 10px;
    font-size: 0.7rem;
  }

  .tx-time {
    display: none;
  }

  .tx-slot {
    font-size: 0.7rem;
  }

  .tx-sig {
    font-size: 0.65rem;
  }

  .validator-details {
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 16px;
  }

  .reward-bars {
    height: 70px;
    gap: 4px;
  }

  .pool-row {
    font-size: 0.72rem;
    padding: 8px 10px;
  }

  .pool-value {
    font-size: 0.72rem;
  }

  footer .footer-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 10px;
  }

  .stat-value {
    font-size: 1rem;
  }

  .logo-text h1 {
    font-size: 1rem;
  }

  .validator-main {
    flex-wrap: wrap;
    gap: 6px;
  }

  .validator-pubkey {
    font-size: 0.7rem;
  }

  .tx-item {
    grid-template-columns: 55px 1fr 45px;
    gap: 4px;
  }

  .tx-fee {
    display: none;
  }

  .search-box input {
    font-size: 0.75rem;
    padding: 10px 12px;
  }
}
