:root {
  --bg0: #0a0c10;
  --bg1: rgba(10, 12, 16, 0.76);
  --text0: rgba(255, 255, 255, 0.92);
  --text1: rgba(255, 255, 255, 0.64);
  --border0: rgba(255, 255, 255, 0.12);
  --shadow0: 0 18px 48px rgba(0, 0, 0, 0.45);
  --accent: #2ea8ff;
  --accent2: #7a4bff;
  --buttonText: rgba(255, 255, 255, 0.92);
  --cardBg: rgba(16, 18, 24, 0.62);
  --cardBgHover: rgba(18, 20, 28, 0.72);
  --focus: rgba(46, 168, 255, 0.42);
}

html[data-theme="light"] {
  --bg0: #f6f7fb;
  --bg1: rgba(246, 247, 251, 0.7);
  --text0: rgba(9, 11, 14, 0.92);
  --text1: rgba(9, 11, 14, 0.64);
  --border0: rgba(9, 11, 14, 0.14);
  --shadow0: 0 18px 48px rgba(0, 0, 0, 0.14);
  --buttonText: rgba(255, 255, 255, 0.96);
  --cardBg: rgba(255, 255, 255, 0.72);
  --cardBgHover: rgba(255, 255, 255, 0.86);
  --focus: rgba(46, 168, 255, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text0);
  background: radial-gradient(1200px 800px at 50% 20%, rgba(122, 75, 255, 0.22), transparent 52%),
    radial-gradient(1200px 800px at 50% 40%, rgba(46, 168, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(10, 12, 16, 0.92), rgba(10, 12, 16, 0.98));
  overflow-x: hidden;
}

html[data-theme="light"] body {
  background: radial-gradient(1200px 800px at 50% 20%, rgba(122, 75, 255, 0.14), transparent 54%),
    radial-gradient(1200px 800px at 50% 40%, rgba(46, 168, 255, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(246, 247, 251, 0.92), rgba(246, 247, 251, 0.98));
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  opacity: 0.9;
  pointer-events: none;
}

html[data-theme="light"] #starfield {
  opacity: 0;
}

.page {
  min-height: 100%;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  user-select: none;
}

.brandMark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(46, 168, 255, 0.9), rgba(122, 75, 255, 0.9));
  box-shadow: var(--shadow0);
  font-weight: 800;
  color: rgba(10, 12, 16, 0.92);
}

html[data-theme="light"] .brandMark {
  color: rgba(255, 255, 255, 0.96);
}

.brandText {
  font-weight: 750;
  letter-spacing: 0.2px;
}

.brandSub {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border0);
  color: var(--text1);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.navLink {
  text-decoration: none;
  color: var(--text1);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 140ms ease, color 140ms ease;
}

.navLink:hover {
  color: var(--text0);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .navLink:hover {
  background: rgba(9, 11, 14, 0.06);
}

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

.iconButton {
  height: 38px;
  width: 38px;
  border-radius: 12px;
  border: 1px solid var(--border0);
  background: var(--bg1);
  color: var(--text0);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 120ms ease, background 140ms ease;
}

.iconButton:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .iconButton:hover {
  background: rgba(9, 11, 14, 0.06);
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
}

html[data-theme="dark"] .moonIcon {
  display: none;
}

html[data-theme="dark"] .sunIcon {
  display: block;
}

html[data-theme="light"] .sunIcon {
  display: none;
}

html[data-theme="light"] .moonIcon {
  display: block;
}

.main {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 42px 24px 40px;
  gap: 26px;
}

.hero {
  text-align: center;
  padding: 16px 0 4px;
  max-width: 940px;
}

.heroLogo {
  width: min(220px, 56vw);
  margin: 0 auto 14px;
  filter: drop-shadow(0 18px 60px rgba(46, 168, 255, 0.16));
}

.heroLogoImg {
  width: 100%;
  height: auto;
  display: block;
}

.heroLogo:not(.hasImage) #heroImage {
  display: none;
}

.heroLogo.hasImage #heroSvg {
  display: none;
}

.heroTitle {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 44px);
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, rgba(46, 168, 255, 0.98), rgba(122, 75, 255, 0.98));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.heroDesc {
  margin: 14px 0 0;
  color: var(--text1);
  font-size: 15px;
  line-height: 1.7;
}

.heroActions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.primaryButton {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(46, 168, 255, 1), rgba(122, 75, 255, 1));
  color: var(--buttonText);
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 22px 54px rgba(46, 168, 255, 0.18);
  transition: transform 120ms ease, filter 140ms ease;
}

.primaryButton:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.cards {
  width: min(980px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.card {
  flex: 1 1 280px;
  max-width: 320px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border0);
  background: var(--cardBg);
  border-radius: 16px;
  padding: 14px 14px 16px;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.22);
  transition: transform 120ms ease, background 140ms ease, border-color 140ms ease;
}

.card:hover {
  transform: translateY(-2px);
  background: var(--cardBgHover);
  border-color: rgba(46, 168, 255, 0.26);
}

.cardTitle {
  font-weight: 750;
  letter-spacing: 0.2px;
}

.cardDesc {
  margin-top: 6px;
  color: var(--text1);
  font-size: 13px;
  line-height: 1.6;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px 18px;
  color: var(--text1);
  font-size: 12px;
}

.footerLink {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: border-color 140ms ease;
}

.footerLink:hover {
  border-bottom-color: currentColor;
}

.dot {
  opacity: 0.6;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .search {
    width: min(360px, 58vw);
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 100%;
    max-width: 100%;
  }
}
