@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

/* ===========================
   CSS 自定义属性
=========================== */
:root {
  --c-white: #ffffff;
  --c-bg: #f5f5f5;
  --c-dark: #1f1f1f;
  --c-mid: #3a3a3a;
  --c-muted: #6b6b6b;
  --c-border: #e0e0e0;
  --c-accent: #1f1f1f;
  --c-accent-light: #3d3d3d;
  --c-glass: rgba(255,255,255,0.72);
  --c-glass-border: rgba(255,255,255,0.5);
  --radius-card: 16px;
  --radius-sm: 10px;
  --radius-btn: 8px;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-card-hover: 0 12px 32px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.06);
  --font-head: 'Lexend Mega', 'Public Sans', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
  --header-h: 60px;
  --bnav-h: 64px;
  --aside-w: 220px;
  --content-max: 900px;
  --gap: 16px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-dark);
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: var(--bnav-h);
}

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

a {
  color: var(--c-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ===========================
   Site Wrap
=========================== */
.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===========================
   Header
=========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--c-dark);
  height: var(--header-h);
  border-bottom: 2px solid rgba(255,255,255,0.08);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-mark img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-icon {
  font-size: 22px;
  color: var(--c-white);
  font-family: var(--font-head);
  font-weight: 900;
}

.top-nav {
  flex: 1;
  overflow: hidden;
}

.top-nav p {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav p::-webkit-scrollbar {
  display: none;
}

.top-nav p a {
  color: rgba(255,255,255,0.75);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius-btn);
  transition: color var(--transition), background var(--transition);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.top-nav p a:hover,
.top-nav p a[aria-current="page"] {
  color: var(--c-white);
  background: rgba(255,255,255,0.12);
  text-decoration: none;
}

/* ===========================
   Main Layout
=========================== */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.main-content--with-aside {
  display: grid;
  grid-template-columns: var(--aside-w) 1fr;
  gap: 24px;
  align-items: start;
}

/* ===========================
   Aside
=========================== */
.global-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.aside-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aside-inner h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  color: var(--c-dark);
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-links li a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-mid);
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-links li a:hover,
.aside-links li a.active {
  background: var(--c-dark);
  color: var(--c-white);
  text-decoration: none;
}

.aside-parent {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}

.aside-parent-link {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c-dark);
  text-decoration: underline;
}

.aside-brand-block {
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}

.aside-brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--c-dark);
}

.aside-brand-desc {
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* ===========================
   Page Article Wrapper
=========================== */
.page-article {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ===========================
   Eyebrow / Small Tags
=========================== */
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.eyebrow--section {
  display: block;
  margin-bottom: 4px;
}

/* ===========================
   Hero (Home)
=========================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--c-dark);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 0 -20px;
  padding: 0 20px;
}

.hero-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #111;
}

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

.hero-placeholder {
  background: linear-gradient(135deg, #2a2a2a 0%, #111 100%);
  min-height: 400px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  padding: 60px 48px 60px 40px;
  gap: 20px;
}

.hero-eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}

.hero-h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  color: var(--c-white);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  max-width: 420px;
  line-height: 1.6;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-white);
  color: var(--c-dark);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  min-height: 48px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--c-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  text-decoration: none;
}

/* ===========================
   Content / Prose
=========================== */
.content-section {
  width: 100%;
}

.prose-wrap {
  max-width: var(--content-max);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-dark);
}

.prose-wrap--article,
.prose-wrap--about,
.prose-wrap--privacy {
  max-width: 720px;
}

.prose-wrap h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 2em 0 0.6em;
  letter-spacing: -0.01em;
}

.prose-wrap h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 1.5em 0 0.5em;
}

.prose-wrap p {
  margin-bottom: 1.2em;
}

.prose-wrap ul,
.prose-wrap ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
  list-style: disc;
}

.prose-wrap ol {
  list-style: decimal;
}

.prose-wrap li {
  margin-bottom: 0.4em;
}

.prose-wrap a {
  color: var(--c-dark);
  text-decoration: underline;
  font-weight: 600;
}

.prose-wrap strong {
  font-weight: 700;
}

.prose-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.93rem;
}

.prose-wrap th,
.prose-wrap td {
  border: 1px solid var(--c-border);
  padding: 8px 12px;
  text-align: left;
}

.prose-wrap th {
  background: var(--c-bg);
  font-weight: 700;
}

/* ===========================
   Section Headings
=========================== */
.channels-section h2,
.latest-section h2,
.children-section h2,
.related-section h2,
.about-channels-section h2,
.privacy-nav-section h2 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--c-dark);
  margin-bottom: 24px;
}

/* ===========================
   Bento Grid
=========================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: var(--gap);
}

.bento-grid--channels {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto;
}

.bento-grid--articles {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
}

.bento-grid--children {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
}

.bento-grid--related {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto;
}

.bento-grid--about {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto;
}

.bento-grid--small {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto;
}

/* ===========================
   Bento Card (Glass)
=========================== */
.bento-card {
  background: var(--c-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.bento-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.bento-card--wide {
  grid-column: span 2;
}

.bento-card--channel {
  grid-column: span 1;
}

.card-media {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--c-bg);
  flex-shrink: 0;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.bento-card:hover .card-thumb {
  transform: scale(1.05);
}

.card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-body h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-body h3 a {
  color: var(--c-dark);
  text-decoration: none;
}

.card-body h3 a:hover {
  text-decoration: underline;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--c-muted);
  line-height: 1.5;
}

.card-date {
  font-size: 0.78rem;
  color: var(--c-muted);
  font-weight: 600;
}

.card-link {
  margin-top: auto;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--c-dark);
  text-decoration: underline;
  padding-top: 8px;
}

/* ===========================
   Channel Hero
=========================== */
.channel-hero {
  background: var(--c-dark);
  border-radius: var(--radius-card);
  padding: 48px 40px;
  color: var(--c-white);
}

.channel-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--c-white);
}

.breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
}

.breadcrumb a:hover {
  color: var(--c-white);
}

.page-date {
  display: inline-block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

/* ===========================
   Article Layout
=========================== */
.article-head-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--c-dark);
}

.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.article-meta .page-date {
  color: var(--c-muted);
}

.article-hero-media {
  border-radius: var(--radius-card);
  overflow: hidden;
  max-height: 400px;
}

.article-hero-img {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================
   About / Privacy Heads
=========================== */
.about-head-section,
.privacy-head-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-h1,
.privacy-h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.5vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--c-dark);
}

.about-hero-media {
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 8px;
}

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

.privacy-intro {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 600px;
  line-height: 1.6;
}

.privacy-head-section .page-date {
  color: var(--c-muted);
}

.empty-tip {
  color: var(--c-muted);
  font-size: 0.9rem;
  padding: 16px 0;
}

/* ===========================
   Footer
=========================== */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,0.65);
  padding: 28px 20px;
  margin-bottom: var(--bnav-h);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer-contact address {
  font-style: normal;
}

.footer-brand {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--c-white);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}

.footer-links li a {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.footer-links li a:hover {
  color: var(--c-white);
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}

.footer-copy {
  width: 100%;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ===========================
   Bottom Fixed Nav
=========================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(31, 31, 31, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.08);
  height: var(--bnav-h);
}

.bottom-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.bnav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--c-white);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 18px;
  text-decoration: none;
}

.bnav-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.bottom-nav p {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.bottom-nav p a {
  color: rgba(255,255,255,0.65);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.68rem;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.bottom-nav p a:hover {
  color: var(--c-white);
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.bnav-search {
  flex-shrink: 0;
}

.bnav-search form {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bnav-search input[type="search"] {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 8px 12px;
  width: 140px;
  height: 40px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.bnav-search input[type="search"]::placeholder {
  color: rgba(255,255,255,0.35);
}

.bnav-search input[type="search"]:focus {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
}

.bnav-search button {
  background: var(--c-white);
  color: var(--c-dark);
  border: none;
  border-radius: 6px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 8px 14px;
  height: 40px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  min-height: 40px;
}

.bnav-search button:hover {
  background: var(--c-bg);
  transform: scale(1.05);
}

/* ===========================
   Scroll Reveal Animation
=========================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-item {
    opacity: 1;
    transform: none;
  }

  .bento-card {
    transition: none;
  }

  .btn-primary:hover {
    transform: none;
  }

  .card-thumb {
    transition: none;
  }
}

/* ===========================
   Responsive: Tablet
=========================== */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .bento-grid--articles,
  .bento-grid--children {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-grid--small {
    grid-template-columns: repeat(3, 1fr);
  }

  .main-content--with-aside {
    grid-template-columns: 180px 1fr;
  }

  --aside-w: 180px;
}

@media (max-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .hero-media {
    min-height: 40vh;
  }

  .hero-text {
    align-items: flex-start;
    text-align: left;
    padding: 40px 24px;
  }

  .main-content--with-aside {
    grid-template-columns: 1fr;
  }

  .global-aside {
    position: static;
    order: -1;
  }

  .bento-grid--channels,
  .bento-grid--about,
  .bento-grid--related {
    grid-template-columns: 1fr 1fr;
  }

  .bento-card--wide {
    grid-column: span 1;
  }
}

/* ===========================
   Responsive: Mobile 375px
=========================== */
@media (max-width: 600px) {
  :root {
    --header-h: 56px;
    --bnav-h: 60px;
  }

  html {
    font-size: 16px;
  }

  .main-content {
    padding: 16px 14px 32px;
  }

  .hero-section {
    margin: 0 -14px;
    padding: 0 14px;
    min-height: 100svh;
  }

  .hero-inner {
    min-height: 100svh;
  }

  .hero-media {
    min-height: 35svh;
  }

  .hero-text {
    padding: 28px 20px 36px;
    gap: 14px;
  }

  .hero-h1 {
    font-size: 1.7rem;
  }

  .bento-grid,
  .bento-grid--articles,
  .bento-grid--channels,
  .bento-grid--children,
  .bento-grid--related,
  .bento-grid--about,
  .bento-grid--small {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-card--wide {
    grid-column: span 1;
  }

  .channel-hero {
    padding: 32px 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-links {
    flex-direction: column;
    gap: 2px;
  }

  .bnav-search input[type="search"] {
    width: 90px;
  }

  .top-nav p a {
    font-size: 0.65rem;
    padding: 5px 7px;
  }

  .bottom-nav p a {
    font-size: 0.62rem;
    padding: 6px 7px;
  }

  .page-article {
    gap: 32px;
  }

  .channels-section h2,
  .latest-section h2,
  .children-section h2,
  .related-section h2,
  .about-channels-section h2,
  .privacy-nav-section h2 {
    font-size: 1.3rem;
  }
}
