/* 糖心Vlog官网 - 视频站风格 · 移动端优先 */
:root {
  --bg: #0b0b0f;
  --bg-2: #14141c;
  --bg-3: #1c1c28;
  --surface: #22222f;
  --text: #f5f5f7;
  --text-muted: #a8a8b8;
  --border: rgba(255, 255, 255, 0.08);
  --pink: #ff2d7a;
  --orange: #ff8a1f;
  --magenta: #d41a9c;
  --yellow: #ffc73a;
  --gradient: linear-gradient(135deg, #ffc73a 0%, #ff8a1f 35%, #ff2d7a 70%, #c41a9c 100%);
  --gradient-soft: linear-gradient(135deg, rgba(255, 138, 31, 0.18), rgba(255, 45, 122, 0.18));
  --nav-h: 52px;
  --ad-h: 84px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", "STSong", serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
  padding-top: calc(var(--nav-h) + var(--ad-h));
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 45, 122, 0.22), transparent),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(255, 138, 31, 0.12), transparent),
    linear-gradient(180deg, #0b0b0f 0%, #101018 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #ff8eb5;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffc73a;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 0.75em;
}

h1 {
  font-size: clamp(1.55rem, 5vw, 2.35rem);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  position: relative;
  padding-left: 0.7em;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient);
}

h3 {
  font-size: 1.1rem;
  color: #ffe0ec;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

ul, ol {
  color: var(--text-muted);
  padding-left: 1.25em;
}

.container {
  width: min(100% - 28px, var(--max));
  margin-inline: auto;
}

/* ===== Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  overflow: visible;
  background: rgba(11, 11, 15, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  height: var(--nav-h);
  max-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  background: #000;
}

.brand span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin-right: -4px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.nav-toggle span {
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.25s;
}

.nav-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: none;
  flex-direction: column;
  padding: 8px 0;
  z-index: 1001;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.nav-menu.open {
  display: flex;
}

.nav-menu a {
  color: var(--text);
  padding: 12px 20px;
  font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #ffc73a;
  background: rgba(255, 45, 122, 0.08);
}

/* 下载区：顶部固定，一排两个图标 */
.download-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 999;
  height: var(--ad-h);
  max-height: var(--ad-h);
  overflow: hidden;
  background: linear-gradient(180deg, #1a1220 0%, #141018 100%);
  border-bottom: 1px solid rgba(255, 45, 122, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.download-bar.bar-flash .download-bar-inner {
  box-shadow: inset 0 0 0 1px rgba(255, 199, 58, 0.55);
}

.download-bar-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 100%;
  max-height: var(--ad-h);
  padding: 5px 0;
  overflow: hidden;
  align-content: stretch;
}

.download-item {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.download-item:hover {
  border-color: rgba(255, 45, 122, 0.5);
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 138, 31, 0.15), rgba(255, 45, 122, 0.15));
}

.download-item img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.download-item .meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.download-item .name {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.download-item .tag {
  font-size: 0.6rem;
  color: #ffb347;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-item .btn-mini {
  display: none;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
}

/* Hero：配图全幅展示，文案放图下方，避免遮挡 */
.hero {
  position: relative;
  display: block;
  overflow: hidden;
  margin-bottom: 28px;
  background: #120c14;
}

.hero-bg {
  position: relative;
  width: 100%;
  line-height: 0;
  background: #120c14;
}

.hero-bg img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center top;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 18px 0 8px;
  width: min(100% - 28px, var(--max));
  margin-inline: auto;
  animation: fadeUp 0.8s ease both;
}

.hero-content .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #ffc73a;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.hero-content h1 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 4.5vw, 2rem);
}

.hero-content .lead {
  max-width: 40em;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  color: #fff;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 45, 122, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Ad block */
.ad-block {
  scroll-margin-top: calc(var(--nav-h) + 12px);
  margin: 0 0 28px;
  padding: 18px 16px;
  border-radius: var(--radius);
  background:
    var(--gradient-soft),
    var(--bg-2);
  border: 1px solid rgba(255, 45, 122, 0.28);
  box-shadow: var(--shadow);
  animation: pulseBorder 3s ease-in-out infinite;
}

.ad-block h2 {
  margin-bottom: 6px;
  padding-left: 0;
}

.ad-block h2::before {
  display: none;
}

.ad-block .ad-desc {
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.ad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ad-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  min-width: 0;
}

.ad-card:hover {
  border-color: rgba(255, 199, 58, 0.55);
  color: var(--text);
}

.ad-card img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: cover;
}

.ad-card .info {
  flex: 1 1 auto;
  min-width: 0;
}

.ad-card .info strong {
  display: block;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-card .info small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-card .dl {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

/* Sections */
.section {
  margin-bottom: 40px;
}

.section-intro {
  margin-bottom: 18px;
}

/* 3:7 content rows */
.ratio-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ratio-row .media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
  max-height: 420px;
}

.ratio-row .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.ratio-row .copy h3 {
  margin-top: 0;
}

.ratio-row.reverse .media {
  order: 0;
}

/* Cards grids - video / artist / drama */
.video-grid,
.artist-grid,
.drama-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.video-card,
.drama-card {
  display: block;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.video-card:hover,
a.drama-card:hover,
a.artist-card:hover {
  color: inherit;
}

.video-card:hover,
.drama-card:hover,
.artist-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 45, 122, 0.45);
}

/* 视频封面多为 16:9，短剧海报多为 9:16，按真实比例完整展示 */
.video-card .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0a0e;
}

.drama-card .thumb {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #0a0a0e;
}

.video-card .thumb img,
.drama-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s ease;
}

.video-card:hover .thumb img,
.drama-card:hover .thumb img {
  transform: scale(1.03);
}

.video-card .body,
.drama-card .body {
  padding: 10px;
}

.video-card h3,
.drama-card h3 {
  font-size: 0.82rem;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.video-card .actor,
.drama-card .tag {
  font-size: 0.72rem;
  color: #ffb347;
}

.artist-grid {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

.artist-card {
  text-align: center;
  padding: 14px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  overflow: visible;
}

.artist-card img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin: 0 auto 10px;
  border: 2px solid transparent;
  background: var(--gradient);
  padding: 2px;
  aspect-ratio: 1 / 1;
}

.artist-card strong {
  display: block;
  font-size: 0.9rem;
  padding: 0;
}

.artist-card span {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0;
}

/* Article / SEO blocks */
.article-block {
  margin-bottom: 28px;
  padding: 20px 16px;
  background: var(--bg-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.article-block p,
.article-block li {
  font-size: 0.95rem;
}

.article-block a.seo-link {
  color: #ffc73a;
  font-weight: 700;
  border-bottom: 1px dashed rgba(255, 199, 58, 0.5);
}

.faq details {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: #ffe0ec;
}

.faq details p {
  margin: 10px 0 0;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 18px 0 20px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.breadcrumb a {
  color: #ff8eb5;
}

.breadcrumb span {
  color: var(--text);
}

/* Page content */
.page-hero {
  padding: 24px 0 8px;
}

.page-content {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  margin-bottom: 36px;
}

.page-content h2 {
  margin-top: 1.4em;
}

.page-content h2:first-child {
  margin-top: 0;
}

/* Error pages */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 40px 0;
}

.error-page .code {
  font-size: clamp(4rem, 18vw, 7rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 12px;
  font-family: var(--font-display);
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 36px 0 28px;
  background: #08080c;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-grid h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.footer-grid a {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 4px 0;
}

.footer-grid a:hover {
  color: #ffc73a;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.copyright {
  font-size: 0.78rem;
  color: #6e6e80;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  text-align: center;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseBorder {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 45, 122, 0.15), var(--shadow);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 45, 122, 0.08), var(--shadow);
  }
}

/* 默认可见，避免超高区块因 IO threshold 一直透明造成空白 */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js-reveal .reveal.is-waiting {
  opacity: 0;
  transform: translateY(14px);
}

html.js-reveal .reveal.visible {
  opacity: 1;
  transform: none;
}

/* Tablet+ */
@media (min-width: 640px) {
  :root {
    --nav-h: 56px;
    --ad-h: 96px;
  }

  .download-bar-inner {
    gap: 8px;
    padding: 6px 0;
  }

  .download-item {
    gap: 8px;
    padding: 6px 12px;
    border-radius: 10px;
  }

  .download-item img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .download-item .name {
    font-size: 0.82rem;
  }

  .download-item .tag {
    font-size: 0.65rem;
  }

  .download-item .btn-mini {
    display: inline-flex;
  }

  .ad-grid {
    grid-template-columns: 1fr 1fr;
  }

  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .artist-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .drama-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .ratio-row {
    grid-template-columns: 3fr 7fr;
    align-items: center;
    gap: 24px;
    padding: 20px;
  }

  .ratio-row.reverse {
    grid-template-columns: 7fr 3fr;
  }

  .ratio-row.reverse .media {
    order: 2;
  }

  .ratio-row .media {
    aspect-ratio: 9 / 16;
    max-height: 480px;
  }
}

@media (min-width: 900px) {
  .ad-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex !important;
    flex-direction: row;
    background: transparent;
    border: 0;
    padding: 0;
    gap: 4px;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    z-index: auto;
  }

  .nav-menu a {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .download-item .btn-mini {
    display: none;
  }
}
