:root {
  --primary: #ff6b9d;
  --primary-dark: #e84a7f;
  --primary-light: #ffa8c5;
  --secondary: #7c5cff;
  --secondary-light: #a893ff;
  --accent: #ffb347;
  --accent-light: #ffd28a;
  --mint: #4ecdc4;
  --mint-light: #8ee6df;
  --bg: #fff8fb;
  --bg-alt: #ffffff;
  --bg-soft: #fdf0f6;
  --text: #2d2438;
  --text-soft: #5e5468;
  --text-muted: #8a7f96;
  --border: #f0e2ec;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.6);
  --glass-blur: 16px;
  --shadow-sm: 0 2px 8px rgba(255, 107, 157, 0.08);
  --shadow-md: 0 8px 28px rgba(255, 107, 157, 0.12);
  --shadow-lg: 0 18px 48px rgba(124, 92, 255, 0.16);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --gradient-hero: linear-gradient(135deg, #ff9ec4 0%, #ff6b9d 35%, #a893ff 75%, #7c5cff 100%);
  --gradient-btn: linear-gradient(135deg, #ff6b9d 0%, #7c5cff 100%);
  --gradient-soft: linear-gradient(135deg, rgba(255, 158, 196, 0.18) 0%, rgba(168, 147, 255, 0.18) 100%);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1180px;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #ff8ab5;
    --primary-dark: #ff6b9d;
    --primary-light: #ffb8d0;
    --secondary: #9d85ff;
    --secondary-light: #bfaaff;
    --accent: #ffc266;
    --accent-light: #ffd99e;
    --mint: #5fd9d0;
    --mint-light: #9aebe5;
    --bg: #16121c;
    --bg-alt: #1e1926;
    --bg-soft: #221b2c;
    --text: #f4eef8;
    --text-soft: #d4c9de;
    --text-muted: #a396b3;
    --border: #342a40;
    --card-bg: rgba(38, 30, 48, 0.72);
    --card-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
    --gradient-hero: linear-gradient(135deg, #4a2b52 0%, #5c2f5e 35%, #3d2f6e 75%, #2a2350 100%);
    --gradient-btn: linear-gradient(135deg, #ff6b9d 0%, #9d85ff 100%);
    --gradient-soft: linear-gradient(135deg, rgba(255, 138, 181, 0.12) 0%, rgba(157, 133, 255, 0.12) 100%);
  }
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 158, 196, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(168, 147, 255, 0.16) 0%, transparent 46%),
    radial-gradient(circle at 50% 100%, rgba(78, 205, 196, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (prefers-color-scheme: dark) {
  body {
    background-image:
      radial-gradient(circle at 12% 8%, rgba(255, 138, 181, 0.1) 0%, transparent 42%),
      radial-gradient(circle at 88% 22%, rgba(157, 133, 255, 0.1) 0%, transparent 46%),
      radial-gradient(circle at 50% 100%, rgba(95, 217, 208, 0.06) 0%, transparent 50%);
  }
}

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(--primary-dark);
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.35;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

/* ===== Header / Navigation ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.6s var(--transition) both;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

header nav > a {
  font-size: 1.45rem;
  font-weight: 800;
  background: var(--gradient-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: transform var(--transition);
}

header nav > a:hover {
  transform: scale(1.05);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

header nav ul li a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

header nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--gradient-btn);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

header nav ul li a:hover {
  color: var(--primary);
  background: var(--gradient-soft);
  transform: translateY(-2px);
}

header nav ul li a:hover::after {
  width: 55%;
}

/* ===== Main Layout ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 90px;
}

/* ===== Hero Banner ===== */
#hero {
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 4rem;
  padding: 4rem 2.5rem 3.5rem;
  border-radius: var(--radius-xl);
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientShift 14s ease infinite;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -8%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.12);
}

#hero > p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 2rem;
}

#hero nav[aria-label="面包屑"] {
  position: relative;
  z-index: 1;
}

#hero nav[aria-label="面包屑"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}

#hero nav[aria-label="面包屑"] ol li {
  color: rgba(255, 255, 255, 0.82);
}

#hero nav[aria-label="面包屑"] ol li + li::before {
  content: "›";
  margin-right: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
}

#hero nav[aria-label="面包屑"] ol li a {
  color: #fff;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  transition: background var(--transition), transform var(--transition);
}

#hero nav[aria-label="面包屑"] ol li a:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

/* ===== Section Headings ===== */
section > h2 {
  position: relative;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 1.75rem;
  padding-left: 1.1rem;
  color: var(--text);
}

section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 1.5em;
  border-radius: 6px;
  background: var(--gradient-btn);
  box-shadow: 0 0 16px rgba(255, 107, 157, 0.4);
}

section > h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  margin-top: 0.6rem;
  border-radius: 4px;
  background: var(--gradient-btn);
  opacity: 0.55;
}

section h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.32rem);
  font-weight: 700;
  margin: 1.6rem 0 0.7rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

section h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-btn);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(124, 92, 255, 0.5);
}

section p {
  color: var(--text-soft);
  margin-bottom: 0.9rem;
  font-size: 0.98rem;
}

/* ===== Content Cards (玻璃卡片) ===== */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.2rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
  animation: fadeUp 0.7s var(--transition) both;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== News Articles ===== */
#news article {
  position: relative;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#news article:last-child {
  margin-bottom: 0;
}

#news article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.4rem;
  bottom: 1.4rem;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-btn);
  opacity: 0;
  transition: opacity var(--transition);
}

#news article:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

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

#news article h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

#news article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* ===== Articles Grid ===== */
#articles {
  display: block;
}

#articles > h2 {
  margin-bottom: 1.75rem;
}

#articles article {
  position: relative;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

#articles article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-light);
}

#articles article:hover::after {
  opacity: 1;
}

#articles article h3 {
  position: relative;
  z-index: 1;
  margin-top: 0;
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}

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

#articles article p {
  position: relative;
  z-index: 1;
}

#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

#articles article a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  border-radius: 999px;
  background: var(--gradient-btn);
  box-shadow: 0 4px 14px rgba(255, 107, 157, 0.3);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

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

#articles article a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.4);
  filter: brightness(1.05);
}

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

/* ===== FAQ ===== */
#faq h3 {
  position: relative;
  padding: 1rem 1.2rem 1rem 2.9rem;
  margin: 0.65rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: default;
  transition: background var(--transition), color var(--transition);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-btn);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.35);
}

#faq h3:hover {
  background: var(--gradient-soft);
  color: var(--primary);
}

#faq h3 + p {
  padding: 0.9rem 1.2rem 1rem 2.9rem;
  margin: 0 0 0.9rem;
  font-size: 0.94rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: background var(--transition);
}

/* ===== HowTo ===== */
#howto h3 {
  margin-top: 1.5rem;
}

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

#howto p {
  position: relative;
  padding-left: 1rem;
  border-left: 2px dashed var(--border);
  margin-left: 0.4rem;
}

#howto h3 + p {
  border-left-color: var(--primary-light);
}

/* ===== Contact ===== */
#contact p {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.96rem;
}

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

#contact h3 {
  margin-top: 1.8rem;
}

#contact a {
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

#contact a:hover {
  border-bottom-color: var(--primary);
}

/* ===== Sitemap & Links ===== */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: var(--gradient-btn);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 107, 157, 0.3);
}

/* ===== Legal ===== */
#legal h2 {
  font-size: 1.25rem;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  padding-left: 0;
}

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

#legal h2::before {
  display: none;
}

#legal h2::after {
  width: 40px;
  height: 3px;
  margin-top: 0.4rem;
}

#legal p {
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* ===== Footer ===== */
footer {
  position: relative;
  margin-top: 2rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--gradient-hero);
  background-size: 200% 200%;
  animation: gradientShift 16s ease infinite;
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

footer p {
  font-size: 0.9rem;
  margin: 0.35rem 0;
  color: rgba(255, 255, 255, 0.9);
}

footer p:first-child {
  font-weight: 600;
  font-size: 0.95rem;
}

footer p:last-child {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ===== Scroll Animation (via JS-friendly classes) ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--gradient-btn);
  border-radius: 10px;
  border: 2px solid var(--bg-soft);
}

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

/* ===== Focus Visible ===== */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  header nav {
    padding: 0.8rem 1.1rem;
    gap: 0.8rem;
  }

  header nav ul {
    gap: 0.15rem;
  }

  header nav ul li a {
    padding: 0.4rem 0.65rem;
    font-size: 0.86rem;
  }

  main {
    padding: 1.5rem 1.1rem 3rem;
  }

  #hero {
    padding: 3rem 1.8rem 2.6rem;
    border-radius: var(--radius-lg);
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
  }

  section {
    margin-bottom: 2.5rem;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  header nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
  }

  header nav > a {
    font-size: 1.3rem;
  }

  header nav ul {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul li a {
    white-space: nowrap;
    font-size: 0.84rem;
    padding: 0.4rem 0.7rem;
  }

  main {
    padding: 1rem 0.85rem 2.5rem;
  }

  #hero {
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 2.4rem 1.3rem 2rem;
    border-radius: var(--radius-md);
  }

  #hero h1 {
    font-size: 1.55rem;
    line-height: 1.4;
  }

  #hero > p {
    font-size: 0.94rem;
  }

  section {
    margin-bottom: 2rem;
    scroll-margin-top: 130px;
  }

  section > h2 {
    font-size: 1.3rem;
    padding-left: 0.9rem;
    margin-bottom: 1.25rem;
  }

  section h3 {
    font-size: 1.05rem;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 1.5rem 1.1rem;
    border-radius: var(--radius-md);
  }

  #news article,
  #articles article {
    padding: 1.1rem 1.1rem;
  }

  #faq h3 {
    padding: 0.9rem 0.9rem 0.9rem 2.6rem;
    font-size: 0.95rem;
  }

  #faq h3::before {
    left: 0.8rem;
    width: 22px;
    height: 22px;
  }

  #faq h3 + p {
    padding: 0.8rem 0.9rem 0.9rem 2.6rem;
    font-size: 0.9rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 0.42rem 0.9rem;
    font-size: 0.85rem;
  }

  footer {
    padding: 2rem 1rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
}

/* ===== Reduced Motion ===== */
@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;
  }
}

/* ===== Print ===== */
@media print {
  header,
  footer,
  #hero nav[aria-label="面包屑"] {
    display: none;
  }

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

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