:root {
  --bg: #0a0a0c;
  --bg-soft: #141418;
  --bg-card: #1a1a20;
  --line: #2a2a32;
  --text: #f2f2f5;
  --muted: #a0a0ae;
  --brand: #e91e63;
  --brand-2: #ff6b35;
  --brand-grad: linear-gradient(135deg, #ffd54f 0%, #ff6b35 45%, #e91e63 100%);
  --radius: 12px;
  --max: 1180px;
  --header-h: 64px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --font: "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;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(233, 30, 99, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(255, 107, 53, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: #ff8fab;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

ul {
  list-style: none;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.logo span {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: none;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(233, 30, 99, 0.15);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

.mobile-nav {
  display: none;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 12px 0 16px;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block;
  padding: 12px 16px;
  color: var(--muted);
  border-radius: 8px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--text);
  background: rgba(233, 30, 99, 0.12);
}

/* Hero */
.hero {
  padding: 36px 0 28px;
}

.hero-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(233, 30, 99, 0.18);
  color: #ff8fab;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.3;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 22px;
  max-width: 52ch;
}

.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 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(233, 30, 99, 0.35);
}

.btn-primary:hover { color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: #ff8fab;
}

.hero-visual {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
  max-height: 520px;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(10, 10, 12, 0.85));
  pointer-events: none;
}

/* Sections */
.section {
  padding: 40px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.35;
}

.section-head p,
.section-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 22px;
  max-width: 70ch;
}

/* Category chips */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.cat-item:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  color: var(--text);
}

.cat-item img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.cat-item strong {
  display: block;
  font-size: 0.98rem;
}

.cat-item span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

/* Media grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.media-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.media-card:hover {
  transform: translateY(-3px);
  border-color: rgba(233, 30, 99, 0.5);
}

.media-card .thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.media-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.media-card:hover .thumb img {
  transform: scale(1.04);
}

.media-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.media-card .meta {
  padding: 12px 12px 14px;
}

.media-card h3 {
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 6px;
  font-weight: 600;
}

.media-card p {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Feature / promo */
.feature-row {
  display: grid;
  gap: 18px;
}

.feature-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.feature-card img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  margin-bottom: 10px;
}

/* Long SEO article */
.article {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 18px;
}

.article h2 {
  font-size: 1.45rem;
  margin: 28px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.article h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article h3 {
  font-size: 1.12rem;
  margin: 20px 0 10px;
  color: #ffc1d3;
}

.article p {
  color: #d4d4dc;
  margin-bottom: 14px;
  text-align: justify;
}

.article ul,
.article ol {
  margin: 0 0 16px 1.2em;
  color: #d4d4dc;
}

.article li {
  margin-bottom: 8px;
  list-style: disc;
}

.article ol li { list-style: decimal; }

.toc {
  background: rgba(233, 30, 99, 0.08);
  border: 1px solid rgba(233, 30, 99, 0.25);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 24px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
}

.toc a {
  display: block;
  padding: 4px 0;
  color: #ff8fab;
}

.highlight-box {
  border-left: 3px solid var(--brand);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px;
  margin: 18px 0;
  border-radius: 0 10px 10px 0;
}

/* Page hero for inner pages */
.page-hero {
  padding: 36px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--muted);
  max-width: 60ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: #ff8fab; }

.content-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 18px;
  margin-bottom: 28px;
}

.content-block h2 {
  font-size: 1.25rem;
  margin: 24px 0 10px;
}

.content-block h2:first-child { margin-top: 0; }

.content-block p {
  color: #d4d4dc;
  margin-bottom: 14px;
}

.content-block ul {
  margin: 0 0 16px 1.2em;
  color: #d4d4dc;
}

.content-block li {
  list-style: disc;
  margin-bottom: 8px;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h) - 72px);
  display: flex;
  align-items: center;
  padding: 40px 0;
}

.error-box {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.error-code {
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 12px;
}

.error-box h1 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.error-box p {
  color: var(--muted);
  margin-bottom: 22px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #08080a;
  padding: 40px 0 28px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-brand strong {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-col p,
.footer-col a {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-col h4 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.footer-col a {
  display: block;
  padding: 4px 0;
}

.footer-col a:hover { color: #ff8fab; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* FAQ */
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq details p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 0.95rem;
}

/* Related links */
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.related a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--muted);
  font-size: 0.88rem;
}

.related a:hover {
  border-color: var(--brand);
  color: #ff8fab;
}

/* Desktop */
@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .nav { display: flex; }
  .mobile-nav { display: none !important; }
  .hero { padding: 56px 0 40px; }
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
  }
  .hero-visual {
    aspect-ratio: 3 / 4;
    max-height: 560px;
  }
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .media-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .feature-row {
    grid-template-columns: 1fr 1fr;
  }
  .feature-card {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
  .feature-card.reverse img { order: 2; }
  .article,
  .content-block {
    padding: 36px 40px;
  }
  .footer-grid {
    grid-template-columns: 1.6fr 1.2fr 1fr;
  }
  .section { padding: 52px 0; }
}

@media (min-width: 1024px) {
  .media-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

/* Sticky ads bar under header */
.ads-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 95;
  background: rgba(10, 10, 12, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 8px 0 6px;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 4px;
  background: transparent;
  margin: 0;
  width: min(100% - 16px, var(--max));
  margin-inline: auto;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}

#ads figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: linear-gradient(135deg, #fff, #fff);
  max-width: none;
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
  color: inherit;
}

#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(233, 30, 99, 0.28);
}

#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: #a0a0ae;
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
  line-height: 1.2;
}
