/* 糖心Vlog - tx-log.homes */
:root {
  --bg: #0c0a0d;
  --bg-elevated: #161218;
  --bg-soft: #1e1a20;
  --surface: #231f26;
  --text: #f5f0f2;
  --text-muted: #a89aa3;
  --text-dim: #7a6d76;
  --brand: #e83e6a;
  --brand-soft: #ff6b8a;
  --brand-deep: #b81e4a;
  --accent: #f0c14b;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --max: 1120px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", 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;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 0.75em;
}

h1 { font-size: clamp(1.6rem, 3.5vw, 2.35rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); color: #fff; }
h3 { font-size: 1.15rem; color: #fff; }

p { margin: 0 0 1em; color: var(--text-muted); }

ul, ol {
  color: var(--text-muted);
  padding-left: 1.25em;
}

li { margin-bottom: 0.45em; }

/* Background atmosphere */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(232, 62, 106, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(240, 193, 75, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(184, 30, 74, 0.12), transparent 55%),
    var(--bg);
  pointer-events: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 10, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.logo span {
  background: linear-gradient(135deg, #fff 30%, var(--brand-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: rgba(232, 62, 106, 0.15);
}

/* Layout */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head .eyebrow {
  display: inline-block;
  color: var(--brand-soft);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-head p {
  max-width: 640px;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(232, 62, 106, 0.12);
  border: 1px solid rgba(232, 62, 106, 0.35);
  color: var(--brand-soft);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1rem;
  color: #fff;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  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(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 8px 24px rgba(232, 62, 106, 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: #fff;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  object-fit: cover;
  max-height: 460px;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto -8% -8% auto;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, rgba(232, 62, 106, 0.35), transparent 70%);
  z-index: -1;
  filter: blur(20px);
}

/* Cards / grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(232, 62, 106, 0.4);
  transform: translateY(-3px);
}

.card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.card-body h3 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.card-body p {
  font-size: 0.92rem;
  margin: 0;
}

.feature-item {
  display: flex;
  gap: 1rem;
  padding: 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.feature-item h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.feature-item p {
  margin: 0;
  font-size: 0.92rem;
}

/* Content blocks */
.prose {
  max-width: 780px;
}

.prose h2 {
  margin-top: 2rem;
}

.prose h3 {
  margin-top: 1.4rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-block {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.25rem;
}

.content-block h3 {
  margin-bottom: 0.65rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.media-frame img {
  width: 100%;
  object-fit: cover;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tag a {
  color: inherit;
}

.tag:hover {
  border-color: var(--brand);
  color: #fff;
}

/* TOC / jump links */
.toc {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}

.toc h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 1.5rem;
}

.toc a {
  color: var(--text-muted);
}

.toc a:hover {
  color: var(--brand-soft);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--text-muted);
}

/* Page hero for inner pages */
.page-hero {
  padding: 2.25rem 0 1rem;
}

.page-hero h1 {
  margin-bottom: 0.65rem;
}

.page-hero p {
  max-width: 42em;
  margin: 0;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-soft), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  margin-bottom: 0.75rem;
}

.error-page p {
  max-width: 28em;
  margin: 0 auto 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #08070a;
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.footer-brand h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.9rem;
}

.footer-col h4 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: #fff;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}

.footer-col a:hover {
  color: var(--brand-soft);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.keywords-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.keywords-bar span {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* Vlog gallery */
.vlog-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.vlog-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
}

.vlog-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vlog-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.6rem 0.55rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  font-size: 0.82rem;
  color: #fff;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.75rem;
}

.faq-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.94rem;
}

/* Internal link box */
.link-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.link-box a {
  display: block;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
}

.link-box a:hover {
  border-color: var(--brand);
  color: var(--brand-soft);
}

.link-box a small {
  display: block;
  font-weight: 400;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-copy,
.hero-visual,
.card,
.feature-item {
  animation: fadeUp 0.6s ease both;
}

.hero-visual { animation-delay: 0.12s; }
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:nth-child(4) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .two-col,
  .footer-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4,
  .vlog-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .toc ol {
    columns: 1;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(12, 10, 13, 0.98);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.25rem;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
  }

  .header-inner {
    position: relative;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .section {
    padding: 2.25rem 0;
  }

  .link-box {
    grid-template-columns: 1fr;
  }

  .feature-item {
    flex-direction: column;
  }

  .feature-item img {
    width: 100%;
    height: 160px;
  }
}

@media (max-width: 480px) {
  body { font-size: 15px; }

  .grid-4,
  .vlog-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
