/* 糖心vlog - tv-log.club */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@600;700&display=swap");

:root {
  --brand: #e83e8c;
  --brand-dark: #c2185b;
  --brand-light: #fff0f6;
  --accent: #ff8a00;
  --accent-soft: #fff4e6;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
  --bg: #faf8f6;
  --bg-white: #ffffff;
  --border: #eee4e8;
  --shadow: 0 4px 24px rgba(232, 62, 140, 0.08);
  --radius: 12px;
  --max: 1100px;
  --header-h: 64px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-dark); }
ul, ol { padding-left: 1.25em; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav a:hover, .nav a.active {
  color: var(--brand);
  background: var(--brand-light);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .25s;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #fff5eb 0%, #ffe8f0 45%, #f3e8ff 100%);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255, 138, 0, 0.15), transparent),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(232, 62, 140, 0.12), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 36em;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #fff;
  box-shadow: 0 4px 16px rgba(232, 62, 140, 0.35);
}
.btn-primary:hover { color: #fff; }
.btn-outline {
  background: var(--bg-white);
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn-outline:hover { background: var(--brand-light); color: var(--brand-dark); }

.hero-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.hero-visual img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-white); }
.section-head { margin-bottom: 32px; text-align: center; }
.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-bottom: 10px;
}
.section-head p {
  color: var(--text-secondary);
  max-width: 40em;
  margin: 0 auto;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: box-shadow .2s, border-color .2s;
}
.feature-card:hover {
  box-shadow: var(--shadow);
  border-color: #f5c6d8;
}
.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; color: var(--text-secondary); }

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.cat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.cat-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.cat-item .cat-label {
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.cat-item .cat-desc {
  padding: 0 14px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Content blocks */
.content-block { margin-bottom: 40px; }
.content-block h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-light);
}
.content-block h3 {
  font-size: 1.15rem;
  margin: 24px 0 12px;
  color: var(--brand-dark);
}
.content-block p { margin-bottom: 14px; color: var(--text-secondary); }
.content-block ul, .content-block ol { margin-bottom: 14px; color: var(--text-secondary); }
.content-block li { margin-bottom: 6px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin: 36px 0;
}
.split.reverse .split-text { order: 2; }
.split.reverse .split-media { order: 1; }
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.split-media img { width: 100%; aspect-ratio: 16/11; object-fit: cover; }

.img-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.img-row img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.vlog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.vlog-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-white);
}
.vlog-grid img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}
.vlog-grid figcaption {
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--brand);
  font-weight: 400;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body {
  padding: 0 20px 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span { margin: 0 6px; }

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, #fff5eb, #ffe8f0);
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.page-hero p { color: var(--text-secondary); max-width: 36em; }

.page-body {
  padding: 40px 20px 56px;
  max-width: 800px;
}
.page-body h2 {
  font-size: 1.3rem;
  margin: 32px 0 12px;
  color: var(--text);
}
.page-body h3 {
  font-size: 1.05rem;
  margin: 20px 0 10px;
  color: var(--brand-dark);
}
.page-body p { margin-bottom: 14px; color: var(--text-secondary); }
.page-body ul, .page-body ol { margin-bottom: 14px; color: var(--text-secondary); }
.page-body li { margin-bottom: 6px; }

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(145deg, #fff5eb, #ffe8f0);
}
.error-page .code {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}
.error-page h1 { font-size: 1.5rem; margin-bottom: 12px; }
.error-page p { color: var(--text-secondary); margin-bottom: 28px; max-width: 28em; margin-left: auto; margin-right: auto; }

/* Internal links box */
.links-box {
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px 0;
}
.links-box h3 { font-size: 1rem; margin-bottom: 10px; }
.links-box ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.links-box a { font-weight: 500; }

/* Footer */
.site-footer {
  background: #1f1520;
  color: #c9b8c4;
  padding: 48px 0 24px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 36px; height: 36px; border-radius: 8px; }
.footer-brand span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.site-footer p { line-height: 1.7; margin-bottom: 8px; }
.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-family: var(--font);
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #c9b8c4; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: #8a7580;
}

/* TOC */
.toc {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.toc h2 { font-size: 1rem; margin-bottom: 12px; font-family: var(--font); }
.toc ol { margin: 0; padding-left: 1.3em; color: var(--text-secondary); font-size: 0.92rem; }
.toc li { margin-bottom: 4px; }

/* Mobile */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .vlog-grid { grid-template-columns: 1fr 1fr; }
  .img-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .split { grid-template-columns: 1fr; gap: 20px; }
  .split.reverse .split-text,
  .split.reverse .split-media { order: unset; }
}

@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .hero { padding: 36px 0 32px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }

  /* 内页移动端文字外边距（不含首页） */
  .page-hero { padding: 28px 16px 22px; }
  .page-hero .container { padding-left: 0; padding-right: 0; }
  .page-body { padding: 28px 16px 48px; }
  .error-page { padding: 48px 16px; }
  .error-page > div { padding: 0 4px; }
  .site-footer .footer-grid,
  .site-footer .footer-bottom { padding-left: 0; padding-right: 0; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .vlog-grid { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 24px 18px 20px; }
  .page-body { padding: 24px 18px 40px; }
  .error-page { padding: 40px 18px; }
}
