/* 杏吧原创官网 xbxx.pics */
:root {
  --bg: #0c0618;
  --bg-2: #160d2a;
  --bg-card: #1a1230;
  --text: #f2eef8;
  --text-muted: #b7a8d4;
  --accent: #ff4d8d;
  --accent-2: #ff7a45;
  --accent-3: #9b5cff;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --max: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(155, 92, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(255, 77, 141, 0.16), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, #100822 40%, var(--bg-2) 100%);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

a {
  color: #ff9ec4;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(12, 6, 24, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 6px 4px;
}

.nav a:hover,
.nav a.active {
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: 48px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 77, 141, 0.2), rgba(155, 92, 255, 0.2));
  border: 1px solid rgba(255, 77, 141, 0.35);
  color: #ffc1d8;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  line-height: 1.28;
  background: linear-gradient(92deg, #fff 20%, #ffb4d0 55%, #d9b8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(255, 77, 141, 0.28);
}

.btn-primary:hover {
  color: #fff;
  opacity: 0.92;
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto -8% -10% 20%;
  height: 40%;
  background: radial-gradient(circle, rgba(255, 77, 141, 0.35), transparent 70%);
  z-index: -1;
  filter: blur(20px);
}

/* Sections */
section {
  padding: 42px 0;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 720px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 12px 0 8px;
  font-size: 1.08rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.feature-row.reverse .feature-text {
  order: 2;
}

.feature-row.reverse .feature-media {
  order: 1;
}

.feature-text h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.feature-text p {
  margin: 0 0 10px;
  color: var(--text-muted);
}

.feature-text ul {
  margin: 8px 0 0;
  padding-left: 1.1em;
  color: var(--text-muted);
}

.feature-media img {
  width: 100%;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.shot-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.shot-item img {
  border-radius: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}

.shot-item figcaption {
  padding: 10px 12px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.prose {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.prose h2,
.prose h3 {
  margin-top: 1.4em;
  margin-bottom: 0.55em;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--text-muted);
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  color: var(--text-muted);
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.toc {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0 8px;
}

.toc a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(155, 92, 255, 0.1);
  border: 1px solid rgba(155, 92, 255, 0.22);
  color: #e8d9ff;
  font-size: 0.92rem;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cta-band {
  margin: 20px 0 10px;
  padding: 28px 24px;
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(255, 77, 141, 0.18), rgba(155, 92, 255, 0.18)),
    var(--bg-card);
  border: 1px solid rgba(255, 77, 141, 0.28);
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 10px;
}

.cta-band p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.page-hero {
  padding: 36px 0 10px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 760px;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: #d7c5ff;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 0;
}

.error-page h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page p {
  color: var(--text-muted);
  margin: 0 0 18px;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  padding: 34px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 22px;
}

.site-footer h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer p,
.site-footer li {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.copyright {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: #8f7fb0;
  font-size: 0.86rem;
  text-align: center;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.related-links a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 960px) {
  .hero-grid,
  .feature-row,
  .feature-row.reverse,
  .footer-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-text,
  .feature-row.reverse .feature-media {
    order: initial;
  }

  .shot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .toc {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  .site-header {
    position: relative;
    top: auto;
    flex-shrink: 0;
    z-index: 100;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    left: auto;
    width: min(240px, calc(100vw - 32px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(18, 10, 36, 0.96);
    box-shadow: var(--shadow);
    z-index: 120;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 10px 12px;
    border-radius: 8px;
  }

  .nav a:hover,
  .nav a.active {
    background: rgba(255, 255, 255, 0.06);
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  /* 导航+广告下方：主内容整体滚动 */
  .page-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  #xb-ads-wrap {
    flex-shrink: 0;
    position: relative !important;
    top: auto !important;
  }

  .hero {
    padding-top: 28px;
  }

  .shot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .prose {
    padding: 18px 14px;
  }

  section {
    padding: 30px 0;
  }
}
