:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --muted-panel: #f7f8fa;
  --line: #eceef2;
  --line-strong: #dfe3ea;
  --text: #17191f;
  --muted: #7c828d;
  --soft: #a6abb4;
  --blue: #1967ff;
  --blue-soft: #edf4ff;
  --black: #111318;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(16, 24, 40, 0.12);
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 3px 8px rgba(25, 103, 255, 0.16));
}

.view-toggle button,
.download,
.detail-link {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.shell {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 38px;
  padding: 54px 32px 72px;
}

.sidebar {
  position: sticky;
  top: 104px;
  align-self: start;
  min-height: calc(100vh - 130px);
  padding-right: 26px;
  border-right: 1px solid var(--line);
}

.sidebar section + section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.filter-title {
  margin-bottom: 12px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.filter {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #424854;
  font-weight: 650;
  text-align: left;
  padding: 8px 10px;
}

.filter:hover { background: #f6f7f8; }
.filter.active { color: var(--text); background: #f1f2f4; }

.source-mark {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #eef3ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.source-mark.official { background: #fff1cc; color: #9a6700; }
.source-mark.community { background: #eef8ee; color: #257842; }

.content {
  min-width: 0;
}

.content-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.content-head h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.content-head p {
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 15px;
  font-weight: 600;
}

.view-toggle {
  display: inline-flex;
  padding: 5px;
  border-radius: 12px;
  background: #f1f2f4;
}

.view-toggle button {
  min-height: 36px;
  padding: 0 14px;
  color: #737985;
  background: transparent;
}

.view-toggle button.active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 2px 7px rgba(17, 19, 24, 0.08);
}

.searchbar {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1.5px solid #9ec5ff;
  border-radius: 10px;
  margin-bottom: 26px;
}

.searchbar span {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.searchbar input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.searchbar input::placeholder { color: #b6bbc4; }

.market-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.skill-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto auto;
  gap: 16px;
  align-items: center;
  min-height: 94px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.skill-row:last-child { border-bottom: 0; }
.skill-row:hover { background: #fbfcff; }

.skill-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #4f5b6b;
  background: #f7f9fc;
  border: 1px solid #e5e9f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.skill-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill-icon.media {
  color: #b04a1f;
  background: linear-gradient(135deg, #fff8f0, #fff0e5);
  border-color: #ffd8bd;
}

.skill-icon.web {
  color: #4564d8;
  background: linear-gradient(135deg, #f5f7ff, #eef2ff);
  border-color: #dbe3ff;
}

.skill-icon.anysearch {
  color: #6b4ce6;
  background: linear-gradient(135deg, #fbf9ff, #f1ecff);
  border-color: #e2d9ff;
}

.skill-icon.xhs {
  color: #e84e69;
  background: linear-gradient(135deg, #fff8fa, #ffedf2);
  border-color: #ffd7e0;
}

.skill-icon.amap {
  color: #1d72f3;
  background: linear-gradient(135deg, #f6fbff, #eaf3ff);
  border-color: #d6e7ff;
}

.skill-icon.stock {
  color: #1f9c5b;
  background: linear-gradient(135deg, #f6fff9, #eaf8ef);
  border-color: #d6efdf;
}

.skill-icon.pdf {
  color: #4f5662;
  background: linear-gradient(135deg, #fafbfc, #f1f3f6);
  border-color: #e0e4ea;
}

.skill-main {
  min-width: 0;
}

.skill-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.skill-title h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.api {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: #fff3e4;
  color: #ce7614;
  font-size: 12px;
  font-weight: 700;
}

.desc {
  margin: 7px 0 0;
  color: var(--soft);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #b0b5be;
  font-size: 13px;
  white-space: nowrap;
}

.tag {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag.content { background: #fff0f4; color: #f34870; }
.tag.map { background: #eaf9ef; color: #2d9d55; }
.tag.finance { background: #fff4d8; color: #a56b00; }

.download {
  min-height: 34px;
  padding: 0 14px;
  color: var(--text);
  background: #f4f5f7;
  white-space: nowrap;
}

.download:hover { background: #e9ebef; }

.market-list.card-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.market-list.card-view .skill-row {
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.market-list.card-view .meta,
.market-list.card-view .tag,
.market-list.card-view .download {
  grid-column: 2;
  justify-self: start;
}

.market-list.card-view .desc {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.empty {
  padding: 46px;
  text-align: center;
  color: var(--soft);
  background: #fafbfc;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
}

.detail-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(17, 19, 24, 0.18);
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(520px, 100vw);
  height: 100vh;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(104%);
  transition: transform 0.22s ease;
  overflow-y: auto;
}

.detail-panel.open {
  transform: translateX(0);
}

.detail-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #555b66;
  font-size: 22px;
  line-height: 1;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 36px;
  margin-bottom: 24px;
}

.detail-hero h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.detail-hero p {
  margin: 6px 0 0;
  color: var(--muted);
}

.detail-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}

.detail-section p {
  margin: 0;
  color: #424854;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-kv {
  padding: 12px;
  border-radius: 10px;
  background: #f7f8fa;
}

.detail-kv span {
  display: block;
  color: var(--soft);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-kv b {
  font-size: 14px;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.detail-link,
.detail-actions .download {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.detail-link {
  background: var(--black);
  color: #fff;
}

@media (max-width: 980px) {
  .topbar__inner {
    padding: 0 18px;
  }
  .brand { min-width: auto; }
  .shell {
    grid-template-columns: 1fr;
    padding: 28px 18px 48px;
  }
  .sidebar {
    position: static;
    min-height: 0;
    padding-right: 0;
    border-right: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .sidebar section + section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
  }
  .topbar__inner {
    min-height: 68px;
  }
  .sidebar {
    display: block;
  }
  .content-head {
    align-items: start;
    flex-direction: column;
  }
  .skill-row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }
  .meta,
  .tag,
  .download {
    grid-column: 2;
    justify-self: start;
  }
  .market-list.card-view {
    grid-template-columns: 1fr;
  }
}
