:root {
  --brand: #1f6feb;
  --brand-2: #7c3aed;
  --brand-3: #06b6d4;
  --bg: #f5f7fb;
  --bg-soft: #eef2f9;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;
  --text: #1b2333;
  --text-soft: #4b5568;
  --text-mute: #6b7280;
  --border: rgba(31, 111, 235, 0.14);
  --shadow: 0 10px 30px rgba(23, 43, 99, 0.10);
  --shadow-lg: 0 18px 50px rgba(23, 43, 99, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --blur: saturate(160%) blur(14px);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-soft: #0f1730;
    --card: rgba(22, 31, 56, 0.72);
    --card-solid: #141c33;
    --text: #e8eefc;
    --text-soft: #c2cce4;
    --text-mute: #93a0bd;
    --border: rgba(124, 160, 255, 0.20);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(31, 111, 235, 0.18), transparent 60%),
    radial-gradient(1000px 520px at 92% 4%, rgba(124, 58, 237, 0.16), transparent 62%),
    radial-gradient(900px 500px at 50% 110%, rgba(6, 182, 212, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:hover,
a:focus-visible {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* ============ Header / Banner ============ */
header {
  position: relative;
  max-width: var(--maxw);
  margin: 22px auto 0;
  padding: 54px 40px 46px;
  border-radius: var(--radius-lg);
  color: #f2f7ff;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(125deg, #1f6feb 0%, #4f46e5 42%, #7c3aed 72%, #06b6d4 100%);
  background-size: 220% 220%;
  box-shadow: var(--shadow-lg);
  animation: bannerShift 16s ease-in-out infinite alternate;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 240px at 10% 0%, rgba(255, 255, 255, 0.30), transparent 65%),
    radial-gradient(520px 260px at 92% 100%, rgba(255, 255, 255, 0.18), transparent 68%);
  pointer-events: none;
  z-index: -1;
}

header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 78%);
  pointer-events: none;
  z-index: -1;
}

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

header h1 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3.6vw, 2.5rem);
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.22);
}

header > p {
  margin: 0 auto 26px;
  max-width: 820px;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  color: rgba(240, 246, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

/* ============ Navigation ============ */
header nav {
  margin-top: 8px;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #f4f8ff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid transparent;
  transition: transform 0.28s var(--ease), background 0.28s var(--ease),
    box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: #ffffff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

/* ============ Main layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px 60px;
  display: block;
}

section {
  position: relative;
  margin: 0 0 30px;
  padding: 34px 32px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
  scroll-margin-top: 24px;
}

section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(31, 111, 235, 0.34);
}

section h2 {
  position: relative;
  margin: 0 0 20px;
  padding-left: 18px;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.3px;
  color: var(--text);
}

section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2), var(--brand-3));
  box-shadow: 0 0 14px rgba(31, 111, 235, 0.45);
}

section h3 {
  margin: 26px 0 10px;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

section h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), transparent);
  opacity: 0.75;
}

section p {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.98rem;
}

section ul,
section ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text-soft);
}

section li {
  margin: 6px 0;
}

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

/* ============ Articles ============ */
article {
  position: relative;
  margin: 16px 0;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(23, 43, 99, 0.07);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124, 58, 237, 0.32);
}

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

article h3 {
  margin-top: 0;
}

article h3::after {
  display: none;
}

article p {
  margin: 0 0 8px;
  font-size: 0.94rem;
}

article p:first-of-type {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  background: rgba(31, 111, 235, 0.10);
  border: 1px solid rgba(31, 111, 235, 0.22);
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(31, 111, 235, 0.30);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

article a::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

article a:hover,
article a:focus-visible {
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.40);
}

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

/* ============ Blockquote ============ */
blockquote {
  margin: 18px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: linear-gradient(120deg, rgba(31, 111, 235, 0.10), rgba(124, 58, 237, 0.06));
  color: var(--text-soft);
  font-style: italic;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 24px rgba(31, 111, 235, 0.16);
}

blockquote p {
  margin: 6px 0;
  font-size: 0.94rem;
}

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  margin: 14px 0 8px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(23, 43, 99, 0.06);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#faq h3::after {
  display: none;
}

#faq h3:hover {
  transform: translateX(6px);
  border-color: rgba(31, 111, 235, 0.40);
  box-shadow: 0 10px 24px rgba(31, 111, 235, 0.16);
}

#faq h3 + p {
  margin: 0 0 14px;
  padding: 0 6px 4px 18px;
  font-size: 0.94rem;
  border-left: 2px dashed rgba(31, 111, 235, 0.28);
}

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

#howto ol li {
  position: relative;
  counter-increment: step;
  margin: 10px 0;
  padding: 14px 18px 14px 58px;
  border-radius: var(--radius-sm);
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(23, 43, 99, 0.06);
  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: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 14px rgba(31, 111, 235, 0.32);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: rgba(124, 58, 237, 0.34);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.18);
}

/* ============ Contact ============ */
#contact p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--card-solid);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact p:hover {
  transform: translateX(5px);
  border-color: rgba(6, 182, 212, 0.42);
}

/* ============ Sitemap / Links ============ */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

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

#sitemap a,
#links a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--card-solid);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease),
    background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover,
#sitemap a:focus-visible,
#links a:focus-visible {
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(31, 111, 235, 0.32);
}

/* ============ Legal / Meta ============ */
#legal h2,
#meta-info h2 {
  margin-top: 26px;
}

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

#meta-info p {
  display: inline-block;
  margin: 6px 10px 6px 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--text-mute);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

/* ============ Footer ============ */
footer {
  max-width: var(--maxw);
  margin: 0 auto 34px;
  padding: 30px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  color: var(--text-soft);
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}

footer p {
  margin: 6px 0;
  font-size: 0.88rem;
}

footer p:last-child {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* ============ Scroll animation ============ */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline: view()) {
  section,
  article {
    animation: riseIn 0.9s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }
}

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header {
    margin: 14px 14px 0;
    padding: 40px 24px 34px;
    border-radius: var(--radius);
  }

  main {
    padding: 24px 14px 44px;
  }

  section {
    padding: 26px 20px;
    border-radius: var(--radius);
  }

  article {
    padding: 18px 18px;
  }
}

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

  header {
    padding: 32px 18px 28px;
  }

  header nav ul {
    gap: 6px;
    padding: 10px;
  }

  header nav a {
    padding: 7px 12px;
    font-size: 0.84rem;
  }

  main {
    padding: 18px 10px 36px;
  }

  section {
    margin-bottom: 20px;
    padding: 22px 16px;
  }

  section h2 {
    padding-left: 14px;
    font-size: 1.15rem;
  }

  section h2::before {
    width: 5px;
  }

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

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

  footer {
    margin: 0 10px 24px;
    padding: 22px 16px;
  }
}

@media (max-width: 380px) {
  header nav a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  section {
    padding: 18px 13px;
  }
}

/* ============ Print ============ */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  header {
    background: #ffffff;
    color: #000000;
    box-shadow: none;
  }

  section,
  article,
  footer {
    box-shadow: none;
    background: #ffffff;
    border: 1px solid #cccccc;
  }

  header nav {
    display: none;
  }
}