:root {
  --bg: #000000;
  --sidebar-bg: #050505;
  --card-bg: #0b0c10;
  --card-border: rgba(0, 242, 254, 0.2);
  --accent: #00f2fe;
  --accent-secondary: #4facfe;
  --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --text-main: #ffffff;
  --text-muted: #8a94a6;
  --badge-bg: rgba(0, 242, 254, 0.12);
  --badge-border: rgba(0, 242, 254, 0.4);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-gradient {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 800px;
  background: radial-gradient(circle at 50% 20%, rgba(0, 242, 254, 0.08), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  background: rgba(5, 5, 7, 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 18px rgba(0, 242, 254, 0.4);
}

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

.badge-vlt {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
}

.brand-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

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

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

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

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
}

.status-dot.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 56px 0 40px;
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 30%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
}

.search-box {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 20px;
  color: #fff;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
}

.search-box button {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  border: none;
  color: #090d16;
  font-weight: 700;
  font-size: 14px;
  padding: 0 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-box button:hover {
  opacity: 0.9;
}

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

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 24px;
  backdrop-filter: blur(8px);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}

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

/* Cards & Tables */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 48px;
}

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

.card-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.btn-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.btn-sm:hover {
  background: rgba(255, 255, 255, 0.1);
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--card-border);
  text-transform: uppercase;
}

.data-table td {
  padding: 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.hash-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.hash-link:hover {
  text-decoration: underline;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #111827;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.detail-row {
  margin-bottom: 16px;
}

.detail-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.detail-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: 8px;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-genesis {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 16px;
}

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

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

/* Auto Refresh Button */
.btn-auto-refresh {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-auto-refresh.off {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Network Health Bar */
.network-health-bar {
  display: flex;
  justify-content: space-around;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 18px;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.health-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.health-label {
  color: var(--text-muted);
}
.health-val {
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

/* Trend Chart */
.chart-section {
  margin-bottom: 24px;
}
.chart-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}
.chart-container {
  padding: 16px;
  width: 100%;
}
#trendCanvas {
  width: 100%;
  height: 120px;
  display: block;
}

/* Mempool Section */
.mempool-section {
  margin-bottom: 24px;
}
.mempool-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--card-border);
  margin-top: 12px;
}
.btn-pagination {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-pagination:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}
.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Copy Button in Modals */
.btn-copy-sm {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
}
.btn-copy-sm:hover {
  background: rgba(0, 242, 254, 0.2);
}

