/* 哔咔官网 · 夜樱阅读舱视觉体系 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=ZCOOL+XiaoWei&display=swap");

:root {
  --ink: #14181f;
  --ink-soft: #3a4454;
  --paper: #f4f7fb;
  --paper-2: #e8eef6;
  --panel: rgba(255, 255, 255, 0.72);
  --coral: #ff5a6a;
  --coral-deep: #e23b4d;
  --mint: #2ec4b6;
  --sky: #4c8dff;
  --gold: #f0b429;
  --line: rgba(20, 24, 31, 0.08);
  --shadow: 0 18px 40px rgba(20, 32, 54, 0.12);
  --radius: 22px;
  --max: 1120px;
  --nav-h: 64px;
  --dock-h: 0px;
  --font-display: "ZCOOL XiaoWei", "Noto Sans SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 90, 106, 0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(46, 196, 182, 0.14), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, var(--paper) 40%, #eef3f9 100%);
  line-height: 1.75;
  padding-bottom: var(--dock-h);
}

body.dock-open {
  --dock-h: 108px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--sky);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coral-deep);
}

.shell {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* 顶部推广 */
.promo-rail {
  background: linear-gradient(90deg, rgba(20, 24, 31, 0.92), rgba(40, 52, 78, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.promo-rail-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  padding: 12px 0;
}

.promo-tile {
  width: 72px;
  text-decoration: none;
  color: #fff;
  text-align: center;
  transition: transform 0.2s ease;
}

.promo-tile img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 6px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.promo-tile em {
  font-style: normal;
  font-size: 11px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-tile:hover {
  transform: translateY(-3px);
}

/* 导航 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(244, 247, 251, 0.82);
  border-bottom: 1px solid var(--line);
}

.topbar-row {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.brand-mark strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.nav-tray {
  display: flex;
  align-items: center;
  gap: 8px 18px;
}

.nav-tray a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-tray a:hover,
.nav-tray a.is-active {
  color: var(--coral-deep);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

/* 固定下载坞 */
.sticky-dock {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--nav-h);
  z-index: 45;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(20, 32, 54, 0.08);
}

.sticky-dock.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-dock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 0;
}

.dock-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 11px;
}

.dock-chip img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
}

.dock-chip span {
  max-width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hero */
.hero-stage {
  position: relative;
  overflow: hidden;
  padding: 48px 0 28px;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 8% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 106, 0.22), transparent 70%);
  animation: drift 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}

.hero-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero-visual {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111;
  aspect-ratio: 4 / 5;
  max-height: 520px;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: softZoom 18s ease-in-out infinite alternate;
}

.hero-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(10, 14, 22, 0.72));
  pointer-events: none;
}

/* 通用区块 */
.block {
  padding: 42px 0;
}

.block-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: 0 0 10px;
}

.block-lead {
  margin: 0 0 24px;
  color: var(--ink-soft);
  max-width: 46rem;
}

.glass-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 22px;
}

.prose p {
  margin: 0 0 1.05em;
  color: var(--ink-soft);
}

.prose h2,
.prose h3 {
  color: var(--ink);
  line-height: 1.35;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 1.6em 0 0.7em;
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.35em 0 0.55em;
}

/* 图文交错 */
.split-row {
  display: grid;
  gap: 22px;
  align-items: center;
  margin: 28px 0;
}

.split-row img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.split-row.reverse .media {
  order: -1;
}

/* 卡片矩阵 */
.mosaic {
  display: grid;
  gap: 16px;
}

.mosaic-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(20, 32, 54, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mosaic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.mosaic-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.mosaic-card .body {
  padding: 14px 16px 18px;
}

.mosaic-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.mosaic-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* 功能条 */
.ribbon-list {
  display: grid;
  gap: 12px;
}

.ribbon-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #f7fafc);
  border: 1px solid var(--line);
}

.ribbon-item .dot {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--coral), #ff8a5b);
}

.ribbon-item:nth-child(2n) .dot {
  background: linear-gradient(135deg, var(--mint), #4c8dff);
}

.ribbon-item:nth-child(3n) .dot {
  background: linear-gradient(135deg, var(--gold), #ff7a59);
}

.ribbon-item h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.ribbon-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* CTA 区（非 Hero/Nav） */
.action-band {
  margin: 36px 0;
  padding: 28px 22px;
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(255, 90, 106, 0.12), rgba(46, 196, 182, 0.12)),
    #fff;
  border: 1px solid var(--line);
  text-align: center;
}

.action-band h2 {
  font-family: var(--font-display);
  margin: 0 0 10px;
}

.action-band p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.btn-coral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(226, 59, 77, 0.28);
  transition: transform 0.2s ease;
}

.btn-coral:hover {
  transform: translateY(-2px);
}

/* 面包屑 */
.crumbs {
  padding: 18px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.crumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--coral-deep);
}

.crumbs span {
  margin: 0 6px;
  opacity: 0.5;
}

/* 页脚 */
.site-foot {
  margin-top: 48px;
  padding: 36px 0 28px;
  background: #121722;
  color: rgba(255, 255, 255, 0.78);
}

.site-foot a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.site-foot a:hover {
  color: #fff;
}

.foot-grid {
  display: grid;
  gap: 22px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.foot-brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.foot-copy {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.55);
}

/* 错误页 */
.error-panel {
  min-height: 58vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 0;
}

.error-panel h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4rem);
  margin: 0 0 10px;
}

.error-panel p {
  color: var(--ink-soft);
  margin: 0 0 22px;
}

/* 动效 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes drift {
  from {
    transform: translate(-12px, 0);
  }
  to {
    transform: translate(18px, 24px);
  }
}

@keyframes softZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

/* 响应式 */
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .split-row {
    grid-template-columns: 0.95fr 1.05fr;
  }

  .split-row.reverse {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .split-row.reverse .media {
    order: 0;
  }

  .mosaic {
    grid-template-columns: repeat(3, 1fr);
  }

  .sticky-dock-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .foot-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

  body.dock-open {
    --dock-h: 96px;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-tray {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(var(--nav-h) + 6px);
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .nav-tray.is-open {
    display: flex;
  }

  .topbar {
    position: sticky;
  }

  .topbar-row {
    position: relative;
  }
}

@media (min-width: 980px) {
  .ribbon-list {
    grid-template-columns: 1fr 1fr;
  }
}
