/* 哔咔漫画 bikas.homes — 夜樱墨海视觉体系 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=ZCOOL+QingKe+HuangYou&display=swap");

:root {
  --hm-ink: #0a0e17;
  --hm-deep: #121a2b;
  --hm-panel: rgba(22, 32, 54, 0.72);
  --hm-line: rgba(255, 122, 162, 0.28);
  --hm-rose: #ff7aa2;
  --hm-coral: #ff4f7b;
  --hm-mint: #6ef0c8;
  --hm-ice: #9ec8ff;
  --hm-text: #e8eef8;
  --hm-mute: #9aa8c2;
  --hm-glow: rgba(255, 79, 123, 0.35);
  --hm-radius: 18px;
  --hm-max: 1120px;
  --hm-nav-h: 58px;
  --hm-dl-gap: 10px;
  --hm-font-display: "ZCOOL QingKe HuangYou", "Noto Sans SC", sans-serif;
  --hm-font-body: "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--hm-font-body);
  color: var(--hm-text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 79, 123, 0.22), transparent 55%),
    radial-gradient(900px 500px at 95% 5%, rgba(110, 240, 200, 0.14), transparent 50%),
    radial-gradient(800px 700px at 50% 110%, rgba(158, 200, 255, 0.12), transparent 55%),
    linear-gradient(165deg, #070a12 0%, #121a2b 42%, #0d1422 100%);
  background-attachment: fixed;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--hm-mint);
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.25s ease;
}

a:hover {
  color: var(--hm-rose);
}

h1,
h2,
h3 {
  font-family: var(--hm-font-display);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  margin: 0 0 0.85rem;
  color: #fff;
}

h3 {
  font-size: clamp(1.15rem, 2.8vw, 1.35rem);
  margin: 0 0 0.55rem;
  color: var(--hm-ice);
}

p {
  margin: 0 0 1rem;
  color: var(--hm-mute);
}

.hm-wrap {
  width: min(100% - 2rem, var(--hm-max));
  margin-inline: auto;
}

/* 顶部广告推广区（ads.d-y.dev） */
.hm-ad-top {
  position: relative;
  z-index: 55;
  padding: 0.85rem 0 0.55rem;
  background:
    linear-gradient(120deg, rgba(255, 79, 123, 0.16), rgba(110, 240, 200, 0.1)),
    rgba(10, 14, 23, 0.92);
  border-bottom: 1px solid var(--hm-line);
}

.hm-ad-label {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--hm-mute);
}

.hm-ad-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 0.9rem;
  padding: 0 0.75rem 0.35rem;
}

.hm-ad-card {
  margin: 0;
  width: 72px;
  text-align: center;
}

.hm-ad-card a {
  display: inline-block;
  border-radius: 16px;
}

.hm-ad-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hm-ad-card a:hover img {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 26px rgba(255, 79, 123, 0.35);
}

.hm-ad-card figcaption {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--hm-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 导航 */
.hm-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 14, 23, 0.78);
  border-bottom: 1px solid var(--hm-line);
  height: var(--hm-nav-h);
}

.hm-nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hm-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-family: var(--hm-font-display);
  font-size: 1.25rem;
}

.hm-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 0 2px rgba(255, 122, 162, 0.45);
}

.hm-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  justify-content: flex-end;
}

.hm-menu a {
  color: var(--hm-mute);
  font-size: 0.9rem;
}

.hm-menu a:hover,
.hm-menu a.hm-on {
  color: var(--hm-rose);
}

.hm-burger {
  display: none;
  border: 1px solid var(--hm-line);
  background: transparent;
  color: var(--hm-text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
}

/* 滚动后漂浮固定下载栏（导航下方，不遮挡正文） */
.hm-float-dock {
  position: sticky;
  top: var(--hm-nav-h);
  z-index: 45;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.hm-float-dock.hm-float-on {
  max-height: 240px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  border-bottom-color: var(--hm-line);
}

.hm-float-inner {
  width: min(100% - 1.25rem, var(--hm-max));
  margin-inline: auto;
  padding: 0.55rem 0 0.7rem;
}

.hm-float-title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  color: var(--hm-mute);
  letter-spacing: 0.06em;
}

.hm-float-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hm-dl-gap);
}

@media (min-width: 900px) {
  .hm-float-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.hm-float-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--hm-mute);
  font-size: 0.68rem;
  text-decoration: none;
}

.hm-float-chip img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.hm-float-chip:hover img {
  transform: translateY(-3px) scale(1.04);
}

.hm-float-chip span {
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hero — 全幅氛围，无下载按钮 */
.hm-hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  padding: 3.5rem 0 3rem;
  overflow: hidden;
}

.hm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(10, 14, 23, 0.2), rgba(10, 14, 23, 0.82) 58%),
    url("shot-comic-serial.jpg") center/cover no-repeat;
  transform: scale(1.04);
  animation: hm-drift 18s ease-in-out infinite alternate;
  z-index: -2;
}

.hm-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(transparent, #0a0e17);
  z-index: -1;
}

.hm-hero-copy {
  max-width: 640px;
  animation: hm-rise 0.9s ease both;
}

.hm-hero-copy .hm-brand-mark {
  font-family: var(--hm-font-display);
  font-size: clamp(2.4rem, 8vw, 4rem);
  color: #fff;
  text-shadow: 0 0 40px var(--hm-glow);
  margin-bottom: 0.4rem;
}

.hm-hero-copy p {
  color: #d5deef;
  font-size: 1.05rem;
  max-width: 34em;
}

.hm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 240, 200, 0.35);
  color: var(--hm-mint);
  font-size: 0.78rem;
  margin-bottom: 0.85rem;
  background: rgba(110, 240, 200, 0.08);
}

/* 内容区块 */
.hm-section {
  padding: 3.2rem 0;
  position: relative;
}

.hm-section + .hm-section {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.hm-glass {
  background: var(--hm-panel);
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.35rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.hm-split {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 860px) {
  .hm-split {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hm-split.hm-flip > :first-child {
    order: 2;
  }
}

.hm-phone {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 122, 162, 0.35);
  box-shadow:
    0 0 0 6px rgba(255, 79, 123, 0.08),
    0 28px 60px rgba(0, 0, 0, 0.45);
  animation: hm-float 5.5s ease-in-out infinite;
}

.hm-phone img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}

.hm-grid-3 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 760px) {
  .hm-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hm-tile {
  padding: 1.2rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 79, 123, 0.12), rgba(18, 26, 43, 0.9));
  border: 1px solid rgba(255, 122, 162, 0.2);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.hm-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 240, 200, 0.45);
}

.hm-tile h3 {
  margin-top: 0.35rem;
}

.hm-rail {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .hm-rail {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.hm-mosaic {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, 1fr);
}

.hm-mosaic figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(158, 200, 255, 0.2);
}

.hm-mosaic img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.hm-mosaic figure:hover img {
  transform: scale(1.05);
}

.hm-prose {
  font-size: 1rem;
}

.hm-prose p {
  text-align: justify;
}

.hm-quote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--hm-coral);
  background: rgba(255, 79, 123, 0.08);
  border-radius: 0 14px 14px 0;
  color: #dce6f7;
  font-size: 1.02rem;
}

.hm-list {
  margin: 0 0 1.2rem;
  padding-left: 1.15rem;
  color: var(--hm-mute);
}

.hm-list li {
  margin-bottom: 0.45rem;
}

.hm-crumb {
  padding: 1rem 0 0.2rem;
  font-size: 0.88rem;
  color: var(--hm-mute);
}

.hm-crumb a {
  color: var(--hm-ice);
}

.hm-page-head {
  padding: 1.5rem 0 0.5rem;
}

.hm-legal .hm-section {
  padding: 1.6rem 0;
}

.hm-footer {
  margin-top: 2rem;
  padding: 2.2rem 0 6.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--hm-mute);
  font-size: 0.9rem;
}

.hm-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  margin-bottom: 1rem;
}

.hm-footer a {
  color: var(--hm-ice);
}

.hm-error {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.hm-error h1 {
  font-size: clamp(3rem, 12vw, 5.5rem);
  color: var(--hm-coral);
  margin-bottom: 0.3rem;
}

.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--hm-coral), #ff8fb0);
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 10px 28px var(--hm-glow);
}

.hm-btn:hover {
  filter: brightness(1.06);
}

.hm-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hm-reveal.hm-in {
  opacity: 1;
  transform: none;
}

@keyframes hm-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hm-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes hm-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, 1%, 0);
  }
}

@media (max-width: 760px) {
  .hm-burger {
    display: inline-grid;
    place-items: center;
  }

  .hm-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.96);
    border-bottom: 1px solid var(--hm-line);
    padding: 0.85rem 1rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .hm-menu.hm-open {
    display: flex;
  }
}
