:root {
  color-scheme: dark;
  --bg: #070d1a;
  --bg-deep: #060b16;
  --panel: #0c1424;
  --card: #111a2c;
  --card-hover: #162138;
  --line: rgba(146, 165, 198, 0.14);
  --line-strong: rgba(146, 165, 198, 0.23);
  --text: #f4f7ff;
  --muted: #98a6bc;
  --faint: #62718a;
  --blue: #2e6df6;
  --blue-bright: #3d79ff;
  --blue-dim: rgba(46, 109, 246, 0.13);
  --green: #5abf88;
  --green-dim: rgba(90, 191, 136, 0.12);
  --amber: #c8a36d;
  --amber-dim: rgba(200, 163, 109, 0.1);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% 0%, rgba(41, 91, 190, 0.14), transparent 31%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 28px 28px, 28px 28px, auto;
  background-position: center top, center top, center top, center top;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body, button, input, select { color-scheme: dark; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, select { cursor: pointer; }
button, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 1px solid var(--blue-bright); outline-offset: 2px; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 96px;
}

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark-wrap {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(88, 131, 218, 0.28);
  background: rgba(28, 58, 120, .18);
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(20, 57, 125, .12);
}
.brand-mark { width: 18px; height: 18px; fill: none; stroke: #6f9eff; stroke-width: 1.2; stroke-linejoin: round; }
.brand-copy { display: grid; gap: 0; }
.brand-copy strong { font-size: 13px; line-height: 1.1; letter-spacing: -.015em; }
.brand-copy small { margin-top: 2px; color: var(--faint); font-size: 9px; font-family: var(--mono); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.header-stat { display: grid; gap: 1px; text-align: right; }
.header-stat strong { font: 600 12px var(--mono); }
.header-stat span { color: var(--faint); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 48px 0 28px;
}
.hero-copy { max-width: 670px; }
.eyebrow {
  margin: 0 0 8px;
  color: #69a0ff;
  font: 600 10px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 { margin: 0; font-size: clamp(36px, 6vw, 58px); line-height: 1.02; letter-spacing: -.055em; font-weight: 750; }
.hero h1 span { color: #7895c9; }
.hero-text { max-width: 610px; margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.hero-meta { display: grid; grid-template-columns: repeat(2, minmax(88px, 1fr)); gap: 8px; min-width: 260px; }
.hero-chip, .hero-source {
  border: 1px solid var(--line);
  background: rgba(12,20,36,.72);
  border-radius: 9px;
}
.hero-chip { min-height: 66px; padding: 11px 12px; display: grid; align-content: space-between; }
.hero-chip span, .hero-source span { color: var(--faint); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .09em; }
.hero-chip strong { font: 650 16px var(--mono); }
.hero-chip strong.valid { color: var(--green); }
.hero-source { grid-column: 1 / -1; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; }
.hero-source strong { font: 11px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-source small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 120px 74px;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  background: rgba(10,17,31,.75);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(1,7,17,.12);
}
.search-field {
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.018);
}
.control-icon { width: 15px; height: 15px; margin: 0 11px; fill: none; stroke: var(--faint); stroke-width: 1.5; }
.search-field input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12.5px; }
.search-field input::placeholder { color: var(--faint); }
.search-field kbd { margin-right: 10px; color: var(--faint); font: 10px var(--mono); }
.compact-select {
  position: relative;
  min-width: 0;
  height: 40px;
  padding: 4px 10px 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.018);
}
.select-label { display: block; color: var(--faint); font: 8px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.select-trigger {
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 1px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 10.5px;
  text-align: left;
}
.select-trigger:disabled { cursor: not-allowed; opacity: .55; }
.select-chevron {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-right: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  transform: rotate(45deg) translateY(-1px);
  transition: transform .15s ease, border-color .15s ease;
}
.custom-select.is-open { border-color: rgba(67, 116, 216, .34); background: rgba(16, 28, 49, .96); }
.custom-select.is-open .select-chevron { transform: rotate(225deg) translate(-1px, -1px); border-color: #7ea2ff; }
.select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: -1px;
  right: -1px;
  z-index: 60;
  overflow: auto;
  max-height: 260px;
  padding: 4px;
  border: 1px solid rgba(101, 127, 174, .23);
  border-radius: 8px;
  background: #0b1323;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .42), 0 0 0 1px rgba(4, 10, 22, .55);
}
.select-option {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #aab8cf;
  font: 9px var(--mono);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.select-option:hover, .select-option.is-selected {
  background: rgba(46, 109, 246, .13);
  border-color: rgba(58, 113, 225, .22);
  color: #e4ebff;
}
.reset-button {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.018);
  color: var(--muted);
  font-size: 10px;
}
.reset-button:hover:not(:disabled) { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.035); }

.filter-row { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.channel-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.channel-item {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 10px var(--mono);
}
.channel-item strong { margin-left: 3px; color: var(--faint); font-weight: 500; }
.channel-item:hover, .channel-item.is-selected { border-color: rgba(58, 113, 225, .28); background: var(--blue-dim); color: #cbdcff; }
.channel-item.is-selected strong { color: #72a0ff; }
.result-summary { margin: 0; color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.result-summary strong { color: var(--text); font-weight: 600; }
.result-summary span { color: var(--faint); margin: 0 4px; }
.result-summary em { font-style: normal; }

.registry-state {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(12,20,36,.85);
}
.registry-state.success { display: none; }
.registry-state.error { border-color: rgba(198, 81, 92, .24); }
.state-dot { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #6a7a94; box-shadow: 0 0 0 4px rgba(106,122,148,.08); }
.registry-state.error .state-dot { background: #d35e68; box-shadow: 0 0 0 4px rgba(211,94,104,.09); }
.registry-state strong { font-size: 11px; }
.registry-state p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.state-action { margin-top: 8px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text); font-size: 9px; }

.release-group {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 14% 0%, rgba(51,91,169,.05), transparent 30%),
    rgba(9,16,29,.82);
  box-shadow: 0 12px 26px rgba(1,7,17,.13);
}
.release-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 1px 13px;
}
.release-heading h2 { margin: 0; display: grid; gap: 3px; font-size: 14px; line-height: 1.15; letter-spacing: -.02em; }
.release-heading h2 .channel-title { display: inline-flex; align-items: center; gap: 7px; }
.channel-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-dim); }
.release-group.beta .channel-dot { background: #7b9eff; }
.release-group.stable .channel-dot { background: #4ec488; box-shadow: 0 0 0 4px var(--green-dim); }
.release-heading h2 small { color: var(--faint); font: 8.5px var(--mono); }
.channel-maintainer { color: var(--faint); font: 8px var(--mono); }
.channel-downloads { display: grid; justify-items: end; gap: 2px; }
.channel-downloads strong { font: 600 10.5px var(--mono); }
.channel-downloads span { color: var(--faint); font-size: 8.5px; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.profile-card {
  min-width: 0;
  min-height: 146px;
  display: flex;
  flex-direction: column;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(19,28,46,.92), rgba(14,22,37,.96));
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.profile-card:hover { background: linear-gradient(180deg, rgba(24,37,61,.96), rgba(15,25,43,.98)); border-color: rgba(117, 145, 194, .22); transform: translateY(-1px); }
.profile-card h3 { margin: 6px 0 3px; color: var(--text); font-size: 12px; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
.asset-name { margin: 0; overflow: hidden; color: var(--muted); font: 8px/1.4 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.meta-list { margin: 8px 0 0; padding-top: 0; display: grid; gap: 3px; }
.meta-line { min-width: 0; display: grid; grid-template-columns: 9px 1fr; align-items: center; gap: 4px; color: var(--muted); font: 8px var(--mono); }
.meta-icon { width: 8px; height: 8px; fill: none; stroke: var(--faint); stroke-width: 1.25; }
.meta-line span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-foot { margin-top: auto; display: flex; align-items: center; gap: 5px; }
.download-button {
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font: 600 9px var(--mono);
}
.download-button { flex: 1; min-width: 0; border: 1px solid rgba(56, 119, 255, .36); background: linear-gradient(180deg, var(--blue-bright), var(--blue)); color: #fff; box-shadow: 0 5px 14px rgba(46,109,246,.18); }
.download-button:hover { filter: brightness(1.07); }
.download-button svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.25; }
.download-button svg { margin-left: 4px; }

.empty-state { padding: 56px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(10,16,29,.75); }
.empty-kicker { margin: 0 0 8px; color: #72a0ff; font: 9px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.empty-state h2 { margin: 0 0 6px; font-size: 18px; }
.empty-state p:not(.empty-kicker) { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.empty-state button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text); font-size: 10px; }

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 max(14px, calc((100vw - 1080px) / 2));
  border-top: 1px solid rgba(146,165,198,.13);
  background: rgba(5,10,21,.92);
  box-shadow: 0 -10px 28px rgba(1,7,17,.3);
  backdrop-filter: blur(12px);
}
.footer-brand { font: 650 10px var(--mono); letter-spacing: .08em; color: #d8e3ff; }
.footer-nav { display: flex; align-items: center; justify-content: center; gap: 24px; min-width: 0; }
.footer-nav a { color: #8f9db1; font-size: 9px; white-space: nowrap; }
.footer-nav a:hover { color: #d9e4ff; }
.github-link { display: inline-flex; align-items: center; gap: 4px; }
.github-link svg { width: 10px; height: 10px; fill: currentColor; }
.footer-status { display: flex; align-items: center; gap: 8px; color: #748198; font: 8px var(--mono); }
.back-top { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; }
.back-top svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.35; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 70px;
  z-index: 30;
  transform: translate(-50%, 10px);
  padding: 9px 12px;
  border: 1px solid rgba(67, 116, 216, .35);
  border-radius: 6px;
  background: #0b1830;
  color: #cfe0ff;
  font: 9px var(--mono);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .6; }

@media (max-width: 860px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-meta { width: min(100%, 380px); }
  .control-panel { grid-template-columns: minmax(0, 1fr) 118px 74px; }
  .reset-button { grid-column: 1 / -1; }
  .footer-nav { gap: 16px; }
}

@media (max-width: 640px) {
  .app-shell { width: min(100% - 18px, 560px); padding-bottom: 84px; }
  .site-header { min-height: 62px; }
  .header-stat { display: none; }
  .hero { padding: 30px 0 20px; }
  .hero h1 { font-size: 37px; }
  .hero-text { margin-top: 12px; font-size: 11px; }
  .hero-meta { min-width: 0; width: 100%; }
  .control-panel { grid-template-columns: 1fr 110px; }
  .search-field { grid-column: 1 / -1; }
  .compact-select { width: 100%; }
  .reset-button { grid-column: auto; }
  .filter-row { min-height: 48px; }
  .result-summary { display: none; }
  .release-group { padding: 11px; border-radius: 12px; }
  .profile-grid { gap: 6px; }
  .profile-card { min-height: 150px; padding: 9px; }
  .profile-card h3 { font-size: 11px; }
  .asset-name { font-size: 7px; }
  .download-button { height: 25px; font-size: 8px; }
  .footer-status { display: none; }
  .site-footer { grid-template-columns: 1fr; min-height: 50px; padding: 0 9px; }
  .footer-brand { display: none; }
  .footer-nav { overflow-x: auto; justify-content: flex-start; gap: 18px; scrollbar-width: none; }
  .footer-nav::-webkit-scrollbar { display: none; }
}

@media (max-width: 420px) {
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .release-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .channel-downloads { justify-items: start; }
}
