:root {
  color-scheme: dark;
  --void: #05080b;
  --deck: #081116;
  --panel: rgba(10, 23, 29, 0.88);
  --panel-solid: #0b171d;
  --panel-soft: #10252c;
  --ink: #e7fbf6;
  --muted: #82a09c;
  --dim: #516c68;
  --line: rgba(124, 255, 226, 0.16);
  --line-strong: rgba(124, 255, 226, 0.32);
  --cyan: #55f7df;
  --cyan-strong: #00d4bc;
  --green: #7dff9f;
  --amber: #ffd166;
  --red: #ff6b7a;
  --blue: #6ab8ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
  --glow: 0 0 32px rgba(85, 247, 223, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--void);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "IBM Plex Sans", "Aptos", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(85, 247, 223, 0.16), transparent 26rem),
    radial-gradient(circle at 86% 4%, rgba(106, 184, 255, 0.12), transparent 24rem),
    linear-gradient(180deg, #071116 0%, #05080b 48%, #030507 100%);
  color: var(--ink);
  letter-spacing: 0;
}

.grid-shell {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(124, 255, 226, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 255, 226, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.58) 46%, transparent 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 30px;
  background: rgba(5, 8, 11, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(85, 247, 223, 0.18), rgba(106, 184, 255, 0.06)),
    #071015;
  box-shadow: var(--glow);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.brand-mark::before {
  width: 29px;
  height: 29px;
  border: 1px solid rgba(85, 247, 223, 0.55);
}

.brand-mark::after {
  width: 2px;
  height: 18px;
  background: var(--cyan);
  transform-origin: bottom;
  animation: sweep 2.8s linear infinite;
}

.brand-mark span {
  width: 7px;
  height: 7px;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-family: "Aptos Display", "Segoe UI", sans-serif;
  font-size: 25px;
  line-height: 1.05;
  font-weight: 800;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

p {
  color: var(--muted);
}

.top-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-chip,
.version {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 23, 29, 0.72);
  color: var(--muted);
  white-space: nowrap;
}

.metric-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  font-size: 12px;
  text-transform: uppercase;
}

.metric-chip strong {
  color: var(--cyan);
}

.version {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
}

main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px;
}

.panel {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(85, 247, 223, 0.09), transparent 24%, transparent 76%, rgba(106, 184, 255, 0.07));
  opacity: 0.72;
}

.section-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 0;
}

.panel-code {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--cyan);
  background: rgba(85, 247, 223, 0.08);
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-size: 12px;
}

form {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
button,
.button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: rgba(3, 8, 10, 0.78);
}

select {
  color-scheme: dark;
}

input::placeholder {
  color: var(--dim);
}

input:focus,
select:focus,
button:focus-visible,
.button:focus-visible,
.small-link:focus-visible {
  outline: 3px solid rgba(85, 247, 223, 0.28);
  outline-offset: 2px;
  border-color: var(--cyan);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  gap: 8px;
  color: #02100e;
  background: var(--cyan);
  border-color: var(--cyan);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 0 28px rgba(85, 247, 223, 0.18);
}

button:hover,
.button:hover {
  background: #8dffee;
}

.primary-action {
  min-height: 48px;
}

.disabled {
  pointer-events: none;
  opacity: 0.38;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 18px;
  gap: 18px;
}

.progress-panel {
  position: relative;
  display: grid;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-size: 13px;
}

.progress-meta strong {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  background: rgba(3, 8, 10, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  border-radius: inherit;
  box-shadow: 0 0 20px rgba(125, 255, 159, 0.42);
  transition: width 220ms ease;
}

.result-filters {
  display: grid;
  grid-template-columns: auto repeat(5, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  box-shadow: none;
}

.filter-title {
  position: relative;
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

.table-caption {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 10, 0.36);
}

.table-caption span {
  padding: 10px 12px;
  color: var(--dim);
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

table {
  position: relative;
  width: 100%;
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(124, 255, 226, 0.11);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 85px;
  z-index: 2;
  color: var(--muted);
  background: #071116;
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr {
  background: rgba(8, 17, 22, 0.54);
}

tbody tr:hover {
  background: rgba(85, 247, 223, 0.055);
}

.domain {
  color: var(--ink);
  font-weight: 900;
}

.score-cell {
  color: var(--green);
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.price-cell {
  color: var(--amber);
  white-space: nowrap;
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-variant-numeric: tabular-nums;
}

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

.actions button,
.small-link {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.actions button {
  color: var(--cyan);
  background: rgba(85, 247, 223, 0.08);
  box-shadow: none;
}

.small-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(106, 184, 255, 0.12);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: "SF Mono", "Cascadia Code", monospace;
  font-size: 11px;
  font-weight: 900;
}

.available {
  color: var(--green);
  background: rgba(125, 255, 159, 0.1);
}

.taken {
  color: var(--red);
  background: rgba(255, 107, 122, 0.1);
}

.unknown,
.error {
  color: var(--blue);
  background: rgba(106, 184, 255, 0.1);
}

@media (max-width: 1080px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-metrics {
    flex-wrap: wrap;
  }

  form,
  .result-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-title {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .topbar,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .status-row {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 21px;
  }

  form,
  .result-filters,
  .table-caption {
    grid-template-columns: 1fr;
  }

  .button,
  button {
    width: 100%;
  }
}
