:root {
  --bg-deep: #1a1028;
  --bg-card: #261a36;
  --bg-soft: #2f2044;
  --pink-main: #ff3d8f;
  --pink-light: #ff6eb3;
  --pink-glow: rgba(255, 61, 143, 0.35);
  --coral: #ff5c7a;
  --lavender: #c9a0ff;
  --text-primary: #f5eef8;
  --text-muted: #b8a8c8;
  --border: rgba(255, 110, 179, 0.25);
  --radius: 16px;
  --nav-h: 58px;
  --sticky-h: 88px;
  --max-w: 1100px;
  --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-primary);
  line-height: 1.85;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 61, 143, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(201, 160, 255, 0.1) 0%, transparent 38%),
    url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23ff3d8f' fill-opacity='0.06'/%3E%3C/svg%3E");
}

a { color: var(--pink-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

img { max-width: 100%; height: auto; display: block; }

.container { width: min(100% - 32px, var(--max-w)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26, 16, 40, 0.92);
  backdrop-filter: blur(14px);
  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: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 4px 16px var(--pink-glow);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 6px;
  flex-wrap: wrap;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.main-nav a:hover,
.main-nav a.active {
  background: linear-gradient(135deg, var(--pink-main), var(--coral));
  color: #fff;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--pink-main), #ff2d6f);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 6px 24px var(--pink-glow);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-download:hover { transform: translateY(-1px); color: #fff; }

/* Sticky ads bar */
.sticky-download {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(38, 26, 54, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}

.sticky-download.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-download #sticky-ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.sticky-download #sticky-ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(25% - 6px);
  box-sizing: border-box;
}

.sticky-download #sticky-ads img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.sticky-download #sticky-ads .caption {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

/* Top ads */
.ads-top-wrap {
  padding: 14px 0 6px;
  background: linear-gradient(180deg, rgba(255,61,143,0.08), transparent);
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  background: transparent;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(25% - 8px);
  box-sizing: border-box;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24,24,24,0.3);
  transition: transform 180ms ease;
}

#ads img:hover { transform: translateY(-3px) scale(1.04); }

#ads .caption {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* Hero */
.hero {
  padding: 48px 0 36px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--pink-light);
  margin-bottom: 18px;
  background: rgba(255,61,143,0.08);
}

.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.35;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff, var(--pink-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 28px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 40px 0; }

.section-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--pink-main), var(--lavender));
  border-radius: 2px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  padding-left: 16px;
}

/* Text block */
.text-block p {
  margin-bottom: 1.2em;
  text-align: justify;
  color: #e8dff0;
}

.text-block h3 {
  font-size: 1.15rem;
  margin: 1.8em 0 0.8em;
  color: var(--pink-light);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--pink-glow), transparent 70%);
  pointer-events: none;
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.card h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #fff;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Image + text layouts */
.media-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  align-items: center;
  margin: 28px 0;
}

.media-row.reverse { grid-template-columns: 1.4fr 1fr; }

.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  position: relative;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, var(--pink-main), transparent) 1;
  border-radius: var(--radius);
  pointer-events: none;
}

.media-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Feature list */
.feature-list {
  list-style: none;
  margin: 16px 0;
}

.feature-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #e0d4ea;
}

.feature-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--pink-main);
  font-size: 0.7rem;
  top: 14px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--pink-light); }
.breadcrumb span { color: var(--pink-light); }

/* Legal / sub pages */
.page-hero {
  padding: 36px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.page-hero h1 { font-size: 1.8rem; margin-bottom: 8px; }
.page-hero p { color: var(--text-muted); }

.legal-content h2 {
  font-size: 1.25rem;
  margin: 2em 0 0.8em;
  color: var(--pink-light);
}

.legal-content h3 {
  font-size: 1.05rem;
  margin: 1.5em 0 0.6em;
  color: #fff;
}

.legal-content p, .legal-content li {
  margin-bottom: 0.9em;
  color: #ddd0e8;
  text-align: justify;
}

.legal-content ul, .legal-content ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

/* Footer */
.site-footer {
  margin-top: 60px;
  padding: 40px 0 28px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand img { width: 48px; border-radius: 12px; margin-bottom: 12px; }

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: #fff;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 0.88rem; color: var(--text-muted); }

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-code {
  font-size: 5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink-main), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.error-page h1 { margin: 16px 0 10px; }
.error-page p { color: var(--text-muted); max-width: 480px; margin-bottom: 24px; }

/* Highlight box */
.highlight-box {
  background: linear-gradient(135deg, rgba(255,61,143,0.12), rgba(201,160,255,0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.highlight-box strong { color: var(--pink-light); }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.stat-item {
  text-align: center;
  padding: 18px 10px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pink-main);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Responsive */
@media (min-width: 769px) {
  #ads > div { width: calc(12.5% - 8px); }
  .sticky-download #sticky-ads > div { width: calc(12.5% - 8px); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(26,16,40,0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }

  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }

  .media-row, .media-row.reverse {
    grid-template-columns: 1fr;
  }

  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  .header-cta { display: none; }
}

@media (max-width: 480px) {
  #ads > div { width: calc(25% - 8px); }
}
