@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700&family=Varela+Round&display=swap');

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

:root {
  --clr-primary: #56228b;
  --clr-secondary: #8b4513;
  --clr-dark: #1f1726;
  --clr-primary-light: #7340b0;
  --clr-primary-dim: #3a1660;
  --clr-secondary-light: #b05a20;
  --clr-glass-bg: rgba(86, 34, 139, 0.12);
  --clr-glass-border: rgba(86, 34, 139, 0.28);
  --clr-text: #f0eaf8;
  --clr-text-muted: #c4b8d8;
  --clr-text-dark: #e8dff5;
  --clr-surface: rgba(31, 23, 38, 0.85);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-soft: 0 4px 24px rgba(31, 23, 38, 0.45);
  --shadow-card: 0 8px 32px rgba(86, 34, 139, 0.18);
  --font-main: 'Nunito Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Varela Round', 'Nunito Sans', sans-serif;
  --nav-height: 72px;
  --anchor-height: 44px;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
  line-height: 1.65;
}

body {
  font-family: var(--font-main);
  background-color: var(--clr-dark);
  color: var(--clr-text);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

a {
  color: var(--clr-text);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover, a:focus-visible {
  color: #d4a8ff;
  opacity: 0.88;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── 公告条 ── */
.announce-bar {
  background: linear-gradient(90deg, var(--clr-primary-dim) 0%, var(--clr-secondary) 100%);
  text-align: center;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f0e8ff;
  position: relative;
  z-index: 200;
  width: 100%;
  overflow: hidden;
}

/* ── aside > nav ── */
aside.site-aside {
  position: sticky;
  top: 0;
  z-index: 150;
  background: rgba(31, 23, 38, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--clr-glass-border);
  width: 100%;
  overflow: hidden;
}

aside.site-aside nav.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 16px;
}

aside.site-aside nav.top-nav ul {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

aside.site-aside nav.top-nav ul.nav-left {
  justify-content: flex-end;
}

aside.site-aside nav.top-nav ul.nav-right {
  justify-content: flex-start;
}

aside.site-aside nav.top-nav ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  min-height: 44px;
  height: 44px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

aside.site-aside nav.top-nav ul li a:hover,
aside.site-aside nav.top-nav ul li a:focus-visible {
  background: var(--clr-glass-bg);
  color: #e0c8ff;
}

.brand-center {
  flex-shrink: 0;
  margin: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  height: 44px;
  width: auto;
  border-radius: var(--radius-sm);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #d4a8ff;
  white-space: nowrap;
  padding: 6px 12px;
  background: var(--clr-glass-bg);
  border: 1px solid var(--clr-glass-border);
  border-radius: var(--radius-md);
}

/* ── 粘性锚点条 ── */
.sticky-anchor-bar {
  position: sticky;
  top: var(--nav-height);
  z-index: 140;
  background: rgba(86, 34, 139, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(86, 34, 139, 0.2);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  width: 100%;
}

.sticky-anchor-bar::-webkit-scrollbar { display: none; }

.anchor-list {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
  height: var(--anchor-height);
  width: max-content;
  min-width: 100%;
}

.anchor-list li a {
  display: flex;
  align-items: center;
  padding: 0 10px;
  min-height: 44px;
  height: 44px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.anchor-list li a:hover,
.anchor-list li a:focus-visible {
  color: #e0c8ff;
  background: rgba(86, 34, 139, 0.25);
}

/* div 锚点偏移 */
div[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--anchor-height) + 12px);
}

/* ── Hero ── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 60%, rgba(86, 34, 139, 0.55) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 20%, rgba(139, 69, 19, 0.35) 0%, transparent 55%),
              var(--clr-dark);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(86, 34, 139, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 34, 139, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.hero-blob-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(86, 34, 139, 0.7), transparent 70%);
  top: 10%;
  left: -80px;
  animation: blobFloat 12s ease-in-out infinite;
}

.hero-blob-2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(139, 69, 19, 0.5), transparent 70%);
  bottom: 8%;
  right: 5%;
  animation: blobFloat 16s ease-in-out infinite reverse;
}

@keyframes blobFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-28px) scale(1.05); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 120px 40px 80px;
  text-align: left;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.25;
  color: #f0e8ff;
  max-width: 720px;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(86, 34, 139, 0.6);
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--clr-text-muted);
  max-width: 540px;
  line-height: 1.7;
}

/* ── 正文内容区 ── */
.content-body-section {
  position: relative;
  z-index: 1;
}

.page-content-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 40px;
  align-items: start;
}

.content-main {
  min-width: 0;
  overflow: hidden;
}

/* page.content 内部样式 */
.content-main h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: #e4d0ff;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(86, 34, 139, 0.35);
  line-height: 1.3;
}

.content-main h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #d4b8f8;
  margin: 32px 0 12px;
}

.content-main p {
  color: var(--clr-text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.72;
}

.content-main ul,
.content-main ol {
  list-style: disc;
  padding-left: 1.6em;
  margin-bottom: 16px;
  color: var(--clr-text-muted);
}

.content-main ol {
  list-style: decimal;
}

.content-main li {
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.65;
}

.content-main a {
  color: #c49ef8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-main a:hover {
  color: #e0c8ff;
}

.content-main strong {
  color: #f0e8ff;
  font-weight: 700;
}

.content-main table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.content-main th {
  background: rgba(86, 34, 139, 0.4);
  color: #e4d0ff;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.92rem;
}

.content-main td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(86, 34, 139, 0.15);
  font-size: 0.95rem;
  color: var(--clr-text-muted);
}

.content-main tr:nth-child(even) td {
  background: rgba(86, 34, 139, 0.07);
}

/* div 分隔流线 */
.content-main div {
  position: relative;
  padding: 36px 28px;
  margin-bottom: 32px;
  background: rgba(86, 34, 139, 0.07);
  border: 1px solid rgba(86, 34, 139, 0.18);
  border-radius: var(--radius-xl);
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.content-main div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* ── 右侧 aside ── */
.content-aside {
  position: sticky;
  top: calc(var(--nav-height) + var(--anchor-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* ── 玻璃拟态卡片 ── */
.glass-card {
  background: rgba(86, 34, 139, 0.13);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--clr-glass-border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 48px rgba(86, 34, 139, 0.28);
}

.aside-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #d4a8ff;
  margin-bottom: 16px;
}

.aside-title span {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(86, 34, 139, 0.3);
  border-radius: 999px;
}

.aside-nav-list li {
  margin-bottom: 4px;
}

.aside-nav-list li a {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  min-height: 40px;
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  border-radius: var(--radius-sm);
  transition: background 0.18s, color 0.18s;
  line-height: 1.4;
}

.aside-nav-list li a:hover,
.aside-nav-list li a:focus-visible {
  background: rgba(86, 34, 139, 0.25);
  color: #e0c8ff;
}

.aside-tip p {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
}

/* ── Footer ── */
footer {
  background: linear-gradient(180deg, rgba(31, 23, 38, 0.0) 0%, var(--clr-dark) 8%),
              var(--clr-dark);
  border-top: 1px solid rgba(86, 34, 139, 0.25);
  margin-top: 40px;
  width: 100%;
  overflow: hidden;
}

.footer-cta-block {
  text-align: center;
  padding: 64px 40px 48px;
  background: radial-gradient(ellipse at center, rgba(86, 34, 139, 0.25) 0%, transparent 70%);
}

.footer-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #e4d0ff;
  margin-bottom: 12px;
}

.footer-cta-title span {
  display: inline-block;
}

.footer-cta-desc {
  color: var(--clr-text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* footer > div×n */
footer > div.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px 48px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #d4a8ff;
  margin-bottom: 14px;
}

.footer-col h4 span {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(86, 34, 139, 0.25);
  border-radius: 999px;
}

.footer-col p {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 10px;
}

.footer-col ul li {
  margin-bottom: 6px;
}

.footer-col ul li a {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  line-height: 1.5;
  transition: color 0.18s;
}

.footer-col ul li a:hover {
  color: #d4a8ff;
}

footer > div.footer-bottom {
  border-top: 1px solid rgba(86, 34, 139, 0.18);
  padding: 20px 40px;
  text-align: center;
}

.copyright {
  font-size: 0.82rem;
  color: rgba(196, 184, 216, 0.6);
  line-height: 1.6;
}

/* ── 动效 ── */
@media (prefers-reduced-motion: no-preference) {
  .content-main div {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .content-main div.in-view {
    opacity: 1;
    transform: none;
  }

  .glass-card {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease,
                box-shadow 0.25s ease;
  }

  .glass-card.in-view {
    opacity: 1;
    transform: none;
  }
}

/* ── 响应式 ── */
@media (max-width: 1024px) {
  .page-content-wrap {
    grid-template-columns: 1fr 240px;
    gap: 28px;
    padding: 48px 24px;
  }
}

@media (max-width: 900px) {
  .page-content-wrap {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }

  .content-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .content-aside .aside-card {
    flex: 1 1 260px;
  }

  footer > div.footer-cols {
    grid-template-columns: 1fr 1fr;
    padding: 0 24px 40px;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-height: 60px;
    --anchor-height: 44px;
  }

  aside.site-aside nav.top-nav {
    padding: 0 8px;
    height: var(--nav-height);
  }

  aside.site-aside nav.top-nav ul li a {
    padding: 0 7px;
    font-size: 0.72rem;
    min-height: 44px;
    height: 44px;
  }

  .brand-center {
    margin: 0 6px;
  }

  .brand-text {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .hero-inner {
    padding: 80px 16px 60px;
  }

  .hero-h1 {
    font-size: 1.55rem;
  }

  .content-main div {
    padding: 24px 16px;
  }

  footer > div.footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 16px 32px;
  }

  .footer-cta-block {
    padding: 40px 16px 32px;
  }

  footer > div.footer-bottom {
    padding: 16px 16px;
  }

  .anchor-list {
    padding: 0 8px;
  }

  .anchor-list li a {
    padding: 0 8px;
    font-size: 0.74rem;
    min-height: 44px;
    height: 44px;
  }
}

@media (max-width: 375px) {
  aside.site-aside nav.top-nav ul li a {
    font-size: 0.68rem;
    padding: 0 4px;
  }

  .brand-text {
    font-size: 0.72rem;
    padding: 3px 5px;
  }

  .content-main div {
    padding: 20px 12px;
  }
}
