@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@600;700;800&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
  --brand-pink: #fb7299;
  --brand-pink-deep: #a83159;
  --brand-cyan: #5ac8fa;
  --brand-cyan-deep: #00658b;
  --brand-lime: #58c86f;
  --page-bg: #faf9fd;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f4f3f7;
  --surface-variant: #e3e2e6;
  --text-primary: #1a1b1e;
  --text-muted: #697585;
  --font-display: 'Be Vietnam Pro', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;
  --soft-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 8% 8%, rgba(251, 114, 153, 0.08), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(90, 200, 250, 0.10), transparent 30%),
    var(--page-bg);
  font-family: var(--font-body);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.ambient-effects { pointer-events: none; }
.ambient-effects__canvas { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.ambient-effects__canvas--burst { z-index: 120; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(14px);
}

.app-header__inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(220px, 420px);
  align-items: center;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 20px;
}

.app-header__left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.app-header__brand {
  color: var(--brand-pink-deep);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.app-header__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
}

.nav-link {
  position: relative;
  padding: 8px 2px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-link:hover { color: var(--brand-pink-deep); }
.nav-link:first-child { color: var(--brand-pink-deep); }
.nav-link:first-child::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 2px;
  border-radius: 999px;
  content: '';
  background: var(--brand-pink-deep);
}

.app-header__search {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  min-width: 0;
  height: 40px;
  padding: 0 6px 0 16px;
  border-radius: 999px;
  background: var(--surface-container-low);
}

.app-header__search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.app-header__search button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-pink);
  color: #fff;
  cursor: pointer;
}

.bili-home {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.surface-card,
.post-card,
.creator-panel,
.poetize-left-card,
.feature-card,
.taxonomy-card {
  border-radius: 20px;
  background: var(--surface-container-lowest);
  box-shadow: var(--soft-shadow);
  animation: bili-rise-in 0.72s ease both;
}

.creator-rail {
  display: grid;
  align-content: start;
  gap: 18px;
}

.creator-rail__profile {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(251, 114, 153, 0.12), rgba(90, 200, 250, 0.12));
}

.creator-rail__avatar,
.detail-author__badge,
.post-card__author-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #fb7299, #5ac8fa);
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
}

.creator-rail__avatar { width: 72px; height: 72px; font-size: 28px; }
.creator-rail__avatar img { width: 100%; height: 100%; object-fit: cover; }
.creator-rail__profile h2 { margin: 0; font-size: 20px; }
.creator-rail__profile p { margin: 6px 0 0; color: var(--text-muted); font-size: 13px; }

.creator-rail__nav {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface-container-lowest);
  box-shadow: var(--soft-shadow);
}

.rail-link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  color: var(--text-muted);
  font-weight: 700;
}

.rail-link:hover,
.rail-link--active {
  color: var(--brand-pink-deep);
  background: rgba(251, 114, 153, 0.10);
}

.creator-rail__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.creator-rail__stats div {
  padding: 14px 10px;
  border-radius: 16px;
  background: var(--surface-container-lowest);
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.creator-rail__stats strong,
.creator-rail__stats span { display: block; }
.creator-rail__stats strong { font-size: 20px; }
.creator-rail__stats span { margin-top: 4px; color: var(--text-muted); font-size: 12px; }

.poetize-left-card { padding: 18px; }
.poetize-left-card__head,
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.poetize-left-card__head span,
.section-heading span {
  display: block;
  color: var(--brand-pink-deep);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.poetize-left-card__head strong,
.section-heading h1,
.section-heading h2 {
  margin: 4px 0 0;
  font-family: var(--font-display);
}

.section-heading p,
.panel-empty {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.tag-cloud,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.poetize-tag,
.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(90, 200, 250, 0.12);
  color: var(--brand-cyan-deep);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.poetize-tag:hover,
.mini-chip:hover { transform: translateY(-2px); }
.poetize-tag em { font-style: normal; opacity: .68; }
.poetize-tag--1 { background: rgba(251, 114, 153, .13); color: var(--brand-pink-deep); }
.poetize-tag--2 { background: rgba(90, 200, 250, .14); color: var(--brand-cyan-deep); }
.poetize-tag--3 { background: rgba(88, 200, 111, .14); color: #166534; }
.poetize-tag--4 { background: rgba(255, 209, 102, .20); color: #8a5a00; }
.poetize-tag--5 { background: rgba(167, 139, 250, .14); color: #5b21b6; }
.poetize-tag--6 { background: rgba(45, 212, 191, .14); color: #0f766e; }

.bili-main { min-width: 0; }

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  margin-bottom: 28px;
}

.feature-stack {
  display: grid;
  gap: 18px;
}

.feature-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  color: white;
  background-size: cover;
  background-position: center;
}

.feature-card--large { min-height: 458px; }
.feature-card a {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, .58));
}

.feature-card h1,
.feature-card h2 {
  max-width: 760px;
  margin: 14px 0 0;
  font-family: var(--font-display);
  line-height: 1.18;
}

.feature-card h1 { font-size: 44px; }
.feature-card h2 { font-size: 22px; }
.feature-card p { max-width: 680px; margin: 14px 0 0; line-height: 1.75; opacity: .92; }

.post-list {
  display: grid;
  gap: 18px;
}

.post-card {
  display: grid;
  gap: 14px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.post-card--wide { grid-template-columns: minmax(220px, 320px) 1fr; }

.post-card__cover {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 12px;
  padding: 18px;
  color: white;
  background-size: cover;
  background-position: center;
}

.post-card__glow {
  position: absolute;
  right: -18px;
  bottom: -48px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.post-card__chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-card__category,
.post-card__board {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.post-card__board { background: rgba(18, 23, 34, 0.2); }

.post-card__cover-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-card__cover-copy strong {
  max-width: 260px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
}

.post-card__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-card__tags a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(90, 200, 250, 0.12);
  color: var(--brand-cyan-deep);
  font-size: 12px;
  font-weight: 700;
}

.post-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
}

.post-card:hover h3 { color: var(--brand-pink-deep); }
.post-card p { margin: 0; color: var(--text-muted); line-height: 1.75; }

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--surface-variant);
}

.post-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-card__author-badge { width: 44px; height: 44px; }
.post-card__author strong,
.post-card__author span { display: block; }
.post-card__author span { color: var(--text-muted); font-size: 12px; }

.post-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.detail-main { overflow: hidden; }
.detail-cover {
  position: relative;
  min-height: 360px;
  color: white;
  background-size: cover;
  background-position: center;
}
.detail-cover--page { background: linear-gradient(135deg, #fb7299, #5ac8fa); }
.detail-cover__content {
  position: absolute;
  inset: auto 0 0;
  padding: 34px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, .62));
}
.detail-cover h1 {
  max-width: 850px;
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.18;
}
.detail-cover p { max-width: 760px; margin: 12px 0 0; line-height: 1.8; }

.detail-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--surface-variant);
}
.detail-author__badge { width: 62px; height: 62px; font-size: 24px; }
.detail-author__copy strong,
.detail-author__copy span { display: block; }
.detail-author__copy span,
.detail-author__meta { color: var(--text-muted); }
.detail-author__meta {
  display: flex;
  gap: 12px;
  margin-left: auto;
  font-size: 13px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--brand-pink);
  color: white;
  font-weight: 800;
}

.detail-content {
  padding: 30px;
  color: #262a31;
  line-height: 1.9;
  font-size: 16px;
}
.detail-content h1,
.detail-content h2,
.detail-content h3 { font-family: var(--font-display); line-height: 1.28; }
.detail-content img { max-width: 100%; border-radius: 14px; }
.detail-content blockquote {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--brand-pink);
  border-radius: 12px;
  background: rgba(251, 114, 153, .08);
  color: var(--text-muted);
}
.detail-content pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 14px;
  background: #161a2a;
  color: #f8fafc;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 30px 30px;
}
.detail-action {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-container-low);
  color: var(--text-muted);
  font-weight: 700;
}

.detail-comments { padding: 0 30px 34px; }
.detail-aside { display: grid; gap: 18px; }
.aside-panel { padding: 22px; }
.section-heading--compact { margin-bottom: 12px; }
.detail-outline { display: grid; gap: 10px; }
.detail-outline div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-container-low);
}
.detail-outline span { color: var(--text-muted); }

.archive-hero { padding: 26px; margin-bottom: 20px; }
.archive-list,
.taxonomy-grid {
  display: grid;
  gap: 16px;
}
.archive-item { padding: 18px; }
.archive-item time { color: var(--brand-pink-deep); font-weight: 800; }
.archive-item a {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}
.archive-item p { margin: 8px 0 0; color: var(--text-muted); line-height: 1.7; }

.taxonomy-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.taxonomy-card {
  padding: 20px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.taxonomy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .1);
}
.taxonomy-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
}
.taxonomy-card span,
.taxonomy-card p {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 28px;
}
.empty-state strong { font-family: var(--font-display); font-size: 26px; }
.empty-state p { margin: 0; color: var(--text-muted); line-height: 1.75; }
.error-state strong { color: var(--brand-pink-deep); font-size: 72px; }
.error-state h1 { margin: 0; }

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(26, 27, 30, .06);
  background: rgba(255, 255, 255, .72);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 20px;
  color: var(--text-muted);
}

.site-footer strong,
.site-footer span { display: block; }
.site-footer strong { color: var(--text-primary); font-family: var(--font-display); }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 14px;
  font-weight: 700;
}
.site-footer a:hover { color: var(--brand-pink-deep); }

@media (max-width: 1080px) {
  .bili-home,
  .feature-grid,
  .two-column {
    grid-template-columns: 1fr;
  }
  .creator-rail { order: 2; }
}

@media (max-width: 760px) {
  .app-header__inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
  .app-header__left,
  .app-header__nav {
    flex-wrap: wrap;
    gap: 12px;
  }
  .bili-home,
  .page-shell {
    padding: 20px 14px 48px;
  }
  .feature-card--large { min-height: 360px; }
  .feature-card h1,
  .detail-cover h1 { font-size: 30px; }
  .post-card--wide { grid-template-columns: 1fr; }
  .post-card__meta,
  .detail-author {
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-author__meta { margin-left: 0; }
  .taxonomy-grid { grid-template-columns: 1fr; }
  .detail-content,
  .detail-comments { padding: 22px; }
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

@keyframes bili-rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
