:root {
  --bg: #070a12;
  --panel: #101624;
  --panel-soft: #151c2e;
  --field: #0b101b;
  --text: #f7f8ff;
  --muted: #9aa7c7;
  --pink: #ff3d81;
  --cyan: #35d8ff;
  --lime: #7cff6b;
  --border: #26304a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(53, 216, 255, 0.07), transparent 26%, transparent 72%, rgba(255, 61, 129, 0.07)),
    linear-gradient(180deg, #090d16, var(--bg) 52%, #090a0f);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.start-page {
  display: grid;
  min-height: 100vh;
  overflow-x: hidden;
  padding: clamp(18px, 3vw, 34px);
  place-items: center;
  position: relative;
  width: 100%;
}

.wallet-chip {
  align-items: center;
  background: rgba(11, 16, 27, 0.74);
  border: 1px solid rgba(53, 216, 255, 0.22);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  top: clamp(14px, 2vw, 24px);
  z-index: 20;
}

.wallet-chip:hover,
.nav-wallet:hover {
  border-color: rgba(53, 216, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(53, 216, 255, 0.1);
}

.wallet-chip span {
  font-size: 12px;
  font-weight: 900;
}

.wallet-chip strong {
  color: var(--lime);
  font-size: 12px;
}

.search-home {
  display: grid;
  gap: 22px;
  max-width: 760px;
  min-width: 0;
  text-align: center;
  width: 100%;
}

.brand-mark {
  color: var(--text);
  display: inline-grid;
  justify-self: center;
  max-width: calc(100vw - 48px);
  min-width: 0;
  text-decoration: none;
}

.brand-lbv {
  color: var(--lime);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.34em;
  line-height: 1;
  text-shadow:
    0 0 8px rgba(124, 255, 107, 0.72),
    0 0 18px rgba(53, 216, 255, 0.34);
}

.brand-name {
  background: linear-gradient(100deg, var(--pink), var(--cyan) 55%, var(--text));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(42px, 8vw, 82px);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 0.95;
  max-width: 100%;
  text-shadow:
    0 0 12px rgba(255, 61, 129, 0.38),
    0 0 24px rgba(53, 216, 255, 0.28);
}

.brand-line {
  background:
    linear-gradient(90deg, var(--cyan), rgba(53, 216, 255, 0.08) 70%),
    linear-gradient(90deg, var(--lime), var(--lime));
  background-position: left center, right center;
  background-repeat: no-repeat;
  background-size: calc(100% - 22px) 2px, 14px 2px;
  border-radius: 999px;
  display: block;
  height: 2px;
  margin-top: 8px;
}

.search-box {
  align-items: center;
  background: rgba(247, 248, 255, 0.96);
  border: 1px solid rgba(53, 216, 255, 0.22);
  border-radius: 999px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 62px;
  min-width: 0;
  padding: 7px;
  justify-self: center;
  max-width: 760px;
  width: calc(100vw - 64px);
}

.search-box:focus-within {
  border-color: rgba(53, 216, 255, 0.72);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(53, 216, 255, 0.14);
}

.search-box input {
  background: transparent;
  border: 0;
  color: #101624;
  min-width: 0;
  min-height: 48px;
  outline: none;
  padding: 0 18px;
  width: 100%;
}

.search-box input::placeholder {
  color: #68728a;
}

.search-submit {
  background: #101624;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  font-weight: 950;
  min-height: 48px;
  min-width: 64px;
  padding: 0 18px;
}

.quick-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.quick-row button,
.quick-link {
  align-items: center;
  background: rgba(16, 22, 36, 0.76);
  border: 1px solid rgba(53, 216, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  text-decoration: none;
}

.quick-row button:hover,
.quick-link:hover,
.registry-row:hover {
  border-color: rgba(53, 216, 255, 0.5);
  color: var(--cyan);
}

.search-results-mode .start-page {
  min-height: 42vh;
  padding-bottom: 24px;
}

.search-results-mode .search-home {
  gap: 16px;
}

.results-search-box {
  align-items: center;
  background: rgba(247, 248, 255, 0.96);
  border: 1px solid rgba(53, 216, 255, 0.22);
  border-radius: 999px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 6px;
  width: min(760px, 100%);
}

.results-search-box:focus-within {
  border-color: rgba(53, 216, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(53, 216, 255, 0.12);
}

.results-search-box input {
  background: transparent;
  border: 0;
  color: #101624;
  min-height: 42px;
  min-width: 0;
  outline: none;
  padding: 0 16px;
}

.results-search-box button {
  border-radius: 999px;
  min-height: 42px;
}

.search-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 46px;
}

.app-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 clamp(18px, 3vw, 34px) clamp(34px, 6vw, 70px);
}

.topnav {
  align-items: center;
  background: rgba(7, 10, 18, 0.84);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(53, 216, 255, 0.14);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px;
  position: sticky;
  top: 12px;
  z-index: 10;
}

.nav-pill {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 850;
  min-height: 40px;
  padding: 0 14px;
}

.nav-pill.active {
  background: linear-gradient(135deg, rgba(255, 61, 129, 0.18), rgba(53, 216, 255, 0.16));
  border-color: rgba(53, 216, 255, 0.32);
  color: var(--cyan);
}

.nav-wallet {
  align-items: center;
  background: rgba(11, 16, 27, 0.92);
  border: 1px solid rgba(124, 255, 107, 0.28);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
}

.nav-wallet span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.nav-wallet strong {
  color: var(--lime);
  font-size: 12px;
}

.tab-panel,
.reader-card {
  background: rgba(16, 22, 36, 0.9);
  border: 1px solid rgba(53, 216, 255, 0.15);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.tab-panel {
  display: none;
  padding: clamp(18px, 3vw, 28px);
}

.tab-panel.active {
  display: grid;
  gap: 18px;
}

.panel-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.eyebrow {
  color: var(--lime);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.22em;
  margin: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 20px;
  line-height: 1.18;
}

.muted,
.result-card p,
.reader-preview p {
  color: var(--muted);
  line-height: 1.5;
}

.tool-row,
.tool-grid {
  display: grid;
  gap: 10px;
}

.tool-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
}

.compact-tool-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.tool-grid {
  grid-template-columns: minmax(260px, 1fr) 110px 110px auto;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tool-row input,
.tool-grid input {
  background: rgba(11, 16, 27, 0.92);
  border: 1px solid rgba(53, 216, 255, 0.24);
  border-radius: 8px;
  color: var(--text);
  min-height: 52px;
  outline: none;
  padding: 0 16px;
  width: 100%;
}

.tool-row input:focus,
.tool-grid input:focus {
  border-color: rgba(53, 216, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(53, 216, 255, 0.12);
}

button,
.icon-button {
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  min-height: 46px;
  padding: 0 18px;
}

.icon-button {
  align-items: center;
  display: inline-grid;
  min-width: 46px;
  place-items: center;
}

.cyan {
  background: var(--cyan);
  color: var(--bg);
}

.lime {
  background: var(--lime);
  color: var(--bg);
}

.pink {
  background: var(--pink);
  color: var(--text);
}

.button-link {
  align-items: center;
  border-radius: 8px;
  display: inline-grid;
  font-weight: 900;
  min-height: 46px;
  padding: 0 18px;
  place-items: center;
  text-decoration: none;
}

.feed-pill,
.source-pill,
.tag {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.feed-pill {
  background: rgba(124, 255, 107, 0.14);
  border: 1px solid rgba(124, 255, 107, 0.24);
  color: var(--lime);
}

.source-pill {
  background: rgba(255, 61, 129, 0.15);
  color: var(--pink);
}

.tag {
  background: rgba(53, 216, 255, 0.1);
  color: var(--cyan);
}

.results-grid {
  display: grid;
  gap: 12px;
}

.result-card,
.metric-card,
.status-box,
.reader-preview,
.source-list {
  background: #0b101b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.result-card {
  display: grid;
  gap: 10px;
}

.search-empty-card {
  border-color: rgba(53, 216, 255, 0.28);
}

.result-topline,
.tag-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-url,
.mini-link {
  color: var(--cyan);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.reader-preview {
  display: grid;
  gap: 14px;
  min-height: 280px;
}

.reader-preview pre,
.reader-text {
  color: var(--text);
  font-family: inherit;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.reader-body {
  padding: 28px;
}

.reader-shell {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 920px;
}

.reader-card {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 40px);
}

.node-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metric-card {
  display: grid;
  gap: 10px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--cyan);
  font-size: clamp(18px, 2.4vw, 24px);
  overflow-wrap: anywhere;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-row {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 38px;
  padding: 0;
  text-align: left;
}

.source-row strong {
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: right;
}

.registry-row {
  border: 1px solid rgba(53, 216, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}

.install-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 980px;
  min-height: 100vh;
  padding: clamp(20px, 4vw, 52px);
}

.install-hero,
.install-panel {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr);
}

.install-hero h1 {
  font-size: clamp(36px, 7vw, 72px);
  line-height: 0.95;
}

.install-icon {
  border: 1px solid rgba(53, 216, 255, 0.3);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
  height: 96px;
  object-fit: cover;
  width: 96px;
}

.install-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.browser-library-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-backdrop {
  background: rgba(7, 10, 18, 0.66);
  backdrop-filter: blur(8px);
  inset: 0;
  position: fixed;
  z-index: 40;
}

.wallet-backdrop[hidden],
.wallet-drawer[hidden] {
  display: none;
}

.wallet-drawer {
  background: rgba(11, 16, 27, 0.98);
  border-left: 1px solid rgba(53, 216, 255, 0.22);
  box-shadow: -28px 0 70px rgba(0, 0, 0, 0.42);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  max-width: 100vw;
  position: fixed;
  right: 0;
  top: 0;
  width: min(420px, calc(100vw - 18px));
  z-index: 50;
}

.wallet-drawer-header {
  align-items: center;
  border-bottom: 1px solid rgba(53, 216, 255, 0.14);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px;
}

.wallet-drawer-body {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding: 16px;
}

.wallet-balance-panel {
  background:
    linear-gradient(135deg, rgba(53, 216, 255, 0.2), rgba(255, 61, 129, 0.14)),
    #101624;
  border: 1px solid rgba(53, 216, 255, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 138px;
  padding: 18px;
}

.wallet-balance-panel span,
.wallet-balance-panel small,
.wallet-field span,
.wallet-mini-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.wallet-balance-panel strong {
  color: var(--text);
  font-size: 42px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.wallet-field,
.wallet-mini-stat {
  background: #0b101b;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.wallet-field strong,
.wallet-mini-stat strong {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.wallet-action-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wallet-node-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-mini-stat.wide {
  grid-column: 1 / -1;
}

.wallet-transfer-form {
  display: grid;
  gap: 10px;
}

.wallet-transfer-form input {
  background: rgba(7, 10, 18, 0.78);
  border: 1px solid rgba(53, 216, 255, 0.24);
  border-radius: 8px;
  color: var(--text);
  min-height: 46px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

.wallet-transfer-form input:focus {
  border-color: rgba(53, 216, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(53, 216, 255, 0.12);
}

.wallet-transfer-form .wallet-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-status {
  min-height: 52px;
}

@media (max-width: 860px) {
  .wallet-chip {
    left: 14px;
    right: 14px;
    justify-content: center;
  }

  .search-home {
    max-width: 300px;
    padding-top: 42px;
  }

  .brand-name {
    font-size: clamp(30px, 9vw, 42px);
  }

  .search-box {
    grid-template-columns: minmax(0, 1fr) 56px;
    min-height: 58px;
    max-width: 280px;
    width: min(280px, calc(100vw - 48px));
  }

  .search-box input {
    font-size: 15px;
    padding: 0 12px;
  }

  .search-submit {
    min-width: 56px;
    padding: 0 12px;
  }

  .quick-row {
    margin: 0 auto;
    max-width: 280px;
    width: min(280px, calc(100vw - 48px));
  }

  .tool-row,
  .tool-grid,
  .node-grid,
  .install-grid,
  .browser-library-grid,
  .install-hero,
  .install-panel {
    grid-template-columns: 1fr;
  }

  .source-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-row strong {
    text-align: left;
  }

  .wallet-drawer {
    width: 100vw;
  }

  .wallet-action-grid,
  .wallet-node-grid {
    grid-template-columns: 1fr;
  }

  .wallet-mini-stat.wide {
    grid-column: auto;
  }
}
