/* ============================================================================
   LingheOS Public Chain (ChainID: 88888) — Ethereum UI Design System
   Aligned to ethereum.org Design System + Etherscan v2 Mainnet Typography/Grid
   Brand Palette: Ethereum Diamond Indigo (#627EEA) + Linghe Frosted Core
   ============================================================================ */
:root {
  color-scheme: light;
  /* Ethereum Light Mode Canonical Surfaces & Text */
  --eth-bg-page: #f8f9fc;
  --eth-bg-surface: #ffffff;
  --eth-bg-subtle: #f3f5fb;
  --eth-bg-hover: #eef2ff;
  --eth-fg-primary: #111827;
  --eth-fg-secondary: #374151;
  --eth-fg-muted: #525b68;
  --eth-border: #e5e7eb;
  --eth-border-strong: #8b95a5;

  /* Ethereum Brand & Semantic Palette (WCAG 2.2 AA Calibrated) */
  --eth-indigo: #627eea;
  --eth-indigo-text: #3b4cca;
  --eth-indigo-hover: #4c66d6;
  --eth-indigo-deep: #3b4cca;
  --eth-indigo-soft: rgba(59, 76, 202, 0.10);
  --eth-btn-bg: #4355c7;
  --eth-btn-hover: #3545b0;
  --eth-violet: #7f56d9;
  --eth-link: #0369a1;
  --eth-link-hover: #075985;
  --eth-emerald: #027a48;
  --eth-emerald-bg: #ecfdf3;
  --eth-emerald-border: #6ce9a6;
  --eth-cyan: #0369a1;
  --eth-amber: #b54708;
  --eth-amber-bg: #fffaeb;
  --eth-danger: #b91c1c;
  --eth-danger-border: #fca5a5;
  --eth-gold-accent: #8a6418;
  --eth-gold-border: rgba(168, 123, 34, 0.65);

  /* Hero Mesh Gradient (ethereum.org signature pastel radial aura) */
  --eth-hero-bg:
    radial-gradient(circle at 14% 22%, rgba(98, 126, 234, 0.20) 0%, transparent 48%),
    radial-gradient(circle at 84% 26%, rgba(167, 139, 250, 0.22) 0%, transparent 46%),
    radial-gradient(circle at 68% 88%, rgba(56, 189, 248, 0.16) 0%, transparent 48%),
    linear-gradient(180deg, #eef2ff 0%, #f8f9fc 100%);

  --eth-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --eth-shadow-card: 0 4px 16px rgba(17, 24, 39, 0.045), 0 1px 2px rgba(17, 24, 39, 0.03);
  --eth-shadow-float: 0 18px 42px rgba(59, 76, 202, 0.12);

  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-pill: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "PingFang SC", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --eth-bg-page: #0b0e17;
  --eth-bg-surface: #121726;
  --eth-bg-subtle: #181f33;
  --eth-bg-hover: rgba(98, 126, 234, 0.16);
  --eth-fg-primary: #f3f4f6;
  --eth-fg-secondary: #cbd5e1;
  --eth-fg-muted: #94a3b8;
  --eth-border: #222b42;
  --eth-border-strong: #5b6b86;

  --eth-indigo: #7891f5;
  --eth-indigo-text: #9bb1ff;
  --eth-indigo-hover: #90a5fa;
  --eth-indigo-soft: rgba(120, 145, 245, 0.16);
  --eth-btn-bg: #4355c7;
  --eth-btn-hover: #4f63dc;
  --eth-link: #60a5fa;
  --eth-link-hover: #93c5fd;
  --eth-emerald: #34d399;
  --eth-emerald-bg: rgba(16, 185, 129, 0.14);
  --eth-emerald-border: rgba(52, 211, 153, 0.45);
  --eth-cyan: #38bdf8;
  --eth-danger: #f87171;
  --eth-danger-border: rgba(248, 113, 113, 0.55);
  --eth-gold-accent: #e5c378;
  --eth-gold-border: rgba(229, 195, 120, 0.55);

  --eth-hero-bg:
    radial-gradient(circle at 15% 20%, rgba(98, 126, 234, 0.28) 0%, transparent 50%),
    radial-gradient(circle at 82% 24%, rgba(124, 58, 237, 0.24) 0%, transparent 46%),
    radial-gradient(circle at 70% 85%, rgba(14, 165, 233, 0.16) 0%, transparent 50%),
    linear-gradient(180deg, #0f1424 0%, #0b0e17 100%);

  --eth-shadow-card: 0 6px 24px rgba(0, 0, 0, 0.35);
  --eth-shadow-float: 0 20px 50px rgba(0, 0, 0, 0.55);
}

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

body {
  font-family: var(--font-sans);
  background: var(--eth-bg-page);
  color: var(--eth-fg-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
}

a {
  color: var(--eth-link);
  text-decoration: none;
}
a:hover {
  color: var(--eth-link-hover);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--eth-indigo-text);
  outline-offset: 2px;
}

.eth-omnibox input:focus-visible,
.eth-omnibox select:focus-visible {
  outline: 2px solid var(--eth-indigo-text);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--eth-btn-bg);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--eth-shadow-float);
}
.skip-link:focus {
  left: 16px;
  color: #ffffff;
}

.eth-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================================
   1. Etherscan-Style Top Telemetry Utility Strip
   ============================================================================ */
.eth-utility-bar {
  background: var(--eth-bg-surface);
  border-bottom: 1px solid var(--eth-border);
  font-size: 12.5px;
  color: var(--eth-fg-muted);
}

.eth-utility-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  gap: 12px;
  flex-wrap: wrap;
}

.eth-ticker-list {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.eth-ticker-item strong {
  color: var(--eth-fg-primary);
  font-weight: 600;
}

.eth-up {
  color: var(--eth-emerald);
  font-weight: 600;
}

.eth-utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eth-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--eth-border-strong);
  background: var(--eth-bg-subtle);
  color: var(--eth-fg-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.eth-mini-btn:hover {
  border-color: var(--eth-indigo-text);
  color: var(--eth-indigo-text);
}

.eth-wp-btn {
  min-height: 36px;
  padding: 6px 11px;
  border-radius: var(--radius-md);
  border-color: var(--eth-gold-border);
  color: var(--eth-fg-primary);
}
.eth-wp-btn svg {
  color: var(--eth-gold-accent);
  flex-shrink: 0;
}
.eth-wp-btn:hover {
  border-color: var(--eth-gold-accent);
  color: var(--eth-gold-accent);
}

.eth-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.eth-nav-cta {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.eth-nav-cta img {
  flex-shrink: 0;
}

/* ============================================================================
   2. Ethereum.org Sticky Main Navigation Bar
   ============================================================================ */
.eth-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--eth-bg-surface) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--eth-border);
}

.eth-navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  gap: 12px;
  flex-wrap: nowrap;
}

.eth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.eth-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(98, 126, 234, 0.32);
  display: block;
}

.eth-brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--eth-fg-primary);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.eth-chain-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--eth-indigo-soft);
  color: var(--eth-indigo-text);
}

.eth-brand-sub {
  font-size: 11.5px;
  color: var(--eth-fg-muted);
  white-space: nowrap;
}

.eth-nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.eth-nav-tabs::-webkit-scrollbar {
  display: none;
}

.eth-nav-tab {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--eth-fg-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.eth-nav-tab:hover {
  background: var(--eth-bg-subtle);
  color: var(--eth-fg-primary);
}
.eth-nav-tab.active {
  background: var(--eth-indigo-soft);
  color: var(--eth-indigo-text);
  font-weight: 700;
}

.eth-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 15px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--eth-btn-bg);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(67, 85, 199, 0.28);
  transition: background 0.15s ease, transform 0.1s ease;
}
.eth-btn-primary:hover {
  background: var(--eth-btn-hover);
  color: #ffffff;
}
.eth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================================
   3. Ethereum.org Aura Hero + Etherscan Omnibox Search
   ============================================================================ */
.eth-hero {
  background: var(--eth-hero-bg);
  border-bottom: 1px solid var(--eth-border);
  padding: 34px 0 64px;
  position: relative;
  overflow: hidden;
}

.eth-hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: center;
  gap: 28px;
}

.eth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--eth-bg-surface);
  border: 1px solid var(--eth-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--eth-indigo-text);
  margin-bottom: 12px;
  box-shadow: var(--eth-shadow-sm);
}

.eth-hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--eth-fg-primary);
}

.eth-hero-desc {
  font-size: 14px;
  color: var(--eth-fg-secondary);
  margin-bottom: 18px;
}

.eth-omnibox {
  display: flex;
  align-items: center;
  background: var(--eth-bg-surface);
  border: 1.5px solid var(--eth-border-strong);
  border-radius: var(--radius-lg);
  padding: 5px;
  box-shadow: var(--eth-shadow-card);
  max-width: 740px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.eth-omnibox:focus-within {
  border-color: var(--eth-indigo);
  box-shadow: 0 0 0 4px var(--eth-indigo-soft);
}

.eth-omnibox select {
  border: none;
  background: var(--eth-bg-subtle);
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--eth-fg-secondary);
  outline: none;
  cursor: pointer;
}

.eth-omnibox input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 13.5px;
  outline: none;
  min-width: 180px;
}

.eth-quick-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: var(--eth-fg-muted);
}

.eth-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--eth-bg-surface);
  border: 1px solid var(--eth-border-strong);
  color: var(--eth-fg-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.eth-chip:hover {
  border-color: var(--eth-indigo-text);
  color: var(--eth-indigo-text);
}

/* Right Hero Emblem (Ethereum Octahedron Geometry + LingheOS Luminous Core) */
.eth-hero-emblem-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.eth-emblem-stage {
  position: relative;
  width: 236px;
  height: 224px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eth-emblem-core {
  width: 108px;
  height: 108px;
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(98, 126, 234, 0.38), inset 0 1px 2px rgba(255, 255, 255, 0.55);
  z-index: 2;
  animation: ethFloat 5s ease-in-out infinite;
}

@keyframes ethFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.eth-orbit-pill {
  position: absolute;
  z-index: 3;
  background: var(--eth-bg-surface);
  border: 1px solid var(--eth-border);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: var(--eth-shadow-card);
  white-space: nowrap;
}

/* ============================================================================
   4. Etherscan Canonical 6-Cell Master Overview Card (Overlapping Hero)
   ============================================================================ */
.eth-main {
  margin-top: -36px;
  position: relative;
  z-index: 10;
  padding-bottom: 56px;
}

.eth-overview-card {
  background: var(--eth-bg-surface);
  border: 1px solid var(--eth-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--eth-shadow-card);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: 22px;
}

.eth-metric-cell {
  padding: 18px 22px;
  border-right: 1px solid var(--eth-border);
  border-bottom: 1px solid var(--eth-border);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.eth-metric-cell:nth-child(3n) {
  border-right: none;
}
.eth-metric-cell:nth-child(n+4) {
  border-bottom: none;
}

.eth-metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--eth-bg-subtle);
  color: var(--eth-indigo-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}

.eth-metric-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--eth-fg-muted);
  margin-bottom: 3px;
  font-weight: 600;
}

.eth-metric-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--eth-fg-primary);
}

.eth-metric-sub {
  font-size: 12px;
  color: var(--eth-fg-muted);
  margin-top: 2px;
}

/* ============================================================================
   5. Etherscan Dual Feed Grid (Latest Blocks | Latest Transactions) & Panels
   ============================================================================ */
.eth-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

.eth-card {
  background: var(--eth-bg-surface);
  border: 1px solid var(--eth-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--eth-shadow-card);
  overflow: hidden;
}

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

.eth-card-title {
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eth-feed-list {
  display: flex;
  flex-direction: column;
}

.eth-feed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--eth-border);
  gap: 12px;
  transition: background 0.12s ease;
}
.eth-feed-row:last-child {
  border-bottom: none;
}
.eth-feed-row:hover {
  background: var(--eth-bg-subtle);
}

.eth-bk-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--eth-bg-subtle);
  color: var(--eth-fg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.eth-method-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--eth-bg-subtle);
  border: 1px solid var(--eth-border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--eth-fg-secondary);
}

.eth-fee-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--eth-indigo-soft);
  color: var(--eth-indigo-text);
  font-size: 11.5px;
  font-weight: 700;
}

.eth-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--eth-emerald-bg);
  border: 1px solid var(--eth-emerald-border);
  color: var(--eth-emerald);
  font-size: 11.5px;
  font-weight: 700;
}

/* Tables */
.eth-table-wrap {
  overflow-x: auto;
}

.eth-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.eth-table th {
  text-align: left;
  padding: 12px 18px;
  background: var(--eth-bg-subtle);
  color: var(--eth-fg-secondary);
  font-weight: 700;
  font-size: 12px;
  border-bottom: 1px solid var(--eth-border);
  white-space: nowrap;
}

.eth-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--eth-border);
  vertical-align: middle;
}

.eth-table tr:last-child td {
  border-bottom: none;
}
.eth-table tbody tr:hover {
  background: var(--eth-bg-subtle);
}

/* Inspector Drawer / Card */
.eth-inspector {
  background: var(--eth-bg-surface);
  border: 1.5px solid var(--eth-indigo);
  border-radius: var(--radius-xl);
  box-shadow: var(--eth-shadow-float);
  padding: 20px 24px;
  margin-bottom: 22px;
}

.eth-kv-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  row-gap: 10px;
  column-gap: 16px;
  font-size: 13.5px;
  margin-top: 12px;
}

.eth-kv-key {
  color: var(--eth-fg-muted);
  font-weight: 500;
}

/* Footer */
.eth-footer {
  border-top: 1px solid var(--eth-border);
  background: var(--eth-bg-surface);
  padding: 28px 0;
  color: var(--eth-fg-muted);
  font-size: 12.5px;
}

@media (max-width: 1460px) {
  .eth-brand-sub {
    display: none;
  }
}

@media (max-width: 1220px) {
  .eth-navbar-inner {
    flex-wrap: wrap;
    padding: 8px 0;
    gap: 8px;
  }
  .eth-nav-tabs {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
    padding-top: 6px;
    border-top: 1px solid var(--eth-border);
  }
}

@media (max-width: 980px) {
  .eth-hero-grid {
    grid-template-columns: 1fr;
  }
  .eth-hero-emblem-wrap {
    display: none;
  }
  .eth-overview-card {
    grid-template-columns: 1fr;
  }
  .eth-metric-cell {
    border-right: none !important;
    border-bottom: 1px solid var(--eth-border) !important;
  }
  .eth-dual-grid {
    grid-template-columns: 1fr;
  }
  .eth-kv-grid {
    grid-template-columns: 1fr;
  }
  .eth-omnibox {
    flex-wrap: wrap;
  }
  .eth-omnibox select {
    width: 100%;
  }
}
