:root {
  color-scheme: light;
  --red: #a8071a;
  --red-bright: #d92d3e;
  --red-soft: #fff1f1;
  --navy: #101d36;
  --navy-2: #162847;
  --ink: #182033;
  --muted: #667085;
  --subtle: #8a93a4;
  --paper: #f5f6f8;
  --surface: #ffffff;
  --line: #e5e8ee;
  --shadow: 0 18px 55px rgba(17, 29, 54, 0.09);
  --shadow-card: 0 12px 32px rgba(17, 29, 54, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --red: #f04b5e;
  --red-bright: #ff6676;
  --red-soft: rgba(240, 75, 94, 0.12);
  --navy: #0b1220;
  --navy-2: #121d31;
  --ink: #f2f4f8;
  --muted: #a5adbb;
  --subtle: #7f899b;
  --paper: #0d1422;
  --surface: #141e2e;
  --line: #293448;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  width: min(1380px, calc(100% - 64px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(168, 7, 26, 0.25);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.brand-mark::before {
  width: 32px;
  height: 15px;
  transform: rotate(30deg);
}

.brand-mark::after {
  width: 32px;
  height: 15px;
  transform: rotate(-30deg);
}

.brand-mark span {
  position: relative;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.official-link,
.theme-toggle {
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.official-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.official-link svg {
  width: 16px;
  height: 16px;
}

.official-link:hover {
  transform: translateY(-1px);
  border-color: var(--red);
  color: var(--red);
}

.theme-toggle {
  display: grid;
  width: 42px;
  padding: 0;
  place-items: center;
  border-radius: 12px;
  cursor: pointer;
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.moon-icon,
:root[data-theme="dark"] .sun-icon {
  display: none;
}

:root[data-theme="dark"] .moon-icon {
  display: block;
}

main,
footer {
  width: min(1380px, calc(100% - 64px));
  margin-inline: auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  min-height: 540px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000, transparent 68%);
}

.hero-content {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 930px;
  padding: 72px 68px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.eyebrow span {
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: var(--red-bright);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(48px, 4.7vw, 68px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.08;
  white-space: nowrap;
}

h1 em {
  color: #ff7280;
  font-style: normal;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 17px;
}

.search-shell {
  display: flex;
  max-width: 720px;
  height: 66px;
  align-items: center;
  gap: 14px;
  padding: 0 18px 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  transition: border-color 160ms ease, background 160ms ease;
}

.search-shell:focus-within {
  border-color: rgba(255, 114, 128, 0.85);
  background: rgba(255, 255, 255, 0.15);
}

.search-shell > svg {
  width: 23px;
  height: 23px;
  color: rgba(255, 255, 255, 0.72);
}

.search-shell input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
}

.search-shell input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.search-shell input::-webkit-search-cancel-button {
  filter: invert(1);
}

.search-shell kbd {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 13px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
}

.hero-meta span {
  position: relative;
}

.hero-meta span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -12px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  content: "";
}

.hero-meta strong {
  color: rgba(255, 255, 255, 0.82);
}

.quick-panel {
  position: relative;
  z-index: 3;
  align-self: stretch;
  margin: 24px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.quick-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-kicker,
.section-index {
  color: #ff7f8c;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.quick-heading h2 {
  margin: 5px 0 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

.live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ad89f;
  box-shadow: 0 0 0 4px rgba(90, 216, 159, 0.1);
}

.quick-list {
  display: flex;
  flex-direction: column;
}

.quick-link {
  display: grid;
  grid-template-columns: 28px 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  transition: padding 160ms ease, color 160ms ease;
}

.quick-link:last-child {
  border-bottom: 0;
}

.quick-link:hover {
  padding-left: 4px;
  color: #ff8692;
}

.quick-number {
  color: rgba(255, 255, 255, 0.28);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.quick-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

.quick-icon svg {
  width: 18px;
  height: 18px;
}

.quick-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.35;
}

.quick-copy strong {
  color: #fff;
  font-size: 14px;
}

.quick-copy small {
  overflow: hidden;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow-icon {
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.32);
}

.hero-orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(255, 90, 108, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit::before {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6676;
  box-shadow: 0 0 28px 8px rgba(255, 102, 118, 0.3);
  content: "";
}

.orbit-one {
  right: 25%;
  bottom: -310px;
  width: 560px;
  height: 560px;
}

.orbit-one::before {
  top: 88px;
  left: 52px;
}

.orbit-two {
  top: -210px;
  left: 43%;
  width: 390px;
  height: 390px;
}

.orbit-two::before {
  right: 54px;
  bottom: 52px;
}

.recent-section,
.directory,
.notice {
  margin-top: 72px;
}

.recent-section {
  padding-bottom: 2px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-label h2 {
  margin: 0;
  font-size: 18px;
}

.section-label button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.section-label button:hover {
  color: var(--red);
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recent-list a {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: border-color 160ms ease, color 160ms ease;
}

.recent-list a:hover {
  border-color: var(--red);
  color: var(--red);
}

.recent-list a span,
.recent-list svg {
  width: 17px;
  height: 17px;
}

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

.directory-head h2 {
  margin: 5px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.directory-head p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.section-index {
  color: var(--red);
}

.filters {
  display: flex;
  overflow-x: auto;
  gap: 9px;
  padding: 2px 2px 15px;
  scrollbar-width: thin;
}

.filter-chip {
  display: inline-flex;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.filter-chip span {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 7px;
  background: var(--paper);
  color: var(--subtle);
  font-size: 11px;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.filter-chip.is-active span,
.filter-chip:hover span {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
}

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

.link-card {
  position: relative;
  display: flex;
  min-height: 285px;
  overflow: hidden;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(17, 29, 54, 0.02);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.link-card:hover {
  z-index: 1;
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--red) 35%, var(--line));
  box-shadow: var(--shadow-card);
}

.card-topline {
  position: absolute;
  top: 0;
  left: 24px;
  width: 40px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--red);
  transform: scaleX(0.45);
  transform-origin: left;
  transition: transform 190ms ease;
}

.link-card:hover .card-topline {
  transform: scaleX(1);
}

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

.card-icon {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.favorite-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.favorite-button:hover,
.favorite-button.is-favorite {
  background: var(--red-soft);
  color: var(--red);
}

.favorite-button.is-favorite svg {
  fill: currentColor;
}

.favorite-button svg {
  width: 18px;
  height: 18px;
}

.card-content {
  flex: 1;
}

.card-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.network-tag {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--subtle);
  font-weight: 600;
}

.card-content h3 {
  margin-bottom: 8px;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.card-content p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.card-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: color 160ms ease, gap 160ms ease;
}

.card-link svg {
  width: 17px;
  height: 17px;
}

.card-link:hover {
  gap: 12px;
  color: var(--red);
}

.empty-state {
  padding: 72px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-state > span {
  display: block;
  margin-bottom: 6px;
  color: var(--subtle);
  font-size: 44px;
}

.empty-state h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.empty-state p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.empty-state button {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
}

.notice {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--red) 20%, var(--line));
  border-radius: var(--radius-lg);
  background: var(--red-soft);
}

.notice-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
}

.notice strong {
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.notice > a {
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 44px;
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer > div {
  display: flex;
  flex-direction: column;
}

footer strong {
  color: var(--ink);
  font-size: 15px;
}

footer p {
  margin: 0;
  text-align: right;
}

footer .icp-link {
  display: inline-block;
  margin-top: 6px;
}

footer .icp-link:hover,
footer .icp-link:focus-visible {
  color: var(--red);
  text-decoration: underline;
}

.is-hidden {
  display: none !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--red-bright) 60%, transparent);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .hero-content {
    padding: 58px 46px;
  }

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

@media (max-width: 900px) {
  .topbar,
  main,
  footer {
    width: min(100% - 36px, 720px);
  }

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

  .hero-content {
    padding: 58px 36px 26px;
  }

  h1 {
    font-size: clamp(38px, 6.2vw, 52px);
  }

  .quick-panel {
    margin: 0 24px 24px;
  }

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

  .recent-section,
  .directory,
  .notice {
    margin-top: 54px;
  }
}

@media (max-width: 620px) {
  .topbar,
  main,
  footer {
    width: calc(100% - 24px);
  }

  .topbar {
    height: 74px;
  }

  .official-link {
    display: none;
  }

  .hero {
    min-height: 0;
    border-radius: 22px;
  }

  .hero-content {
    padding: 42px 22px 24px;
  }

  h1 {
    font-size: clamp(26px, 8vw, 40px);
    letter-spacing: -0.06em;
  }

  .hero-copy {
    font-size: 15px;
  }

  .search-shell {
    height: 58px;
    padding-left: 17px;
  }

  .search-shell kbd {
    display: none;
  }

  .hero-meta {
    gap: 7px 17px;
  }

  .hero-meta span:not(:last-child)::after {
    right: -10px;
  }

  .quick-panel {
    margin: 0 12px 12px;
    padding: 24px 18px;
  }

  .quick-link {
    grid-template-columns: 22px 36px minmax(0, 1fr) 18px;
    gap: 9px;
  }

  .directory-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .directory-head p {
    margin: 0;
  }

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

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

  .notice {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 20px;
  }

  .notice > a {
    grid-column: 2;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  footer p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
