/* 糖心Vlog - txvlogapp.cfd */
:root {
  --bg: #0a0a0c;
  --bg-soft: #121218;
  --bg-card: #1a1a22;
  --text: #f2f2f5;
  --text-muted: #a8a8b3;
  --accent: #ff2d6a;
  --accent-2: #ff8a00;
  --grad: linear-gradient(135deg, #ffcc00 0%, #ff4d8d 45%, #9b4dff 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 204, 0, 0.15), rgba(255, 77, 141, 0.12), rgba(155, 77, 255, 0.15));
  --line: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --max: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 广告图标：覆盖全局 img 规则，避免被拉扯变形 */
#ads img {
  max-width: none;
  width: 65px;
  height: 65px;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1 / 1;
}

a {
  color: #ff7aa8;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffd166;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 12, 0.88);
  border-bottom: 1px solid var(--line);
}

/* 广告条由 /ads.js 注入，紧贴顶栏下方固定，便于点击 */
#tx-ads-bar {
  position: sticky;
  top: 68px;
  z-index: 90;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 77, 141, 0.18), transparent 45%),
    radial-gradient(ellipse at 80% 10%, rgba(255, 204, 0, 0.12), transparent 40%),
    radial-gradient(ellipse at 70% 80%, rgba(155, 77, 255, 0.14), transparent 45%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.25;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 28px;
  max-width: 36em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--grad);
  color: #111;
}

.btn-primary:hover {
  color: #111;
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  font-size: 0.88rem;
  border: 1px solid var(--line);
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--grad-soft);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 32px;
  max-width: 720px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.3;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-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;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 77, 141, 0.35);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #000;
}

.feature-card .body {
  padding: 16px 18px 20px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.shot-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.shot-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}

.shot-item figcaption {
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.split.reverse .split-media {
  order: 2;
}

.split-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.split-copy h2 {
  margin-top: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.split-copy p {
  color: var(--text-muted);
}

.split-copy ul {
  padding-left: 1.1em;
  color: var(--text-muted);
}

.split-copy li {
  margin-bottom: 8px;
}

/* Long SEO content */
.seo-article {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 28px 12px;
}

.seo-article h2,
.seo-article h3 {
  line-height: 1.35;
}

.seo-article h2 {
  margin-top: 0;
  font-size: 1.55rem;
}

.seo-article h3 {
  margin-top: 28px;
  font-size: 1.2rem;
  color: #ffd4e4;
}

.seo-article p,
.seo-article li {
  color: var(--text-muted);
}

.seo-article p {
  margin: 0 0 16px;
}

.toc {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px;
  margin: 0 0 28px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.toc a {
  font-size: 0.92rem;
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  color: var(--text-muted);
  margin: 12px 0 4px;
}

/* Legal / content pages */
.page-hero {
  padding: 48px 0 24px;
  background: var(--grad-soft);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
}

.content-page {
  padding: 40px 0 72px;
}

.content-page .prose {
  max-width: 820px;
}

.prose h2 {
  margin-top: 32px;
  font-size: 1.3rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: #ffd166;
}

/* 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;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

.error-page h1 {
  margin: 0 0 12px;
  font-size: 1.6rem;
}

.error-page p {
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #07070a;
  padding: 40px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.site-footer h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer p,
.site-footer a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: #777;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeUp 0.7s ease both;
}

.reveal-delay {
  animation-delay: 0.15s;
}

/* Mobile */
@media (max-width: 960px) {
  .hero-grid,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split.reverse .split-media {
    order: 0;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .shot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    flex-direction: column;
    align-items: stretch;
    background: #121218;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .header-inner {
    position: relative;
  }

  .toc {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .feature-grid,
  .shot-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 40px 0 36px;
  }

  .section {
    padding: 44px 0;
  }

  .seo-article {
    padding: 20px 16px 8px;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn {
    width: 100%;
  }
}
