:root {
  --bg-primary: #f5f6fa;
  --bg-secondary: #ffffff;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-muted: #7a7a95;
  --border-color: rgba(26, 26, 46, 0.1);
  --accent: #e94560;
  --accent-2: #6a5acd;
  --accent-3: #ff9a3c;
  --gradient-banner: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #533483 75%, #e94560 100%);
  --gradient-card: linear-gradient(135deg, rgba(233, 69, 96, 0.12), rgba(106, 90, 205, 0.12));
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --glass-blur: blur(18px);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1180px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-elevated: rgba(26, 26, 46, 0.72);
    --text-primary: #f0f0f8;
    --text-secondary: #b8b8d0;
    --text-muted: #8888a8;
    --border-color: rgba(240, 240, 248, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --gradient-card: linear-gradient(135deg, rgba(233, 69, 96, 0.18), rgba(106, 90, 205, 0.18));
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--accent-2);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

ul,
ol {
  list-style: none;
}

/* ============ Header ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.top-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar span:first-child {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

header nav[role="navigation"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6px 16px;
}

header nav[role="navigation"] a {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: color var(--transition), background-color var(--transition), transform var(--transition);
}

header nav[role="navigation"] a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--gradient-banner);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

header nav[role="navigation"] a:hover {
  color: var(--text-primary);
  background-color: var(--gradient-card);
  transform: translateY(-1px);
}

header nav[role="navigation"] a:hover::after {
  width: 60%;
}

/* ============ Main layout ============ */
main {
  display: block;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 64px;
}

section {
  position: relative;
  margin-top: 40px;
  padding: 40px 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), background-color var(--transition);
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

section:hover {
  box-shadow: var(--shadow-md);
}

section#home {
  margin-top: 32px;
  padding: 64px 48px;
  background: var(--gradient-banner);
  border: none;
  color: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

section#home::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 154, 60, 0.35), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBlob 12s ease-in-out infinite;
}

section#home::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.3), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBlob 16s ease-in-out infinite reverse;
}

section#home h1,
section#home p {
  position: relative;
  z-index: 1;
}

section#home h1 {
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

section#home p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 860px;
}

section#home p + p {
  margin-top: 16px;
}

/* ============ Typography ============ */
h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

h2 {
  position: relative;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 24px;
  padding-left: 18px;
  letter-spacing: -0.3px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 70%;
  border-radius: var(--radius-pill);
  background: var(--gradient-banner);
}

section#home h2::before {
  background: #ffffff;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--accent);
  letter-spacing: 0.2px;
}

p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 15.5px;
}

section#home p {
  color: rgba(255, 255, 255, 0.9);
}

/* ============ Breadcrumb ============ */
nav[aria-label="面包屑导航"] {
  margin-top: 24px;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
}

nav[aria-label="面包屑导航"] li {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
}

nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-muted);
  opacity: 0.6;
}

nav[aria-label="面包屑导航"] a {
  color: var(--text-secondary);
  font-weight: 500;
}

nav[aria-label="面包屑导航"] a:hover {
  color: var(--accent);
}

/* ============ Articles ============ */
article {
  position: relative;
  margin-top: 20px;
  padding: 24px 26px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-banner);
  opacity: 0;
  transition: opacity var(--transition);
}

article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(233, 69, 96, 0.3);
}

article:hover::before {
  opacity: 1;
}

article h3 {
  margin-top: 0;
  color: var(--text-primary);
}

article p {
  font-size: 14.5px;
}

article p:nth-of-type(1) {
  display: inline-block;
  padding: 2px 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(233, 69, 96, 0.1);
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

article a::after {
  content: "→";
  transition: transform var(--transition);
}

article a:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateX(2px);
}

article a:hover::after {
  transform: translateX(4px);
}

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  padding: 16px 20px 16px 44px;
  margin-top: 14px;
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15.5px;
  cursor: default;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: var(--gradient-banner);
  border-radius: 50%;
}

#faq h3:hover {
  transform: translateX(4px);
  border-color: rgba(233, 69, 96, 0.35);
}

#faq h3 + p {
  padding: 0 20px 8px 44px;
  margin-top: -4px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* ============ HowTo ============ */
#howto h4 {
  position: relative;
  padding-left: 36px;
  color: var(--text-primary);
}

#howto h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--gradient-banner);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.12);
}

#howto h4::after {
  content: "✓";
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

/* ============ Cases quotes ============ */
#cases p:not(:first-of-type) {
  position: relative;
  padding: 16px 20px 16px 52px;
  margin-top: 12px;
  background: var(--gradient-card);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-3);
  font-style: italic;
  color: var(--text-secondary);
  transition: transform var(--transition), box-shadow var(--transition);
}

#cases p:not(:first-of-type)::before {
  content: "\201C";
  position: absolute;
  left: 18px;
  top: 6px;
  font-size: 40px;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--accent-3);
  opacity: 0.6;
}

#cases p:not(:first-of-type):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============ Contact ============ */
#contact p {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}

#contact p:last-of-type {
  border-bottom: none;
}

/* ============ Sitemap & links ============ */
section[aria-labelledby="sitemap-title"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

section[aria-labelledby="sitemap-title"] ul li a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}

section[aria-labelledby="sitemap-title"] ul li a:hover {
  color: #ffffff;
  background: var(--gradient-banner);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============ Footer ============ */
footer[role="contentinfo"] {
  position: relative;
  margin-top: 48px;
  padding: 48px 24px 40px;
  background: var(--gradient-banner);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  overflow: hidden;
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 154, 60, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

footer[role="contentinfo"] p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13.5px;
  margin-bottom: 8px;
}

footer[role="contentinfo"] p:first-child {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
}

footer[role="contentinfo"] p:nth-child(2) {
  color: var(--accent-3);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ============ Animations ============ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -20px) scale(1.08);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

section:nth-of-type(2) { animation-delay: 0.05s; }
section:nth-of-type(3) { animation-delay: 0.1s; }
section:nth-of-type(4) { animation-delay: 0.15s; }
section:nth-of-type(5) { animation-delay: 0.2s; }
section:nth-of-type(6) { animation-delay: 0.25s; }
section:nth-of-type(7) { animation-delay: 0.3s; }
section:nth-of-type(8) { animation-delay: 0.35s; }

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  main {
    padding: 0 18px 48px;
  }

  section {
    padding: 32px 24px;
    border-radius: var(--radius-md);
  }

  section#home {
    padding: 48px 28px;
  }

  header nav[role="navigation"] a {
    padding: 7px 11px;
    font-size: 13.5px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .top-bar {
    padding: 8px 16px;
    font-size: 12px;
    justify-content: center;
    text-align: center;
  }

  header nav[role="navigation"] {
    padding: 6px 10px;
    gap: 2px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header nav[role="navigation"]::-webkit-scrollbar {
    display: none;
  }

  header nav[role="navigation"] a {
    white-space: nowrap;
    padding: 8px 12px;
  }

  main {
    padding: 0 14px 40px;
  }

  section {
    margin-top: 24px;
    padding: 26px 18px;
    border-radius: var(--radius-md);
  }

  section#home {
    padding: 40px 22px;
    border-radius: var(--radius-md);
  }

  h2 {
    padding-left: 14px;
    margin-bottom: 18px;
  }

  h2::before {
    width: 5px;
  }

  nav[aria-label="面包屑导航"] ol {
    padding: 10px 14px;
    font-size: 12.5px;
  }

  article {
    padding: 18px 18px;
  }

  #faq h3 {
    padding: 14px 16px 14px 40px;
    font-size: 14.5px;
  }

  #faq h3 + p {
    padding-left: 40px;
    padding-right: 14px;
  }

  #cases p:not(:first-of-type) {
    padding: 14px 16px 14px 44px;
  }

  section[aria-labelledby="sitemap-title"] ul {
    gap: 8px;
  }

  section[aria-labelledby="sitemap-title"] ul li a {
    padding: 7px 14px;
    font-size: 13px;
  }

  footer[role="contentinfo"] {
    padding: 36px 18px 32px;
  }
}

@media (max-width: 380px) {
  section {
    padding: 22px 14px;
  }

  section#home {
    padding: 32px 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  header nav[role="navigation"] a {
    padding: 7px 10px;
    font-size: 13px;
  }
}

/* ============ Print ============ */
@media print {
  header[role="banner"],
  footer[role="contentinfo"],
  nav[aria-label="面包屑导航"] {
    display: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  section {
    box-shadow: none;
    border: 1px solid #cccccc;
    page-break-inside: avoid;
  }

  section#home {
    background: #f0f0f0;
    color: #000000;
  }

  section#home h1,
  section#home p {
    color: #000000;
  }
}