/* ============================================================
   麻豆下载社区 - pvgwlby.cn
   style.css  |  二次元同好交流小站
   渐变 · 毛玻璃 · 圆角卡片 · 响应式 · 暗色模式 · 滚动动画
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --brand-1: #1F6FEB;
  --brand-2: #7C3AED;
  --brand-3: #EC4899;
  --brand-4: #06B6D4;

  --bg: #F5F7FC;
  --bg-alt: #FFFFFF;
  --bg-soft: rgba(255, 255, 255, 0.62);
  --surface: #FFFFFF;
  --surface-2: #F0F3FA;

  --text: #16202F;
  --text-2: #46536B;
  --text-3: #7B879E;

  --line: rgba(22, 32, 47, 0.10);
  --line-strong: rgba(22, 32, 47, 0.18);

  --shadow-sm: 0 2px 10px rgba(22, 32, 47, 0.06);
  --shadow: 0 10px 30px -12px rgba(31, 111, 235, 0.28);
  --shadow-lg: 0 26px 60px -22px rgba(31, 111, 235, 0.38);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --maxw: 1180px;
  --gap: clamp(1rem, 2.4vw, 2rem);

  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.42s;

  color-scheme: light;
}

/* ---------- 暗色模式 ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1120;
    --bg-alt: #101827;
    --bg-soft: rgba(24, 33, 51, 0.55);
    --surface: #131C2E;
    --surface-2: #182238;

    --text: #EAF0FB;
    --text-2: #B4C0D6;
    --text-3: #8494AE;

    --line: rgba(234, 240, 251, 0.12);
    --line-strong: rgba(234, 240, 251, 0.22);

    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow: 0 12px 34px -14px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 28px 64px -24px rgba(0, 0, 0, 0.8);

    color-scheme: dark;
  }
}

/* 手动切换支持 */
html[data-theme="dark"] {
  --bg: #0B1120;
  --bg-alt: #101827;
  --bg-soft: rgba(24, 33, 51, 0.55);
  --surface: #131C2E;
  --surface-2: #182238;
  --text: #EAF0FB;
  --text-2: #B4C0D6;
  --text-3: #8494AE;
  --line: rgba(234, 240, 251, 0.12);
  --line-strong: rgba(234, 240, 251, 0.22);
  color-scheme: dark;
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(15px, 0.55vw + 13.6px, 16.5px);
  line-height: 1.85;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(31, 111, 235, 0.16), transparent 62%),
    radial-gradient(900px 560px at 96% 4%, rgba(124, 58, 237, 0.14), transparent 60%),
    radial-gradient(760px 520px at 50% 108%, rgba(6, 182, 212, 0.12), transparent 62%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

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

a {
  color: var(--brand-1);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

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

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

h1, h2, h3, h4 {
  line-height: 1.32;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
  color: var(--text);
  font-weight: 800;
}

h1 { font-size: clamp(1.75rem, 3.6vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 2.05rem); }
h3 { font-size: clamp(1.1rem, 1.5vw, 1.32rem); }

p { margin: 0 0 1.05em; color: var(--text-2); }

ul, ol {
  margin: 0 0 1.15em;
  padding-left: 1.35em;
  color: var(--text-2);
}

li { margin-bottom: 0.45em; }

li::marker { color: var(--brand-1); font-weight: 700; }

blockquote {
  margin: 1.1em 0;
  padding: 1.05em 1.3em;
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--brand-1), var(--brand-3)) 1;
  background: var(--bg-soft);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
}

blockquote p:last-child { margin-bottom: 0; }

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2rem 0;
}

/* ---------- 布局容器 ---------- */
main,
header > nav,
footer {
  width: min(100% - 2.2rem, var(--maxw));
  margin-inline: auto;
}

main {
  display: block;
  padding-bottom: 2rem;
}

/* ---------- 顶部导航：毛玻璃悬浮 ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 0.6rem 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

@media (prefers-color-scheme: dark) {
  header {
    background: linear-gradient(180deg, rgba(11, 17, 32, 0.78), rgba(11, 17, 32, 0.5));
  }
}

html[data-theme="dark"] header {
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.78), rgba(11, 17, 32, 0.5));
}

header > nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
}

header > nav > a:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
  color: var(--text);
  padding: 0.42rem 0.95rem 0.42rem 0.8rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(31, 111, 235, 0.14), rgba(124, 58, 237, 0.14));
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease);
}

header > nav > a:first-child::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.16);
  flex: none;
}

header > nav > a:first-child:hover {
  color: var(--brand-1);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav ul li { margin: 0; }

header nav ul a {
  display: inline-block;
  padding: 0.42rem 0.82rem;
  border-radius: var(--radius-pill);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-2);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav ul a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-3));
  transform: translateX(-50%);
  transition: width 0.32s var(--ease);
}

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

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

/* ---------- 通用区块卡片：圆角 + 毛玻璃 ---------- */
main > section {
  position: relative;
  margin: 1.35rem 0;
  padding: clamp(1.35rem, 3.2vw, 2.6rem);
  background: var(--bg-soft);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  overflow: hidden;
}

main > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3), var(--brand-4));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

main > section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}

main > section:hover::before { opacity: 1; }

/* 首屏 Banner */
main > section:first-of-type {
  margin-top: 1.6rem;
  padding: clamp(1.8rem, 5vw, 3.6rem) clamp(1.35rem, 4vw, 3rem);
  background:
    linear-gradient(135deg, rgba(31, 111, 235, 0.92), rgba(124, 58, 237, 0.88) 48%, rgba(236, 72, 153, 0.82)),
    var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: var(--shadow-lg);
  color: #fff;
  isolation: isolate;
}

main > section:first-of-type::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -140px;
  top: -190px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 68%);
  border-radius: 50%;
  pointer-events: none;
  animation: floaty 11s ease-in-out infinite;
  z-index: -1;
}

main > section:first-of-type::before { display: none; }

main > section:first-of-type h1 {
  color: #fff;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.22);
  max-width: 24ch;
}

main > section:first-of-type p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 74ch;
  font-size: 1.02rem;
}

main > section:first-of-type p:last-of-type {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
  margin-bottom: 0;
}

main > section:first-of-type p:last-of-type a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

main > section:first-of-type p:last-of-type a:first-child {
  background: #fff;
  color: var(--brand-1);
  border-color: #fff;
}

main > section:first-of-type p:last-of-type a:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.45);
}

main > section:first-of-type p:last-of-type a:first-child:hover {
  background: #fff;
  color: var(--brand-2);
}

/* 面包屑 */
main > nav[aria-label="面包屑导航"] {
  margin: 1rem 0 0.4rem;
  font-size: 0.9rem;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-3);
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  color: var(--text-3);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] a {
  color: var(--text-2);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

main > nav[aria-label="面包屑导航"] a:hover {
  background: var(--bg-soft);
  color: var(--brand-1);
}

/* ---------- 标题装饰 ---------- */
main > section > h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1.15rem;
}

main > section > h2::before {
  content: "";
  width: 6px;
  height: 1.05em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-3));
  flex: none;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 74px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-4));
  opacity: 0.75;
}

main > section:first-of-type > h2::before,
main > section:first-of-type > h2::after { display: none; }

main > section > h3 {
  margin-top: 1.6rem;
  color: var(--text);
}

main > section > h3:first-of-type { margin-top: 0.6rem; }

/* ---------- 产品优势 / 列表卡片化 ---------- */
#products > ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 0.85rem;
}

#products > ul li {
  position: relative;
  margin: 0;
  padding: 1rem 1.15rem 1rem 3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.96rem;
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease), border-color 0.32s var(--ease);
}

#products > ul li::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 1.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.14);
}

#products > ul li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

/* ---------- 客户评价卡片 ---------- */
#cases blockquote {
  position: relative;
  padding-left: 3.2rem;
}

#cases blockquote::before {
  content: "\201C";
  position: absolute;
  left: 1rem;
  top: 0.35rem;
  font-size: 3.4rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--brand-1);
  opacity: 0.35;
}

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

/* ---------- 新闻中心文章卡片 ---------- */
#news {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.05rem;
  align-items: start;
}

#news > h2,
#news > p {
  grid-column: 1 / -1;
}

#news > article {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 1.35rem 1.4rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.36s var(--ease), box-shadow 0.36s var(--ease), border-color 0.36s var(--ease);
}

#news > article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.42s var(--ease);
}

#news > article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

#news > article:hover::before { transform: scaleX(1); }

#news > article h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.5;
}

#news > article h3 a {
  color: var(--text);
  background-image: linear-gradient(90deg, var(--brand-1), var(--brand-3));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease), color 0.3s var(--ease);
}

#news > article h3 a:hover {
  color: var(--brand-1);
  background-size: 100% 2px;
}

#news > article p {
  margin: 0;
  font-size: 0.92rem;
}

#news > article p:nth-of-type(1) {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

#news > article p:nth-of-type(1)::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
  flex: none;
}

#news > article p:last-child {
  margin-top: auto;
  padding-top: 0.5rem;
}

#news > article p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(31, 111, 235, 0.12), rgba(124, 58, 237, 0.12));
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease);
}

#news > article p:last-child a::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

#news > article p:last-child a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--brand-2);
}

#news > article p:last-child a:hover::after { transform: translateX(4px); }

/* ---------- 技术文章详情 ---------- */
#article-1 > article,
#article-1 article {
  padding: 1.5rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

#article-1 article h3 {
  margin-top: 0;
}

#article-1 article > p:nth-of-type(1) {
  font-size: 0.84rem;
  color: var(--text-3);
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 1.1rem;
}

#article-1 article p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

#article-1 article p:last-child a:hover {
  transform: translateY(-3px);
  color: #fff;
  filter: brightness(1.08);
  box-shadow: var(--shadow-lg);
}

/* ---------- HowTo 步骤 ---------- */
#howto > ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

#howto > ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 1rem 1.2rem 1rem 3.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease), border-color 0.32s var(--ease);
}

#howto > ol li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 6px 16px -6px rgba(31, 111, 235, 0.7);
}

#howto > ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

#howto > ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.7rem;
}

#howto > ul li {
  position: relative;
  margin: 0;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

#howto > ul li::before {
  content: "✓";
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-2);
  font-weight: 800;
}

#howto > ul li:hover {
  transform: translateY(-3px);
  background: var(--surface);
}

/* ---------- FAQ 折叠卡片 ---------- */
#faq {
  display: grid;
  gap: 0.9rem;
}

#faq > h2 {
  margin-bottom: 0.4rem;
}

#faq > h3 {
  margin: 0;
  padding: 1rem 3rem 1rem 1.25rem;
  font-size: 1.02rem;
  font-weight: 700;
  background: linear-gradient(120deg, rgba(31, 111, 235, 0.10), rgba(124, 58, 237, 0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  cursor: default;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq > h3::after {
  content: "?";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
  box-shadow: 0 6px 14px -6px rgba(124, 58, 237, 0.8);
}

#faq > h3:hover {
  color: var(--brand-1);
  background: linear-gradient(120deg, rgba(31, 111, 235, 0.16), rgba(124, 58, 237, 0.12));
}

#faq > h3 + p {
  margin: 0;
  padding: 1.1rem 1.35rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  transition: box-shadow 0.32s var(--ease);
}

#faq > h3 + p:hover { box-shadow: var(--shadow); }

/* ---------- 联系 / 网站地图 / 友链 ---------- */
#contact > ul,
#sitemap > ul,
#links > ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.7rem;
}

#contact > ul li,
#sitemap > ul li,
#links > ul li {
  margin: 0;
  padding: 0.8rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  color: var(--text-2);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact > ul li:hover,
#sitemap > ul li:hover,
#links > ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

#sitemap > ul li a,
#links > ul li a {
  display: block;
  font-weight: 600;
  color: var(--text);
}

#sitemap > ul li a:hover,
#links > ul li a:hover { color: var(--brand-1); }

#contact > ul li {
  font-weight: 500;
}

#contact > p:last-child {
  margin-top: 1.2rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
}

/* ---------- 页脚 ---------- */
footer {
  margin-top: 2.4rem;
  padding: clamp(1.6rem, 4vw, 3rem) clamp(1.35rem, 4vw, 2.8rem) 1.6rem;
  background: linear-gradient(160deg, rgba(31, 111, 235, 0.10), rgba(124, 58, 237, 0.09) 55%, rgba(6, 182, 212, 0.08));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

footer > section {
  min-width: 0;
}

footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

footer h2::before {
  content: "";
  width: 5px;
  height: 1em;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-3));
  flex: none;
}

footer h3 {
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

footer p {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 0.7rem;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

footer ul li { margin: 0; }

footer ul a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-2);
  padding: 0.2rem 0;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

footer ul a::before {
  content: "›";
  color: var(--brand-1);
  font-weight: 800;
  transition: transform 0.25s var(--ease);
}

footer ul a:hover {
  color: var(--brand-1);
  transform: translateX(3px);
}

footer ul a:hover::before { transform: translateX(2px); }

footer > p:last-child {
  grid-column: 1 / -1;
  margin: 0.6rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

/* ---------- 滚动进入动画 ---------- */
@media (prefers-reduced-motion: no-preference) {
  main > section,
  main > nav[aria-label="面包屑导航"],
  #news > article,
  footer > section {
    animation: rise 0.72s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 32%;
  }

  @supports not (animation-timeline: view()) {
    main > section,
    main > nav[aria-label="面包屑导航"],
    #news > article,
    footer > section {
      animation: none;
      opacity: 1;
      transform: none;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-26px, 22px, 0) scale(1.06); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  html { scroll-padding-top: 132px; }

  header > nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  header > nav > a:first-child {
    align-self: flex-start;
  }

  header nav ul {
    justify-content: flex-start;
    gap: 0.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
  }

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

  header nav ul a {
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 0.38rem 0.7rem;
  }

  #news { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 640px) {
  body { line-height: 1.78; }

  main,
  header > nav,
  footer {
    width: min(100% - 1.2rem, var(--maxw));
  }

  main > section {
    padding: 1.15rem 1.05rem;
    border-radius: var(--radius);
    margin: 0.9rem 0;
  }

  main > section:hover { transform: none; }

  main > section:first-of-type {
    padding: 1.6rem 1.15rem;
    border-radius: var(--radius-lg);
  }

  main > section:first-of-type h1 { max-width: none; }

  main > section:first-of-type p:last-of-type a {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
  }

  #products > ul,
  #howto > ul,
  #contact > ul,
  #sitemap > ul,
  #links > ul {
    grid-template-columns: 1fr;
  }

  #news { grid-template-columns: 1fr; }

  #news > article:hover,
  #howto > ol li:hover,
  #products > ul li:hover {
    transform: none;
  }

  #howto > ol li { padding: 0.95rem 1rem 0.95rem 3.2rem; }

  #faq > h3 {
    padding: 0.9rem 2.7rem 0.9rem 1.05rem;
    font-size: 0.98rem;
  }

  #faq > h3 + p { padding: 1rem 1.05rem 1.1rem; }

  #cases blockquote { padding-left: 2.5rem; }

  #cases blockquote::before {
    left: 0.6rem;
    font-size: 2.6rem;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    border-radius: var(--radius);
  }
}

@media (max-width: 380px) {
  header nav ul a { font-size: 0.82rem; padding: 0.34rem 0.6rem; }
  main > section > h2 { font-size: 1.22rem; }
}

/* ---------- 交互与可访问性 ---------- */
@media (hover: none) {
  main > section:hover,
  #news > article:hover,
  #products > ul li:hover,
  #howto > ol li:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
}

@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;
  }
}

::selection {
  background: rgba(31, 111, 235, 0.24);
  color: var(--text);
}

:target {
  scroll-margin-top: 100px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-1) transparent;
}

::-webkit-scrollbar { width: 10px; height: 10px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2));
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-2), var(--brand-3));
  background-clip: padding-box;
}

/* 打印优化 */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  header,
  footer,
  main > nav[aria-label="面包屑导航"] {
    display: none;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
    break-inside: avoid;
  }

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