:root {
  --bg: #f7f8fc;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-strong: rgba(255, 255, 255, 0.9);
  --text: #1a1a2e;
  --text-soft: #4a4a63;
  --text-muted: #6b6b85;
  --border: rgba(26, 26, 46, 0.1);
  --border-strong: rgba(26, 26, 46, 0.18);
  --primary: #e94560;
  --primary-dark: #c92f49;
  --secondary: #0f3460;
  --accent: #7b2ff7;
  --accent-2: #00c2ff;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #0f3460 42%, #7b2ff7 78%, #e94560 100%);
  --gradient-primary: linear-gradient(135deg, #e94560 0%, #7b2ff7 100%);
  --gradient-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.12), rgba(123, 47, 247, 0.12));
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 28px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 18px 48px rgba(26, 26, 46, 0.16);
  --shadow-glow: 0 12px 36px rgba(233, 69, 96, 0.28);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 72px;
  --max-w: 1200px;
  --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;
}

html[data-theme="dark"],
body.dark-mode {
  --bg: #0d0d18;
  --bg-soft: #13131f;
  --surface: #181826;
  --surface-glass: rgba(24, 24, 38, 0.72);
  --surface-glass-strong: rgba(24, 24, 38, 0.92);
  --text: #f2f2f8;
  --text-soft: #c4c4d6;
  --text-muted: #9a9ab2;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  --gradient-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.18), rgba(123, 47, 247, 0.18));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(123, 47, 247, 0.1), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(233, 69, 96, 0.1), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(0, 194, 255, 0.08), transparent 50%);
}

img,
svg {
  max-width: 100%;
  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(--primary-dark);
}

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

h1 { font-size: clamp(1.75rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

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

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.5em;
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1.1em 1.4em;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--gradient-soft);
  color: var(--text-soft);
}

blockquote p {
  margin: 0 0 0.6em;
  font-style: italic;
}

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

time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

address {
  font-style: normal;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ HEADER ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.4s var(--ease), box-shadow 0.3s var(--ease);
}

#site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

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

.brand svg {
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease);
}

.brand a:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

#main-nav {
  margin-left: auto;
}

#main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#main-nav li {
  margin: 0;
}

#main-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  color: var(--primary);
  background: var(--gradient-soft);
}

#main-nav a:hover::after {
  transform: scaleX(1);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

#site-search {
  display: flex;
  align-items: center;
  background: var(--surface-glass-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.14);
}

#search-input {
  width: 180px;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

#search-input::placeholder {
  color: var(--text-muted);
}

#site-search button {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--gradient-primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

#theme-toggle,
#menu-toggle {
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-glass-strong);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

/* ============ BREADCRUMB ============ */
main > nav[aria-label="面包屑导航"] {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 20px 0;
}

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

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

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

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

/* ============ HERO ============ */
#hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 20px 8px;
}

.hero-slider {
  position: relative;
  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);
  isolation: isolate;
}

.hero-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(0, 194, 255, 0.28), transparent 50%);
  pointer-events: none;
}

.hero-slider::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: rotate(18deg);
  pointer-events: none;
}

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

.slide {
  display: none;
  padding: clamp(28px, 5vw, 64px);
  animation: slideFade 0.7s var(--ease);
}

.slide.active {
  display: block;
}

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

.slide h1,
.slide h2 {
  color: #fff;
  max-width: 780px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.slide h1 {
  background: linear-gradient(120deg, #ffffff 30%, #ffd6dd 70%, #c9b6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 720px;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
}

.slide > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  background: #fff;
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease), background-color 0.25s var(--ease);
}

.slide > a::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

.slide > a:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  color: var(--primary-dark);
}

.slide > a:hover::after {
  transform: translateX(4px);
}

.slider-controls {
  position: absolute;
  right: clamp(20px, 4vw, 44px);
  bottom: clamp(20px, 4vw, 40px);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.slider-controls button {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0;
  cursor: pointer;
  position: relative;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.slider-controls button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.slider-controls button:first-child::before {
  transform: translate(-50%, -50%) rotate(-135deg);
}

.slider-controls button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: #fff;
  transform: scale(1.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.hero-stats > div {
  position: relative;
  padding: 22px 18px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.hero-stats > div::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.hero-stats > div:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.hero-stats > div:hover::before {
  opacity: 1;
}

.hero-stats strong {
  position: relative;
  display: block;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stats span {
  position: relative;
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ============ SECTIONS ============ */
main > section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 20px;
}

main > section > h2 {
  position: relative;
  padding-left: 18px;
  margin-bottom: 1.2em;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--gradient-primary);
  box-shadow: 0 0 18px rgba(233, 69, 96, 0.4);
}

main > section > article {
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

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

main > section > article h3 {
  position: relative;
  padding-bottom: 0.4em;
  margin-top: 1.4em;
}

main > section > article h3:first-child {
  margin-top: 0;
}

main > section > article h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-primary);
  opacity: 0.85;
}

/* ============ NEWS ============ */
#news > p {
  max-width: 760px;
  margin-bottom: 1.6em;
}

#news > article {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#news > article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

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

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

#news > article h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

#news > article h3 a {
  color: var(--text);
  background-image: linear-gradient(var(--primary), var(--primary));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.35s var(--ease), color 0.25s var(--ease);
}

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

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

#news > article > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
}

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

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

/* ============ ARTICLE SECTIONS ============ */
main > section[id^="article-"] {
  padding-top: 0;
  padding-bottom: clamp(28px, 4vw, 48px);
}

main > section[id^="article-"] h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  padding-left: 0;
  margin-bottom: 0.5em;
}

main > section[id^="article-"] h2::before {
  display: none;
}

main > section[id^="article-"] > p {
  max-width: 860px;
}

main > section[id^="article-"] > p:first-of-type {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============ KNOWLEDGE ============ */
#knowledge > article {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#knowledge > article:hover {
  box-shadow: none;
}

#knowledge h3 {
  grid-column: auto;
  margin: 0 0 0.5em;
  padding: 20px 22px 0;
  font-size: 1.05rem;
}

#knowledge > article > h3,
#knowledge > article > p {
  grid-column: auto;
}

#knowledge > article {
  display: block;
}

#knowledge > article > h3 {
  padding: 0;
}

#knowledge > article > h3,
#knowledge > article > p {
  padding: 20px 22px;
  margin: 0;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#knowledge > article > h3 {
  margin-bottom: -1px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 0;
  background: var(--gradient-soft);
}

#knowledge > article > p {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-bottom: 20px;
}

#knowledge > article > h3:hover,
#knowledge > article > p:hover {
  border-color: var(--border-strong);
}

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

/* ============ FAQ ============ */
#faq dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#faq dt {
  margin: 0;
}

#faq dt button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}

#faq dt button::after {
  content: "+";
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.35s var(--ease);
}

#faq dt button:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

#faq dt button[aria-expanded="true"] {
  border-color: var(--primary);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--gradient-soft);
}

#faq dt button[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

#faq dd {
  margin: 0;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.95rem;
  animation: faqOpen 0.35s var(--ease);
}

#faq dd[hidden] {
  display: none;
}

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

/* ============ HOWTO ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  position: relative;
  padding: 14px 18px 14px 58px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  counter-increment: step;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 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;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: var(--shadow-glow);
}

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

/* ============ TEAM & CONTACT ============ */
#contact address {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 1.4em;
}

#contact address p {
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact address p:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* ============ SITEMAP & LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ============ LEGAL ============ */
#privacy,
#disclaimer,
#copyright {
  padding-top: clamp(24px, 3.5vw, 40px);
  padding-bottom: clamp(24px, 3.5vw, 40px);
}

#copyright p:last-child {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============ FOOTER ============ */
#site-footer {
  margin-top: 40px;
  padding: 48px 20px 60px;
  text-align: center;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid var(--border);
}

#site-footer p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

#site-footer p:first-child {
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}

#site-footer a {
  font-weight: 600;
}

/* ============ BACK TO TOP ============ */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-family: inherit;
  font-size: 0;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.3s var(--ease);
}

#back-to-top::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 2.5px solid currentColor;
  border-left: 2.5px solid currentColor;
  transform: translate(-50%, -30%) rotate(45deg);
}

#back-to-top.show,
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  box-shadow: 0 16px 44px rgba(233, 69, 96, 0.5);
  transform: translateY(-4px) scale(1.06);
}

/* ============ SCROLL ANIMATION ============ */
.reveal,
.fade-in,
.scroll-animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.in-view,
.reveal.visible,
.fade-in.in-view,
.fade-in.visible,
.scroll-animate.in-view,
.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

main > section {
  animation: revealUp 0.8s var(--ease) both;
}

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

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

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  #main-nav ul {
    gap: 0;
  }

  #main-nav a {
    padding: 8px 9px;
    font-size: 0.85rem;
  }

  #search-input {
    width: 130px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 12px;
  }

  .brand {
    flex: 1;
  }

  #menu-toggle {
    display: inline-block;
  }

  #main-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease);
  }

  #main-nav.open {
    max-height: 520px;
    opacity: 1;
  }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--border);
  }

  #main-nav a {
    padding: 11px 14px;
    font-size: 0.94rem;
  }

  #main-nav a::after {
    display: none;
  }

  .header-tools {
    gap: 8px;
  }

  #site-search {
    flex: 1;
    min-width: 0;
  }

  #search-input {
    width: 100%;
    min-width: 0;
  }

  .hero-stats {
    gap: 10px;
  }

  .hero-stats > div {
    padding: 16px 10px;
  }
}

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

  .header-inner {
    padding: 10px 14px;
  }

  .brand a span {
    font-size: 0.95rem;
  }

  #theme-toggle,
  #menu-toggle {
    padding: 7px 11px;
    font-size: 0.76rem;
  }

  #site-search button {
    padding: 7px 12px;
    font-size: 0.76rem;
  }

  main > nav[aria-label="面包屑导航"] {
    padding: 14px 14px 0;
  }

  #hero {
    padding: 16px 14px 4px;
  }

  .hero-slider {
    border-radius: var(--radius-lg);
  }

  .slide {
    padding: 26px 20px 74px;
  }

  .slider-controls {
    right: 16px;
    bottom: 16px;
  }

  .slider-controls button {
    width: 40px;
    height: 40px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
  }

  .hero-stats > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    text-align: left;
  }

  .hero-stats strong {
    font-size: 1.5rem;
  }

  .hero-stats span {
    margin-top: 0;
  }

  main > section {
    padding: 32px 14px;
  }

  main > section > h2 {
    padding-left: 14px;
  }

  main > section > h2::before {
    width: 4px;
  }

  main > section > article {
    padding: 20px 18px;
    border-radius: var(--radius-md);
  }

  #news > article {
    padding: 18px;
  }

  #news > article:hover {
    transform: translateY(-3px);
  }

  #faq dt button {
    padding: 15px 16px;
    font-size: 0.94rem;
  }

  #faq dd {
    padding: 15px 16px;
    font-size: 0.9rem;
  }

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

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

  #back-to-top {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
  }

  #site-footer {
    padding: 36px 14px 90px;
  }
}

@media (max-width: 380px) {
  .brand a span {
    font-size: 0.85rem;
  }

  #site-search input {
    font-size: 0.8rem;
  }

  #theme-toggle {
    display: none;
  }
}

/* ============ THEME TRANSITION & MISC ============ */
::selection {
  background: rgba(233, 69, 96, 0.28);
  color: var(--text);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-dark), var(--accent));
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #site-header,
  .hero-stats > div,
  main > section > article,
  #news > article,
  #faq dt button,
  #site-footer {
    background: var(--surface);
  }
}