:root {
  --bg: #0b0e1a;
  --bg-soft: #11152a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #eef1f8;
  --text-dim: #a8b2d1;
  --text-faint: #7c86a6;
  --accent: #e94560;
  --accent-2: #7b5cff;
  --accent-3: #22d3ee;
  --gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  --gradient-accent: linear-gradient(120deg, #e94560 0%, #7b5cff 60%, #22d3ee 100%);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fb;
    --bg-soft: #ffffff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --border: rgba(20, 30, 60, 0.1);
    --text: #18203a;
    --text-dim: #4b5573;
    --text-faint: #6a7490;
    --gradient: linear-gradient(135deg, #e8ecff 0%, #f0e6ff 45%, #e0f7ff 100%);
    --shadow: 0 18px 40px rgba(40, 60, 120, 0.14);
  }
}

*,
*::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", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 12% -10%, rgba(123, 92, 255, 0.22), transparent 60%),
    radial-gradient(800px 520px at 92% 0%, rgba(233, 69, 96, 0.16), transparent 62%),
    radial-gradient(700px 600px at 50% 110%, rgba(34, 211, 238, 0.12), transparent 65%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

h1 { font-size: clamp(1.75rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
h3 { font-size: clamp(1.12rem, 2vw, 1.35rem); }
h4 { font-size: clamp(1rem, 1.6vw, 1.12rem); color: var(--text-dim); }

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

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

li { margin-bottom: 0.4em; }

blockquote {
  margin: 0 0 1em;
  padding: 1em 1.2em;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-dim);
  font-style: italic;
}

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

time {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-faint);
}

address { font-style: normal; }

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

::selection {
  background: var(--accent);
  color: #fff;
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 26, 0.62);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: light) {
  #site-header { background: rgba(255, 255, 255, 0.68); }
}

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

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease);
}

.brand-logo:hover { transform: translateY(-1px); color: var(--text); }

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

.brand-logo:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(123, 92, 255, 0.5);
}

.brand-name {
  font-size: 1.02rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#main-nav li { margin: 0; }

#main-nav a {
  display: inline-block;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  color: var(--text);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

/* ============ Layout ============ */
main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

main > section {
  margin-top: 2.6rem;
  padding: clamp(1.25rem, 3vw, 2.4rem);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  animation: fadeUp 0.7s var(--ease) both;
}

main > section:first-child { margin-top: 1.6rem; }

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main > section { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  border: 1px solid var(--border);
  padding: clamp(1.6rem, 4vw, 3.2rem);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.35), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -45% -15%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 64%);
  pointer-events: none;
  animation: floatGlow 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-40px, 30px, 0) scale(1.15); }
}

#hero > * { position: relative; z-index: 1; }

#hero h1 {
  background: linear-gradient(100deg, #ffffff 0%, #ffd9e2 45%, #b9c8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

@media (prefers-color-scheme: light) {
  #hero h1 {
    background: linear-gradient(100deg, #1a1a2e 0%, #7b5cff 55%, #e94560 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.hero-lead {
  max-width: 78ch;
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  color: var(--text-dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.6rem 0 2rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  color: #fff;
  background: var(--gradient-accent);
  background-size: 180% 180%;
  box-shadow: 0 10px 28px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(123, 92, 255, 0.48);
  background-position: 100% 50%;
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: var(--text);
  transform: translateY(-3px);
  border-color: var(--accent-3);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
}

.hero-visual {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.hero-visual:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.4);
}

.hero-visual figcaption {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}

/* ============ Breadcrumb ============ */
#breadcrumb {
  margin-top: 1.2rem !important;
  padding: 0.7rem 1.1rem !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}

#breadcrumb li { margin: 0; color: var(--text-faint); }

#breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-faint);
  opacity: 0.6;
}

#breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ============ Section typography ============ */
main > section > h2 {
  position: relative;
  padding-bottom: 0.6rem;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: var(--gradient-accent);
  transition: width 0.45s var(--ease);
}

main > section:hover > h2::after { width: 108px; }

main > section > h3 {
  margin-top: 1.6rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}

main > section > h4 {
  margin-top: 1.3rem;
  color: var(--accent-3);
}

/* ============ News ============ */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.news-list li {
  margin: 0;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.news-list li:hover {
  transform: translateY(-5px);
  border-color: rgba(233, 69, 96, 0.5);
  box-shadow: 0 16px 34px rgba(233, 69, 96, 0.18);
}

.news-list h3 { margin: 0 0 0.35rem; font-size: 1.02rem; }
.news-list p { margin: 0.45rem 0 0; font-size: 0.92rem; }

/* ============ Articles ============ */
#articles > p { max-width: 80ch; }

#articles article {
  margin-top: 1.1rem;
  padding: 1.2rem 1.35rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-left-color 0.35s var(--ease), background 0.35s var(--ease);
}

#articles article:hover {
  transform: translateX(4px) translateY(-3px);
  border-left-color: var(--accent-2);
  box-shadow: 0 16px 36px rgba(123, 92, 255, 0.18);
}

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

#articles article p:first-of-type { margin-bottom: 0.5rem; }

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

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

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

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

#howto ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 0.9rem 1rem 0.9rem 3.2rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-accent);
  box-shadow: 0 6px 16px rgba(233, 69, 96, 0.35);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.5);
}

/* ============ FAQ ============ */
#faq details {
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  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: rgba(123, 92, 255, 0.45);
  box-shadow: 0 12px 28px rgba(123, 92, 255, 0.14);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.5);
  box-shadow: 0 14px 32px rgba(233, 69, 96, 0.16);
}

#faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 3rem 0.95rem 1.15rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.25s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--accent);
  background: rgba(233, 69, 96, 0.14);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

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

#faq summary:hover { color: var(--accent); }

#faq details p {
  margin: 0;
  padding: 0 1.15rem 1.05rem;
  font-size: 0.94rem;
  animation: fadeUp 0.4s var(--ease) both;
}

/* ============ Contact & footer sections ============ */
#contact address {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

#contact address p { margin: 0; }

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-dim);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: var(--text);
  transform: translateY(-3px);
  border-color: var(--accent-3);
  box-shadow: 0 10px 22px rgba(34, 211, 238, 0.2);
}

/* ============ Footer ============ */
#site-footer {
  border-top: 1px solid var(--border);
  background: rgba(11, 14, 26, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2.4rem 1.25rem 1.6rem;
}

@media (prefers-color-scheme: light) {
  #site-footer { background: rgba(255, 255, 255, 0.6); }
}

#site-footer > section {
  max-width: var(--maxw);
  margin: 0 auto 1.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#site-footer > section:hover {
  border-color: rgba(123, 92, 255, 0.4);
  transform: translateY(-2px);
}

#site-footer h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

#site-footer p {
  font-size: 0.88rem;
  margin: 0 0 0.3rem;
  color: var(--text-faint);
}

.footer-copy {
  max-width: var(--maxw);
  margin: 1.2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .header-inner {
    justify-content: center;
    padding: 0.7rem 1rem;
  }

  #main-nav ul { justify-content: center; }

  main { padding: 0 1rem 2.4rem; }

  main > section { margin-top: 1.8rem; }
}

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

  body { font-size: 15px; }

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

  #main-nav a {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
  }

  main > section {
    padding: 1.15rem 1rem;
    border-radius: var(--radius-sm);
  }

  .hero-actions { gap: 0.6rem; }

  .btn-primary,
  .btn-secondary {
    flex: 1 1 100%;
    padding: 0.72rem 1.2rem;
  }

  .hero-visual svg { height: auto; }

  #howto ol li { padding-left: 3rem; }

  #faq summary { padding-right: 2.6rem; font-size: 0.94rem; }
}

@media (max-width: 380px) {
  #main-nav a { font-size: 0.78rem; padding: 0.3rem 0.5rem; }
}

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

  #site-header,
  .hero-actions,
  #breadcrumb,
  #links,
  #sitemap {
    display: none;
  }

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