/* 糖心官网 - Tangxin Vlog */
:root {
  --bg: #070708;
  --bg-elevated: #121214;
  --bg-soft: #1a1a1e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f0eb;
  --text-muted: #a8a29a;
  --accent: #c60018;
  --accent-hot: #e8192c;
  --accent-soft: #ff4d6d;
  --gold: #f0b429;
  --pink: #e84a8a;
  --nav-h: 64px;
  --bar-h: 56px;
  --radius: 10px;
  --max: 1120px;
  --font-display: "Cormorant Garamond", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--bar-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  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;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ff8fa3;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin: 1.25rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 7, 8, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}

.brand img {
  height: 36px;
  width: auto;
}

.brand span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 0.92rem;
  border-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(198, 0, 24, 0.15);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
}

/* Sticky download bar */
.download-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 999;
  background: linear-gradient(180deg, #141416 0%, #0e0e10 100%);
  border-bottom: 1px solid rgba(198, 0, 24, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.download-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0;
  min-height: var(--bar-h);
  align-items: center;
}

.download-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.82rem;
  flex: 1 1 calc(25% - 10px);
  min-width: 140px;
  max-width: 100%;
  transition: border-color 0.2s, transform 0.2s;
  white-space: nowrap;
}

.download-chip:hover {
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.download-chip img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.download-chip .chip-name {
  white-space: nowrap;
  flex-shrink: 0;
}

.download-chip .tag {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Ad slot */
.ad-slot {
  margin: 20px auto;
  padding: 18px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(198, 0, 24, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(232, 74, 138, 0.2), transparent 50%),
    var(--bg-elevated);
  border: 1px solid rgba(198, 0, 24, 0.4);
  border-radius: var(--radius);
  text-align: center;
}

.ad-slot h2 {
  margin-bottom: 0.35rem;
  color: var(--text);
}

.ad-slot p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.ad-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ad-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 110px;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
}

.ad-app img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
}

.ad-app strong {
  font-size: 0.82rem;
  font-weight: 600;
}

.ad-app span {
  font-size: 0.7rem;
  color: var(--gold);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 7, 8, 0.15) 0%,
    rgba(7, 7, 8, 0.35) 45%,
    rgba(7, 7, 8, 0.92) 78%,
    var(--bg) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 48px 0 56px;
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
  animation: fadeUp 0.9s ease both;
}

.hero-content .eyebrow {
  display: inline-block;
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-content h1 {
  margin: 0 0 14px;
  max-width: 16ch;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.65);
}

.hero-content .lead {
  max-width: 38ch;
  font-size: 1.05rem;
  color: rgba(245, 240, 235, 0.88);
  margin-bottom: 24px;
}

.btn-group {
  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;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-hot), var(--pink));
  color: #fff;
  box-shadow: 0 10px 28px rgba(198, 0, 24, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(198, 0, 24, 0.35);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(198, 0, 24, 0);
  }
}

.btn-primary {
  animation: softPulse 2.8s ease-in-out infinite;
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.25);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
}

/* Sections */
.section {
  padding: 48px 0;
}

.section-head {
  margin-bottom: 28px;
  max-width: 52ch;
}

.section-head p {
  margin: 0;
}

.section-label {
  color: var(--accent-soft);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* 3:7 media-text */
.media-row {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 40px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(26, 26, 30, 0.9), rgba(12, 12, 14, 0.95));
  border: 1px solid var(--border);
  border-radius: 14px;
}

.media-row.reverse {
  grid-template-columns: 7fr 3fr;
}

.media-row.reverse .media-visual {
  order: 2;
}

.media-row.reverse .media-copy {
  order: 1;
}

.media-visual {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 9 / 16;
  max-height: 420px;
}

.media-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media-row:hover .media-visual img {
  transform: scale(1.03);
}

.media-copy h3 {
  margin-top: 0;
  color: var(--text);
}

.media-copy p {
  font-size: 0.98rem;
}

/* Grids */
.video-grid,
.artist-grid,
.drama-grid {
  display: grid;
  gap: 16px;
}

.video-grid {
  grid-template-columns: repeat(4, 1fr);
}

.artist-grid {
  grid-template-columns: repeat(4, 1fr);
}

.drama-grid {
  grid-template-columns: repeat(4, 1fr);
}

.card-video,
.card-artist,
.card-drama {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}

a.card-video {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card-video:hover {
  color: inherit;
}

.card-video:hover,
.card-artist:hover,
.card-drama:hover {
  transform: translateY(-4px);
  border-color: rgba(198, 0, 24, 0.5);
}

.card-video .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.card-drama .thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111;
}

.card-video .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0a0a0a;
}

.card-drama .thumb img,
.card-artist img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-video .meta,
.card-drama .meta {
  padding: 12px 12px 14px;
}

.card-video h3,
.card-drama h3 {
  font-family: var(--font-body);
  font-size: 0.92rem;
  margin: 0 0 6px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-video .actor,
.card-drama .tag {
  font-size: 0.8rem;
  color: var(--accent-soft);
}

.card-artist {
  text-align: center;
  padding-bottom: 14px;
}

.card-artist .avatar-wrap {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.card-artist h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin: 12px 0 0;
}

/* Article / SEO prose */
.prose {
  max-width: none;
}

.seo-block.prose,
.seo-block .prose,
.prose > .seo-block {
  max-width: none;
}

.prose h2 {
  margin-top: 2rem;
  color: var(--text);
}

.prose h3 {
  color: rgba(245, 240, 235, 0.95);
}

.prose ul,
.prose ol {
  color: var(--text-muted);
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.seo-block {
  margin: 36px 0;
  padding: 28px 24px;
  background:
    linear-gradient(160deg, rgba(198, 0, 24, 0.08), transparent 40%),
    var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.seo-block a {
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 77, 109, 0.45);
}

/* Page hero compact */
.page-hero {
  padding: 36px 0 12px;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(198, 0, 24, 0.25), transparent 50%),
    var(--bg);
}

.page-hero h1 {
  margin: 0 0 10px;
}

/* Download page */
.app-list {
  display: grid;
  gap: 16px;
}

.app-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.app-item img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
}

.app-item h3 {
  margin: 0 0 4px;
  font-family: var(--font-body);
}

.app-item p {
  margin: 0;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 40px 0 28px;
  border-top: 1px solid var(--border);
  background: #050506;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand img {
  height: 40px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

/* Error pages */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 60px 0;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-hot), var(--pink), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

/* TOC */
.toc {
  padding: 16px 18px;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.toc ul {
  margin: 0;
  padding-left: 1.1rem;
  columns: 2;
  gap: 24px;
}

.toc li {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 960px) {
  .video-grid,
  .artist-grid,
  .drama-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .media-row,
  .media-row.reverse {
    grid-template-columns: 3fr 7fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 56px;
    --bar-h: auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: rgba(10, 10, 12, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .nav-cta {
    display: none;
  }

  .download-chip {
    flex: 1 1 calc(50% - 8px);
    min-width: calc(50% - 8px);
    gap: 6px;
    padding: 5px 8px 5px 5px;
    font-size: 0.78rem;
  }

  .download-chip img {
    width: 28px;
    height: 28px;
  }

  .download-chip .tag {
    display: none;
  }

  .download-bar-inner {
    gap: 8px;
  }

  .media-row,
  .media-row.reverse {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .media-row.reverse .media-visual,
  .media-row.reverse .media-copy {
    order: unset;
  }

  .media-visual {
    max-height: 360px;
    aspect-ratio: 3 / 4;
    max-width: 280px;
    margin-inline: auto;
  }

  /* Keep visual ~30% feel on mobile via constrained width */
  .media-row {
    text-align: left;
  }

  .hero {
    min-height: 72vh;
  }

  .hero-content h1 {
    max-width: none;
  }

  .app-item {
    grid-template-columns: 56px 1fr;
  }

  .app-item .btn {
    grid-column: 1 / -1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toc ul {
    columns: 1;
  }

  .section {
    padding: 36px 0;
  }
}

@media (max-width: 480px) {
  .video-grid,
  .artist-grid,
  .drama-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card-video h3,
  .card-drama h3 {
    font-size: 0.8rem;
  }

  .ad-app {
    width: calc(50% - 8px);
  }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}
