/* 糖心Vlog - tangxins.click */
:root {
  --bg: #0c0c0e;
  --bg-elevated: #16161a;
  --bg-soft: #1c1c22;
  --text: #f2f2f4;
  --text-muted: #a8a8b3;
  --accent: #e11d48;
  --accent-soft: #fb7185;
  --accent-dim: rgba(225, 29, 72, 0.18);
  --line: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --max: 1120px;
  --header-h: 64px;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(225, 29, 72, 0.22), transparent),
    radial-gradient(ellipse 40% 30% at 100% 0%, rgba(251, 113, 133, 0.08), transparent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

ul {
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(12, 12, 14, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

/* 顶栏下方广告条由 ads.js 注入，保持可点击 */
.site-ads-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #be123c);
  color: #fff;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.35);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.25s;
}

.nav-mobile {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.25rem;
  flex-direction: column;
  gap: 0.85rem;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  color: var(--text-muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  padding: 3rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.45) saturate(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg) 0%,
    rgba(12, 12, 14, 0.55) 45%,
    rgba(12, 12, 14, 0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  animation: fadeUp 0.8s ease both;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40em;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.section-head p {
  color: var(--text-muted);
}

.section-intro {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 48em;
}

.prose {
  color: var(--text-muted);
  max-width: 48em;
}

.prose p {
  margin-bottom: 1.1rem;
}

.prose h3 {
  color: var(--text);
  font-size: 1.2rem;
  margin: 1.75rem 0 0.75rem;
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin: 0.75rem 0 1.25rem 1.25rem;
  list-style: disc;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

/* Feature grid */
.feature-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.feature-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.feature-item:hover {
  border-color: rgba(225, 29, 72, 0.45);
  transform: translateY(-3px);
}

.feature-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.feature-body {
  padding: 1.1rem 1.15rem 1.25rem;
}

.feature-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Category chips */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0 2rem;
}

.cat-list a {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cat-list a:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-dim);
}

/* Showcase */
.showcase-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.showcase-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.showcase-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  transition: transform 0.45s ease;
}

.showcase-item:hover img {
  transform: scale(1.04);
}

.showcase-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.85rem 0.85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  font-size: 0.88rem;
  color: #fff;
}

/* Split layout */
.split {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.split img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  width: 100%;
}

/* Steps */
.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.step {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin-bottom: 0.65rem;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 40em;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-soft);
}

.page-content {
  padding: 2.5rem 0 4rem;
}

.toc {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 2rem;
}

.toc h2 {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.toc ul {
  list-style: none;
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.related-links {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.related-links h2 {
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
}

.related-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.related-links a {
  padding: 0.4rem 0.9rem;
  background: var(--bg-soft);
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: flex;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 7rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Footer */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.footer-brand a {
  color: var(--text);
}

.footer-col p,
.footer-col li {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.footer-col ul {
  display: grid;
  gap: 0.4rem;
}

.footer-col a {
  color: var(--text-muted);
}

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Desktop */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .nav-desktop {
    display: flex;
  }

  .nav-mobile {
    display: none !important;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .split {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .hero {
    align-items: center;
    padding: 4rem 0;
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}
