:root {
  --surface: #e0e5ec;
  --shadow-dark: #bec3c9;
  --shadow-light: #ffffff;
  --text: #2d3748;
  --muted: #6c7293;
  --muted-soft: #8a91aa;
  --line: rgba(108, 114, 147, 0.18);
  --accent: #51637f;
  --accent-strong: #2f3f58;
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: calc(100% - 32px);
  max-width: 1400px;
  margin: 32px auto;
  padding: 42px 40px 26px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 20px 20px 60px var(--shadow-dark), -20px -20px 60px var(--shadow-light);
}

.deco {
  position: absolute;
  z-index: 0;
  display: block;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
  animation: floatSoft 7s ease-in-out infinite;
}

.deco-a {
  width: 46px;
  height: 46px;
  top: 30px;
  right: 36px;
}

.deco-b {
  width: 34px;
  height: 34px;
  top: 420px;
  right: 16px;
  animation-delay: 2s;
}

.deco-c {
  width: 34px;
  height: 34px;
  left: 24px;
  bottom: 70px;
  animation-delay: 4s;
}

.hero,
.content-section,
.footer {
  position: relative;
  z-index: 1;
}

.hero {
  max-width: 960px;
  margin: 0 auto 42px;
  text-align: center;
}

.brand-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border-radius: 50%;
  color: var(--muted);
  font-size: 32px;
  box-shadow: 15px 15px 30px var(--shadow-dark), -15px -15px 30px var(--shadow-light);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.brand-mark:hover {
  transform: translateY(-2px);
  box-shadow: inset 8px 8px 16px var(--shadow-dark), inset -8px -8px 16px var(--shadow-light);
}

.hero h1 {
  color: var(--text);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 760px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 16px;
}

.category-item,
.nav-item,
.info-item {
  background: var(--surface);
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  transition: box-shadow 0.28s ease, transform 0.28s ease, color 0.28s ease;
}

.category-item:hover,
.nav-item:hover {
  color: var(--accent-strong);
  transform: translateY(-3px);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

.content-section {
  margin-top: 46px;
}

.section-title {
  margin-bottom: 24px;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  text-align: center;
}

.section-title::after {
  content: "";
  display: block;
  width: 62px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 99px;
  background: var(--surface);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.nav-item {
  min-height: 156px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #4a5568;
  text-align: center;
  text-decoration: none;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--surface);
  font-size: 26px;
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.nav-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.nav-desc {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
}

.category-item {
  min-height: 104px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #4a5568;
  font-weight: 700;
  text-decoration: none;
}

.category-icon {
  margin-bottom: 6px;
  font-size: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-item {
  min-height: 160px;
  padding: 24px 24px 22px;
  border-radius: 18px;
}

.info-item:hover {
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.info-item h3 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.info-item p {
  color: var(--muted);
  font-size: 14px;
}

.footer {
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

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

.engine-shell {
  padding-top: 28px;
}

.subnav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.back-link,
.soft-command {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.back-link:hover,
.soft-command:hover {
  color: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

.engine-hero {
  max-width: 980px;
  margin: 4px auto 42px;
  text-align: center;
}

.engine-mark {
  margin-bottom: 12px;
}

.engine-kicker {
  width: fit-content;
  margin: 0 auto 10px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  background: var(--surface);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

.engine-hero h1 {
  color: var(--text);
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.engine-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.primary-command {
  color: var(--text);
}

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

.detail-card,
.detail-panel,
.flow-step,
.related-item {
  background: var(--surface);
  box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  transition: transform 0.28s ease, box-shadow 0.28s ease, color 0.28s ease;
}

.detail-card {
  min-height: 210px;
  padding: 28px 24px;
  border-radius: 18px;
  text-align: center;
}

.detail-card:hover,
.flow-step:hover,
.related-item:hover {
  transform: translateY(-4px);
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.detail-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  font-size: 28px;
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.detail-card h3,
.detail-panel h2,
.flow-step strong {
  color: var(--text);
}

.detail-card h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.detail-card p,
.flow-step p,
.detail-panel p {
  color: var(--muted);
  font-size: 14px;
}

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

.detail-panel {
  padding: 26px;
  border-radius: 18px;
}

.detail-panel h2 {
  margin-bottom: 14px;
  font-size: 21px;
}

.detail-panel ul {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.detail-panel li {
  padding-left: 22px;
  position: relative;
  color: var(--muted);
  font-size: 14px;
}

.detail-panel li::before {
  content: "";
  width: 8px;
  height: 8px;
  position: absolute;
  left: 0;
  top: 9px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.flow-step {
  min-height: 166px;
  padding: 24px;
  border-radius: 18px;
}

.flow-step span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: var(--muted);
  font-weight: 900;
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

.flow-step strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-item {
  min-height: 92px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
}

.related-item span {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

.related-item small {
  color: var(--muted);
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(6px, -14px, 0);
  }
}

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

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

@media (max-width: 860px) {
  .page-shell {
    width: calc(100% - 20px);
    max-width: 760px;
    margin: 10px auto;
    padding: 28px 20px 22px;
    border-radius: 22px;
  }

  .hero {
    margin-bottom: 34px;
  }

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

  .subnav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .subnav .back-link {
    width: 100%;
    max-width: none;
  }

  .nav-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

  .info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .detail-grid,
  .split-detail,
  .flow-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .info-item {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: calc(100% - 10px);
    max-width: 440px;
    padding: 22px 14px 18px;
  }

  .hero h1 {
    font-size: 29px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .section-title {
    font-size: 21px;
  }

  .nav-grid {
    gap: 12px;
  }

  .nav-item {
    min-height: 142px;
    padding: 18px 10px;
  }

  .nav-title {
    font-size: 15px;
  }

  .nav-desc,
  .info-item p,
  .footer p {
    font-size: 12px;
  }

  .engine-actions {
    align-items: stretch;
  }

  .soft-command {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
