*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: #1a1a1a;
  font-family: "Times New Roman", Times, Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 3rem;
}

.title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.page-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
width: 100%;
  margin: 0 auto;
}

.header-left {
  flex: 0 1 auto;
  min-width: 0;
  width: 400px;
}

.header-info {
  flex: 1 1 320px;
  min-width: 0;
  background: #1a1a1a;
  color: #fff;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
  width: 500px;
}

.search-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 1rem;
}

.search-label {
  display: block;
  font-size: 0.95rem;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 420px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid #1a1a1a;
  border-radius: 9999px;

  outline: none;
}

.search-form input::placeholder {
  color: #888;
}

.search-form input:focus {
  border-color: #1a1a1a;
}

.search-button {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
  border-left: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.search-button:hover {
  opacity: 0.85;
}

.search-button:focus {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

.footer {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.9rem;
  color: #1a1a1a;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer .underline {
  text-decoration: underline;
}

.footer-sep {
  margin: 0 0.5rem;
}

.load-error,
.results-empty {
  margin-top: 1rem;
  padding: 1rem;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
}

.load-error code,
.results-empty code {
  background: #eee;
  padding: 0.1em 0.4em;
  border-radius: 2px;
}

/* ----- Results ----- */
.results-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Consolas", monospace;
  position: relative;
  z-index: 2;
}

.results-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.results-table th,
.results-table td {
  text-align: left;
  padding: 0.5rem 1rem 0.5rem 0;
  vertical-align: top;
}

.results-table th {
  font-weight: 600;
  border-bottom: 1px solid #1a1a1a;
  padding-bottom: 0.5rem;
}

.results-table tbody tr:not(:last-child) td {
  padding-bottom: 0.5rem;
}

/* Set name tooltip */
.set-name-with-tooltip {
  position: relative;
  cursor: help;
}

.set-tooltip-popup {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 8px;
  padding: 0.65rem 0.9rem;
  width: 420px;
  max-width: 90vw;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.35;
  border-radius: 6px;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 1000;
  pointer-events: none;
  box-sizing: border-box;
}

.set-name-with-tooltip:hover .set-tooltip-popup,
.set-tooltip-popup:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.set-tooltip-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 1rem;
  border: 6px solid transparent;
  border-top-color: #1a1a1a;
}


.tooltip-source {
  display: block;
  margin-top: 0.5rem;
  text-align: right;
  color: #fff;
  text-decoration: underline;
  pointer-events: auto;
}

.tooltip-source:hover {
  opacity: 0.9;
}

