:root {
  --bg: #0b1220;
  --bg-soft: #101a2e;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8eefc;
  --text-soft: #a9b6d0;
  --text-dim: #7d8aa5;
  --primary: #4f8cff;
  --primary-2: #8b5cf6;
  --accent: #22d3ee;
  --accent-2: #f472b6;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --blur: saturate(160%) blur(16px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f6ff;
    --bg-soft: #eaf1ff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --border: rgba(20, 40, 90, 0.12);
    --text: #10203c;
    --text-soft: #3d5276;
    --text-dim: #5f7191;
    --primary: #2563eb;
    --primary-2: #7c3aed;
    --accent: #0891b2;
    --accent-2: #db2777;
    --shadow: 0 18px 50px rgba(30, 60, 120, 0.16);
    --shadow-sm: 0 8px 24px rgba(30, 60, 120, 0.12);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -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, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(79, 140, 255, 0.22), transparent 60%),
    radial-gradient(900px 520px at 92% 4%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(34, 211, 238, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  background-attachment: fixed;
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  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(--accent);
}

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

::selection {
  background: rgba(79, 140, 255, 0.35);
  color: #fff;
}

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.72), rgba(11, 18, 32, 0.42));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

@media (prefers-color-scheme: light) {
  header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.55));
  }
}

.topbar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px clamp(16px, 4vw, 32px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
}

.topbar span:first-child {
  font-weight: 600;
  background: linear-gradient(90deg, var(--accent), var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.topbar span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 32px);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: all 0.28s var(--ease);
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============ Main Layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 32px) 60px;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 34px);
}

section {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3.4vw, 38px);
  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: 130px;
}

section:hover {
  border-color: rgba(79, 140, 255, 0.35);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

/* ============ Hero Banner ============ */
#hero {
  padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px);
  background:
    linear-gradient(135deg, rgba(79, 140, 255, 0.28), rgba(139, 92, 246, 0.22) 45%, rgba(34, 211, 238, 0.18) 100%),
    var(--surface);
  border: 1px solid rgba(120, 160, 255, 0.28);
  overflow: hidden;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.45), transparent 62%);
  filter: blur(30px);
  z-index: -1;
  animation: float 14s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -45% -15%;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.35), transparent 62%);
  filter: blur(34px);
  z-index: -1;
  animation: float 18s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-24px, 28px, 0) scale(1.08); }
}

h1 {
  font-size: clamp(1.55rem, 3.6vw, 2.65rem);
  line-height: 1.28;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  font-weight: 800;
  background: linear-gradient(100deg, var(--text) 10%, var(--accent) 55%, var(--primary-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.22rem, 2.4vw, 1.65rem);
  margin: 0 0 18px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--primary), var(--primary-2));
  box-shadow: 0 0 14px rgba(79, 140, 255, 0.7);
}

h3 {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  margin: 22px 0 10px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: 0.01em;
}

h3:first-child {
  margin-top: 0;
}

p {
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: clamp(0.94rem, 1.4vw, 1rem);
}

section > p:last-child,
section > ul:last-child,
section > ol:last-child {
  margin-bottom: 0;
}

ul, ol {
  margin: 0 0 12px;
  padding-left: 1.35em;
  color: var(--text-soft);
}

li {
  margin: 6px 0;
}

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

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

/* ============ Products list ============ */
#products ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

#products ul li {
  margin: 0;
  padding: 14px 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#products ul li:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 140, 255, 0.5);
  background: rgba(79, 140, 255, 0.12);
  color: var(--text);
}

/* ============ Blockquote ============ */
blockquote {
  margin: 14px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: linear-gradient(90deg, rgba(79, 140, 255, 0.14), transparent);
  color: var(--text-soft);
  font-style: italic;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

blockquote:hover {
  transform: translateX(6px);
  border-left-color: var(--accent);
}

/* ============ News ============ */
#news ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#news li {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#news li:hover {
  transform: translateX(6px);
  border-color: rgba(34, 211, 238, 0.45);
}

#news time {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  white-space: nowrap;
}

/* ============ Articles ============ */
#articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

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

#articles article {
  position: relative;
  padding: 20px 22px;
  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);
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(79, 140, 255, 0.14), transparent 55%, rgba(139, 92, 246, 0.14));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

#articles article:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: var(--shadow);
}

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

#articles article h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--text);
}

#articles article time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

#articles article p {
  margin: 0 0 12px;
  font-size: 0.94rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 140, 255, 0.35);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), filter 0.28s var(--ease);
}

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

#articles article a:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.45);
}

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

@media (min-width: 760px) {
  #articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  #articles {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============ FAQ ============ */
#faq h3 {
  padding: 14px 18px;
  margin: 12px 0 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(90deg, rgba(79, 140, 255, 0.16), rgba(139, 92, 246, 0.1));
  border: 1px solid var(--border);
  border-bottom: none;
  font-size: 0.98rem;
  cursor: default;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq h3:hover {
  background: linear-gradient(90deg, rgba(79, 140, 255, 0.28), rgba(139, 92, 246, 0.18));
  color: var(--accent);
}

#faq h3 + p {
  margin: 0;
  padding: 14px 18px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-top: none;
  font-size: 0.93rem;
}

/* ============ Howto ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

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

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

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 14px rgba(79, 140, 255, 0.4);
}

/* ============ Contact ============ */
#contact {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(139, 92, 246, 0.14)),
    var(--surface);
}

#contact p {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact p:hover {
  transform: translateX(6px);
  border-color: rgba(34, 211, 238, 0.5);
}

#contact p:last-child {
  margin-bottom: 0;
}

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: all 0.28s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(79, 140, 255, 0.4);
}

/* ============ Footer ============ */
footer {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

footer > section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 32px) 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 28px;
}

footer > section:hover {
  box-shadow: none;
  border-color: transparent;
}

footer h2 {
  font-size: 1rem;
  margin: 18px 0 6px;
  padding-left: 12px;
  color: var(--text);
}

footer h2::before {
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

footer p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0 0 8px;
  line-height: 1.7;
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6px clamp(16px, 4vw, 32px);
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
}

footer > p:last-child {
  padding-bottom: 28px;
  color: var(--text-soft);
  font-weight: 500;
}

@media (min-width: 760px) {
  footer > section {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
  }
}

@media (min-width: 1080px) {
  footer > section {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============ Scroll Reveal Animation ============ */
section {
  animation: reveal 0.8s var(--ease) both;
}

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

@supports (animation-timeline: view()) {
  section {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 42%;
  }
}

#articles article {
  animation: reveal 0.7s var(--ease) both;
}

#articles article:nth-of-type(2) { animation-delay: 0.05s; }
#articles article:nth-of-type(3) { animation-delay: 0.1s; }
#articles article:nth-of-type(4) { animation-delay: 0.15s; }
#articles article:nth-of-type(5) { animation-delay: 0.2s; }
#articles article:nth-of-type(6) { animation-delay: 0.25s; }
#articles article:nth-of-type(7) { animation-delay: 0.3s; }
#articles article:nth-of-type(8) { animation-delay: 0.35s; }
#articles article:nth-of-type(9) { animation-delay: 0.4s; }
#articles article:nth-of-type(10) { animation-delay: 0.45s; }

@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: 760px) {
  body {
    font-size: 15px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 12px;
    padding: 8px 16px;
  }

  nav {
    padding: 6px 12px;
  }

  nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  nav a {
    white-space: nowrap;
    font-size: 13px;
    padding: 7px 12px;
  }

  section {
    padding: 18px 16px;
    border-radius: 16px;
    scroll-margin-top: 150px;
  }

  #hero {
    padding: 24px 18px;
  }

  h2 {
    padding-left: 13px;
  }

  h2::before {
    width: 3px;
  }

  #products ul {
    grid-template-columns: 1fr;
  }

  #news li {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

  #faq h3 {
    font-size: 0.94rem;
  }

  #howto ol li {
    padding-left: 46px;
  }

  footer > section {
    padding: 20px 16px 4px;
  }
}

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

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), var(--primary));
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* ============ Print ============ */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  header, footer, nav {
    display: none;
  }
  section {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    break-inside: avoid;
    animation: none;
  }
  a {
    color: #000;
  }
  h1, h2, h3 {
    -webkit-text-fill-color: #000;
    color: #000;
    background: none;
  }
}