/* XCL Explorer theme — layered on Bootstrap 4 (Darkly) + Iquidus style.css */
:root {
  --xcl-bg: #020d2a;
  --xcl-bg-2: #061639;
  --xcl-surface: rgba(11, 30, 70, 0.62);
  --xcl-surface-solid: #0a1d45;
  --xcl-surface-2: rgba(20, 48, 104, 0.45);
  --xcl-border: rgba(90, 170, 255, 0.14);
  --xcl-border-strong: rgba(90, 190, 255, 0.32);
  --xcl-text: #e7f0ff;
  --xcl-muted: #8ea3c9;
  --xcl-faint: #5d7299;
  --xcl-cyan: #00e8ff;
  --xcl-blue: #1a7bff;
  --xcl-grad: linear-gradient(120deg, #00f0ff 0%, #12a8ff 50%, #1a6bff 100%);
  --xcl-green: #2ee6a6;
  --xcl-red: #ff5d7a;
  --xcl-amber: #ffc457;
  --xcl-radius: 14px;
  --xcl-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  padding: 0 !important;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--xcl-bg) !important;
  color: var(--xcl-text);
  font: 15px/1.55 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}
.xcl-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(0, 232, 255, 0.16), transparent 60%),
    radial-gradient(800px 520px at 100% 0%, rgba(26, 107, 255, 0.20), transparent 60%),
    linear-gradient(180deg, var(--xcl-bg) 0%, var(--xcl-bg-2) 100%);
}
.xcl-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120, 180, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
a { color: #4cc9ff; transition: color .15s ease; }
a:hover, a:focus { color: var(--xcl-cyan); text-decoration: none; }
::selection { background: rgba(0, 232, 255, 0.3); }
h1, h2, h3, h4, h5, h6 { color: #fff; font-weight: 700; letter-spacing: -0.01em; }
.text-muted { color: var(--xcl-muted) !important; }
hr { border-color: var(--xcl-border); }
.xcl-grad {
  background: var(--xcl-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- header ---------- */
.xcl-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(2, 13, 42, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--xcl-border);
}
.xcl-header .navbar {
  max-width: 1280px; margin: 0 auto;
  padding: 10px 20px !important;
  background: transparent !important;
}
.xcl-brand { display: flex; align-items: center; gap: 10px; padding: 0; margin-right: 24px; }
.xcl-brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.45)); }
.xcl-brand-text { display: flex; align-items: baseline; gap: 6px; font-weight: 800; font-size: 1.3rem; letter-spacing: 0.02em; line-height: 1; }
.xcl-brand-sub { color: var(--xcl-text); font-weight: 500; font-size: 1.05rem; letter-spacing: 0; opacity: .9; }
.xcl-header .navbar-toggler {
  border: 1px solid var(--xcl-border-strong); border-radius: 10px; padding: 6px 9px;
}
.xcl-header .navbar-toggler:focus { outline: none; box-shadow: 0 0 0 3px rgba(0, 232, 255, .2); }
.xcl-header .navbar-nav { gap: 4px; }
.xcl-header .nav-link {
  color: var(--xcl-muted) !important;
  font-weight: 500; font-size: .94rem;
  padding: 8px 14px !important;
  border-radius: 10px;
  transition: color .15s ease, background .15s ease;
}
.xcl-header .nav-link .fa { width: 16px; text-align: center; opacity: .85; }
.xcl-header .nav-link:hover { color: #fff !important; background: rgba(90, 170, 255, 0.08); }
.xcl-header li.active .nav-link {
  color: #fff !important;
  background: linear-gradient(120deg, rgba(0, 240, 255, .16), rgba(26, 107, 255, .2));
  box-shadow: inset 0 0 0 1px var(--xcl-border-strong);
}
.xcl-header li.active .nav-link .fa { color: var(--xcl-cyan); opacity: 1; }
.menu-text { margin-left: 6px; }

/* ---------- main / hero ---------- */
.xcl-main { flex: 1 0 auto; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 20px 40px; }
.xcl-hero { margin-bottom: 24px; }

.xcl-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  max-width: 860px; margin: 6px auto 26px;
  padding: 6px;
  background: var(--xcl-surface);
  border: 1px solid var(--xcl-border-strong);
  border-radius: 16px;
  box-shadow: 0 10px 40px -12px rgba(0, 150, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.xcl-search:focus-within { border-color: rgba(0, 232, 255, .65); box-shadow: 0 0 0 4px rgba(0, 232, 255, .12), 0 10px 40px -12px rgba(0, 150, 255, .5); }
.xcl-search-icon { position: absolute; left: 22px; color: var(--xcl-muted); pointer-events: none; }
.xcl-search .form-control {
  flex: 1; min-width: 0; height: 48px;
  padding-left: 44px !important;
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  color: #fff !important; font-size: 1rem;
}
.xcl-search .form-control::placeholder { color: var(--xcl-faint); }
.xcl-btn, .btn-primary, .btn-success, .btn-info {
  background: var(--xcl-grad) !important;
  border: 0 !important; color: #021233 !important;
  font-weight: 700; border-radius: 12px !important;
  box-shadow: 0 6px 18px -6px rgba(0, 200, 255, .6);
}
.xcl-btn { height: 48px; padding: 0 26px; }
.xcl-btn:hover, .btn-primary:hover, .btn-success:hover { filter: brightness(1.1); }

.xcl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.xcl-stat {
  position: relative; overflow: hidden;
  padding: 16px 18px;
  background: var(--xcl-surface);
  border: 1px solid var(--xcl-border);
  border-radius: var(--xcl-radius);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.xcl-stat::before {
  content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px;
  background: var(--xcl-grad); opacity: .7;
}
.xcl-stat-label { color: var(--xcl-muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.xcl-stat-label .fa { color: var(--xcl-cyan); font-size: .9rem; }
.xcl-stat-value { margin-top: 8px; font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xcl-unit { margin-left: 6px; font-size: .8rem; font-weight: 600; color: var(--xcl-muted); }
.xcl-stat-sub { margin-top: 2px; font-size: .8rem; color: var(--xcl-muted); }
.xcl-stat-sub span { margin-left: 4px; color: var(--xcl-text); }

/* ---------- content ---------- */
.xcl-content > .row, .xcl-content .row { margin-left: -8px; margin-right: -8px; }
.xcl-content [class*='col-'] { padding-left: 8px; padding-right: 8px; }
.xcl-content > .col-md-12, .xcl-content > .col-xs-12 { padding-left: 0; padding-right: 0; }
.footer-padding { display: none; }

.card {
  background: var(--xcl-surface) !important;
  border: 1px solid var(--xcl-border) !important;
  border-radius: var(--xcl-radius) !important;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--xcl-text);
}
.card-header {
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid var(--xcl-border) !important;
  padding: 14px 18px;
  color: #fff; font-size: .98rem;
  word-break: break-all;
}
.card-header strong { font-weight: 650; }
.card-body { padding: 16px 18px; }
.card-footer { background: transparent; border-top: 1px solid var(--xcl-border); }
.xcl-card-title { display: flex; align-items: center; justify-content: space-between; word-break: normal; }
.xcl-live-tag { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--xcl-green); }

.xcl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--xcl-green); box-shadow: 0 0 0 0 rgba(46, 230, 166, .6); animation: xcl-pulse 2s infinite; display: inline-block; }
@keyframes xcl-pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 230, 166, .55); } 70% { box-shadow: 0 0 0 8px rgba(46, 230, 166, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 230, 166, 0); } }
@media (prefers-reduced-motion: reduce) { .xcl-dot { animation: none; } }

/* ---------- tables ---------- */
.table, .table-responsive { color: var(--xcl-text); margin-bottom: 0; }
.table { background: transparent !important; border-collapse: separate; border-spacing: 0; }
.table th, .table td, .table-bordered, .table-bordered th, .table-bordered td {
  border-color: var(--xcl-border) !important;
  border-left: 0 !important; border-right: 0 !important;
  vertical-align: middle;
}
.table thead th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--xcl-muted);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  border-top: 0 !important; border-bottom: 1px solid var(--xcl-border) !important;
  padding: 12px 16px; white-space: nowrap;
}
.table td { padding: 12px 16px; border-top: 1px solid var(--xcl-border) !important; font-variant-numeric: tabular-nums; }
.table-striped tbody tr:nth-of-type(odd) { background: rgba(255, 255, 255, 0.015) !important; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: rgba(0, 200, 255, 0.05) !important; }
.table-hover tbody tr:hover { color: inherit; }
.table-success, .table-success > td, .table-success > th { background: rgba(46, 230, 166, 0.09) !important; color: var(--xcl-text) !important; }
.table-danger, .table-danger > td, .table-danger > th { background: rgba(255, 93, 122, 0.10) !important; color: var(--xcl-text) !important; }
.table-warning, .table-warning > td, .table-warning > th { background: rgba(255, 196, 87, 0.10) !important; color: var(--xcl-text) !important; }
.table-info, .table-info > td, .table-info > th { background: rgba(26, 140, 255, 0.10) !important; color: var(--xcl-text) !important; }
.table-active, .table-active > td { background: rgba(255, 255, 255, .04) !important; }
.table-success td:first-child { box-shadow: inset 3px 0 0 var(--xcl-green); }
.table-danger td:first-child { box-shadow: inset 3px 0 0 var(--xcl-red); }
.table-warning td:first-child { box-shadow: inset 3px 0 0 var(--xcl-amber); }

/* hashes & numbers */
.table td a, .txid, .data, .xcl-hash, .xcl-mono, code, pre {
  font-family: var(--xcl-mono);
}
.table td a { font-size: .88rem; }
.table td a.xcl-block-link { font-family: 'Inter', sans-serif; font-weight: 600; font-size: .95rem; }
.xcl-hash { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
#recent-table td:nth-child(2) { max-width: 0; width: 46%; }
#recent-table td:nth-child(2) a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xcl-amount { font-weight: 600; color: #fff; white-space: nowrap; }
.xcl-time { color: var(--xcl-muted); font-size: .88rem; }
.decimal { font-size: .78em; color: var(--xcl-muted); }
.summary-table td, .summary-table th { word-break: break-all; }
pre, code { color: #9be8ff; background: rgba(0, 0, 0, .25); border-radius: 8px; }
pre { padding: 14px; border: 1px solid var(--xcl-border); }

/* DataTables */
.dataTables_wrapper { padding: 0; }
.dataTables_wrapper .row { margin: 0 !important; padding: 10px 12px; align-items: center; }
.dataTables_wrapper .row:first-child:empty { display: none; }
.dataTables_length, .dataTables_info { color: var(--xcl-muted); font-size: .85rem; padding: 0 !important; }
.dataTables_length select, .dataTables_filter input, .custom-select, .form-control {
  background-color: rgba(2, 13, 42, .6) !important;
  border: 1px solid var(--xcl-border-strong) !important;
  color: var(--xcl-text) !important;
  border-radius: 10px !important;
}
.form-control:focus, .custom-select:focus { border-color: rgba(0, 232, 255, .6) !important; box-shadow: 0 0 0 3px rgba(0, 232, 255, .12) !important; }
.dataTables_length select { margin: 0 6px; padding: 2px 26px 2px 10px; height: auto; }
div.dataTables_processing { background: var(--xcl-surface-solid) !important; color: var(--xcl-text); border: 1px solid var(--xcl-border); border-radius: 10px; }
.pagination { margin: 0 !important; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.page-link {
  background: transparent !important; border: 1px solid var(--xcl-border) !important;
  color: var(--xcl-muted) !important; border-radius: 9px !important; margin: 0 !important;
  padding: 6px 12px; font-size: .85rem;
}
.page-link:hover { color: #fff !important; border-color: var(--xcl-border-strong) !important; background: rgba(90, 170, 255, .08) !important; }
.page-item.active .page-link { background: var(--xcl-grad) !important; color: #021233 !important; border-color: transparent !important; font-weight: 700; }
.page-item.disabled .page-link { opacity: .4; }
table.dataTable { margin-top: 0 !important; margin-bottom: 0 !important; }
table.dataTable thead .sorting:after, table.dataTable thead .sorting:before { display: none; }

/* ---------- misc bootstrap components ---------- */
.nav-tabs, .nav-pills { border-bottom: 1px solid var(--xcl-border); gap: 4px; margin-bottom: 14px; }
.nav-tabs .nav-link, .nav-pills .nav-link { border: 0 !important; color: var(--xcl-muted); border-radius: 10px 10px 0 0; font-weight: 500; background: transparent; }
.nav-tabs .nav-link:hover, .nav-pills .nav-link:hover { color: #fff; }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link, .nav-pills .nav-link.active {
  color: #fff !important; background: transparent !important;
  box-shadow: inset 0 -2px 0 var(--xcl-cyan);
}
.alert { border-radius: 12px; border: 1px solid var(--xcl-border); background: var(--xcl-surface); color: var(--xcl-text); }
.alert-danger { border-color: rgba(255, 93, 122, .4); background: rgba(255, 93, 122, .1); }
.alert-warning { border-color: rgba(255, 196, 87, .4); background: rgba(255, 196, 87, .1); }
.alert-info { border-color: rgba(26, 140, 255, .4); background: rgba(26, 140, 255, .1); }
.alert .close { color: #fff; text-shadow: none; }
.badge { border-radius: 999px; font-weight: 600; padding: .35em .7em; }
.badge-success { background: rgba(46, 230, 166, .18); color: var(--xcl-green); }
.badge-danger { background: rgba(255, 93, 122, .18); color: var(--xcl-red); }
.badge-primary, .badge-info, .badge-secondary { background: rgba(0, 200, 255, .16); color: var(--xcl-cyan); }
.list-group-item { background: transparent; border-color: var(--xcl-border); color: var(--xcl-text); }
.dropdown-menu, .modal-content, .popover { background: var(--xcl-surface-solid); border: 1px solid var(--xcl-border-strong); border-radius: 12px; color: var(--xcl-text); }
.dropdown-item { color: var(--xcl-text); }
.dropdown-item:hover { background: rgba(90, 170, 255, .1); color: #fff; }
.tooltip-inner { background: var(--xcl-surface-solid); border: 1px solid var(--xcl-border-strong); border-radius: 8px; }
.iquidus { color: var(--xcl-muted) !important; }
.iquidus:hover { color: var(--xcl-cyan) !important; }
.block-last-next, .block-last, .block-next { color: var(--xcl-cyan); }
.jqplot-target, .jqplot-xaxis, .jqplot-yaxis, .jqplot-table-legend { color: var(--xcl-muted) !important; font-family: 'Inter', sans-serif !important; }
.jqplot-highlighter-tooltip, .jqplot-canvasOverlay-tooltip { background: var(--xcl-surface-solid) !important; border: 1px solid var(--xcl-border-strong) !important; color: #fff; border-radius: 6px; }
#pieChart { margin: 10px auto; }
.qrcode img, .qrcode canvas { background: #fff; padding: 8px; border-radius: 10px; }

/* ---------- footer ---------- */
.xcl-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--xcl-border);
  background: rgba(2, 10, 32, 0.75);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.xcl-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .85rem; color: var(--xcl-muted);
}
.xcl-footer-brand { display: flex; align-items: center; gap: 8px; color: var(--xcl-text); font-weight: 600; }
.xcl-footer-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xcl-footer-status label { margin: 0; }
.xcl-live, .xcl-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--xcl-border); background: rgba(255, 255, 255, .03);
  color: var(--xcl-text); font-variant-numeric: tabular-nums;
}
.xcl-chip .fa { color: var(--xcl-cyan); }
.xcl-footer-links { display: flex; align-items: center; gap: 14px; }
.xcl-footer-links a { color: var(--xcl-muted); }
.xcl-footer-links a:hover { color: var(--xcl-cyan); }

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
  .xcl-header .navbar-collapse {
    margin-top: 10px; padding: 8px;
    background: var(--xcl-surface-solid);
    border: 1px solid var(--xcl-border); border-radius: 14px;
  }
  .xcl-header .nav-link { padding: 12px 14px !important; }
  .xcl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  body { font-size: 14px !important; }
  .xcl-main { padding: 16px 12px 28px; }
  .xcl-header .navbar { padding: 8px 14px !important; }
  .xcl-search { margin: 0 0 16px; border-radius: 14px; }
  .xcl-search .form-control { height: 44px; font-size: 16px; /* stops iOS zoom */ }
  .xcl-btn { height: 44px; padding: 0 16px; }
  .xcl-stats { gap: 10px; }
  .xcl-stat { padding: 12px 14px; }
  .xcl-stat-value { font-size: 1.15rem; }
  .xcl-stat-label { font-size: .68rem; letter-spacing: .06em; }
  .card-header, .card-body { padding: 12px 14px; }
  .table thead th, .table td { padding: 10px 10px; }
  .table td a { font-size: .82rem; }
  .table-responsive, .card > table, .card .dataTables_wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dataTables_wrapper .row > div { text-align: center !important; }
  .pagination { justify-content: center !important; margin-top: 6px !important; }
  .pagination .page-item:not(.previous):not(.next):not(.active) { display: none; }
  .xcl-time { white-space: nowrap; }
  .xcl-footer-inner { justify-content: center; text-align: center; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); }
  .xcl-footer-brand { display: none; }
}
@media (max-width: 400px) {
  .xcl-search-icon { display: none; }
  .xcl-search .form-control { padding-left: 12px !important; }
  .xcl-brand-sub { display: none; }
}
@media (max-width: 767.98px) {
  .hidden-xs { display: none !important; }
  .summary-table td, .summary-table th { word-break: normal; }
  .summary-table td a { word-break: break-all; }
}
