/* ============================================================
   Raw Collage Theme — 手机福利视频
   主色 #fafaf8 · 辅色 #4a4a4a · 墨色 #1a1a1a
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
  line-height: 1.65;
  scroll-behavior: auto;
  background: #fafaf8;
  color: #1a1a1a;
}

body {
  font-family: 'Rubik', 'Nunito Sans', system-ui, sans-serif;
  background: #fafaf8;
  color: #1a1a1a;
  overflow-x: hidden;
  padding-bottom: 72px; /* bottom nav height */
}

a {
  color: #1a1a1a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #4a4a4a;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.2rem, 3.5vw, 1.8rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1rem, 2.5vw, 1.25rem); margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

ul, ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

/* ---------- Sketch / Raw decorations ---------- */
.sketch-rect {
  display: block;
  width: 80%;
  height: 80%;
  border: 2px solid #1a1a1a;
  transform: rotate(-1.5deg);
  opacity: 0.18;
}

.sketch-line {
  display: block;
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #1a1a1a 0, #1a1a1a 8px, transparent 8px, transparent 14px);
  opacity: 0.25;
  transform: rotate(-0.4deg);
}

.section-deco {
  margin: 1.5rem 0;
  border: none;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a4a4a;
  margin-bottom: 0.5rem;
  border-left: 3px solid #1a1a1a;
  padding-left: 0.5rem;
}

/* ---------- Hero ---------- */
.hero-wrap,
.topic-hero,
.tag-hero {
  position: relative;
  min-height: 45vh;
  background: #1a1a1a;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-inner,
.topic-hero-inner,
.tag-hero-inner {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.5rem 4rem;
  width: 100%;
  text-align: center;
  color: #fafaf8;
}

.hero-inner h1,
.topic-hero-inner h1,
.tag-hero-inner h1 {
  color: #fafaf8;
}

.hero-sub {
  color: rgba(250,250,248,0.8);
  font-size: 1rem;
  max-width: 560px;
  margin: 0.75rem auto 0;
}

.hero-clip {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: #fafaf8;
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}

.hero-fig {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: grayscale(40%) contrast(1.1);
}

/* ---------- Bottom Fixed Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #1a1a1a;
  border-top: 2px solid #4a4a4a;
  height: 64px;
  display: flex;
  align-items: center;
}

.bottom-nav nav {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bottom-nav nav::-webkit-scrollbar {
  display: none;
}

.bottom-nav nav > p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
  padding: 0 0.5rem;
}

.bottom-nav nav > p > a {
  color: rgba(250,250,248,0.8);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.6rem 0.55rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
  letter-spacing: 0.01em;
  border-right: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.bottom-nav nav > p > a:last-child {
  border-right: none;
}

.bottom-nav nav > p > a:hover {
  color: #fafaf8;
}

.brand-center {
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  color: #fafaf8 !important;
  background: #4a4a4a;
  padding: 0.4rem 0.75rem !important;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ---------- Layout Containers ---------- */
.home-main,
.topic-main,
.tag-main,
.article-main,
.about-main,
.privacy-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 2rem;
}

/* ---------- Section: Content + Sidebar ---------- */
.section-content,
.article-body-section,
.about-body-section,
.privacy-body-section {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Sidebar left */
.sidebar {
  flex: 0 0 220px;
  min-width: 0;
  border-right: 2px dashed rgba(26,26,26,0.2);
  padding-right: 1.5rem;
  transform: rotate(-0.3deg);
}

.sidebar h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 0.3rem;
}

.sidebar h3 {
  font-size: 0.85rem;
  margin: 1rem 0 0.5rem;
  color: #4a4a4a;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-nav a {
  font-size: 0.88rem;
  text-decoration: none;
  padding: 0.3rem 0.4rem;
  border-left: 2px solid transparent;
  transition: border-color 0.1s, background 0.1s;
  line-height: 1.4;
}

.sidebar-nav a:hover {
  border-left-color: #1a1a1a;
  background: rgba(26,26,26,0.04);
}

.sidebar-home-link,
.sidebar-home a {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: #4a4a4a;
}

.sidebar-links {
  margin-top: 1rem;
}

.sidebar-links a {
  display: block;
  font-size: 0.85rem;
  padding: 0.25rem 0;
}

.sidebar-note {
  margin-top: 1rem;
  background: rgba(26,26,26,0.05);
  padding: 0.75rem;
  border-left: 3px solid #1a1a1a;
  transform: rotate(0.5deg);
}

.sidebar-note p {
  font-size: 0.82rem;
  margin: 0;
}

/* ---------- Content Body ---------- */
.content-body {
  flex: 1;
  min-width: 0;
}

/* ---------- Prose ---------- */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: #1a1a1a;
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(26,26,26,0.15);
  padding-bottom: 0.3rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose a {
  color: #1a1a1a;
  font-weight: 600;
}

.prose ul, .prose ol {
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.3rem;
}

.prose img {
  border: 2px solid #1a1a1a;
  margin: 1.5rem 0;
  transform: rotate(-0.8deg);
}

.prose blockquote {
  border-left: 4px solid #1a1a1a;
  padding: 0.75rem 1rem;
  background: rgba(26,26,26,0.04);
  margin: 1.5rem 0;
  transform: rotate(0.4deg);
}

/* ---------- Tag Cloud ---------- */
.tag-cloud {
  margin-top: 1.25rem;
}

.tag-pill {
  display: inline-block;
  background: #1a1a1a;
  color: #fafaf8;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  margin: 0.2rem 0.15rem 0.2rem 0;
  transform: rotate(-0.6deg);
  transition: background 0.1s;
}

.tag-pill:hover {
  background: #4a4a4a;
  color: #fafaf8;
}

/* ---------- Cards ---------- */
.topic-list,
.child-list,
.recent-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.topic-card,
.child-card,
.recent-card,
.tag-card {
  border: 2px solid #1a1a1a;
  border-radius: 4px;
  padding: 1rem;
  background: #fafaf8;
  border-bottom: 5px solid #1a1a1a;
  transform: rotate(calc(var(--card-tilt, 0) * 1deg));
  transition: transform 0.15s;
  position: relative;
}

.topic-list li:nth-child(odd) .topic-card,
.child-list li:nth-child(odd) .child-card,
.recent-list li:nth-child(odd) .recent-card {
  --card-tilt: -0.6;
}
.topic-list li:nth-child(even) .topic-card,
.child-list li:nth-child(even) .child-card,
.recent-list li:nth-child(even) .recent-card {
  --card-tilt: 0.4;
}

.topic-card:hover,
.child-card:hover,
.recent-card:hover,
.tag-card:hover {
  transform: rotate(0deg) translateY(-3px);
}

.card-fig {
  width: 100%;
  height: 140px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: rgba(26,26,26,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.card-fig--empty {
  border: 2px dashed rgba(26,26,26,0.3);
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05);
}

.card-date {
  font-size: 0.78rem;
  color: #4a4a4a;
  display: block;
  margin-bottom: 0.4rem;
}

.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 1px;
}

.card-link:hover {
  color: #4a4a4a;
  border-color: #4a4a4a;
}

/* ---------- Section Titles ---------- */
.section-topics,
.section-recent,
.section-children,
.section-tagged,
.about-links-section,
.privacy-footer-section,
.article-footer-section {
  margin-bottom: 3rem;
}

.section-topics > h2,
.section-recent > h2,
.section-children > h2,
.section-tagged > h2 {
  margin-bottom: 1.25rem;
}

/* ---------- Article Layout ---------- */
.article-hero-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  padding: 2rem 0 1rem;
}

.art-hero-fig {
  flex: 0 0 320px;
  height: 220px;
  overflow: hidden;
  border: 2px solid #1a1a1a;
  border-bottom: 5px solid #1a1a1a;
  border-radius: 4px;
  transform: rotate(-1deg);
}

.art-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%) contrast(1.1);
}

.article-meta-aside {
  flex: 1;
  min-width: 0;
}

.breadcrumb {
  font-size: 0.82rem;
  text-decoration: none;
  color: #4a4a4a;
  display: block;
  margin-bottom: 0.75rem;
}

.art-dates {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.art-date {
  font-size: 0.8rem;
  color: #4a4a4a;
  font-style: italic;
}

.art-desc {
  font-size: 1rem;
  color: #4a4a4a;
  border-left: 3px solid #1a1a1a;
  padding-left: 0.75rem;
  margin-top: 0.75rem;
}

.article-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid #1a1a1a;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  transition: background 0.1s;
}

.article-nav-links a:hover {
  background: #1a1a1a;
  color: #fafaf8;
}

.article-nav-aside {
  background: rgba(26,26,26,0.04);
  border: 1.5px dashed rgba(26,26,26,0.25);
  padding: 1.25rem;
  border-radius: 4px;
  transform: rotate(-0.3deg);
}

/* ---------- About ---------- */
.about-intro-section {
  display: flex;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 2rem;
  border-bottom: 2px solid #1a1a1a;
  margin-bottom: 2.5rem;
}

.about-hero-fig {
  flex: 0 0 260px;
  height: 200px;
  overflow: hidden;
  border: 2px solid #1a1a1a;
  transform: rotate(-1.2deg);
  border-radius: 4px;
}

.about-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-intro-aside {
  flex: 1;
}

.about-brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.about-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.topic-link-btn {
  display: inline-block;
  border: 2px solid #1a1a1a;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 3px;
  font-size: 0.9rem;
  transition: background 0.1s, color 0.1s;
}

.topic-link-btn:hover {
  background: #1a1a1a;
  color: #fafaf8;
}

/* ---------- Privacy ---------- */
.privacy-header-section {
  display: flex;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 2px dashed rgba(26,26,26,0.3);
}

.privacy-meta {
  flex: 1;
}

.privacy-deco {
  flex: 0 0 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.privacy-more {
  padding: 1.25rem;
  border: 1.5px solid #1a1a1a;
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 3px;
}

.privacy-more a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(26,26,26,0.15);
}

/* ---------- Recent / children meta ---------- */
.recent-tags,
.children-meta,
.tagged-count,
.about-topics-meta {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #4a4a4a;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid #1a1a1a;
  padding: 1rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer p {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
}

.site-footer p a {
  text-decoration: none;
  font-weight: 700;
}

.site-footer small {
  font-size: 0.78rem;
  color: #4a4a4a;
}

.site-footer small a {
  color: #4a4a4a;
  text-decoration: none;
  font-weight: 500;
}

.site-footer small a:hover {
  color: #1a1a1a;
}

/* ---------- Carousel / Rotation Animation ---------- */
@keyframes card-jitter {
  0%, 100% { transform: rotate(-0.6deg); }
  50% { transform: rotate(0.4deg); }
}

.topic-card:not(:hover) {
  animation: card-jitter 6s ease-in-out infinite;
}

.topic-list li:nth-child(2) .topic-card:not(:hover) {
  animation-delay: -2s;
}
.topic-list li:nth-child(3) .topic-card:not(:hover) {
  animation-delay: -4s;
}

/* ---------- Responsive: Tablet ---------- */
@media (max-width: 768px) {
  .section-content,
  .article-body-section,
  .about-body-section,
  .privacy-body-section {
    flex-direction: column;
  }

  .sidebar {
    flex: none;
    border-right: none;
    border-bottom: 2px dashed rgba(26,26,26,0.2);
    padding-right: 0;
    padding-bottom: 1.25rem;
    transform: none;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .article-hero-section {
    flex-direction: column;
  }

  .art-hero-fig {
    flex: none;
    width: 100%;
    height: 180px;
  }

  .about-intro-section {
    flex-direction: column;
  }

  .about-hero-fig {
    flex: none;
    width: 100%;
    height: 180px;
  }

  .privacy-header-section {
    flex-direction: column;
  }

  .privacy-deco {
    display: none;
  }

  .topic-list,
  .child-list,
  .recent-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Responsive: Mobile 375px ---------- */
@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  .hero-inner,
  .topic-hero-inner,
  .tag-hero-inner {
    padding: 2rem 1rem 3.5rem;
  }

  .home-main,
  .topic-main,
  .tag-main,
  .article-main,
  .about-main,
  .privacy-main {
    padding: 1.25rem 0.875rem;
  }

  .topic-list,
  .child-list,
  .recent-list {
    grid-template-columns: 1fr;
  }

  .bottom-nav nav > p {
    justify-content: flex-start;
    padding: 0 0.25rem;
  }

  .bottom-nav nav > p > a {
    font-size: 0.65rem;
    padding: 0.5rem 0.4rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .article-nav-links {
    flex-direction: column;
  }

  .art-hero-fig {
    height: 160px;
  }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
