:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #4834d4;
  --accent: #fd79a8;
  --accent-light: #ffeaa7;
  --bg: #f8f9fd;
  --bg-alt: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --text-lighter: #b2bec3;
  --border: #e8ecf4;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.6);
  --shadow: 0 8px 32px rgba(108, 92, 231, 0.08);
  --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.16);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
  --nav-height: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #a29bfe;
    --primary-light: #6c5ce7;
    --primary-dark: #dfe6e9;
    --accent: #fd79a8;
    --accent-light: #ffeaa7;
    --bg: #0f0f1a;
    --bg-alt: #1a1a2e;
    --text: #dfe6e9;
    --text-light: #b2bec3;
    --text-lighter: #636e72;
    --border: #2d2d44;
    --card-bg: rgba(26, 26, 46, 0.72);
    --card-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 16px 48px rgba(162, 155, 254, 0.15);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(108, 92, 231, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(253, 121, 168, 0.05) 0%, transparent 60%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
  list-style: none;
}

::selection {
  background: var(--primary);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(248, 249, 253, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

@media (prefers-color-scheme: dark) {
  header {
    background: rgba(15, 15, 26, 0.82);
  }
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

header nav > a:first-child {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

header nav > a:first-child:hover {
  opacity: 0.8;
  -webkit-text-fill-color: transparent;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

header nav ul::-webkit-scrollbar {
  display: none;
}

header nav ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  border-radius: 10px;
  white-space: nowrap;
  transition: all var(--transition);
  position: relative;
}

header nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: transform var(--transition);
}

header nav ul li a:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
}

header nav ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ===== MAIN ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 32px) 24px 60px;
}

/* ===== BREADCRUMB ===== */
main > nav[aria-label="面包屑"] {
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease both;
}

main > nav[aria-label="面包屑"] ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-lighter);
  flex-wrap: wrap;
}

main > nav[aria-label="面包屑"] ol li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-lighter);
  font-weight: 600;
}

main > nav[aria-label="面包屑"] ol li a {
  color: var(--text-light);
  font-weight: 500;
}

main > nav[aria-label="面包屑"] ol li a:hover {
  color: var(--primary);
}

/* ===== BANNER ===== */
#banner {
  position: relative;
  padding: 64px 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 40%, #fd79a8 100%);
  color: #fff;
  overflow: hidden;
  margin-bottom: 48px;
  box-shadow: 0 20px 60px rgba(108, 92, 231, 0.3);
  animation: fadeInUp 0.8s ease both;
}

#banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#banner::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#banner h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

#banner p {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  line-height: 1.85;
  opacity: 0.92;
  max-width: 800px;
}

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

/* ===== SECTIONS ===== */
main > section {
  margin-bottom: 56px;
  animation: fadeInUp 0.7s ease both;
}

main > section:nth-child(odd) {
  animation-delay: 0.05s;
}

main > section:nth-child(even) {
  animation-delay: 0.1s;
}

main > section h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 28px;
  padding-bottom: 16px;
  position: relative;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

main > section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
}

main > section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
  line-height: 1.5;
}

main > section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 20px 0 8px;
  line-height: 1.5;
}

main > section p {
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.85;
}

main > section ul,
main > section ol {
  padding-left: 0;
  margin: 12px 0;
}

main > section ul li {
  position: relative;
  padding: 8px 0 8px 28px;
  color: var(--text-light);
  line-height: 1.75;
}

main > section ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}

/* ===== CARDS ===== */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal,
#update {
  background: var(--card-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover,
#legal:hover,
#update:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* ===== PRODUCTS GRID ===== */
#products h4 {
  display: flex;
  align-items: center;
  gap: 10px;
}

#products h4::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  flex-shrink: 0;
}

/* ===== CASES / BLOCKQUOTE ===== */
#cases blockquote {
  position: relative;
  margin: 20px 0;
  padding: 24px 28px 24px 56px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(253, 121, 168, 0.04));
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  transition: transform var(--transition), box-shadow var(--transition);
}

#cases blockquote::before {
  content: "\201C";
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 3rem;
  font-family: Georgia, serif;
  color: var(--primary);
  opacity: 0.3;
  line-height: 1;
}

#cases blockquote:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.1);
}

#cases blockquote p {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 0;
}

/* ===== NEWS ===== */
#news h3 {
  padding-left: 20px;
  border-left: 3px solid var(--primary);
  transition: border-color var(--transition), padding-left var(--transition);
}

#news h3:hover {
  border-left-color: var(--accent);
  padding-left: 24px;
}

#news h3 + p {
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin-bottom: 8px;
}

/* ===== ARTICLES ===== */
#articles article {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  margin-bottom: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

#articles article:hover::before {
  transform: scaleY(1);
}

#articles article:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 28px rgba(108, 92, 231, 0.1);
  border-color: var(--primary-light);
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--text);
  transition: color var(--transition);
}

#articles article:hover h3 {
  color: var(--primary);
}

#articles article p {
  font-size: 0.9rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--primary);
  margin-top: 8px;
  transition: gap var(--transition), color var(--transition);
}

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

#articles article a:hover {
  color: var(--accent);
}

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

/* ===== FAQ ===== */
#faq h3 {
  cursor: default;
  padding: 16px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 16px 0 8px;
  font-size: 1rem;
  transition: all var(--transition);
  position: relative;
}

#faq h3::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  margin-right: 10px;
  vertical-align: middle;
  flex-shrink: 0;
}

#faq h3:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.08);
  transform: translateY(-1px);
}

#faq h3 + p {
  padding: 0 20px 8px 54px;
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* ===== HOWTO ===== */
#howto h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--text);
  margin: 24px 0 8px;
}

#howto h4::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#howto h4 {
  counter-reset: step;
}

#howto h4 {
  counter-increment: step;
}

#howto h4::before {
  content: counter(step);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

#howto > ul {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  border: 1px solid var(--border);
}

/* ===== CONTACT ===== */
#contact p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
}

#contact h3 {
  margin-top: 24px;
}

#contact h3:first-of-type {
  margin-top: 0;
}

/* ===== SITEMAP ===== */
#sitemap ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

#sitemap ul li {
  padding: 0;
}

#sitemap ul li::before {
  display: none;
}

#sitemap ul li a {
  display: block;
  padding: 12px 18px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
  text-align: center;
}

#sitemap ul li a:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.25);
}

/* ===== LINKS ===== */
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#links ul li::before {
  display: none;
}

#links ul li a {
  display: inline-block;
  padding: 10px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all var(--transition);
}

#links ul li a:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.25);
}

/* ===== LEGAL ===== */
#legal h2 {
  font-size: 1.1rem;
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

#legal h2:first-child {
  margin-top: 0;
}

#legal h2::after {
  width: 32px;
  height: 3px;
}

/* ===== UPDATE ===== */
#update p {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.9rem;
}

#update p:first-child::before {
  content: "📅";
  font-size: 0.85rem;
}

#update p:nth-child(2)::before {
  content: "🔄";
  font-size: 0.85rem;
}

#update p:nth-child(3)::before {
  content: "✏️";
  font-size: 0.85rem;
}

#update p:nth-child(4)::before {
  content: "👤";
  font-size: 0.85rem;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-top: 20px;
}

footer p {
  color: var(--text-lighter);
  font-size: 0.85rem;
  line-height: 2;
}

footer a {
  color: var(--primary);
  font-weight: 500;
  transition: all var(--transition);
}

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

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ===== SCROLL REVEAL ===== */
main > section {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.7s ease forwards;
}

main > section:nth-child(1) { animation-delay: 0.05s; }
main > section:nth-child(2) { animation-delay: 0.1s; }
main > section:nth-child(3) { animation-delay: 0.15s; }
main > section:nth-child(4) { animation-delay: 0.2s; }
main > section:nth-child(5) { animation-delay: 0.25s; }
main > section:nth-child(6) { animation-delay: 0.3s; }
main > section:nth-child(7) { animation-delay: 0.35s; }
main > section:nth-child(8) { animation-delay: 0.4s; }
main > section:nth-child(9) { animation-delay: 0.45s; }
main > section:nth-child(10) { animation-delay: 0.5s; }
main > section:nth-child(11) { animation-delay: 0.55s; }
main > section:nth-child(12) { animation-delay: 0.6s; }
main > section:nth-child(13) { animation-delay: 0.65s; }
main > section:nth-child(14) { animation-delay: 0.7s; }
main > section:nth-child(15) { animation-delay: 0.75s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  #banner {
    padding: 48px 36px;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal,
  #update {
    padding: 32px 28px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
    --radius: 16px;
    --radius-lg: 22px;
  }

  header nav {
    padding: 0 16px;
    gap: 12px;
  }

  header nav > a:first-child {
    font-size: 1.1rem;
  }

  header nav ul li a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  main {
    padding: calc(var(--nav-height) + 20px) 16px 40px;
  }

  #banner {
    padding: 36px 24px;
    border-radius: var(--radius);
    margin-bottom: 32px;
  }

  #banner h1 {
    font-size: 1.3rem;
    margin-bottom: 16px;
  }

  #banner p {
    font-size: 0.9rem;
  }

  main > section {
    margin-bottom: 36px;
  }

  main > section h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  main > section h2::after {
    width: 40px;
    height: 3px;
  }

  main > section h3 {
    font-size: 1.05rem;
    margin: 20px 0 10px;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal,
  #update {
    padding: 24px 20px;
    border-radius: var(--radius);
  }

  #articles article {
    padding: 18px 20px;
  }

  #articles article h3 {
    font-size: 0.95rem;
  }

  #faq h3 {
    font-size: 0.925rem;
    padding: 12px 16px;
  }

  #faq h3 + p {
    padding: 0 16px 6px 50px;
    font-size: 0.875rem;
  }

  #sitemap ul {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
  }

  #sitemap ul li a {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  #cases blockquote {
    padding: 18px 20px 18px 46px;
  }

  #cases blockquote::before {
    font-size: 2.2rem;
    left: 12px;
  }

  footer {
    padding: 28px 16px;
  }
}

@media (max-width: 480px) {
  header nav > a:first-child {
    font-size: 1rem;
  }

  header nav ul li a {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  #banner {
    padding: 28px 18px;
  }

  #banner h1 {
    font-size: 1.15rem;
  }

  #banner p {
    font-size: 0.85rem;
  }

  main > section h2 {
    font-size: 1.1rem;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal,
  #update {
    padding: 20px 16px;
  }

  #articles article {
    padding: 16px;
  }

  #sitemap ul {
    grid-template-columns: 1fr 1fr;
  }

  #links ul li a {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

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

  main > section {
    opacity: 1;
    transform: none;
  }
}

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

/* ===== PRINT ===== */
@media print {
  header,
  footer,
  #banner::before,
  #banner::after {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
    opacity: 1;
    transform: none;
    animation: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}