/* 糖心Vlog 官网 - 品牌主题 */
:root {
  --bg: #12080c;
  --bg-soft: #1c0f14;
  --bg-card: #241318;
  --text: #f7f2f4;
  --text-muted: #c9b4bb;
  --primary: #b01e3a;
  --primary-dark: #7a1428;
  --gold: #d4a85a;
  --accent-start: #f6c84c;
  --accent-mid: #f07a4a;
  --accent-end: #e23a7b;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --nav-h: 58px;
  --max: 1100px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(226, 58, 123, 0.18), transparent 60%),
    radial-gradient(900px 400px at 0% 0%, rgba(176, 30, 58, 0.28), transparent 55%),
    var(--bg);
  line-height: 1.75;
  font-size: 16px;
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: #ffd27a; }
ul, ol { padding-left: 1.2em; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 0.7em; font-weight: 700; }
h1 { font-size: clamp(1.55rem, 4.5vw, 2.15rem); }
h2 { font-size: clamp(1.25rem, 3.5vw, 1.65rem); color: #fff; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; color: var(--text-muted); }
strong { color: #fff; }

.container {
  width: min(100% - 28px, var(--max));
  margin-inline: auto;
}

/* 顶部导航 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(14, 6, 9, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.brand span { font-size: 1.05rem; }

.nav-links {
  display: none;
  gap: 6px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(176, 30, 58, 0.35);
}

.menu-btn {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: 0.2s;
}

.menu-btn span::before { top: -6px; position: absolute; }
.menu-btn span::after { top: 6px; position: absolute; }

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(18, 8, 12, 0.98);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 18px;
}

.mobile-nav.open { display: grid; gap: 8px; }
.mobile-nav a {
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
}

/* 站点广告位：内容顶部，下滑固定在导航下方 */
.site-ads {
  position: sticky;
  top: var(--nav-h);
  z-index: 980;
  margin: 12px 0 18px;
  padding: 10px 12px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.site-ads:empty { display: none; }

/* 防止全局 img 规则把广告图标左右压扁 */
.site-ads #ads > div {
  flex-shrink: 0;
  min-width: 70px;
}
.site-ads #ads img {
  width: 65px !important;
  height: 65px !important;
  max-width: none !important;
  min-width: 65px;
  min-height: 65px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  flex-shrink: 0;
}

/* Hero：移动端上图下文；PC 左文案右配图 */
.hero {
  margin-bottom: 18px;
  background: #1a0a0e;
  padding: 12px 0 8px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-media {
  width: 100%;
  line-height: 0;
  background: #2a0f16;
  border-radius: 12px;
  overflow: hidden;
  order: -1; /* 移动端图片在上 */
}

.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center top;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4px 0 8px;
}

.hero-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 90, 0.45);
  color: var(--gold);
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.hero h1 {
  margin-bottom: 10px;
}

.hero p {
  max-width: 42em;
  color: #f0dde3;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-mid), var(--accent-end));
  box-shadow: 0 8px 22px rgba(226, 58, 123, 0.35);
}

.btn-ghost {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 14px 0 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.breadcrumb a { color: var(--gold); }
.breadcrumb span { opacity: 0.7; }

/* 图文 3:7 */
.section {
  margin: 28px 0;
  padding: 8px 0 4px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head p { margin-bottom: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  margin: 18px 0;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.split-media {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
  max-height: 420px;
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.split-body h3 { margin-top: 0; }
.split.reverse .split-media { order: 0; }

.toc {
  margin: 16px 0 26px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.toc h2 { font-size: 1.05rem; margin-bottom: 8px; }
.toc ol { margin: 0; color: var(--text-muted); }
.toc a { color: var(--gold); }

/* 卡片网格 */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 12px;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.card-media {
  aspect-ratio: 3 / 4;
  background: #000;
  overflow: hidden;
}

.card-media.wide { aspect-ratio: 16 / 10; }

/* 最新视频：完整显示封面，不裁切 */
.card-media.video-cover {
  aspect-ratio: auto;
  background: #14090c;
}

.card-media.video-cover img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body { padding: 12px; }
.card-body h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body p {
  margin: 0;
  font-size: 0.88rem;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(176, 30, 58, 0.25);
  border: 1px solid rgba(226, 58, 123, 0.3);
  color: #ffd0dc;
  font-size: 0.78rem;
}

.prose h2 {
  margin-top: 1.4em;
  padding-top: 0.4em;
  border-top: 1px solid var(--line);
}

.prose h2:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.prose ul li,
.prose ol li {
  margin-bottom: 0.45em;
  color: var(--text-muted);
}

.faq details {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
}

.faq details p { margin: 10px 0 0; }

.note {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(212, 168, 90, 0.08);
  border: 1px solid rgba(212, 168, 90, 0.28);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.related {
  margin: 28px 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.related ul { margin: 0; }
.related a { font-weight: 600; }

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  background: #0a0507;
}

.footer-grid {
  display: grid;
  gap: 18px;
}

.site-footer h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.site-footer a {
  display: inline-block;
  margin: 4px 0;
  color: var(--text-muted);
}

.site-footer a:hover { color: var(--gold); }

.copyright {
  margin-top: 18px;
  font-size: 0.82rem;
  color: #8e757c;
}

.error-page {
  min-height: 60vh;
  display: grid;
  align-content: center;
  text-align: center;
  padding: 40px 0;
}

.error-page .code {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

@media (min-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  body { font-size: 17px; }
  .menu-btn { display: none; }
  .nav-links { display: flex; }
  .brand img { width: 40px; height: 40px; }

  .hero {
    padding: 28px 0 18px;
  }
  .hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
  }
  .hero-media {
    order: 0;
    border-radius: 16px;
    align-self: center;
  }
  .hero-media img {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: contain;
    object-position: center center;
  }
  .hero-content { padding: 0; }
  .hero p { max-width: none; }

  .video-grid { grid-template-columns: repeat(4, 1fr); }

  .split {
    grid-template-columns: 3fr 7fr;
    gap: 22px;
    padding: 18px;
  }

  .split.reverse {
    grid-template-columns: 7fr 3fr;
  }

  .split.reverse .split-media { order: 2; }
  .split-media { max-height: 480px; }

  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (max-width: 380px) {
  .grid-3 { grid-template-columns: 1fr; }
}
