:root {
  --bg: #0b0b0d;
  --bg-soft: #141418;
  --bg-card: #1a1a20;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f4;
  --muted: #a7a7b0;
  --accent: #e11d48;
  --accent-2: #fb7185;
  --accent-hot: #ff4d6d;
  --grad: linear-gradient(135deg, #e11d48 0%, #fb7185 55%, #ff8a3d 100%);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --max: 1180px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(225, 29, 72, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(255, 138, 61, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  padding-top: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #fff;
}

.container {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

/* Top dock: header + ads stay fixed while page scrolls */
#site-dock {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 2147483000 !important;
  margin: 0;
  padding: 0;
  background: #0b0b0d;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

#site-dock-spacer {
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

/* Pages without ads.js still keep a fixed header */
body > .site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  z-index: 2147483000;
  background: #0b0b0d;
  border-bottom: 1px solid var(--line);
}

body:not(:has(#site-dock)) {
  padding-top: 70px;
}

#site-dock .site-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 1;
  background: #0b0b0d;
  border-bottom: 1px solid var(--line);
}

#ads-bar {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  z-index: 1;
  background: #121216;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  flex-shrink: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}

.nav a:hover,
.nav a.active {
  color: #fff;
}

.nav a.active::after,
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 56px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.15);
  color: var(--accent-2);
  font-size: 0.85rem;
  margin-bottom: 16px;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.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(-2px);
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 28px rgba(225, 29, 72, 0.35);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: #fff;
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: #fff;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-meta strong {
  color: #fff;
  font-size: 1.15rem;
  display: block;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  object-fit: cover;
  max-height: 520px;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto -8% -8% auto;
  width: 42%;
  height: 28%;
  background: var(--grad);
  filter: blur(48px);
  opacity: 0.45;
  z-index: -1;
}

/* Sections */
.section {
  padding: 48px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.3;
}

.section-head p {
  color: var(--muted);
  max-width: 40em;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 22px;
  max-width: 60em;
}

/* Category chips */
.cat-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.chip {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.chip:hover {
  color: #fff;
  border-color: rgba(225, 29, 72, 0.5);
  background: rgba(225, 29, 72, 0.12);
}

/* Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.media-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(225, 29, 72, 0.45);
  box-shadow: var(--shadow);
}

.media-card a {
  color: inherit;
  display: block;
}

.media-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #222;
}

.media-card .body {
  padding: 14px 14px 16px;
}

.media-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  line-height: 1.4;
}

.media-card p {
  color: var(--muted);
  font-size: 0.88rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent-2);
  margin-bottom: 8px;
}

/* Feature row */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 22px;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-row img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  max-height: 420px;
  object-fit: cover;
  object-position: top;
}

.feature-copy h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.feature-copy p {
  color: var(--muted);
  margin-bottom: 12px;
}

.feature-copy ul {
  margin-left: 1.2em;
  color: var(--muted);
}

.feature-copy li {
  margin-bottom: 6px;
}

/* SEO article */
.article {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 40px);
}

.article h2 {
  font-size: 1.55rem;
  margin: 28px 0 14px;
  padding-top: 8px;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  font-size: 1.15rem;
  margin: 20px 0 10px;
  color: #fff;
}

.article p {
  color: #c9c9d1;
  margin-bottom: 14px;
}

.article ul,
.article ol {
  margin: 0 0 16px 1.25em;
  color: #c9c9d1;
}

.article li {
  margin-bottom: 8px;
}

.article .toc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 24px;
}

.article .toc strong {
  display: block;
  margin-bottom: 8px;
}

.article .toc a {
  display: inline-block;
  margin: 4px 12px 4px 0;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.related-links a {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #fff;
  font-size: 0.9rem;
}

/* Page hero for inner pages */
.page-hero {
  padding: 42px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--muted);
  max-width: 46em;
}

.breadcrumb {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #fff;
}

/* Legal / content pages */
.prose {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 36px);
  margin: 28px 0 48px;
}

.prose h2 {
  font-size: 1.3rem;
  margin: 26px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: #c9c9d1;
  margin-bottom: 12px;
}

.prose ul,
.prose ol {
  margin-left: 1.2em;
  margin-bottom: 14px;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 16px;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 12px;
}

.error-page h1 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 22px;
  max-width: 28em;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #08080a;
  padding: 40px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 8px;
}

.footer-col h4 {
  margin-bottom: 12px;
  font-size: 0.98rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* Animations */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy,
.hero-visual,
.media-card,
.feature-row {
  animation: rise 0.7s ease both;
}

.hero-visual {
  animation-delay: 0.12s;
}

.media-card:nth-child(2) { animation-delay: 0.06s; }
.media-card:nth-child(3) { animation-delay: 0.12s; }
.media-card:nth-child(4) { animation-delay: 0.18s; }

/* Mobile */
@media (max-width: 980px) {
  .card-grid,
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid,
  .feature-row,
  .feature-row.reverse,
  .footer-grid {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 6;
  }

  .nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    background: #16161c;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    box-shadow: var(--shadow);
    z-index: 5;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav.open {
    display: flex;
  }

  /* Keep open menu above ads bar inside fixed dock */
  #site-dock {
    overflow: visible !important;
  }

  #site-dock .site-header {
    z-index: 3 !important;
    overflow: visible !important;
  }

  #site-dock #ads-bar {
    z-index: 1;
  }

  #site-dock.nav-open #ads-bar {
    visibility: hidden;
    pointer-events: none;
    height: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
  }

  .nav a {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .nav a.active::after,
  .nav a:hover::after {
    display: none;
  }

  .header-inner {
    position: relative;
    z-index: 4;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .media-card .body {
    padding: 10px;
  }

  .media-card h3 {
    font-size: 0.9rem;
  }

  .hero {
    padding: 28px 0 20px;
  }

  .section {
    padding: 32px 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-visual img {
    max-height: 380px;
  }
}
