:root {
  color-scheme: dark;
  --bg: #15171c;
  --panel: #202229;
  --panel-strong: #272a32;
  --text: #f7f3ed;
  --muted: #c9c0b5;
  --line: rgba(255, 255, 255, 0.13);
  --coral: #ed5b48;
  --coral-deep: #b9362b;
  --teal: #28c5b0;
  --gold: #f1b64a;
  --ink: #0f1115;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  line-height: 1.6;
}

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

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

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(15, 17, 21, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 10px 24px rgba(237, 91, 72, 0.3);
}

.brand-text {
  letter-spacing: 0;
}

.topnav {
  display: flex;
  gap: 8px;
}

.topnav a {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
}

.topnav a:hover,
.topnav a:focus-visible {
  border-color: var(--line);
  color: var(--text);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: 66vh;
  padding: 118px clamp(18px, 5vw, 72px) 38px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: url("hero-portal.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(15, 17, 21, 0.94) 0%, rgba(15, 17, 21, 0.76) 42%, rgba(15, 17, 21, 0.28) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(21, 23, 28, 0) 28%);
}

.hero-content {
  align-self: start;
  justify-self: center;
  width: min(860px, 100%);
  margin-top: 28px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

h1 span {
  display: inline-block;
}

.title-cn {
  margin-left: 0.24em;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin: 18px 0 10px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  justify-content: center;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 16px 34px rgba(237, 91, 72, 0.28);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #f16c5a;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(40, 197, 176, 0.58);
}

.button-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  place-items: center;
}

.button-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.section {
  padding: 68px clamp(18px, 5vw, 72px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto 24px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 1160px;
  margin: 0 auto;
}

.link-card {
  display: flex;
  flex-direction: column;
  min-height: 238px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow);
}

.link-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link-index {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 900;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.status-primary {
  background: var(--teal);
}

.status-secondary {
  background: var(--gold);
}

.status-download {
  background: #ff8c62;
}

.status-page {
  background: #e7e1d7;
}

.link-card .card-actions {
  margin-top: auto;
}

.button-card {
  flex: 1 1 92px;
  background: var(--coral);
  color: #fff;
}

.button-ghost {
  flex: 1 1 92px;
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: rgba(40, 197, 176, 0.68);
}

.notice-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1d23;
}

.notice-panel p:last-child {
  margin: 0;
  color: var(--muted);
}

.not-found {
  display: grid;
  min-height: 76vh;
  place-items: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 16px;
  border: 1px solid rgba(40, 197, 176, 0.42);
  border-radius: 8px;
  background: rgba(15, 17, 21, 0.94);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: var(--shadow);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 62px;
    padding: 11px 16px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .topnav {
    gap: 2px;
  }

  .topnav a {
    padding-inline: 8px;
    font-size: 14px;
  }

  .hero {
    min-height: 68vh;
    padding: 92px 18px 24px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(15, 17, 21, 0.9) 0%, rgba(15, 17, 21, 0.72) 50%, var(--bg) 100%),
      linear-gradient(90deg, rgba(15, 17, 21, 0.6), rgba(15, 17, 21, 0.28));
  }

  h1 {
    font-size: 42px;
  }

  .title-cn {
    margin-left: 0;
  }

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

  .hero-actions .button,
  .card-actions .button {
    width: 100%;
  }

  .section {
    padding: 48px 18px;
  }

  .section-head {
    display: block;
  }

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

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

  .notice-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .footer {
    display: block;
  }

  .footer span {
    display: block;
    margin: 4px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
