:root {
  --bg: #f4f6fb;
  --bg-elev: #ffffff;
  --bg-soft: #eef1f8;
  --text: #1b1f3b;
  --text-soft: #4a5170;
  --text-mute: #7a809a;
  --brand: #5b6cff;
  --brand-2: #9b5bff;
  --brand-3: #ff5b9b;
  --accent: #00d4b8;
  --border: rgba(27, 31, 59, 0.1);
  --border-strong: rgba(27, 31, 59, 0.16);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --shadow-sm: 0 2px 8px rgba(27, 31, 59, 0.06);
  --shadow: 0 10px 30px rgba(27, 31, 59, 0.1);
  --shadow-lg: 0 24px 60px rgba(27, 31, 59, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1020;
    --bg-elev: #161b32;
    --bg-soft: #1b2138;
    --text: #eef1ff;
    --text-soft: #c2c8e6;
    --text-mute: #8e96b8;
    --brand: #7c8bff;
    --brand-2: #b07cff;
    --brand-3: #ff7cb0;
    --accent: #2ee6cb;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --glass: rgba(22, 27, 50, 0.6);
    --glass-strong: rgba(22, 27, 50, 0.84);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  }
}

*,
*::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-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 8% -8%, rgba(91, 108, 255, 0.16), transparent 60%),
    radial-gradient(900px 560px at 100% 0%, rgba(155, 91, 255, 0.14), transparent 58%),
    radial-gradient(760px 520px at 50% 108%, rgba(0, 212, 184, 0.1), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

::selection {
  background: rgba(91, 108, 255, 0.28);
  color: var(--text);
}

/* ============ Header / Nav ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

header nav > a:first-child {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(91, 108, 255, 0.16), rgba(155, 91, 255, 0.16));
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

header nav > a:first-child:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--text);
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
  justify-content: flex-end;
}

header nav ul li a {
  display: inline-block;
  padding: 7px 13px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: all 0.28s var(--ease);
}

header nav ul li a:hover,
header nav ul li a:focus-visible {
  color: var(--text);
  background: var(--bg-soft);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* ============ Main / Sections ============ */
main {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

section {
  margin: 34px 0;
  padding: clamp(22px, 4vw, 42px);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--header-h) + 20px);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

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

/* Hero */
#hero {
  position: relative;
  overflow: hidden;
  margin-top: 34px;
  padding: clamp(34px, 6vw, 68px) clamp(24px, 5vw, 58px);
  color: #ffffff;
  background:
    linear-gradient(125deg, #1b1f3b 0%, #3a3f8f 34%, #7b3fd4 62%, #ff5b9b 100%);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(0, 212, 184, 0.45), transparent 62%);
  filter: blur(10px);
  z-index: -1;
  animation: floaty 14s ease-in-out infinite;
}

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

#hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.65rem, 4.4vw, 2.9rem);
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.28);
}

#hero p {
  margin: 0;
  max-width: 82ch;
  font-size: clamp(0.96rem, 1.6vw, 1.08rem);
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.92);
}

/* Headings */
h2 {
  position: relative;
  margin: 0 0 20px;
  padding-left: 18px;
  font-size: clamp(1.3rem, 2.6vw, 1.72rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--text);
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--brand), var(--brand-2), var(--brand-3));
  box-shadow: 0 0 16px rgba(91, 108, 255, 0.5);
}

h3 {
  margin: 26px 0 10px;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}

h3:first-of-type {
  margin-top: 4px;
}

p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

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

/* ============ Cards: articles / reviews / faq / lists ============ */
article {
  position: relative;
  margin: 16px 0;
  padding: 20px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  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);
}

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

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

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

article h3 {
  margin-top: 0;
}

article p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

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

article p a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(91, 108, 255, 0.14), rgba(155, 91, 255, 0.14));
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}

article p a:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  background: linear-gradient(120deg, rgba(91, 108, 255, 0.24), rgba(255, 91, 155, 0.24));
}

/* Blockquotes (reviews) */
blockquote {
  position: relative;
  margin: 16px 0;
  padding: 20px 22px 20px 60px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--brand), var(--brand-3)) 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.98rem;
  color: var(--text-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 6px;
  font-size: 3.4rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

blockquote:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

blockquote p {
  margin: 0;
  color: inherit;
}

/* FAQ definition list */
dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

dt {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  padding: 14px 18px;
  background: linear-gradient(120deg, rgba(91, 108, 255, 0.12), rgba(155, 91, 255, 0.1));
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: background 0.3s var(--ease);
}

dd {
  margin: 0;
  padding: 16px 18px;
  font-size: 0.95rem;
  color: var(--text-soft);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

dl > dt:hover + dd {
  transform: translateY(2px);
  box-shadow: var(--shadow);
}

/* Ordered list (howto) */
ol {
  margin: 16px 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 12px;
}

ol li {
  position: relative;
  counter-increment: step;
  padding: 15px 18px 15px 62px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-size: 0.96rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

ol li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(91, 108, 255, 0.38);
}

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

/* Unordered lists (sitemap / links) */
ul {
  margin: 14px 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

ul li a {
  display: inline-block;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
}

ul li a:hover,
ul li a:focus-visible {
  color: #ffffff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(91, 108, 255, 0.34);
}

/* Footer */
footer {
  margin-top: 20px;
  padding: 40px var(--gutter) 46px;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.88rem;
  background: linear-gradient(180deg, transparent, rgba(91, 108, 255, 0.07));
  border-top: 1px solid var(--border);
}

footer p {
  margin: 6px 0;
  color: inherit;
}

footer p:first-child {
  font-weight: 700;
  color: var(--text-soft);
}

/* ============ Scroll reveal animation ============ */
@media (prefers-reduced-motion: no-preference) {
  section,
  article,
  blockquote,
  ol li,
  dl > dt,
  dl > dd {
    animation: revealUp 0.7s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }

  @supports not (animation-timeline: view()) {
    section,
    article,
    blockquote,
    ol li,
    dl > dt,
    dl > dd {
      animation: none;
      opacity: 1;
      transform: none;
    }
  }
}

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

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

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  header nav {
    gap: 12px;
  }

  header nav ul li a {
    padding: 6px 10px;
    font-size: 0.84rem;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 60px;
  }

  header nav {
    padding-top: 8px;
    padding-bottom: 8px;
    justify-content: center;
  }

  header nav > a:first-child {
    font-size: 1.05rem;
  }

  header nav ul {
    justify-content: center;
    width: 100%;
  }

  section {
    margin: 22px 0;
    border-radius: var(--radius);
  }

  #hero {
    border-radius: var(--radius);
  }
}

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

  main {
    padding-bottom: 56px;
  }

  section {
    padding: 20px 16px;
  }

  #hero {
    padding: 28px 18px;
  }

  #hero h1 {
    font-size: 1.5rem;
  }

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

  h2::before {
    width: 5px;
  }

  article,
  blockquote {
    padding: 16px;
  }

  blockquote {
    padding-left: 48px;
  }

  blockquote::before {
    left: 12px;
    font-size: 2.6rem;
  }

  ol li {
    padding: 14px 14px 14px 56px;
  }

  ul li a {
    padding: 8px 14px;
    font-size: 0.86rem;
  }

  dt,
  dd {
    padding: 13px 14px;
  }
}

@media (max-width: 400px) {
  header nav ul li a {
    font-size: 0.8rem;
    padding: 5px 9px;
  }

  #hero h1 {
    font-size: 1.32rem;
  }
}

/* ============ Accessibility & Print ============ */
@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;
  }
}

@media print {
  header,
  footer {
    position: static;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  section,
  article,
  blockquote,
  dl,
  dd,
  ol li {
    box-shadow: none;
    background: #ffffff;
    border-color: #cccccc;
  }
}