:root {
  --bg: #0b1020;
  --surface: rgba(17, 24, 39, 0.82);
  --surface-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(255, 255, 255, 0.09);
  --muted: #9ca3af;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 24rem),
    var(--bg);
  color: #e5e7eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.glass-nav {
  background: #F7931A !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 8px 24px rgba(247, 147, 26, 0.35);
  z-index: 1030;
}

.glass-nav .navbar-brand,
.glass-nav .nav-link {
  color: #fff !important;
}

.glass-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.75) !important;
}

.glass-nav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.4);
}

.glass-nav .navbar-toggler-icon {
  filter: invert(1);
}

.hero-section {
  border-bottom: 1px solid var(--border);
}

.tracking-tight {
  letter-spacing: -0.045em;
}

.status-panel,
.faucet-card {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.22);
}

.faucet-card {
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.faucet-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.42);
}

.metric {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.045);
}

.metric strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 0.875rem;
}

.badge {
  font-weight: 600;
}

.article-shell {
  max-width: 820px;
}

.article-content {
  font-size: 1.08rem;
  line-height: 1.8;
}

.article-content h2,
.article-content h3 {
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.article-content pre {
  background: #020617;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  overflow-x: auto;
}

.article-content code:not(pre code) {
  color: #93c5fd;
}

/* Hero buttons */
.hero-btn-primary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: #F7931A;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 20px rgba(247, 147, 26, 0.35);
}

.hero-btn-primary:hover {
  background: #e88410;
  box-shadow: 0 6px 24px rgba(247, 147, 26, 0.5);
  color: #fff;
}

.hero-btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  color: #e5e7eb;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Metric color variants */
.metric--online strong  { color: #34d399; }
.metric--degraded strong { color: #fbbf24; }
.metric--unknown strong  { color: #9ca3af; }

/* Chat */
.chat-key-panel {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-key-change {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.chat-messages {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  min-height: 360px;
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

.chat-msg {
  display: flex;
}

.chat-msg--user { justify-content: flex-end; }
.chat-msg--assistant { justify-content: flex-start; }

.chat-msg__bubble {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.chat-msg--user .chat-msg__bubble {
  background: rgba(247, 147, 26, 0.15);
  border: 1px solid rgba(247, 147, 26, 0.3);
  color: #f3f4f6;
  border-bottom-right-radius: 0.25rem;
}

.chat-msg--assistant .chat-msg__bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #e5e7eb;
  border-bottom-left-radius: 0.25rem;
}

.chat-msg--thinking .chat-msg__bubble {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.1rem;
}

.chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: chat-bounce 1.2s infinite ease-in-out;
}

.chat-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

.chat-input-row {
  display: flex;
  gap: 0.75rem;
}

.chat-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: #e5e7eb;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.chat-input-row input:focus {
  border-color: rgba(247, 147, 26, 0.5);
}

.chat-input-row input::placeholder { color: #4b5563; }

.chat-provider-tabs {
  display: flex;
  gap: 0.5rem;
}

.chat-provider-btn {
  padding: 0.4rem 1.1rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chat-provider-btn:hover { color: #e5e7eb; }

.chat-provider-btn.active {
  background: rgba(247, 147, 26, 0.15);
  border-color: rgba(247, 147, 26, 0.3);
  color: #F7931A;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Guide difficulty badge */
.guide-difficulty {
  display: inline-block;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.guide-difficulty--beginner    { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399; }
.guide-difficulty--intermediate { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3); color: #fbbf24; }
.guide-difficulty--advanced    { background: rgba(239, 68, 68, 0.12);  border: 1px solid rgba(239, 68, 68, 0.3);  color: #f87171; }

/* Tools */
.tools-tabs {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  padding: 0.35rem;
  margin: 0 0 1.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
}

.tools-tab {
  flex: 1;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tools-tab:hover { color: #e5e7eb; }

.tools-tab.active {
  background: rgba(247, 147, 26, 0.15);
  color: #F7931A;
  border: 1px solid rgba(247, 147, 26, 0.3);
}

.tool-panel { display: none; }
.tool-panel.active { display: block; }

.tool-card {
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem;
}

.tool-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #f3f4f6;
}

.tool-card__desc {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.tool-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.tool-row {
  display: flex;
  gap: 1rem;
}

.tool-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tool-field label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.tool-field input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  color: #e5e7eb;
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color 0.15s ease;
  width: 100%;
}

.tool-field input:focus {
  border-color: rgba(247, 147, 26, 0.5);
}

.tool-field input::placeholder { color: #4b5563; }

.tool-reset-btn,
.tool-primary-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 0.625rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.tool-reset-btn:hover { background: rgba(255, 255, 255, 0.09); color: #e5e7eb; }

.tool-primary-btn {
  background: rgba(247, 147, 26, 0.12);
  border-color: rgba(247, 147, 26, 0.35);
  color: #F7931A;
}

.tool-primary-btn:hover {
  background: rgba(247, 147, 26, 0.22);
  border-color: rgba(247, 147, 26, 0.6);
}

.tool-result {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  overflow: hidden;
}

.tool-result__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.tool-result__row:last-child { border-bottom: none; }

.tool-result__label {
  color: var(--muted);
  width: 8rem;
  flex-shrink: 0;
}

.tool-result__value { color: #f3f4f6; font-weight: 500; }

.tool-result__code {
  font-family: monospace;
  font-size: 0.82rem;
  color: #93c5fd;
  word-break: break-all;
}

.tool-result--success .tool-result__value { color: #34d399; }
.tool-result--error { color: #f87171; padding: 0.75rem 1rem; font-size: 0.875rem; }

.tool-explorer-link {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #F7931A;
  border: 1px solid rgba(247, 147, 26, 0.3);
  background: rgba(247, 147, 26, 0.08);
  text-decoration: none;
  transition: background 0.15s ease;
}

.tool-explorer-link:hover {
  background: rgba(247, 147, 26, 0.18);
  color: #F7931A;
}

.tool-result__explorers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
}

.tool-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tool-presets__label {
  font-size: 0.75rem;
  color: var(--muted);
}

.tool-preset-btn {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: #d1d5db;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.tool-preset-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
  .tool-row { flex-direction: column; }
}

/* Network cards (index) */
.network-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.network-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--network-color) 50%, transparent);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.28);
  color: inherit;
}

.network-card__dot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--network-color) 20%, transparent);
  border: 2px solid color-mix(in srgb, var(--network-color) 50%, transparent);
  flex-shrink: 0;
}

.network-card:hover .network-card__dot {
  background: color-mix(in srgb, var(--network-color) 30%, transparent);
}

.network-card__body {
  flex: 1;
}

.network-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #f3f4f6;
}

.network-card__testnet {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--network-color);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.network-card__desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.network-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.network-card__resources {
  font-size: 0.75rem;
  color: var(--muted);
}

.network-card__arrow {
  font-size: 1rem;
  color: var(--network-color);
  transition: transform 0.15s ease;
}

.network-card:hover .network-card__arrow {
  transform: translateX(3px);
}

/* Network show page */
.network-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.15s ease;
}

.network-back:hover {
  color: #e5e7eb;
}

.network-hero {
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--network-color) 30%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--network-color) 8%, var(--surface)), var(--surface));
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.network-resources {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 1rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.network-resource-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  text-decoration: none;
  color: #e5e7eb;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

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

.network-resource-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.network-resource-item__type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  width: 5rem;
  flex-shrink: 0;
}

.network-resource-item__label {
  flex: 1;
  font-size: 0.9rem;
}

.network-resource-item__arrow {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Posts list */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: block;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s ease;
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-item:hover {
  padding-left: 0.5rem;
}

.post-item__title {
  color: #f3f4f6;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.15s ease;
}

.post-item:hover .post-item__title {
  color: #F7931A;
}

.post-item__date {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-item__desc {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.post-tag {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(247, 147, 26, 0.1);
  border: 1px solid rgba(247, 147, 26, 0.25);
  color: #F7931A;
  letter-spacing: 0.02em;
}

.post-divider {
  border-color: var(--border);
  opacity: 1;
}

/* Faucet table */
.faucet-table-wrap {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.22);
}

.faucet-table {
  background: var(--surface);
  color: #e5e7eb;
  margin-bottom: 0;
}

.faucet-table thead th {
  background: rgba(255, 255, 255, 0.04);
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1rem;
}

.faucet-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.faucet-table tbody tr:last-child {
  border-bottom: none;
}

.faucet-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faucet-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border: none;
}

.faucet-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: #d1d5db;
}

.faucet-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.faucet-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.faucet-status--online  { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); color: #34d399; }
.faucet-status--online  .faucet-status__dot { background: #10b981; box-shadow: 0 0 6px #10b981; }

.faucet-status--degraded  { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.3); color: #fbbf24; }
.faucet-status--degraded  .faucet-status__dot { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

.faucet-status--offline  { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.3); color: #f87171; }
.faucet-status--offline  .faucet-status__dot { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

.faucet-status--unknown  { background: rgba(156, 163, 175, 0.1); border-color: rgba(156, 163, 175, 0.2); color: #9ca3af; }
.faucet-status--unknown  .faucet-status__dot { background: #6b7280; }

.faucet-open-btn {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #F7931A;
  border: 1px solid rgba(247, 147, 26, 0.35);
  background: rgba(247, 147, 26, 0.08);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.faucet-open-btn:hover {
  background: rgba(247, 147, 26, 0.18);
  border-color: rgba(247, 147, 26, 0.6);
  color: #F7931A;
}

main {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 28rem),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 24rem),
    #0b1020;
  min-height: calc(100vh - 72px);
}