:root {
  --violet-deep: #12061f;
  --violet-mid: #2a1445;
  --violet-soft: #4a2d6e;
  --coral: #ff5c8a;
  --coral-light: #ff8fb0;
  --peach: #ffd4e5;
  --gold: #f4c27a;
  --ice: #e8f4ff;
  --white: #ffffff;
  --text: #f5eef8;
  --text-dim: #c4b5d4;
  --text-dark: #2a1a38;
  --text-muted: #6e5a7e;
  --border: rgba(255, 92, 138, 0.22);
  --glass: rgba(42, 20, 69, 0.72);
  --shadow: 0 16px 48px rgba(8, 2, 18, 0.45);
  --radius: 20px;
  --nav-h: 58px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--violet-deep);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(255, 92, 138, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 20%, rgba(244, 194, 122, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(74, 45, 110, 0.35) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--coral-light); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; }

.container { width: min(1080px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: linear-gradient(180deg, rgba(18, 6, 31, 0.97) 0%, rgba(42, 20, 69, 0.92) 100%);
  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(--white);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 2px solid var(--coral);
}

.brand span { white-space: nowrap; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--white);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.site-nav a {
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 92, 138, 0.18);
  color: var(--coral-light);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--coral) 0%, #e8457a 100%);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: 0 4px 20px rgba(255, 92, 138, 0.4);
  border: none;
  cursor: pointer;
}

.btn-download:hover { opacity: 0.92; color: var(--white) !important; }

/* Sticky ads bar */
.sticky-ads-wrap {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 1050;
  background: rgba(18, 6, 31, 0.96);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  transform: translateY(-120%);
  transition: transform 0.3s ease;
  backdrop-filter: blur(10px);
}

.sticky-ads-wrap.visible { transform: translateY(0); }

.sticky-ads-wrap #sticky-ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 12px;
}

.sticky-ads-wrap #sticky-ads > div {
  width: calc(12.5% - 8px);
  min-width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sticky-ads-wrap #sticky-ads img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.sticky-ads-wrap #sticky-ads .caption {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 3px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .sticky-ads-wrap #sticky-ads > div { width: calc(25% - 8px); }
  .sticky-ads-wrap #sticky-ads img { width: 52px; height: 52px; }
}

/* Top ads block */
.ads-section {
  background: rgba(42, 20, 69, 0.5);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.ads-section #ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.ads-section #ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 76px;
}

.ads-section #ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.18s ease;
}

.ads-section #ads img:hover { transform: translateY(-3px) scale(1.04); }

.ads-section #ads .caption {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 4px;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hero */
.hero {
  padding: 48px 0 36px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 92, 138, 0.15);
  border: 1px solid var(--border);
  color: var(--coral-light);
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  margin-bottom: 18px;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  line-height: 1.35;
  color: var(--white);
  margin-bottom: 16px;
  font-weight: 800;
}

.hero-lead {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 680px;
  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-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.88rem;
}

.btn-outline:hover { border-color: var(--coral); color: var(--coral-light); }

/* Content sections */
.content-light {
  background: linear-gradient(180deg, #fff8fc 0%, #fef0f6 100%);
  color: var(--text-dark);
  padding: 52px 0;
}

.content-light a { color: #c93d6e; }
.content-light a:hover { color: #a02d56; }

.content-dark {
  padding: 52px 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  color: inherit;
  margin-bottom: 8px;
  font-weight: 700;
}

.content-dark .section-head h2 { color: var(--white); }

.section-head p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.content-dark .section-head p { color: var(--text-dim); }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 8px;
  font-weight: 600;
}

/* Module layouts */
.module-text p {
  margin-bottom: 16px;
  text-align: justify;
}

.module-text p:last-child { margin-bottom: 0; }

.module-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, box-shadow 0.2s;
}

.content-light .card {
  background: var(--white);
  border-color: rgba(255, 92, 138, 0.12);
  box-shadow: 0 8px 28px rgba(42, 20, 69, 0.08);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--coral-light);
}

.content-light .card h3 { color: #c93d6e; }

.card p { font-size: 0.92rem; color: var(--text-dim); }
.content-light .card p { color: var(--text-muted); }

.module-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  margin: 24px 0;
}

@media (min-width: 768px) {
  .module-media.media-left { grid-template-columns: 3fr 7fr; }
  .module-media.media-right { grid-template-columns: 7fr 3fr; }
}

.module-media figure img {
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  width: 100%;
}

.module-media figcaption {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 8px;
  text-align: center;
}

.content-light .module-media figcaption { color: var(--text-muted); }

.module-combo {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .module-combo { grid-template-columns: 7fr 3fr; }
  .module-combo .combo-side { order: 2; }
}

/* Breadcrumb */
.breadcrumb {
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.breadcrumb a { color: var(--coral-light); }
.breadcrumb span { color: var(--text-dim); margin: 0 6px; }

/* Legal / inner pages */
.page-main {
  padding: 36px 0 60px;
}

.page-main h1 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--white);
  margin-bottom: 20px;
}

.page-main h2 {
  font-size: 1.15rem;
  color: var(--coral-light);
  margin: 28px 0 12px;
}

.page-main p, .page-main li {
  color: var(--text-dim);
  margin-bottom: 12px;
}

.page-main ul, .page-main ol {
  padding-left: 22px;
  margin-bottom: 16px;
}

.page-main.light-page {
  background: linear-gradient(180deg, #fff8fc 0%, #fef0f6 100%);
}

.page-main.light-page h1 { color: var(--text-dark); }
.page-main.light-page h2 { color: #c93d6e; }
.page-main.light-page p,
.page-main.light-page li { color: var(--text-muted); }

/* Error pages */
.error-page {
  min-height: 60vh;
  display: flex;
  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(--coral), var(--gold));
  -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; margin-bottom: 12px; }
.error-page p { color: var(--text-dim); margin-bottom: 24px; }

/* Footer */
.site-footer {
  background: rgba(8, 2, 18, 0.9);
  border-top: 1px solid var(--border);
  padding: 36px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.footer-links h4 {
  color: var(--coral-light);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 4px 0;
}

.footer-links a:hover { color: var(--coral-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Responsive nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(18, 6, 31, 0.98);
    flex-direction: column;
    padding: 12px 16px 16px;
    border-bottom: 1px solid var(--border);
  }

  .site-nav.open { display: flex; }

  .site-header { position: relative; }
  .site-header.sticky-mode { position: sticky; }

  .module-media.media-left,
  .module-media.media-right { grid-template-columns: 1fr; }

  .module-combo { grid-template-columns: 1fr; }
}
