:root {
  --ink: #14201d;
  --ink-soft: #31413c;
  --muted: #6d7b76;
  --line: rgba(20, 32, 29, 0.12);
  --line-strong: rgba(20, 32, 29, 0.18);
  --paper: #f6f9f7;
  --paper-warm: #fff9ef;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --teal: #0f766e;
  --teal-dark: #0b4f49;
  --amber: #c47a2c;
  --coral: #b95745;
  --blue: #3d6f95;
  --shadow: 0 18px 50px rgba(31, 43, 38, 0.12);
  --shadow-hover: 0 24px 60px rgba(31, 43, 38, 0.18);
  --radius-panel: 18px;
  --radius-card: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  line-height: 1.6;
  background:
    linear-gradient(135deg, rgba(235, 247, 244, 0.92), rgba(248, 251, 255, 0.86) 44%, rgba(255, 249, 239, 0.86)),
    var(--paper);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    repeating-linear-gradient(90deg, rgba(20, 32, 29, 0.035) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(20, 32, 29, 0.03) 0 1px, transparent 1px 72px);
  content: "";
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(15, 118, 110, 0.09) 36% 48%, transparent 48%),
    linear-gradient(155deg, transparent 0 62%, rgba(196, 122, 44, 0.1) 62% 72%, transparent 72%);
  pointer-events: none;
}

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

.page-shell {
  width: min(1200px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 24px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 8px 0;
  color: var(--ink-soft);
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: var(--radius-card);
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
  font-size: 0.94rem;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.topbar-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.header-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 20px;
  min-height: 198px;
  padding: 18px 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-panel);
  color: #f8fffc;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 36%),
    linear-gradient(115deg, #10221f 0%, #153b35 58%, #27443a 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy,
.search-panel,
.summary-bar,
.nav-container,
.link-grid,
.link-card {
  min-width: 0;
}

.header-content::before {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(255, 255, 255, 0.045) 30px 31px),
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 100%);
  content: "";
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  color: #bde9df;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 1px;
  background: var(--amber);
  content: "";
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.intro {
  max-width: 620px;
  margin: 4px 0 10px;
  color: rgba(248, 255, 252, 0.78);
  font-size: 0.94rem;
}

.search-panel {
  position: relative;
  width: min(720px, 100%);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  z-index: 1;
  color: var(--teal);
  font-size: 1.35rem;
  transform: translateY(-50%);
}

.search-panel input {
  width: 100%;
  height: 40px;
  padding: 0 20px 0 54px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-card);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-panel input::placeholder {
  color: #87918d;
}

.search-panel input:focus {
  border-color: rgba(189, 233, 223, 0.95);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.26), 0 0 0 4px rgba(189, 233, 223, 0.22);
  transform: translateY(-1px);
}

.hero-visual {
  position: relative;
  z-index: 1;
  min-height: 140px;
  align-self: center;
}

.visual-line,
.visual-card {
  position: absolute;
  display: block;
  border-radius: var(--radius-card);
}

.visual-line {
  right: 7%;
  width: 68%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
}

.line-a {
  top: 22%;
}

.line-b {
  top: 50%;
}

.line-c {
  top: 78%;
}

.visual-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.card-a {
  top: 0;
  right: 12%;
  width: 54%;
  height: 42px;
}

.card-b {
  top: 35%;
  right: 0;
  width: 78%;
  height: 48px;
  background: rgba(255, 255, 255, 0.16);
}

.card-c {
  right: 18%;
  bottom: 0;
  width: 46%;
  height: 38px;
  border-color: rgba(196, 122, 44, 0.38);
  background: rgba(196, 122, 44, 0.16);
}

.main-content {
  flex: 1;
}

.summary-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.summary-bar div {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 32px rgba(31, 43, 38, 0.07);
  overflow: hidden;
}

.summary-bar div::after {
  position: absolute;
  right: 16px;
  bottom: -18px;
  color: rgba(15, 118, 110, 0.08);
  content: "#";
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
}

.summary-bar strong {
  position: relative;
  z-index: 1;
  margin-right: 8px;
  color: var(--teal-dark);
  font-size: 1.72rem;
  line-height: 1;
}

.summary-bar span {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

.nav-container {
  display: grid;
  gap: 42px;
  counter-reset: category;
}

.category-section {
  counter-increment: category;
}

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

.category-kicker {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.category-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.category-head h2::before {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-card);
  color: var(--teal-dark);
  background: rgba(15, 118, 110, 0.08);
  content: counter(category, decimal-leading-zero);
  font-size: 0.8rem;
  font-weight: 900;
}

.category-count {
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: var(--radius-card);
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
  font-weight: 800;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.link-card {
  position: relative;
  min-height: 154px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)),
    var(--surface-solid);
  box-shadow: 0 14px 32px rgba(31, 43, 38, 0.08);
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.link-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal), var(--amber));
  content: "";
  opacity: 0;
  transition: opacity 0.24s ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: var(--shadow-hover);
  transform: translateY(-6px);
}

.link-card:hover::before,
.link-card:focus-visible::before {
  opacity: 1;
}

.link-card:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 3px;
}

.link-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.link-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius-card);
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal-dark), var(--blue));
  box-shadow: 0 12px 24px rgba(15, 79, 73, 0.18);
  font-size: 0.82rem;
  font-weight: 900;
}

.link-host {
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.link-card h3::after {
  flex: 0 0 auto;
  color: var(--coral);
  content: "↗";
  font-size: 1rem;
  transition: transform 0.24s ease;
}

.link-card:hover h3::after,
.link-card:focus-visible h3::after {
  transform: translate(2px, -2px);
}

.link-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.empty-state {
  margin: 34px 0;
  padding: 50px 24px;
  border: 1px dashed rgba(15, 118, 110, 0.32);
  border-radius: var(--radius-card);
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(31, 43, 38, 0.08);
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  margin-top: 44px;
  padding: 28px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 0.94rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--teal-dark);
  font-weight: 800;
}

.site-footer a:hover {
  color: var(--coral);
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .header-content {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }

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

@media (max-width: 680px) {
  .page-shell {
    width: calc(100% - 28px);
  }

  .site-header {
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .topbar-note {
    font-size: 0.88rem;
  }

  .header-content {
    min-height: auto;
    padding: 24px 20px;
    border-radius: 14px;
  }

  h1 {
    font-size: clamp(1.95rem, 10vw, 2.45rem);
  }

  .intro {
    margin-bottom: 24px;
    font-size: 1rem;
  }

  .search-panel input {
    height: 54px;
    padding-right: 14px;
  }

  .summary-bar {
    grid-template-columns: 1fr;
    margin-bottom: 30px;
  }

  .category-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    min-height: 142px;
  }

  .site-footer {
    align-items: center;
  }
}
