@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&display=swap");

/* ==== BASE ==== */

*,

*::before,

*::after {

  box-sizing: border-box;

}

html,

body {

  margin: 0;

  padding: 0;

}

.rpc-body {

  min-height: 100vh;

  display: flex;

  align-items: center;

  justify-content: center;

  background:

    radial-gradient(circle at 20% 0, #05231a 0, #020c09 40%, #020407 100%),

    radial-gradient(circle at 100% 120%, #041220 0, #020407 55%);

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",

    "Roboto", sans-serif;

  color: #e2fff5;

}

/* ==== SHELL / CARD ==== */

.rpc-shell {

  padding: 20px;

  width: 100%;

  max-width: 540px;

}

.rpc-card {

  position: relative;

  padding: 18px 18px 20px;

  border-radius: 22px;

  background:

    radial-gradient(circle at 0 0, rgba(0, 255, 195, 0.22), transparent 55%),

    radial-gradient(circle at 100% 100%, rgba(0, 163, 255, 0.18), transparent 55%),

    linear-gradient(145deg, #02070b 0%, #030f15 45%, #020309 100%);

  border: 1px solid rgba(0, 255, 195, 0.46);

  box-shadow:

    0 0 0 1px rgba(0, 255, 195, 0.12),

    0 20px 50px rgba(0, 0, 0, 0.9);

  overflow: hidden;

  backdrop-filter: blur(8px);

}

/* scanline + grain layer */

.rpc-card::before {

  content: "";

  position: absolute;

  inset: 0;

  pointer-events: none;

  background-image:

    linear-gradient(to bottom, rgba(226, 255, 245, 0.08) 1px, transparent 1px),

    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.04), transparent 55%);

  background-size: 100% 2px, 260% 260%;

  mix-blend-mode: soft-light;

  opacity: 0.25;

}

/* inner neon frame */

.rpc-card::after {

  content: "";

  position: absolute;

  inset: 0;

  border-radius: 22px;

  border: 1px solid rgba(0, 255, 195, 0.4);

  box-shadow:

    0 0 18px rgba(0, 255, 195, 0.35),

    0 0 0 1px rgba(0, 0, 0, 0.8);

  pointer-events: none;

  opacity: 0.25;

}

/* ==== TOP STRIP ==== */

.rpc-top-strip {

  position: relative;

  z-index: 1;

  display: flex;

  align-items: center;

  justify-content: space-between;

  column-gap: 12px;

  row-gap: 6px;

  padding: 4px 10px 6px;

  margin: -4px -6px 10px;

  border-radius: 999px;

  background: linear-gradient(

    90deg,

    rgba(0, 255, 195, 0.17),

    rgba(0, 0, 0, 0.85),

    rgba(0, 255, 195, 0.12)

  );

  border: 1px solid rgba(0, 255, 195, 0.35);

  font-size: 10px;

  letter-spacing: 0.16em;

  text-transform: uppercase;

  color: rgba(185, 245, 223, 0.92);

}

.rpc-top-strip .strip-dot {

  width: 7px;

  height: 7px;

  border-radius: 999px;

  background: #1fff9e;

  box-shadow: 0 0 10px rgba(0, 255, 195, 0.9);

  flex-shrink: 0;

}

.rpc-top-strip .strip-label {

  flex: 1 1 auto;

  min-width: 0;

}

.rpc-top-strip .strip-right {

  opacity: 0.7;

}

/* ==== HEADER ==== */

.rpc-header {

  position: relative;

  z-index: 1;

  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 16px;

  margin-bottom: 14px;

}

.rpc-title-block {

  display: flex;

  flex-direction: column;

  gap: 2px;

}

.rpc-kicker {

  font-size: 11px;

  letter-spacing: 0.18em;

  text-transform: uppercase;

  color: rgba(162, 248, 212, 0.8);

}

.rpc-title {

  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;

  font-size: 22px;

  letter-spacing: 0.22em;

  text-transform: uppercase;

  margin: 0;

  color: #f3fff9;

}

.rpc-subtitle {

  margin-top: 4px;

  font-size: 11px;

  line-height: 1.4;

  color: rgba(185, 236, 220, 0.85);

}

.rpc-header-right {

  display: flex;

  flex-direction: column;

  gap: 6px;

  align-items: flex-end;

}

/* live pill */

.rpc-pill {

  display: inline-flex;

  align-items: center;

  gap: 6px;

  padding: 4px 11px;

  border-radius: 999px;

  font-size: 10px;

  text-transform: uppercase;

  letter-spacing: 0.18em;

  border: 1px solid rgba(0, 255, 195, 0.6);

  background: radial-gradient(circle at 0 0, rgba(0, 255, 195, 0.3), rgba(0, 0, 0, 0.95));

  color: #d7fff3;

  white-space: nowrap;

  box-shadow:

    0 0 12px rgba(0, 255, 195, 0.45),

    0 0 1px rgba(0, 255, 195, 0.9);

}

.rpc-pill .pill-dot {

  width: 7px;

  height: 7px;

  border-radius: 999px;

  background: #1fff9e;

  box-shadow: 0 0 10px rgba(0, 255, 195, 0.95);

  animation: pillPulse 1.45s ease-in-out infinite;

}

/* === INLINE BADGE (FULL VERSION) === */

.rpc-powered-row {

  display: inline-flex;

  align-items: center;

  gap: 6px;

  padding: 6px 10px;

  border-radius: 12px;

  border: 1px solid rgba(86, 203, 255, 0.55);

  background: linear-gradient(

    135deg,

    rgba(5, 34, 41, 0.85),

    rgba(0, 0, 0, 0.96)

  );

  box-shadow: 0 0 10px rgba(0, 185, 255, 0.35);

}

.powered-label-inline {

  font-size: 9px;

  letter-spacing: 0.22em;

  text-transform: uppercase;

  color: rgba(177, 226, 245, 0.85);

  white-space: nowrap;

}

.powered-logo-inline {

  height: 22px;

  width: auto;

  opacity: 0.92;

  filter: drop-shadow(0 0 3px rgba(0, 255, 195, 0.25));

  transition: opacity 0.15s ease-out, transform 0.15s ease-out;

}

.powered-logo-inline:hover {

  opacity: 1;

  transform: scale(1.03);

}

/* ==== ENDPOINT ROW ==== */

.rpc-endpoint-row {

  position: relative;

  z-index: 1;

  display: flex;

  flex-wrap: wrap;

  gap: 10px 18px;

  align-items: flex-start;

  justify-content: space-between;

  padding: 10px 12px;

  border-radius: 14px;

  background: radial-gradient(circle at 0 0, rgba(0, 255, 195, 0.2), transparent 60%),

    rgba(3, 18, 20, 0.98);

  border: 1px solid rgba(0, 255, 195, 0.32);

  margin-bottom: 14px;

  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75);

}

.label {

  display: block;

  font-size: 10px;

  letter-spacing: 0.18em;

  text-transform: uppercase;

  color: rgba(160, 235, 210, 0.82);

}

.value {

  font-size: 13px;

  color: #e9fff9;

}

.value-soft {

  font-size: 12px;

  color: rgba(210, 244, 232, 0.88);

}

.rpc-endpoint-main {

  flex: 1 1 auto;

  min-width: 0;

}

.rpc-endpoint-value {

  display: block;

  margin-top: 2px;

  font-size: 12px;

  color: #b6ffee;

  background: radial-gradient(circle at 0 0, rgba(0, 255, 195, 0.18), transparent 65%),

    rgba(1, 40, 32, 0.96);

  padding: 4px 7px;

  border-radius: 8px;

  border: 1px solid rgba(0, 255, 195, 0.36);

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

}

.rpc-version {

  flex: 0 0 auto;

  min-width: 135px;

  text-align: right;

}

/* ==== METRICS ==== */

.rpc-metrics {

  position: relative;

  z-index: 1;

  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 10px;

  margin-bottom: 14px;

}

.rpc-metric {

  position: relative;

  padding: 10px 10px 9px;

  border-radius: 13px;

  border: 1px solid rgba(0, 255, 195, 0.24);

  background:

    radial-gradient(circle at 0 0, rgba(0, 255, 195, 0.16), transparent 55%),

    radial-gradient(circle at 120% 0, rgba(0, 183, 255, 0.18), transparent 55%),

    rgba(2, 12, 17, 0.98);

  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75);

  overflow: hidden;

  transition:

    transform 0.13s ease-out,

    box-shadow 0.13s ease-out,

    border-color 0.13s ease-out,

    background 0.13s ease-out;

}

.rpc-metric::after {

  content: "";

  position: absolute;

  inset: 0;

  background: linear-gradient(

    135deg,

    rgba(0, 255, 195, 0.25),

    rgba(0, 255, 195, 0),

    rgba(0, 183, 255, 0)

  );

  opacity: 0;

  pointer-events: none;

  mix-blend-mode: screen;

  transition: opacity 0.15s ease-out;

}

.rpc-metric:hover {

  transform: translateY(-1px);

  border-color: rgba(0, 255, 195, 0.6);

  box-shadow:

    0 0 10px rgba(0, 255, 195, 0.45),

    0 0 0 1px rgba(0, 0, 0, 0.9);

}

.rpc-metric:hover::after {

  opacity: 0.35;

}

.metric-label {

  font-size: 10px;

  letter-spacing: 0.18em;

  text-transform: uppercase;

  color: rgba(159, 235, 210, 0.9);

  margin-bottom: 4px;

}

.metric-main {

  display: flex;

  align-items: center;

  gap: 6px;

  margin-bottom: 3px;

}

.metric-value {

  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;

  font-size: 15px;

  color: #f6fff9;

}

.metric-sub {

  margin: 0;

  font-size: 11px;

  line-height: 1.3;

  color: rgba(194, 241, 227, 0.9);

}

/* status dot */

.status-dot {

  width: 9px;

  height: 9px;

  border-radius: 999px;

  box-shadow: 0 0 0 1px rgba(2, 10, 8, 0.9);

}

.status-unknown {

  background: #7d8c95;

  box-shadow: 0 0 8px rgba(125, 140, 149, 0.6);

}

.status-ok {

  background: #1fff9e;

  box-shadow: 0 0 10px rgba(0, 255, 195, 0.95);

}

.status-warn {

  background: #ffcc33;

  box-shadow: 0 0 10px rgba(255, 204, 51, 0.95);

}

.status-bad {

  background: #ff3366;

  box-shadow: 0 0 10px rgba(255, 51, 102, 0.95);

}

/* ==== FOOTER ==== */

.rpc-footer {

  position: relative;

  z-index: 1;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  padding-top: 7px;

  border-top: 1px solid rgba(0, 255, 195, 0.28);

  margin-top: 4px;

}

.footer-left {

  display: flex;

  flex-direction: column;

  gap: 2px;

}

.footer-right {

  display: flex;

  align-items: center;

  gap: 8px;

}

.rpc-button {

  position: relative;

  border-radius: 999px;

  border: 1px solid rgba(0, 255, 195, 0.85);

  background: radial-gradient(circle at 0 0, rgba(0, 255, 195, 0.48), rgba(0, 0, 0, 0.96));

  color: #e8fff7;

  font-size: 11px;

  text-transform: uppercase;

  letter-spacing: 0.16em;

  padding: 6px 16px 6px;

  cursor: pointer;

  transition:

    background 0.15s ease-out,

    box-shadow 0.15s ease-out,

    transform 0.12s ease-out,

    border-color 0.15s ease-out;

  box-shadow:

    0 0 14px rgba(0, 255, 195, 0.55),

    0 0 0 1px rgba(0, 0, 0, 0.9);

}

.rpc-button:hover {

  box-shadow:

    0 0 20px rgba(0, 255, 195, 0.8),

    0 0 0 1px rgba(0, 0, 0, 1);

  transform: translateY(-0.5px);

}

.rpc-button:active {

  transform: translateY(0.5px) scale(0.985);

  box-shadow: 0 0 8px rgba(0, 255, 195, 0.55);

}

.rpc-button:disabled {

  opacity: 0.6;

  cursor: wait;

  box-shadow: 0 0 6px rgba(0, 255, 195, 0.2);

}

.rpc-auto-note {

  font-size: 11px;

  color: rgba(189, 236, 222, 0.9);

}

/* ==== WATERMARK ==== */

.rpc-watermark {

  position: relative;

  z-index: 1;

  margin-top: 11px;

  font-size: 10px;

  letter-spacing: 0.2em;

  text-transform: uppercase;

  color: rgba(139, 216, 194, 0.92);

  text-align: right;

  opacity: 0.9;

}

/* ==== ANIMATIONS ==== */

@keyframes pillPulse {

  0% {

    transform: scale(1);

    box-shadow: 0 0 6px rgba(0, 255, 195, 0.6);

  }

  45% {

    transform: scale(1.15);

    box-shadow: 0 0 16px rgba(0, 255, 195, 1);

  }

  100% {

    transform: scale(1);

    box-shadow: 0 0 6px rgba(0, 255, 195, 0.6);

  }

}

/* ==== MOBILE ==== */

@media (max-width: 520px) {

  .rpc-shell {

    padding: 10px;

  }

  .rpc-card {

    padding: 14px 12px 16px;

    border-radius: 20px;

  }

  .rpc-header {

    flex-direction: column;

    align-items: flex-start;

    gap: 10px;

  }

  .rpc-header-right {

    flex-direction: row;

    align-items: center;

    align-self: stretch;

    justify-content: space-between;

  }

  .rpc-title {

    font-size: 19px;

    letter-spacing: 0.18em;

  }

  .rpc-subtitle {

    font-size: 10px;

  }

  .rpc-metrics {

    grid-template-columns: 1fr;

  }

  .rpc-endpoint-row {

    padding: 8px 9px;

  }

  .rpc-version {

    min-width: 0;

    text-align: left;

  }

  .rpc-top-strip {

    flex-wrap: wrap;

    border-radius: 14px;

  }

  .powered-logo-inline {

    height: 18px;

  }

}