:root {
  --ink: #120a14;
  --wine: #3a0f28;
  --wine-deep: #2a0a1e;
  --rose: #ff4d8d;
  --rose-soft: #ff8ab5;
  --gold: #e8c547;
  --gold-dim: #c9a832;
  --violet: #8b5cf6;
  --mist: #f7eef3;
  --paper: #fff9fc;
  --line: rgba(255, 77, 141, 0.22);
  --glass: rgba(26, 10, 20, 0.78);
  --shadow: 0 18px 48px rgba(18, 10, 20, 0.35);
  --radius: 18px;
  --header-h: 56px;
  --sticky-ads-h: 0px;
  --max-w: 940px;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
  --sans: "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(--sans);
  background: var(--ink);
  color: #f3e8ef;
  line-height: 1.88;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 70% 55% at 15% -5%, rgba(255, 77, 141, 0.28), transparent 58%),
    radial-gradient(ellipse 55% 40% at 95% 8%, rgba(139, 92, 246, 0.2), transparent 52%),
    linear-gradient(180deg, #1a0d16 0%, #120a14 40%, #0f0812 100%);
}

a { color: var(--rose-soft); 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(100% - 22px, var(--max-w)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  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: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  flex-shrink: 0;
}

.brand img {
  border-radius: 12px;
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid rgba(255, 77, 141, 0.45);
  box-shadow: 0 4px 16px rgba(255, 77, 141, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 0.92rem; color: var(--rose); letter-spacing: 0.06em; }
.brand-text span { font-size: 0.62rem; color: rgba(255, 255, 255, 0.55); }

.main-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(18, 10, 20, 0.97);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  padding: 10px 14px;
  gap: 2px;
  box-shadow: var(--shadow);
}

.main-nav.open { display: flex; }

.main-nav a {
  color: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--rose);
  background: rgba(255, 77, 141, 0.1);
}

.nav-toggle {
  background: rgba(255, 77, 141, 0.12);
  border: 1px solid var(--line);
  color: var(--rose);
  font-size: 1.15rem;
  padding: 5px 11px;
  border-radius: 9px;
  cursor: pointer;
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: linear-gradient(120deg, var(--rose), #ff2d6a);
  color: #fff;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  box-shadow: 0 6px 20px rgba(255, 77, 141, 0.4);
  white-space: nowrap;
}

.btn-dl:hover { color: #fff; opacity: 0.92; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--rose-soft);
  box-shadow: none;
}

.nav-btn-dl { display: none; }

/* Ads */
.ads-block {
  background: linear-gradient(180deg, rgba(58, 15, 40, 0.6), rgba(18, 10, 20, 0.3));
  border-bottom: 1px solid var(--line);
  padding: 12px 0 14px;
}

#ads, #sticky-ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 4px;
  background: transparent;
}

#ads > div, #sticky-ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(25% - 4px);
  box-sizing: border-box;
}

#ads img, #sticky-ads img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease;
  border: 1px solid rgba(255, 77, 141, 0.25);
}

#ads a, #sticky-ads a { display: inline-block; border-radius: 14px; }
#ads img:hover, #sticky-ads img:hover { transform: translateY(-3px) scale(1.03); }

#ads figcaption, #sticky-ads figcaption,
#ads .caption, #sticky-ads .caption {
  height: 15px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

.sticky-ads-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 250;
  background: rgba(18, 10, 20, 0.95);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.sticky-ads-wrap.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Breadcrumb */
.breadcrumb {
  padding: 14px 0 6px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.breadcrumb a { color: rgba(255, 255, 255, 0.6); }
.breadcrumb span { margin: 0 6px; }

/* Hero */
.forum-hero {
  padding: 28px 0 36px;
  position: relative;
}

.forum-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 77, 141, 0.08), transparent 55%);
  pointer-events: none;
}

.forum-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid rgba(232, 197, 71, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.forum-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.35;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 700;
}

.forum-lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.forum-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* Sections */
.forum-section {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 77, 141, 0.12);
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--rose);
  background: rgba(255, 77, 141, 0.12);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}

.forum-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.4;
}

.forum-section h3 {
  font-size: 1.05rem;
  color: var(--rose-soft);
  margin: 18px 0 10px;
}

.module-text p {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.93rem;
}

/* Cards */
.module-cards {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.cols-2 { grid-template-columns: 1fr; }
.cols-3 { grid-template-columns: 1fr; }

.feature-card {
  background: linear-gradient(145deg, rgba(58, 15, 40, 0.55), rgba(26, 10, 20, 0.8));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 77, 141, 0.15), transparent 70%);
}

.card-num {
  font-size: 0.68rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.feature-card strong {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.feature-card span {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.65;
}

/* Image modules */
.module-media {
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.module-media img { width: 100%; }

.media-cap {
  background: rgba(58, 15, 40, 0.7);
  padding: 10px 14px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  border-top: 1px solid var(--line);
}

.media-row {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  font-size: 0.72rem;
  color: var(--rose-soft);
  background: rgba(255, 77, 141, 0.1);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: rgba(26, 10, 20, 0.5);
}

.faq-item strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.faq-item p {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.68);
}

/* Subpage */
.page-hero {
  padding: 24px 0 20px;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 4.5vw, 1.75rem);
  color: #fff;
  margin-bottom: 10px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.legal-block {
  padding: 20px 0 40px;
}

.legal-block h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--rose-soft);
  margin: 24px 0 10px;
}

.legal-block h3 {
  font-size: 0.98rem;
  color: #fff;
  margin: 16px 0 8px;
}

.legal-block p, .legal-block li {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 10px;
}

.legal-block ul, .legal-block ol {
  padding-left: 1.4em;
  margin-bottom: 12px;
}

/* Error pages */
.error-page {
  text-align: center;
  padding: 48px 0 60px;
}

.error-code {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--rose);
  line-height: 1;
  margin-bottom: 12px;
}

.error-page h1 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 10px;
}

.error-page p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  margin-top: 20px;
  background: rgba(10, 6, 12, 0.6);
}

.footer-grid {
  display: grid;
  gap: 20px;
}

.footer-brand strong {
  color: var(--rose);
  font-size: 0.95rem;
}

.footer-brand p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-links a {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 77, 141, 0.1);
}

/* Desktop */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .nav-btn-dl { display: inline-flex; }

  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 2px;
  }

  .main-nav a { padding: 6px 10px; font-size: 0.82rem; }

  .cols-2 { grid-template-columns: 1fr 1fr; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }

  .media-row { grid-template-columns: 1fr 1fr; align-items: start; }

  #ads > div, #sticky-ads > div {
    width: calc(12.5% - 4px);
  }

  .footer-grid { grid-template-columns: 1.2fr 1fr; }
}

@media (min-width: 960px) {
  .forum-hero { padding: 40px 0 48px; }
  .forum-section { padding: 40px 0; }
}
