:root {
  --void: #0c0618;
  --void-soft: #160d28;
  --rose: #fc5a8d;
  --rose-glow: #ff7eb3;
  --magenta: #d946ef;
  --cyan: #22d3ee;
  --violet: #7c3aed;
  --pearl: #fdf2f8;
  --snow: #ffffff;
  --ink: #1e1033;
  --muted: #8b7a9e;
  --line: rgba(252, 90, 141, 0.14);
  --glass: rgba(22, 13, 40, 0.72);
  --radius: 18px;
  --radius-lg: 28px;
  --header-h: 56px;
  --sticky-ads-h: 0px;
  --max-w: 980px;
  --display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--body);
  background: var(--void);
  color: #e8dff0;
  line-height: 1.85;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 70% 45% at 15% -5%, rgba(252, 90, 141, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 40% at 90% 10%, rgba(34, 211, 238, 0.12), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(124, 58, 237, 0.15), transparent 60%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(252, 90, 141, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--rose-glow); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: var(--cyan); }

img { max-width: 100%; height: auto; display: block; }

.container {
  width: min(100% - 28px, var(--max-w));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--snow);
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(252, 90, 141, 0.5);
  box-shadow: 0 0 18px rgba(252, 90, 141, 0.35);
}

.brand span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-nav a {
  color: #c9b8d8;
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(252, 90, 141, 0.18);
  color: var(--rose-glow);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--snow);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--rose), var(--magenta));
  color: var(--snow) !important;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(252, 90, 141, 0.4);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-dl:hover { opacity: 0.92; color: var(--snow) !important; }

/* Sticky ads */
#sticky-ads-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 450;
  background: rgba(12, 6, 24, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: none;
  padding: 8px 0;
}

#sticky-ads-wrap.visible { display: block; }

#sticky-ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 14px;
}

#sticky-ads > div {
  width: calc(12.5% - 6px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#sticky-ads img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
}

#sticky-ads .caption {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

@media (max-width: 768px) {
  #sticky-ads > div { width: calc(25% - 6px); }
  #sticky-ads img { width: 48px; height: 48px; }
}

/* Ads block */
#ads-block {
  padding: 16px 0 8px;
  text-align: center;
}

#ads-block .ads-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(252, 90, 141, 0.2);
  transition: transform 0.18s;
}

#ads img:hover { transform: translateY(-3px) scale(1.04); }

#ads .caption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hero */
.hero {
  padding: 36px 0 48px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  font-size: 0.75rem;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--snow);
  line-height: 1.35;
  margin-bottom: 14px;
  text-shadow: 0 0 40px rgba(252, 90, 141, 0.3);
}

.hero-lead {
  color: #b8a8c8;
  font-size: 1rem;
  max-width: 640px;
  margin: 0 auto 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--rose-glow);
  font-size: 0.88rem;
}

.btn-outline:hover { border-color: var(--rose); background: rgba(252, 90, 141, 0.08); }

/* Breadcrumb */
.breadcrumb {
  padding: 14px 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--rose-glow); }
.breadcrumb span { color: var(--rose-glow); }

/* Sections */
.section {
  padding: 40px 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  color: var(--snow);
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--rose), var(--cyan));
  border-radius: 2px;
}

.section-head p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 12px;
}

/* Text block */
.text-block {
  margin-bottom: 28px;
}

.text-block h3 {
  font-size: 1.15rem;
  color: var(--rose-glow);
  margin-bottom: 12px;
}

.text-block p {
  margin-bottom: 14px;
  color: #d4c8e0;
  text-align: justify;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.card {
  background: rgba(22, 13, 40, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: rgba(252, 90, 141, 0.35);
  transform: translateY(-2px);
}

.card-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(252, 90, 141, 0.25), rgba(124, 58, 237, 0.25));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.05rem;
  color: var(--snow);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  color: #b0a0c0;
  line-height: 1.75;
}

/* Media + text */
.media-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px 0;
  align-items: start;
}

@media (min-width: 720px) {
  .media-row.has-img { grid-template-columns: 0.35fr 0.65fr; }
  .media-row.has-img.reverse { grid-template-columns: 0.65fr 0.35fr; }
  .media-row.has-img.reverse .media-col { order: 2; }
  .media-row.has-img.reverse .text-col { order: 1; }
}

.media-col img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.media-col figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}

/* Feature list */
.feature-list {
  list-style: none;
  margin: 16px 0;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: #c8b8d8;
  font-size: 0.92rem;
}

.feature-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--rose);
  font-size: 0.65rem;
  top: 4px;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: rgba(22, 13, 40, 0.5);
}

.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--snow);
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--rose);
}

.faq-item[open] summary::after { content: "−"; }

.faq-body {
  padding: 0 20px 16px;
  color: #b8a8c8;
  font-size: 0.9rem;
}

/* Page content */
.page-hero {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--snow);
  margin-bottom: 8px;
}

.page-hero p { color: var(--muted); font-size: 0.92rem; }

.article-body h2 {
  font-size: 1.2rem;
  color: var(--rose-glow);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.article-body h3 {
  font-size: 1.05rem;
  color: var(--cyan);
  margin: 22px 0 10px;
}

.article-body p {
  margin-bottom: 14px;
  color: #d0c4dc;
  text-align: justify;
}

.article-body ul, .article-body ol {
  margin: 12px 0 16px 24px;
  color: #c0b0d0;
}

.article-body li { margin-bottom: 8px; }

/* Error pages */
.error-page {
  text-align: center;
  padding: 60px 0 80px;
}

.error-code {
  font-size: 5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--rose), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.error-page h1 {
  font-size: 1.4rem;
  color: var(--snow);
  margin-bottom: 12px;
}

.error-page p { color: var(--muted); margin-bottom: 24px; }

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(12, 6, 24, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.footer-grid h4 {
  color: var(--snow);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.footer-grid a:hover { color: var(--rose-glow); }

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--void-soft);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .header-inner .btn-dl { display: none; }
}
