/* 与 lumenfeel-home-e / lumenfeel-home 一致的顶部导航（固定顶栏 + 滚动胶囊） */
:root {
  --mc-bg: #000000;
  --mc-max: min(100%, 480px);
  --mc-gutter-x: 10px;
  --navbar-glass-filter: blur(14px) saturate(130%);
  --navbar-glass-filter-stuck: blur(16px) saturate(140%);
  --mc-topbar-pill-r: 26px;
}

.mc-page {
  max-width: var(--mc-max);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: var(--mc-bg);
}

.mc-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: none;
  transition: padding 0.35s ease;
}

.mc-topbar.scrolled {
  padding: 8px max(8px, var(--mc-gutter-x)) 0;
}

.mc-topbar-inner {
  pointer-events: auto;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--mc-max);
  margin: 0 auto;
  min-width: 0;
  min-height: 52px;
  padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) 8px
    max(8px, env(safe-area-inset-left, 0px));
  border-radius: 0;
  border: 1px solid transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    border-radius 0.35s ease;
}

.mc-topbar-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  filter: blur(3px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    transparent 35%,
    transparent 75%,
    rgba(255, 255, 255, 0.06) 100%
  );
  transition: opacity 0.35s ease;
}

.mc-topbar-inner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 10%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0.06) 60%,
    transparent 90%
  );
  opacity: 0;
  pointer-events: none;
  border-radius: inherit;
  transition: opacity 0.35s ease;
}

.mc-topbar.scrolled .mc-topbar-inner {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: var(--navbar-glass-filter, blur(14px) saturate(130%));
  -webkit-backdrop-filter: var(--navbar-glass-filter, blur(14px) saturate(130%));
  border-color: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  box-shadow:
    inset 2px -2px 1px -1px rgba(255, 255, 255, 0.22),
    inset -2px 2px 1px -1px rgba(255, 255, 255, 0.18),
    inset 6px -6px 1px -6px rgba(255, 255, 255, 0.1),
    inset -6px 6px 1px -6px rgba(255, 255, 255, 0.1),
    inset 0 0 2px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

.mc-topbar.scrolled .mc-topbar-inner::before,
.mc-topbar.scrolled .mc-topbar-inner::after {
  opacity: 1;
}

.mc-topbar.stuck .mc-topbar-inner {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: var(--navbar-glass-filter-stuck, blur(16px) saturate(140%));
  -webkit-backdrop-filter: var(--navbar-glass-filter-stuck, blur(16px) saturate(140%));
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  box-shadow:
    inset 2px -2px 1px -1px rgba(255, 255, 255, 0.28),
    inset -2px 2px 1px -1px rgba(255, 255, 255, 0.22),
    inset 6px -6px 1px -6px rgba(255, 255, 255, 0.12),
    inset -6px 6px 1px -6px rgba(255, 255, 255, 0.12),
    inset 0 0 2px rgba(0, 0, 0, 0.65),
    0 6px 20px rgba(0, 0, 0, 0.35);
}

.mc-topbar.stuck .mc-topbar-inner::before,
.mc-topbar.stuck .mc-topbar-inner::after {
  opacity: 1;
}

.mc-topbar.scrolled .mc-topbar-inner,
.mc-topbar.stuck .mc-topbar-inner {
  padding-right: calc(
    env(safe-area-inset-right, 0px) + max(0px, var(--mc-topbar-pill-r) - 1px - 19px)
  );
}

.mc-logo,
.mc-profile {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .mc-topbar {
    transition: none;
  }
  .mc-topbar-inner,
  .mc-topbar-inner::before,
  .mc-topbar-inner::after {
    transition: none;
  }
}

.mc-logo {
  display: flex;
  align-items: center;
  height: 26px;
  width: 140px;
  line-height: 0;
  text-decoration: none;
  color: inherit;
}

.mc-logo img {
  height: 100%;
  width: auto;
  max-width: 100%;
  display: block;
}

.mc-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.mc-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
