:root {
  --bg-deep: #120818;
  --bg-card: rgba(28, 12, 38, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --pink: #ff4d9d;
  --pink-soft: #ff8ec4;
  --violet: #a855f7;
  --magenta: #e91e8c;
  --rose: #fce7f3;
  --text: #f5e6f0;
  --text-muted: #c4a8bc;
  --border: rgba(255, 77, 157, 0.22);
  --shadow: 0 12px 40px rgba(233, 30, 140, 0.18);
  --radius: 18px;
  --nav-h: 64px;
  --ads-h: 96px;
  --font: "Noto Sans SC", "PingFang SC", "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(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.85;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(168, 85, 247, 0.28), transparent),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(255, 77, 157, 0.2), transparent),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(233, 30, 140, 0.12), transparent);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--pink-soft); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

img { max-width: 100%; height: auto; display: block; }

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(18, 8, 24, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(255, 77, 157, 0.35);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--pink);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 6px;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 77, 157, 0.15);
  color: #fff;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--magenta), var(--violet));
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-download:hover { filter: brightness(1.1); color: #fff; }

/* Sticky ads bar */
.ads-sticky-wrap {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(18, 8, 24, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
}

.ads-sticky-wrap.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#ads, #ads-sticky {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  background: transparent;
  margin: 0 auto;
  gap: 6px;
  max-width: 960px;
}

#ads > div, #ads-sticky > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(12.5% - 6px);
  min-width: 70px;
  box-sizing: border-box;
}

#ads img, #ads-sticky img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: 2px solid rgba(255, 77, 157, 0.25);
  background: linear-gradient(135deg, #2a1035, #1a0820);
}

#ads a, #ads-sticky a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}

#ads img:hover, #ads-sticky img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(255, 77, 157, 0.35);
}

#ads figcaption, #ads .caption,
#ads-sticky figcaption, #ads-sticky .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

.ads-top-block {
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 18px 0 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--pink-soft); }
.breadcrumb span { margin: 0 6px; opacity: 0.5; }

/* Hero */
.hero {
  padding: 48px 0 36px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--pink-soft);
  margin-bottom: 20px;
  background: var(--bg-glass);
}

.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.35;
  background: linear-gradient(135deg, #fff 0%, var(--pink-soft) 50%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 28px;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section {
  padding: 40px 0;
}

.section-title {
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  color: #fff;
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, var(--pink), var(--violet));
  border-radius: 4px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  padding-left: 16px;
}

/* Module layouts */
.mod-text p { margin-bottom: 16px; text-align: justify; }

.mod-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card h3 {
  color: var(--pink-soft);
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.card p { font-size: 0.93rem; color: var(--text-muted); }

.mod-img-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  margin: 28px 0;
}

@media (min-width: 768px) {
  .mod-img-text { grid-template-columns: 3fr 7fr; }
  .mod-img-text.reverse { grid-template-columns: 7fr 3fr; }
  .mod-img-text.reverse .mod-img { order: 2; }
}

.mod-img {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.mod-img img { width: 100%; aspect-ratio: 9/16; object-fit: cover; object-position: top; }

.mod-img figcaption {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
}

.mod-cards-img {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 28px 0;
}

@media (min-width: 768px) {
  .mod-cards-img { grid-template-columns: 3fr 7fr; }
}

.feature-list {
  list-style: none;
  margin: 16px 0;
}

.feature-list li {
  padding: 10px 0 10px 24px;
  position: relative;
  border-bottom: 1px solid rgba(255, 77, 157, 0.08);
  font-size: 0.94rem;
}

.feature-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--pink);
  font-size: 0.7rem;
  top: 14px;
}

.highlight-box {
  background: linear-gradient(135deg, rgba(255, 77, 157, 0.1), rgba(168, 85, 247, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.highlight-box h3 { color: #fff; margin-bottom: 12px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  background: var(--bg-glass);
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--pink-soft);
}

/* Footer */
.site-footer {
  margin-top: 60px;
  padding: 40px 0 30px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

.footer-grid h4 { color: #fff; margin-bottom: 12px; font-size: 0.95rem; }

.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); font-size: 0.88rem; }

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 77, 157, 0.1);
}

/* Error pages */
.error-page {
  text-align: center;
  padding: 80px 20px 60px;
  min-height: 60vh;
}

.error-code {
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.error-page h1 { font-size: 1.5rem; margin: 16px 0; color: #fff; }
.error-page p { color: var(--text-muted); margin-bottom: 24px; }

/* Legal pages */
.legal-content h2 {
  color: #fff;
  font-size: 1.2rem;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  color: var(--pink-soft);
  font-size: 1.05rem;
  margin: 20px 0 10px;
}

.legal-content p, .legal-content li {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 12px;
  text-align: justify;
}

.legal-content ul, .legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

/* Mobile */
@media (max-width: 767px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(18, 8, 24, 0.98);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .main-nav.open { max-height: 320px; }

  .main-nav ul {
    flex-direction: column;
    padding: 12px;
  }

  .header-cta { display: none; }

  #ads > div, #ads-sticky > div {
    width: calc(25% - 6px);
  }

  .hero { padding: 32px 0 24px; }
}

@media (min-width: 768px) {
  body.has-sticky-ads { padding-top: 0; }
}
