:root {
  --bg: #0f1120;
  --bg-soft: #161a2e;
  --bg-card: rgba(28, 33, 56, 0.66);
  --bg-card-solid: #1c2138;
  --bg-glass: rgba(22, 26, 46, 0.55);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1fb;
  --text-soft: #b6bdd6;
  --text-dim: #8a92b0;
  --brand: #e94560;
  --brand-2: #f9c74f;
  --brand-3: #4cc9f0;
  --brand-grad: linear-gradient(135deg, #e94560 0%, #b5179e 50%, #4cc9f0 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(233, 69, 96, 0.16), rgba(76, 201, 240, 0.14));
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.28);
  --maxw: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fd;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-solid: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.6);
    --border: rgba(20, 26, 56, 0.09);
    --border-strong: rgba(20, 26, 56, 0.16);
    --text: #171c34;
    --text-soft: #414a6b;
    --text-dim: #6b7392;
    --shadow: 0 18px 46px rgba(31, 41, 84, 0.14);
    --shadow-soft: 0 8px 24px rgba(31, 41, 84, 0.1);
  }
}

*,
*::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: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(233, 69, 96, 0.2), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(76, 201, 240, 0.16), transparent 60%),
    radial-gradient(760px 520px at 50% 108%, rgba(249, 199, 79, 0.12), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

h1,
h2,
h3,
h4 {
  line-height: 1.35;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  position: relative;
  padding-left: 16px;
  margin-top: 0;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 5px;
  border-radius: 4px;
  background: var(--brand-grad);
}

h3 {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  color: var(--text);
}

h4 {
  font-size: 1rem;
  color: var(--text-soft);
}

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

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

li {
  margin-bottom: 0.4em;
}

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

strong {
  color: var(--text);
}

/* ---------- Header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.12);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

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

.brand svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.35);
  transition: transform 0.4s var(--ease);
}

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

.brand-name {
  font-size: 1.18rem;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

#site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#site-header nav li {
  margin: 0;
}

#site-header nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#site-header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-grad);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

#site-header nav a:hover,
#site-header nav a:focus-visible {
  color: var(--text);
  background: var(--brand-grad-soft);
  transform: translateY(-1px);
}

#site-header nav a:hover::after {
  width: 46%;
}

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: block;
}

main > section {
  background: var(--bg-card);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.4vw, 40px);
  margin-bottom: 26px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  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::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 42%);
}

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

main > section:nth-child(2) { animation-delay: 0.04s; }
main > section:nth-child(3) { animation-delay: 0.08s; }
main > section:nth-child(4) { animation-delay: 0.12s; }
main > section:nth-child(5) { animation-delay: 0.16s; }
main > section:nth-child(6) { animation-delay: 0.2s; }
main > section:nth-child(7) { animation-delay: 0.24s; }
main > section:nth-child(8) { animation-delay: 0.28s; }

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

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 22px;
  padding: 10px 18px;
  font-size: 0.88rem;
  color: var(--text-dim);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: fit-content;
  max-width: 100%;
}

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--text-dim);
  opacity: 0.6;
}

.breadcrumb a {
  color: var(--text-soft);
}

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

.breadcrumb [aria-current="page"] {
  color: var(--brand-2);
}

/* ---------- Hero ---------- */
#hero {
  background:
    radial-gradient(700px 380px at 88% -20%, rgba(76, 201, 240, 0.28), transparent 62%),
    radial-gradient(620px 360px at 6% 0%, rgba(233, 69, 96, 0.3), transparent 60%),
    linear-gradient(150deg, rgba(26, 26, 46, 0.9), rgba(22, 33, 62, 0.78));
  border: 1px solid var(--border-strong);
  color: #eef1fb;
}

#hero p {
  color: rgba(238, 241, 251, 0.86);
  max-width: 78ch;
}

#hero h1 {
  background: linear-gradient(120deg, #ffffff 0%, #f9c74f 46%, #4cc9f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-figure {
  margin-top: 26px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.hero-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(233, 69, 96, 0.18), transparent 55%);
  pointer-events: none;
  z-index: 1;
}

.hero-figure:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 32px 74px rgba(0, 0, 0, 0.55);
}

.hero-figure svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Cards for articles / news ---------- */
article {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

article:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

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

article h3 {
  margin-bottom: 0.4em;
  transition: color 0.3s var(--ease);
}

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

article p {
  margin-bottom: 0.6em;
}

article p:first-of-type {
  font-size: 0.86rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-3);
}

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

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

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

/* ---------- HowTo list ---------- */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 12px;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: transform 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: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.4);
}

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

/* ---------- FAQ ---------- */
#faq h3 {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0 0;
  cursor: default;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq h3:hover {
  background: var(--bg-glass);
  border-left-color: var(--brand-2);
  transform: translateX(4px);
}

#faq h3 + p {
  margin: 0 0 6px;
  padding: 12px 18px 14px;
  border-left: 1px dashed var(--border-strong);
  margin-left: 8px;
  font-size: 0.95rem;
}

/* ---------- Contact ---------- */
#contact h3 {
  color: var(--brand-2);
  margin-top: 1.4em;
}

#contact p {
  white-space: normal;
}

#contact p a {
  word-break: break-all;
}

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

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

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

#sitemap a::before {
  content: "▸ ";
  color: var(--brand);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--brand-grad-soft);
  color: var(--text);
}

/* ---------- Footer ---------- */
#site-footer {
  background: linear-gradient(180deg, rgba(15, 17, 32, 0.4), rgba(10, 12, 24, 0.92));
  border-top: 1px solid var(--border);
  padding: clamp(30px, 4vw, 52px) 20px 26px;
  margin-top: 20px;
  color: var(--text-soft);
}

#site-footer > section {
  max-width: var(--maxw);
  margin: 0 auto 26px;
}

#site-footer h2 {
  font-size: 1.15rem;
  color: var(--text);
}

#site-footer h3 {
  font-size: 0.98rem;
  color: var(--brand-2);
  margin-top: 1.2em;
}

#site-footer p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

#site-footer .copyright {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header-inner {
    justify-content: center;
    padding: 10px 16px;
  }

  #site-header nav ul {
    justify-content: center;
    gap: 2px;
  }

  #site-header nav a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  h1 {
    font-size: clamp(1.45rem, 6vw, 2rem);
  }

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

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

  article {
    padding: 16px;
  }
}

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

  .brand-name {
    font-size: 1.05rem;
  }

  #site-header nav a {
    padding: 5px 9px;
    font-size: 0.8rem;
  }

  h2 {
    padding-left: 13px;
  }

  h2::before {
    width: 4px;
  }

  .breadcrumb {
    font-size: 0.8rem;
    padding: 8px 14px;
  }

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

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

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #sitemap a,
  #links a {
    padding: 9px 12px;
    font-size: 0.85rem;
  }
}

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

/* ---------- Print ---------- */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  #site-header,
  #site-footer,
  .breadcrumb {
    display: none;
  }

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