:root {
  --bg-base: #0f0612;
  --bg-surface: #1a0e1f;
  --bg-elevated: #241428;
  --rose: #ff3a7a;
  --rose-light: #ff6b9d;
  --amber: #ffb347;
  --coral: #ff5c4d;
  --indigo: #6e5bff;
  --text: #fff0f6;
  --text-soft: #d9b8c8;
  --border: rgba(255, 58, 122, 0.22);
  --radius: 18px;
  --header-h: 56px;
  --sticky-ads-h: 0px;
  --max-w: 940px;
  --font: "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(--font);
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.88;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(255, 58, 122, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 15%, rgba(255, 179, 71, 0.1), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(110, 91, 255, 0.08), transparent 45%);
}

a { color: var(--rose-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber); }

img { max-width: 100%; height: auto; display: block; }

.container { width: min(100% - 24px, var(--max-w)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(15, 6, 18, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  flex-shrink: 0;
}

.brand img { border-radius: 12px; width: 34px; height: 34px; object-fit: cover; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 0.92rem; letter-spacing: 0.06em; }
.brand-text span { font-size: 0.65rem; color: var(--text-soft); }

.main-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(26, 14, 31, 0.98);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 10px 16px;
  gap: 2px;
}

.main-nav.open { display: flex; }

.main-nav a {
  color: var(--text-soft);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
}

.main-nav a:hover,
.main-nav a.active { color: var(--rose-light); background: rgba(255, 58, 122, 0.1); }

.nav-toggle {
  background: rgba(255, 58, 122, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.15rem;
  padding: 5px 9px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: linear-gradient(120deg, var(--rose), var(--coral));
  color: #fff;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(255, 58, 122, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-dl:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255, 58, 122, 0.45); color: #fff; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
  color: var(--rose-light);
}

.btn-outline:hover { background: rgba(255, 58, 122, 0.08); color: #fff; }

.nav-btn-dl { display: none; }

/* Ads */
.ads-block {
  padding: 10px 0 6px;
  background: linear-gradient(180deg, rgba(36, 20, 40, 0.7), rgba(15, 6, 18, 0.4));
  border-bottom: 1px solid var(--border);
}

#ads, #sticky-ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

#ads > div, #sticky-ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

#ads img, #sticky-ads img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s;
  border: 1px solid rgba(255, 58, 122, 0.25);
}

#ads a, #sticky-ads a { display: inline-block; border-radius: 16px; }

#ads img:hover, #sticky-ads img:hover { transform: translateY(-3px) scale(1.04); }

#ads figcaption, #sticky-ads figcaption,
#ads .caption, #sticky-ads .caption {
  height: 15px;
  font-size: 10px;
  color: var(--text-soft);
  text-align: center;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

.sticky-ads-wrap {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 190;
  background: rgba(15, 6, 18, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.28s, opacity 0.28s;
  pointer-events: none;
}

.sticky-ads-wrap.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-ads-inner #sticky-ads > div { width: calc(25% - 6px); }
.sticky-ads-inner #sticky-ads img { width: 50px; height: 50px; }

main { padding-bottom: 56px; }

.breadcrumb {
  padding: 12px 0 0;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--rose-light); }
.breadcrumb span { margin: 0 5px; opacity: 0.45; }

/* Hero */
.quest-hero {
  padding: 34px 0 26px;
  position: relative;
}

.quest-hero::after {
  content: "";
  position: absolute;
  right: -20%;
  top: 10%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 179, 71, 0.2);
  pointer-events: none;
}

.quest-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  border: 1px solid rgba(255, 179, 71, 0.35);
  background: rgba(255, 179, 71, 0.06);
  margin-bottom: 12px;
}

.quest-hero h1 {
  font-size: clamp(1.42rem, 5.2vw, 2.05rem);
  line-height: 1.38;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 25%, var(--rose-light) 70%, var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quest-lead {
  font-size: 0.94rem;
  color: var(--text-soft);
  margin-bottom: 20px;
  max-width: 70ch;
}

.quest-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* Sections */
.quest-section {
  padding: 30px 0;
  border-top: 1px solid rgba(255, 58, 122, 0.07);
  position: relative;
}

.quest-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30px;
  width: 3px;
  height: 36px;
  background: linear-gradient(180deg, var(--rose), var(--indigo));
  border-radius: 0 3px 3px 0;
  opacity: 0.7;
}

.section-tag {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--amber);
  margin-bottom: 8px;
  display: block;
  padding-left: 12px;
}

.quest-section h2 {
  font-size: clamp(1.12rem, 3.4vw, 1.42rem);
  margin-bottom: 14px;
  color: #fff;
  line-height: 1.42;
  padding-left: 12px;
}

.quest-section h3 {
  font-size: 1.02rem;
  margin: 18px 0 10px;
  color: var(--rose-light);
}

.quest-section p {
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 0.91rem;
  text-align: justify;
}

.quest-section ul, .quest-section ol {
  margin: 12px 0 16px 22px;
  color: var(--text-soft);
  font-size: 0.89rem;
}

.quest-section li { margin-bottom: 7px; }

/* Bento cards */
.bento-grid {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.bento-card {
  background: linear-gradient(155deg, rgba(255, 58, 122, 0.09), rgba(110, 91, 255, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  transition: border-color 0.25s, transform 0.25s;
}

.bento-card:hover {
  border-color: rgba(255, 179, 71, 0.4);
  transform: translateY(-2px);
}

.bento-card strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.bento-card span, .bento-card p {
  font-size: 0.81rem;
  color: var(--text-soft);
  line-height: 1.65;
  margin: 0;
}

.bento-icon {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.bento-grid.cols-2 { grid-template-columns: 1fr; }
.bento-grid.cols-3 { grid-template-columns: 1fr; }

/* Media */
.figure-panel {
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.32);
}

.figure-panel img { border-radius: 0; width: 100%; }

.figure-cap {
  padding: 10px 14px;
  background: var(--bg-elevated);
  font-size: 0.76rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
}

.split-layout {
  display: grid;
  gap: 18px;
  align-items: start;
  margin: 18px 0;
}

.note-panel {
  border-left: 3px solid var(--amber);
  padding: 14px 16px;
  background: rgba(255, 179, 71, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0;
}

.note-panel p { margin: 0; font-size: 0.87rem; }

/* Subpages */
.page-head {
  padding: 26px 0 8px;
}

.page-head h1 {
  font-size: clamp(1.28rem, 4vw, 1.65rem);
  margin-bottom: 8px;
}

.page-head .meta {
  font-size: 0.76rem;
  color: var(--text-soft);
}

.legal-body h2 {
  font-size: 1.08rem;
  color: #fff;
  margin: 26px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.legal-body h3 {
  font-size: 0.96rem;
  color: var(--rose-light);
  margin: 16px 0 8px;
}

.legal-body p, .legal-body li {
  font-size: 0.87rem;
  color: var(--text-soft);
  margin-bottom: 11px;
}

.legal-body ul, .legal-body ol { margin-left: 20px; }

/* Error */
.error-page {
  text-align: center;
  padding: 56px 18px 72px;
}

.error-code {
  font-size: 4.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 10px;
}

.error-page h1 { font-size: 1.25rem; margin-bottom: 8px; }
.error-page p { color: var(--text-soft); font-size: 0.88rem; margin-bottom: 22px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 32px;
  background: rgba(15, 6, 18, 0.75);
}

.footer-cols {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.footer-cols h4 {
  font-size: 0.8rem;
  color: #fff;
  margin-bottom: 8px;
}

.footer-cols a, .footer-cols p {
  display: block;
  font-size: 0.76rem;
  color: var(--text-soft);
  margin-bottom: 5px;
}

.footer-end {
  font-size: 0.7rem;
  color: var(--text-soft);
  text-align: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 58, 122, 0.1);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    gap: 2px;
  }

  .main-nav a { padding: 6px 10px; font-size: 0.8rem; }

  .nav-btn-dl { display: inline-flex; }

  .bento-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .bento-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

  .split-layout { grid-template-columns: 1fr 1.7fr; }
  .split-layout.flip { grid-template-columns: 1.7fr 1fr; }

  .footer-cols { grid-template-columns: 2fr 1fr 1fr; }

  .sticky-ads-inner #sticky-ads > div { width: calc(12.5% - 6px); }

  #ads img { width: 65px; height: 65px; }
  #sticky-ads img { width: 54px; height: 54px; }
}
