/* 糖心Vlog传媒 - txsite.homes */
:root {
  --bg: #0b0d11;
  --bg-soft: #12151c;
  --surface: #181c26;
  --line: rgba(232, 228, 220, 0.12);
  --text: #efeae4;
  --muted: #a39c94;
  --accent: #d4566a;
  --accent-soft: #f0a8b4;
  --gold: #c4a35a;
  --max: 1120px;
  --radius: 4px;
  --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:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(212, 86, 106, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(196, 163, 90, 0.1), transparent 50%),
    linear-gradient(180deg, #0f1218 0%, var(--bg) 40%, #0a0c10 100%);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
}

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;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* ads.js sticky bar sits just below this header */
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 17, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-soft);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: background 0.2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  margin-bottom: 3rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  animation: heroZoom 18s ease-in-out infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 13, 17, 0.35) 0%, rgba(11, 13, 17, 0.55) 45%, rgba(11, 13, 17, 0.96) 100%),
    linear-gradient(90deg, rgba(11, 13, 17, 0.75) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.2rem;
  max-width: 640px;
  animation: fadeUp 0.9s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.15;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
  color: #fff;
}

.hero h1 {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 500;
  color: var(--accent-soft);
  margin-bottom: 0.9rem;
  line-height: 1.45;
}

.hero p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 36em;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #e06a7d;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-soft);
  color: #fff;
}

/* Sections */
.section {
  padding: 3.2rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 46rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}

.section-head p {
  color: var(--muted);
}

.prose {
  color: var(--muted);
}

.prose p {
  margin-bottom: 1.1rem;
}

.prose h2,
.prose h3 {
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  margin: 1.8rem 0 0.7rem;
}

.prose h2 {
  font-size: 1.45rem;
}

.prose h3 {
  font-size: 1.2rem;
}

.prose ul,
.prose ol {
  margin: 0.6rem 0 1.2rem 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

/* Media grids */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.media-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.media-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.media-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.media-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  animation: fadeUp 0.7s ease both;
}

.media-item:nth-child(2) { animation-delay: 0.08s; }
.media-item:nth-child(3) { animation-delay: 0.16s; }
.media-item:nth-child(4) { animation-delay: 0.24s; }
.media-item:nth-child(5) { animation-delay: 0.32s; }
.media-item:nth-child(6) { animation-delay: 0.4s; }

.media-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.55s ease;
}

.media-item.landscape img {
  aspect-ratio: 16 / 10;
}

.media-item:hover img {
  transform: scale(1.04);
}

.media-caption {
  padding: 0.85rem 0.95rem 1rem;
}

.media-caption h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.media-caption p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Feature band */
.feature-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature-band.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.feature-band.reverse .feature-copy {
  order: 2;
}

.feature-band img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.feature-copy h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.feature-copy p {
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.stack-gap {
  display: grid;
  gap: 1.5rem;
}

/* TOC / internal links */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.2rem 0 0.4rem;
}

.toc a {
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.02);
}

.toc a:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
}

/* Page hero (inner pages) */
.page-hero {
  padding: 2.8rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.55rem;
}

.page-hero p {
  color: var(--muted);
  max-width: 40rem;
}

.page-body {
  padding-bottom: 3.5rem;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 1.4rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #080a0e;
  padding: 2.4rem 0 1.6rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.55rem;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-grid h4 {
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
  color: var(--text);
}

.footer-grid ul {
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

/* Mobile */
@media (max-width: 1100px) {
  .media-grid.cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .media-grid,
  .media-grid.cols-4,
  .media-grid.cols-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-band,
  .feature-band.reverse {
    grid-template-columns: 1fr;
  }

  .feature-band.reverse .feature-copy {
    order: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 13, 17, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1rem 1.1rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding: 3.2rem 0 2.4rem;
  }

  .media-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .media-grid,
  .media-grid.cols-4,
  .media-grid.cols-5 {
    grid-template-columns: 1fr;
  }

  body {
    font-size: 15px;
  }
}
