/**
 * 百鸣软件 — 企业级视觉层
 * 沉稳画布 · 克制品牌色 · 去童趣动效
 */

/* —— 全局画布：浅灰砖墙纹理 + 轻景深（平铺滚动，不 fixed）—— */
:root {
  --bm-brick-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='64' viewBox='0 0 128 64'%3E%3Crect width='128' height='64' fill='%23e2e7ec'/%3E%3Crect x='1.5' y='1.5' width='60' height='28' rx='2' fill='%23eef2f6' stroke='%23cfd8e3' stroke-width='0.75'/%3E%3Crect x='66.5' y='1.5' width='60' height='28' rx='2' fill='%23e9edf2' stroke='%23cfd8e3' stroke-width='0.75'/%3E%3Crect x='33.5' y='34.5' width='60' height='28' rx='2' fill='%23e9edf2' stroke='%23cfd8e3' stroke-width='0.75'/%3E%3Crect x='99.5' y='34.5' width='26' height='28' rx='2' fill='%23eef2f6' stroke='%23cfd8e3' stroke-width='0.75'/%3E%3Crect x='1.5' y='34.5' width='26' height='28' rx='2' fill='%23eef2f6' stroke='%23cfd8e3' stroke-width='0.75'/%3E%3C/svg%3E");
  --bm-brick-size: 128px 64px;
}

html {
  background-color: #e8ecf1;
}

body {
  position: relative;
  background-color: #e4e8ee;
  background-image:
    radial-gradient(ellipse 140% 90% at 50% -20%, rgba(15, 23, 42, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(15, 118, 110, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse 70% 45% at 0% 80%, rgba(30, 58, 95, 0.03) 0%, transparent 50%),
    linear-gradient(180deg, rgba(247, 249, 251, 0.88) 0%, rgba(236, 239, 244, 0.82) 42%, rgba(226, 231, 238, 0.86) 100%),
    var(--bm-brick-tile);
  background-size: auto, auto, auto, auto, var(--bm-brick-size);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-attachment: scroll;
}

body > .bm-skip-link {
  position: relative;
  z-index: 10001;
}

body > main,
body > footer {
  position: relative;
  z-index: 0;
}

/* 顶栏必须高于首页 Hero（Hero 曾用 z-index 20~200，会把导航下拉盖住） */
body > .bm-header {
  position: relative;
  z-index: 1030;
}

.bm-header .navbar.fixed-top {
  z-index: 1030;
}

.bm-header .navbar .dropdown-menu {
  z-index: 1050;
}

@media (max-width: 991.98px) {
  .bm-header .navbar-collapse {
    overflow: visible;
  }
}

/* —— 顶栏：企业导航条 —— */
.bm-header .navbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 24px rgba(15, 23, 42, 0.04);
}

.bm-header .navbar.glass-on {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 1) inset, 0 8px 32px rgba(15, 23, 42, 0.08);
}

.bm-header .navbar .dropdown-menu {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.bm-header .navbar-brand {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bm-header .bm-nav-cta {
  background: var(--bm-brand);
  box-shadow: none;
  border-radius: var(--bm-radius-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bm-header .bm-nav-cta:hover {
  background: var(--bm-brand-hover);
  filter: none;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
}

/* —— Hero：深色顶栏式首屏 —— */
.bm-hero-mesh::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.9;
}

.bm-hero-mesh::after {
  background: radial-gradient(
    ellipse 70% 55% at 50% 0%,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 65%
  );
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform: none;
}

.hero-section,
.bm-page .bm-search-hero-premium {
  background:
    linear-gradient(180deg, transparent 70%, rgba(236, 239, 244, 0.35) 92%, rgba(236, 239, 244, 0.92) 100%),
    radial-gradient(ellipse 75% 55% at 50% -15%, rgba(15, 118, 110, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 45% 35% at 95% 10%, rgba(30, 58, 95, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #141c28 0%, #1a2536 45%, #243044 100%);
  border-bottom: none;
}

.hero-section .hero-content {
  color: #e8edf2;
}

.hero-section .hero-eyebrow {
  display: inline-block;
  font-family: var(--bm-font-mono);
  color: #99f6e4;
  background: rgba(15, 118, 110, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.22);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: none;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--bm-radius-sm);
}

.hero-section .hero-title,
.hero-section .hero-title.bm-gradient-text {
  color: #f8fafc;
  background: none;
  -webkit-text-fill-color: unset;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  line-height: 1.12;
}

/* 信任条：轻量辅助信息，不抢主视觉 */
.hero-section .bm-trust-bar {
  gap: 0.5rem 0.65rem;
  padding-top: 1rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-section .bm-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: var(--bm-text-xs);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(241, 245, 249, 0.78);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  box-shadow: none;
}

.hero-section .bm-trust-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  font-size: 0.65rem;
  color: rgba(204, 251, 241, 0.9);
  background: rgba(15, 118, 110, 0.28);
  border-radius: 4px;
  opacity: 1;
}

.hero-section .search-rim {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-shadow-hero-search);
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.hero-section .search-rim:focus-within {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow:
    var(--bm-shadow-hero-search),
    0 0 0 3px rgba(15, 118, 110, 0.22);
}

.hero-section .search-btn {
  background: linear-gradient(180deg, #128a80 0%, var(--bm-brand) 100%);
  border-radius: var(--bm-radius-sm);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.hero-section .search-btn:hover {
  background: linear-gradient(180deg, #0f7f76 0%, var(--bm-brand-hover) 100%);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
}

.hero-section .search-btn,
.hero-section .search-btn i {
  color: #fff;
}

/* 白底搜索区：切断 Hero 浅色字色继承，避免下拉/输入文字「看不见」 */
.hero-section .search-rim,
.hero-section .search-suggestions {
  color: var(--bm-text);
}

.hero-section .search-box {
  color: var(--bm-text);
}

.hero-section .search-box::placeholder {
  color: var(--bm-text-muted);
}

.hero-section .search-suggestions .suggestion-item {
  color: var(--bm-text) !important;
}

.hero-section .search-suggestions .suggestion-item .text-muted,
.hero-section .search-suggestions .suggestion-item small {
  color: var(--bm-text-muted) !important;
}

.hero-section .search-suggestions .suggestion-item.selected,
.hero-section .search-suggestions .suggestion-item.selected .text-muted {
  color: #fff !important;
}

/* 搜索下拉需压过下方白底分区容器 */
.hero-section .search-container {
  isolation: isolate;
  z-index: 40;
}

.hero-section .search-suggestions {
  z-index: 50;
}

.bm-tools-section > .container,
.categories-section > .container,
.featured-section > .container {
  overflow: visible;
}

/* —— 区块标题：企业文档风 —— */
.bm-section-head {
  margin-bottom: clamp(1.75rem, 4vw, 2.25rem);
}

.section-title::after {
  width: 2.75rem;
  height: 2px;
  margin-top: 0.75rem;
  background: linear-gradient(90deg, var(--bm-brand) 0%, rgba(15, 118, 110, 0.15) 100%);
  border-radius: 1px;
}

.section-title {
  font-weight: 600;
  letter-spacing: -0.025em;
}

.section-subtitle {
  color: var(--bm-text-muted);
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* —— 分区：白底卡片浮于灰画布 —— */
.bm-tools-section {
  background: transparent;
  border-bottom: none;
  padding-top: clamp(3rem, 7vw, 4.5rem);
}

.bm-tools-section > .container,
.categories-section > .container,
.featured-section > .container {
  background: var(--bm-surface-card);
  border: 1px solid var(--bm-border-light);
  border-radius: var(--bm-radius-xl);
  box-shadow: var(--bm-shadow-panel);
  padding: clamp(2.25rem, 5vw, 3rem) clamp(1.35rem, 4vw, 2.25rem);
}

.categories-section {
  background: transparent;
  padding: clamp(2rem, 5vw, 3rem) 0;
}

html.bm-lite .categories-section::before {
  display: none;
}

.featured-section {
  background: transparent;
  border-top: none;
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(3rem, 7vw, 4rem);
}

/* 低配：关闭卡片扫光；高配保留 bm-premium 悬停光效 */
html.bm-lite .bm-card-shine::after {
  display: none !important;
}

.category-card,
.software-card,
.bm-tool-card {
  border-radius: var(--bm-radius-md);
  box-shadow: var(--bm-shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.software-card:hover,
.bm-tool-card:hover {
  transform: none;
  box-shadow: var(--bm-shadow-hover);
  border-color: rgba(15, 118, 110, 0.22);
}

.category-icon-wrap {
  background: linear-gradient(145deg, #f8fafc 0%, var(--bm-surface-section) 100%) !important;
  border: 1px solid var(--bm-border-light);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: var(--bm-brand) !important;
}

.category-card[data-platform] .category-icon-wrap {
  color: var(--bm-brand) !important;
}

.category-card[data-platform="windows"] .category-icon-wrap {
  color: #0078d7 !important;
}

.category-card[data-platform="macos"] .category-icon-wrap,
.category-card[data-platform="mac"] .category-icon-wrap {
  color: #334155 !important;
}

.category-card[data-platform="ios"] .category-icon-wrap {
  color: #1d4ed8 !important;
}

.category-card[data-platform="android"] .category-icon-wrap {
  color: #16a34a !important;
}

.category-card[data-platform="excel-mb"] .category-icon-wrap {
  color: #15803d !important;
}

.category-go {
  opacity: 1;
  transform: none;
  color: var(--bm-brand);
}

.bm-tool-card__icon {
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.07) 0%, rgba(30, 58, 95, 0.05) 100%);
  border: 1px solid var(--bm-border-light);
  border-radius: var(--bm-radius-sm);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.bm-tool-card__icon i {
  color: var(--bm-brand);
}

.bm-header .navbar-nav .nav-link i {
  color: var(--bm-text-secondary);
}

.bm-header .navbar-nav .nav-link:hover i {
  color: var(--bm-brand);
}

/* —— 标签：方正小字，非糖果色 —— */
.bm-pill {
  border-radius: var(--bm-radius-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.6875rem;
}

.bm-pill--brand {
  background: rgba(15, 118, 110, 0.08);
  color: var(--bm-brand-active);
  border-color: rgba(15, 118, 110, 0.18);
}

.bm-pill--accent {
  background: var(--bm-surface-section);
  color: var(--bm-text-secondary);
  border-color: var(--bm-border-light);
}

.is-home .bm-card-badge,
.bm-page .featured-badge {
  background: var(--bm-ink-2);
  color: #fff;
  border-radius: var(--bm-radius-sm);
  letter-spacing: 0.06em;
  font-size: 0.625rem;
}

/* —— 底部引导：与画布同系浅色卡片 —— */
.bm-cta-band {
  background: transparent;
  border-top: none;
  padding: 0 0 clamp(2rem, 5vw, 2.75rem);
}

.bm-cta-band > .container {
  max-width: 1140px;
}

.bm-cta-band__inner {
  background: var(--bm-surface-card);
  border: 1px solid var(--bm-border-light);
  border-radius: var(--bm-radius-xl);
  box-shadow: var(--bm-shadow-panel);
  color: var(--bm-text);
  padding: clamp(1.5rem, 3.5vw, 2rem) clamp(1.75rem, 4vw, 2.5rem);
}

.bm-cta-band__title {
  color: var(--bm-text);
}

.bm-cta-band__text {
  color: var(--bm-text-muted);
}

.bm-cta-band .bm-btn-solid {
  background: var(--bm-brand);
  box-shadow: none;
  border-radius: var(--bm-radius-sm);
}

.bm-cta-band .bm-btn-ghost {
  color: var(--bm-brand);
  background: var(--bm-brand-subtle);
  border-color: var(--bm-brand-muted);
}

.bm-cta-band .bm-btn-ghost:hover {
  color: #fff;
  background: var(--bm-brand);
  border-color: var(--bm-brand);
}

/* —— 页脚：半透明叠在砖墙上，与画布连贯 —— */
.footer {
  background:
    linear-gradient(180deg, rgba(236, 239, 244, 0.92) 0%, rgba(232, 236, 241, 0.95) 100%);
  color: var(--bm-text-secondary);
  border-top: 1px solid var(--bm-border-light-strong);
  box-shadow: none;
  padding-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-bottom: calc(var(--bm-space-4) + 3rem);
}

.footer-title,
.footer-heading {
  color: var(--bm-text);
}

.footer-muted,
.footer .footer-muted,
.footer-link,
.footer-platform-link {
  color: var(--bm-text-secondary);
}

.footer a:hover,
.footer-link:hover,
.footer-platform-link:hover {
  color: var(--bm-brand);
}

.footer-platform-link:hover i {
  color: var(--bm-brand);
}

.footer-divider {
  border-color: var(--bm-border-light-strong);
}

.bm-footer-notice {
  background: var(--bm-surface-card);
  border: 1px solid var(--bm-border-light);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-shadow-card);
}

.bm-footer-notice-title {
  color: var(--bm-text);
}

.bm-footer-notice-text {
  color: var(--bm-text-secondary);
}

.bm-footer-notice-icon {
  color: var(--bm-brand);
}

.footer .bm-btn-ghost {
  color: var(--bm-brand);
  background: var(--bm-brand-subtle);
  border-color: var(--bm-brand-muted);
}

.footer .bm-btn-ghost:hover {
  color: #fff;
  background: var(--bm-brand);
  border-color: var(--bm-brand);
}

/* —— 搜索页 Hero 同步深色 —— */
.bm-page .bm-search-hero-premium {
  background:
    linear-gradient(180deg, transparent 70%, rgba(236, 239, 244, 0.35) 92%, rgba(236, 239, 244, 0.92) 100%),
    radial-gradient(ellipse 75% 55% at 50% -15%, rgba(15, 118, 110, 0.2) 0%, transparent 58%),
    linear-gradient(180deg, #141c28 0%, #243044 100%);
  border-bottom: none;
}

.bm-page .bm-search-hero-premium .bm-search-title,
.bm-page .bm-search-hero-premium .bm-search-title.bm-gradient-text {
  color: #f8fafc;
  background: none;
  -webkit-text-fill-color: unset;
}

.bm-page .bm-search-hero-premium .bm-search-lead {
  color: #94a8b8;
}

.bm-page .bm-search-hero-premium .bm-search-lead strong {
  color: #e2e8f0;
}

/* 检索页：筛选下拉不要被下方列表区盖住 */
body.bm-page .bm-search-landing {
  position: relative;
  z-index: 10;
  overflow: visible;
}

body.bm-page .bm-search-toolbar-wrap {
  z-index: 50;
  isolation: isolate;
}

body.bm-page .bm-filter-dropdown .dropdown-menu.bm-filter-dropdown__menu {
  z-index: 60;
}

body.bm-page .bm-search-panel,
body.bm-page .bm-search-panel .form-label,
body.bm-page .bm-search-panel .form-control,
body.bm-page .bm-filter-dropdown__toggle {
  color: var(--bm-text);
}

body.bm-page .bm-search-main {
  background: transparent;
  position: relative;
  z-index: 0;
}

.bm-page .search-form.bm-search-panel {
  margin-top: -2rem;
  border-radius: var(--bm-radius-xl);
  box-shadow: var(--bm-shadow-panel);
  border: 1px solid var(--bm-border-light);
}

html.bm-lite .hero-section,
html.bm-lite .bm-page .bm-search-hero-premium {
  background:
    linear-gradient(180deg, transparent 75%, rgba(236, 239, 244, 0.9) 100%),
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(15, 118, 110, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

html.bm-lite .hero-section .hero-content {
  color: var(--bm-text);
}

html.bm-lite .hero-section .hero-title {
  color: var(--bm-text);
}

html.bm-lite .hero-section .hero-eyebrow {
  font-family: var(--bm-font-mono);
  color: var(--bm-brand-active);
  background: var(--bm-brand-subtle);
  border-color: var(--bm-brand-muted);
}

html.bm-lite .hero-section .hero-title {
  text-shadow: none;
}

html.bm-lite .hero-section .bm-trust-bar {
  border-top-color: var(--bm-border-light-strong);
}

html.bm-lite .hero-section .bm-trust-item {
  color: var(--bm-text-muted);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--bm-border-light);
  box-shadow: none;
}

html.bm-lite .hero-section .bm-trust-item i {
  color: var(--bm-brand);
  background: var(--bm-brand-subtle);
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.65rem;
}

/* bm-lite 下 CTA / 页脚已与默认浅色一致，无需单独覆盖 */

@media (prefers-reduced-motion: reduce) {
  .category-card:hover,
  .software-card:hover,
  .bm-tool-card:hover {
    transform: none;
  }
}
