/**
 * 百鸣软件 — 高端视觉层（网格光晕、玻璃质感、卡片光效）
 * 依赖 design-tokens.css；低配 html.bm-lite 自动降级
 */

:root {
  --bm-gradient-brand: linear-gradient(180deg, #0f766e 0%, #0d6b64 100%);
  --bm-gradient-hero-text: linear-gradient(120deg, #0f172a 0%, #0f172a 100%);
  --bm-glass: rgba(255, 255, 255, 0.72);
  --bm-glass-border: rgba(255, 255, 255, 0.85);
}

/* —— Hero 网格光晕 —— */
.bm-hero-mesh {
  position: relative;
  overflow: visible;
}

.bm-hero-mesh::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 20%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.bm-hero-mesh::after {
  content: "";
  position: absolute;
  width: min(680px, 90vw);
  height: min(680px, 70vw);
  left: 50%;
  top: -35%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(13, 159, 110, 0.14) 0%, rgba(59, 130, 246, 0.08) 40%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.bm-hero-mesh > .container,
.bm-hero-mesh > .container-fluid,
.bm-hero-mesh .hero-content {
  position: relative;
  z-index: 1;
}

html:not(.bm-lite) .hero-title.bm-gradient-text {
  background: var(--bm-gradient-hero-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* —— 区块标签 —— */
.bm-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--bm-text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bm-brand);
  margin-bottom: var(--bm-space-3);
}

.bm-section-kicker::before {
  content: "";
  width: 1.25rem;
  height: 2px;
  border-radius: 1px;
  background: var(--bm-gradient-brand);
}

/* —— 卡片光效（首页 / 列表共用）—— */
.bm-card-shine {
  position: relative;
  overflow: hidden;
}

.bm-card-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 58%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
  z-index: 3;
}

html:not(.bm-lite) .bm-card-shine:hover::after {
  transform: translateX(120%);
}

/* —— 顶栏 CTA —— */
.bm-header .bm-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  margin-left: 0.5rem;
  font-size: var(--bm-text-sm);
  font-weight: 600;
  color: #fff !important;
  background: var(--bm-gradient-brand);
  border: none;
  border-radius: var(--bm-radius-pill);
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(13, 159, 110, 0.28);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.bm-header .bm-nav-cta:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 16px rgba(13, 159, 110, 0.35);
  color: #fff !important;
}

.bm-header .bm-nav-cta:focus-visible {
  outline: 2px solid var(--bm-brand);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  .bm-header .bm-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 0 0.25rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--bm-border-light);
  }

  .bm-header .bm-nav-cta {
    margin-left: 0;
    justify-content: center;
    width: 100%;
  }
}

/* —— 搜索页 Hero —— */
.bm-search-hero-premium .bm-search-title {
  background: var(--bm-gradient-hero-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.bm-lite .bm-search-hero-premium .bm-search-title {
  background: none;
  -webkit-text-fill-color: unset;
  color: var(--bm-text);
}

.bm-search-hero-premium {
  position: relative;
  overflow: hidden;
}

.bm-search-hero-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 15%, transparent 70%);
  pointer-events: none;
}

/* —— 列表卡片统一增强 —— */
.bm-page .software-card.bm-card-shine,
.is-home .software-card.bm-card-shine,
.is-home .category-card.bm-card-shine {
  isolation: isolate;
}

.bm-page .software-image {
  position: relative;
  overflow: hidden;
}

.bm-page .software-image .bm-card-platform {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--bm-radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--bm-text-secondary);
  border: 1px solid var(--bm-border-light);
}

.bm-page .featured-badge,
.is-home .bm-card-badge {
  z-index: 2;
}

/* —— 软件详情首屏光晕 —— */
.bm-page-software .bm-sd-topic-hero__glow {
  display: block !important;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 75%, rgba(13, 159, 110, 0.12) 0%, transparent 55%);
}

.bm-page-software .bm-sd-topic-hero__inner {
  position: relative;
  z-index: 2;
}

/* —— 精选条带 —— */
.bm-featured-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: var(--bm-space-3);
  font-size: var(--bm-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--bm-gradient-brand);
  border-radius: var(--bm-radius-pill);
  box-shadow: var(--bm-shadow-brand);
}

.bm-featured-ribbon i {
  font-size: 0.85em;
}

@media (prefers-reduced-motion: reduce) {
  .bm-card-shine::after {
    display: none;
  }
}
