:root {
  --bg: #0d0d1a;
  --bg-alt: #14142b;
  --surface: rgba(26, 26, 46, 0.72);
  --surface-solid: #1a1a2e;
  --surface-2: #16213e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eaeaf2;
  --text-muted: #a7a7c0;
  --text-dim: #7c7c9a;
  --primary: #e94560;
  --primary-soft: rgba(233, 69, 96, 0.14);
  --accent: #f5c518;
  --purple: #533483;
  --blue: #0f3460;
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #533483 100%);
  --grad-primary: linear-gradient(135deg, #e94560 0%, #b0255c 100%);
  --grad-accent: linear-gradient(135deg, #f5c518 0%, #e9a800 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.45);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --blur: blur(18px) saturate(160%);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-alt: #ffffff;
    --surface: rgba(255, 255, 255, 0.68);
    --surface-solid: #ffffff;
    --surface-2: #eef0f8;
    --border: rgba(20, 20, 50, 0.08);
    --border-strong: rgba(20, 20, 50, 0.16);
    --text: #1a1a2e;
    --text-muted: #4c4c66;
    --text-dim: #6e6e8a;
    --primary-soft: rgba(233, 69, 96, 0.1);
    --grad-hero: linear-gradient(135deg, #ffffff 0%, #eef0fb 45%, #e2dcf5 100%);
    --shadow-sm: 0 2px 8px rgba(30, 30, 70, 0.08);
    --shadow-md: 0 8px 28px rgba(30, 30, 70, 0.1);
    --shadow-lg: 0 18px 48px rgba(30, 30, 70, 0.14);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 8% -8%, rgba(233, 69, 96, 0.16), transparent 60%),
    radial-gradient(800px 480px at 96% 4%, rgba(83, 52, 131, 0.24), transparent 62%),
    radial-gradient(700px 420px at 50% 100%, rgba(15, 52, 96, 0.22), transparent 65%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
}

h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.9rem);
  letter-spacing: 0.5px;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  padding-bottom: 0.5em;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--grad-primary);
}

h3 {
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  margin-top: 1.6em;
  color: var(--text);
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

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

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--primary);
}

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
}

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

address {
  font-style: normal;
}

/* ===== 跳转链接 ===== */
body > a[href="#main-content"] {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 999;
  padding: 10px 20px;
  background: var(--grad-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: top 0.3s var(--ease);
}

body > a[href="#main-content"]:focus {
  top: 16px;
  color: #fff;
}

/* ===== 头部导航 ===== */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

header[role="banner"] > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

header[role="banner"] > div > a[aria-label="魔豆剧场首页"] {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.6px;
  color: var(--text);
  flex-shrink: 0;
}

header[role="banner"] > div > a[aria-label="魔豆剧场首页"] svg {
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--border-strong), 0 4px 14px rgba(233, 69, 96, 0.35);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

header[role="banner"] > div > a[aria-label="魔豆剧场首页"]:hover svg {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 22px rgba(245, 197, 24, 0.45);
}

header[role="banner"] > div > a[aria-label="魔豆剧场首页"]:hover span {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav[aria-label="主导航"] {
  flex: 1 1 auto;
  min-width: 0;
}

nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav[aria-label="主导航"] li {
  margin: 0;
}

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 7px 13px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

nav[aria-label="主导航"] a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--grad-primary);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  color: var(--text);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

nav[aria-label="主导航"] a:hover::after {
  width: 55%;
}

form[role="search"] {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

form[role="search"] input[type="search"] {
  width: 200px;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  transition: width 0.35s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

form[role="search"] input[type="search"]::placeholder {
  color: var(--text-dim);
}

form[role="search"] input[type="search"]:focus {
  width: 250px;
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

form[role="search"] button {
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--grad-primary);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(233, 69, 96, 0.5);
  filter: brightness(1.08);
}

form[role="search"] button:active {
  transform: translateY(0);
}

/* ===== 主内容容器 ===== */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ===== 面包屑 ===== */
nav[aria-label="面包屑导航"] {
  padding: 20px 0 8px;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-dim);
}

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

nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1;
}

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

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

nav[aria-label="面包屑导航"] [aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* ===== 通用 section 卡片 ===== */
main > section {
  position: relative;
  margin-bottom: 32px;
  padding: clamp(22px, 3.4vw, 40px);
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.7s var(--ease) both;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

main > section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

main > section:nth-of-type(2) { animation-delay: 0.06s; }
main > section:nth-of-type(3) { animation-delay: 0.12s; }
main > section:nth-of-type(4) { animation-delay: 0.18s; }
main > section:nth-of-type(5) { animation-delay: 0.24s; }

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

/* ===== Hero 区 ===== */
#hero {
  background: var(--grad-hero);
  overflow: hidden;
  padding: clamp(28px, 4.5vw, 56px);
  text-align: left;
}

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.35), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
  animation: floatGlow 9s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.22), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
  animation: floatGlow 11s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 24px) scale(1.12); }
}

#hero h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 0.5em;
  background: linear-gradient(120deg, var(--text) 0%, var(--text) 55%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#hero > p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  color: var(--text-muted);
  margin-bottom: 1.6em;
}

#hero > a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  margin: 0 12px 12px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  border-radius: var(--radius-pill);
  background: var(--grad-primary);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

#hero > a + a {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

#hero > a:hover {
  transform: translateY(-3px) scale(1.02);
  color: #fff;
  box-shadow: 0 12px 30px rgba(233, 69, 96, 0.55);
  filter: brightness(1.06);
}

#hero > a + a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 10px 26px rgba(245, 197, 24, 0.28);
}

#hero figure {
  position: relative;
  z-index: 1;
  margin: 2em 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-strong);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-6px) perspective(900px) rotateX(2deg);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
}

#hero figure svg {
  width: 100%;
  height: auto;
}

#hero figcaption {
  padding: 12px 18px;
  font-size: 0.84rem;
  color: var(--text-dim);
  text-align: center;
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid var(--border);
}

/* ===== 列表样式增强 ===== */
main > section ul,
main > section ol {
  display: grid;
  gap: 2px;
}

#intro ul li,
#products ul li,
#scenarios ul li,
#howto ul li {
  padding-left: 4px;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

#intro ul li:hover,
#products ul li:hover,
#scenarios ul li:hover,
#howto ul li:hover {
  color: var(--text);
  transform: translateX(4px);
}

/* ===== 产品优势列表 ===== */
#products ul:last-of-type {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

#products ul:last-of-type li {
  margin: 0;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.93rem;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#products ul:last-of-type li:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.22);
}

/* ===== 案例区 ===== */
#cases blockquote {
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#cases blockquote:hover {
  transform: translateX(6px);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* ===== 教程步骤 ===== */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  gap: 10px;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-primary);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

#howto ol li:hover {
  transform: translateX(5px);
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* ===== 文章卡片 ===== */
#articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

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

#articles article {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 16px 40px rgba(233, 69, 96, 0.22);
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text);
  transition: color 0.25s var(--ease);
}

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

#articles article > p:first-of-type {
  margin-bottom: 0.7em;
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

#articles article > p:nth-of-type(2) {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-muted);
}

#articles article a {
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-pill);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#articles article a:hover {
  color: #fff;
  background: var(--grad-primary);
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.4);
}

/* ===== FAQ 手风琴 ===== */
#faq details {
  margin-bottom: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  border-color: var(--primary);
  box-shadow: 0 8px 26px rgba(233, 69, 96, 0.18);
}

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  color: #fff;
  background: var(--grad-primary);
}

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

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.93rem;
  color: var(--text-muted);
  animation: fadeUp 0.4s var(--ease) both;
}

/* ===== 联系区 ===== */
#contact address ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

#contact address li {
  margin: 0;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
}

#contact address li:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--text);
}

/* ===== 网站地图 & 友情链接 ===== */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-primary);
  border-color: transparent;
  transform: translateY(-2px);
}

/* ===== 页脚 ===== */
footer[role="contentinfo"] {
  position: relative;
  margin-top: 40px;
  padding: 48px 20px 32px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.28) 100%);
  border-top: 1px solid var(--border);
}

footer[role="contentinfo"] > section {
  max-width: var(--maxw);
  margin: 0 auto 24px;
  padding: 20px 24px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

footer[role="contentinfo"] > section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

footer[role="contentinfo"] h2 {
  font-size: 1rem;
  margin-bottom: 0.6em;
  color: var(--text);
  padding-bottom: 0;
}

footer[role="contentinfo"] h2::after {
  display: none;
}

footer[role="contentinfo"] p {
  font-size: 0.86rem;
  line-height: 1.8;
  color: var(--text-dim);
  margin: 0 0 0.5em;
}

footer[role="contentinfo"] p:last-child {
  margin-bottom: 0;
}

footer[role="contentinfo"] > a[href="#main-content"] {
  display: block;
  width: fit-content;
  margin: 8px auto 0;
  padding: 10px 26px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  transition: color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

footer[role="contentinfo"] > a[href="#main-content"]:hover {
  color: #fff;
  background: var(--grad-primary);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.4);
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--purple));
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-alt);
}

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

/* ===== 文本选中 ===== */
::selection {
  background: var(--primary);
  color: #fff;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  header[role="banner"] > div {
    gap: 14px;
  }

  form[role="search"] input[type="search"] {
    width: 170px;
  }

  form[role="search"] input[type="search"]:focus {
    width: 200px;
  }
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 140px;
  }

  header[role="banner"] > div {
    padding: 10px 16px;
    gap: 10px;
  }

  nav[aria-label="主导航"] {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  nav[aria-label="主导航"]::-webkit-scrollbar {
    display: none;
  }

  nav[aria-label="主导航"] ul {
    flex-wrap: nowrap;
    width: max-content;
  }

  nav[aria-label="主导航"] a {
    white-space: nowrap;
    font-size: 0.86rem;
    padding: 6px 11px;
  }

  form[role="search"] {
    margin-left: auto;
  }

  form[role="search"] input[type="search"] {
    width: 140px;
    font-size: 0.84rem;
    padding: 8px 13px;
  }

  form[role="search"] input[type="search"]:focus {
    width: 160px;
  }

  form[role="search"] button {
    padding: 8px 14px;
    font-size: 0.84rem;
  }

  main {
    padding: 0 14px 44px;
  }

  main > section {
    margin-bottom: 22px;
    padding: 22px 18px;
    border-radius: var(--radius);
  }

  #hero {
    padding: 26px 20px;
  }

  #hero::before,
  #hero::after {
    width: 300px;
    height: 300px;
  }

  #articles {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  footer[role="contentinfo"] {
    padding: 32px 14px 24px;
  }

  footer[role="contentinfo"] > section {
    padding: 16px 18px;
  }
}

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

  header[role="banner"] > div > a[aria-label="魔豆剧场首页"] span {
    font-size: 1rem;
  }

  header[role="banner"] > div > a[aria-label="魔豆剧场首页"] svg {
    width: 34px;
    height: 34px;
  }

  #hero > a {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-right: 0;
  }

  #hero > a + a {
    margin-top: 10px;
  }

  #hero figure {
    margin-top: 1.4em;
  }

  h2::after {
    width: 44px;
    height: 3px;
  }

  #products ul:last-of-type,
  #contact address ul {
    grid-template-columns: 1fr;
  }

  #howto ol li {
    padding: 12px 14px 12px 50px;
  }

  #howto ol li::before {
    left: 12px;
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
  }

  #faq summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.92rem;
  }

  #faq details p {
    padding: 0 16px 16px;
    font-size: 0.88rem;
  }

  #sitemap a,
  #links a {
    padding: 7px 13px;
    font-size: 0.82rem;
  }
}

/* ===== 减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 高对比度模式 ===== */
@media (forced-colors: active) {
  main > section,
  header[role="banner"],
  #articles article,
  #faq details {
    border: 1px solid CanvasText;
  }
}

/* ===== 打印样式 ===== */
@media print {
  header[role="banner"],
  footer[role="contentinfo"],
  #hero > a,
  form[role="search"],
  #sitemap,
  #links {
    display: none !important;
  }

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

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    animation: none;
  }

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