:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --fg: #1c1c28;
  --muted: #5f6472;
  --brand: #e8434a;
  --brand2: #f7a325;
  --brand3: #4a3aff;
  --card: #f6f7fb;
  --line: #e6e8ef;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.55);
  --shadow: 0 6px 24px rgba(20, 24, 40, 0.08);
  --shadow-lg: 0 18px 48px rgba(20, 24, 40, 0.14);
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="dark"] {
  --bg: #12131a;
  --bg-soft: #171922;
  --fg: #eef0f6;
  --muted: #a7adbd;
  --brand: #ff5a61;
  --brand2: #ffb347;
  --brand3: #7b6bff;
  --card: #1b1d27;
  --line: #2a2d3a;
  --glass: rgba(24, 26, 36, 0.68);
  --glass-line: rgba(255, 255, 255, 0.08);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.8;
  font-size: 16px;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
}

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

::selection {
  background: rgba(232, 67, 74, 0.2);
  color: var(--fg);
}

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 10px;
  top: 10px;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 999;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease), background 0.3s ease;
}

header.site-header.scrolled {
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--fg);
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(232, 67, 74, 0.35);
  transition: transform 0.4s var(--ease);
}

.brand:hover .logo {
  transform: rotate(-8deg) scale(1.06);
}

.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover {
  background: var(--card);
  text-decoration: none;
  color: var(--brand);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 8px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232, 67, 74, 0.12);
}

.search-box input {
  border: 0;
  background: transparent;
  color: var(--fg);
  outline: none;
  width: 130px;
  font-size: 14px;
  padding: 4px;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box button {
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
}

.search-box button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.icon-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  background: var(--bg);
}

.menu-toggle {
  display: none;
}

.hero {
  padding: 48px 0 32px;
  background:
    radial-gradient(1200px 480px at 8% -10%, rgba(232, 67, 74, 0.14), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(247, 163, 37, 0.14), transparent 60%),
    linear-gradient(180deg, var(--card), transparent);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 58, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero h1 {
  font-size: 38px;
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero .lead {
  color: var(--muted);
  font-size: 17px;
  margin-top: 16px;
}

.hero .cta {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  box-shadow: 0 8px 22px rgba(232, 67, 74, 0.32);
}

.btn-primary:hover {
  box-shadow: 0 12px 30px rgba(232, 67, 74, 0.42);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--fg);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.stats {
  display: flex;
  gap: 26px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.stat b {
  display: block;
  font-size: 26px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--card);
  isolation: isolate;
}

.slides {
  position: relative;
  height: 300px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  color: #fff;
  transform: scale(1.02);
}

.slide.active {
  opacity: 1;
  transform: scale(1);
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.slide h3 {
  font-size: 22px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.slide p {
  font-size: 14px;
  opacity: 0.92;
  position: relative;
  z-index: 1;
}

.slide.s1 {
  background: linear-gradient(135deg, #e8434a, #f7a325);
}

.slide.s2 {
  background: linear-gradient(135deg, #4a3aff, #e8434a);
}

.slide.s3 {
  background: linear-gradient(135deg, #0f9b8e, #f7a325);
}

.dots {
  position: absolute;
  bottom: 14px;
  right: 18px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.dots button:hover {
  transform: scale(1.25);
}

.dots button.active {
  background: #fff;
}

section {
  padding: 56px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.3px;
  position: relative;
  padding-bottom: 12px;
}

.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
}

.section-head p {
  color: var(--muted);
  margin-top: 10px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232, 67, 74, 0.06), rgba(247, 163, 37, 0.06));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(232, 67, 74, 0.35);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  position: relative;
}

.card p {
  color: var(--muted);
  font-size: 14.5px;
  position: relative;
}

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(232, 67, 74, 0.12);
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

article.post {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

article.post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(232, 67, 74, 0.35);
}

article.post h3 {
  font-size: 17px;
  margin-bottom: 6px;
  line-height: 1.5;
}

article.post .meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

article.post p {
  font-size: 14px;
  color: var(--muted);
}

article.post a.more {
  font-size: 13.5px;
  font-weight: 700;
  display: inline-block;
  margin-top: 10px;
  transition: transform 0.25s var(--ease);
}

article.post a.more:hover {
  transform: translateX(4px);
  text-decoration: none;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--card);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.faq-item:hover {
  border-color: rgba(232, 67, 74, 0.35);
}

.faq-item.open {
  border-color: rgba(232, 67, 74, 0.5);
  box-shadow: var(--shadow);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 16px 18px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: inherit;
  transition: color 0.25s var(--ease);
}

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

.faq-q .plus {
  color: var(--brand);
  font-weight: 900;
  transition: transform 0.3s var(--ease);
  flex: 0 0 auto;
}

.faq-item.open .faq-q .plus {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
  padding: 0 18px;
}

.faq-a p {
  color: var(--muted);
  font-size: 14.5px;
  padding-bottom: 16px;
}

.faq-item.open .faq-a {
  max-height: 400px;
}

.howto-step {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.howto-step:hover {
  background: var(--card);
  border-color: var(--line);
  transform: translateX(4px);
}

.howto-step .num {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(232, 67, 74, 0.3);
}

.howto-step h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.howto-step p {
  color: var(--muted);
  font-size: 14.5px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-info {
  list-style: none;
}

.contact-info li {
  list-style: none;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.contact-info li:hover {
  color: var(--fg);
}

.contact-info li:last-child {
  border-bottom: 0;
}

.contact-info li b {
  color: var(--fg);
}

footer.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h4 {
  font-size: 15px;
  margin-bottom: 12px;
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

.footer-grid a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

.footer-grid a:hover {
  color: var(--brand);
  padding-left: 4px;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 90;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  transform: translateY(-3px) scale(1.05);
}

.anchor-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.anchor-nav a {
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}

.anchor-nav a:hover {
  color: var(--brand);
  text-decoration: none;
  border-color: var(--brand);
  transform: translateY(-2px);
  background: var(--bg);
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
}

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

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

.breadcrumb span {
  margin: 0 6px;
}

.author-box {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 20px;
  transition: box-shadow 0.3s var(--ease);
}

.author-box:hover {
  box-shadow: var(--shadow);
}

.author-box .avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(232, 67, 74, 0.3);
}

.author-box p {
  font-size: 13.5px;
  color: var(--muted);
}

.prose p {
  margin-bottom: 16px;
  color: var(--fg);
}

.prose h3 {
  margin: 24px 0 10px;
  font-size: 19px;
  position: relative;
  padding-left: 14px;
}

.prose h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 4px;
  height: 1em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand2));
}

.prose h4 {
  margin: 18px 0 8px;
  font-size: 16px;
}

.prose ul {
  margin: 0 0 16px 20px;
}

.prose li {
  margin-bottom: 8px;
  color: var(--muted);
}

@media (max-width: 960px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 36px 0 24px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: menuIn 0.3s var(--ease);
  }

  .nav-links.open a {
    padding: 12px 14px;
  }

  .nav-links.open a::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .search-box input {
    width: 90px;
  }

  .slides {
    height: 260px;
  }

  section {
    padding: 40px 0;
  }

  .section-head h2 {
    font-size: 23px;
  }

  .stats {
    gap: 18px;
  }

  .stat b {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .nav {
    height: 58px;
    gap: 8px;
  }

  .brand {
    font-size: 16px;
  }

  .brand .logo {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .search-box {
    display: none;
  }

  .hero h1 {
    font-size: 25px;
  }

  .hero .lead {
    font-size: 15px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  .slides {
    height: 230px;
  }

  .slide h3 {
    font-size: 18px;
  }

  .card {
    padding: 18px;
  }

  .howto-step {
    padding: 12px;
    gap: 12px;
  }

  .author-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .back-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  header.site-header,
  .back-top,
  .nav-tools,
  .anchor-nav,
  .dots {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  article.post,
  .faq-item {
    break-inside: avoid;
    box-shadow: none;
  }
}