:root {
  --bg: #06080d;
  --bg-top: #0c1220;
  --panel: rgba(13, 18, 30, 0.92);
  --panel-strong: rgba(19, 27, 43, 0.96);
  --ink: #f5f7fb;
  --muted: #a6b0c3;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #79b8ff;
  --accent-soft: rgba(121, 184, 255, 0.14);
  --neon-pink: #ff4fd8;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Share Tech Mono", monospace;
  color: var(--ink);
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at top left, rgba(121, 184, 255, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(69, 211, 197, 0.12), transparent 24rem),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
}

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.hero {
  padding: 1rem 0 2rem;
}

.hero-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
}

.brand-logo {
  display: block;
  width: clamp(72px, 10vw, 110px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 0.98;
  color: var(--neon-pink);
  text-shadow:
    0 0 12px rgba(255, 79, 216, 0.36),
    0 0 28px rgba(255, 79, 216, 0.18);
}

.hero-tagline {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1;
}

.intro {
  max-width: 45rem;
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

.panel {
  position: relative;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 32%),
    var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.search-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.search-input {
  width: 100%;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-input::placeholder {
  color: rgba(245, 247, 251, 0.42);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(121, 184, 255, 0.14);
  transform: translateY(-1px);
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 1.25rem;
}

.meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.clear-button {
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.clear-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
}

td {
  overflow-wrap: anywhere;
}

thead th {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.sort-button {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.sort-button > span:first-child {
  white-space: nowrap;
}

.sort-button:hover,
.sort-button:focus-visible {
  color: var(--ink);
  outline: none;
  background: rgba(255, 255, 255, 0.04);
}

.sort-button[data-direction="asc"],
.sort-button[data-direction="desc"] {
  color: var(--accent);
}

.sort-indicator {
  width: 1ch;
  text-align: center;
}

.sort-button[data-direction="asc"] .sort-indicator::before {
  content: "↑";
}

.sort-button[data-direction="desc"] .sort-indicator::before {
  content: "↓";
}

tbody td {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:hover {
  background: var(--accent-soft);
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(19, 27, 43, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: rgba(33, 49, 77, 0.96);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 1rem, 100%);
    padding-top: 1.5rem;
  }

  .hero-bar {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .brand-lockup {
    gap: 0.85rem;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 0.8rem 0.9rem;
    border-radius: 0;
  }

  .brand-logo {
    width: clamp(76px, 26vw, 96px);
  }

  .hero h1 {
    font-size: clamp(1.95rem, 8.8vw, 2.7rem);
    max-width: none;
  }

  .panel {
    padding: 1rem;
    border-radius: 18px;
  }

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

  .clear-button {
    width: 100%;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.82rem;
  }

  .sort-button {
    gap: 0.3rem;
    padding: 0.75rem 0.4rem 0.75rem 0.3rem;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
  }

  table {
    table-layout: fixed;
  }

  thead th:nth-child(1),
  tbody td:nth-child(1) {
    width: 29%;
  }

  thead th:nth-child(2),
  tbody td:nth-child(2) {
    width: 27%;
  }

  thead th:nth-child(3),
  tbody td:nth-child(3) {
    width: 28%;
  }

  thead th:nth-child(4),
  tbody td:nth-child(4) {
    width: 16%;
  }
}
