/* ============================================
   Layout
   ============================================ */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 48px 80px;
}

@media (max-width: 720px) {
  .container { padding: 40px 22px 60px; }
}

/* ============================================
   Header
   ============================================ */
.header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 80px;
}

.meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10a37f;
  display: inline-block;
}

.title {
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.title em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}

.title .comma {
  color: var(--ink-3);
  font-weight: 400;
}

.subtitle {
  margin-top: 20px;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 56ch;
  line-height: 1.55;
}

.subtitle .accent {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.85em;
}

/* Brand mark */
.mark {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.mark-inner {
  display: contents;
}

.mark-inner .dot {
  color: var(--ink-3);
}

/* ============================================
   Section
   ============================================ */
.section {
  margin-bottom: 64px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-family: var(--font);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
}

.section-title .num {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 400;
}

/* ============================================
   Search
   ============================================ */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.search:focus-within {
  border-color: var(--ink);
  background: var(--bg);
}

.search svg {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
  flex-shrink: 0;
}

.search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  width: 220px;
  letter-spacing: -0.005em;
}

.search input::placeholder {
  color: var(--ink-3);
}

.search kbd {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-2);
  background: var(--bg);
  margin-right: 4px;
}

/* ============================================
   Grid of cards
   ============================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--line-strong);
  background: var(--hover);
}

.card[data-hidden="true"] {
  display: none;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
}

.icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.arrow {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--ink-3);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.card:hover .arrow {
  color: var(--ink);
  transform: translate(2px, -2px);
}

.arrow svg {
  width: 12px;
  height: 12px;
}

.name {
  font-family: var(--font);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 6px;
}

.name .light {
  font-weight: 400;
  color: var(--ink-2);
}

.desc {
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  line-height: 1.5;
  margin-bottom: 24px;
  min-height: 40px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.meta-row .path {
  color: var(--ink);
}

.meta-row .path .sep {
  color: var(--ink-3);
  margin: 0 4px;
}

.meta-row .port {
  color: var(--ink);
  font-weight: 500;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background: var(--ink-3);
  vertical-align: middle;
}

.status-dot.live {
  background: #10a37f;
}

.status-dot.dim {
  background: var(--ink-3);
}

/* ============================================
   Empty state
   ============================================ */
.empty {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 14px;
  display: none;
}

.empty.show {
  display: block;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink-3);
}

.signature {
  color: var(--ink-2);
}

.signature em {
  font-style: normal;
  color: var(--ink);
}

.signature .sep {
  color: var(--ink-3);
  margin: 0 10px;
}

/* ============================================
   备案信息
   ============================================ */
.beian {
  flex-basis: 100%;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  font-size: 12px;
  color: var(--ink-3);
}

.beian-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s var(--ease);
  letter-spacing: 0.01em;
}

.beian-item:hover {
  color: var(--ink-2);
}

.beian-item svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ============================================
   Command palette
   ============================================ */
.palette {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.palette.show {
  display: flex;
  animation: fade 0.18s var(--ease);
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.palette-box {
  width: min(560px, calc(100% - 32px));
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.12);
  animation: rise 0.2s var(--ease);
}

.palette-input {
  width: 100%;
  padding: 16px 22px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--line);
}

.palette-input::placeholder {
  color: var(--ink-3);
}

.palette-list {
  max-height: 360px;
  overflow-y: auto;
}

.palette-item {
  padding: 12px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s var(--ease);
  border-bottom: 1px solid var(--line);
}

.palette-item:last-child {
  border-bottom: none;
}

.palette-item:hover,
.palette-item.active {
  background: var(--hover);
}

.palette-item .pn {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
}

.palette-item .pp {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
}

/* ============================================
   Animations
   ============================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  animation: cardIn 0.4s var(--ease) both;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 720px) {
  .header {
    grid-template-columns: 1fr;
    margin-bottom: 48px;
  }
  .mark { width: 44px; height: 44px; font-size: 15px; }
  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .search { width: 100%; }
  .search input { width: 100%; }
}

/* ============================================
   Feedback modal —— 内容反馈与举报
   ============================================ */
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.feedback-modal.show {
  display: flex;
  animation: fade 0.18s var(--ease);
}

.feedback-box {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.12);
  animation: rise 0.2s var(--ease);
  display: flex;
  flex-direction: column;
}

.feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.feedback-head h3 {
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.feedback-close {
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s var(--ease);
}

.feedback-close:hover {
  color: var(--ink);
}

.feedback-body {
  padding: 22px;
  overflow-y: auto;
}

.feedback-statement {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  margin-bottom: 18px;
}

.feedback-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}

.feedback-contact .label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.feedback-contact a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-contact a:hover {
  color: var(--ink-2);
  text-decoration: underline;
}

/* 覆写 button 默认样式，复用 .beian-item 视觉 */
button.beian-item {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
