.bottom-tabbar {
  --active-tab: 0;
  position: fixed;
  left: 50%;
  bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 80;
  width: min(calc(100% - 24px), 520px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.2)),
    rgba(255, 255, 255, 0.32);
  box-shadow:
    0 14px 36px rgba(17, 17, 17, 0.18),
    inset 1px 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 0 18px rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(18px) saturate(1.5) brightness(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.5) brightness(1.08);
  transform: translateX(-50%);
}

.bottom-tabbar::before,
.bottom-tabbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.bottom-tabbar::before {
  z-index: -2;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.62), transparent 34%),
    radial-gradient(circle at 92% 100%, rgba(15, 118, 110, 0.16), transparent 36%);
}

.bottom-tabbar::after {
  z-index: -1;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.86),
    inset -1px -1px 0 rgba(255, 255, 255, 0.18);
}

.bottom-tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  z-index: 0;
  width: calc((100% - 16px) / 3);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.86), rgba(17, 17, 17, 0.66));
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 18px rgba(17, 17, 17, 0.18);
  transform: translateX(calc(var(--active-tab) * (100% + 4px)));
  transition:
    transform 0.34s cubic-bezier(0.2, 0.88, 0.2, 1.08),
    opacity 0.18s ease;
}

.bottom-tabbar.is-booting .bottom-tab-indicator {
  transition: none;
}

.bottom-tab {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 16px;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(17, 17, 17, 0.62);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transition:
    color 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.bottom-tab svg {
  width: 15px;
  height: 15px;
  display: block;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.bottom-tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-tab.active {
  background: transparent !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.bottom-tab.active svg {
  filter: drop-shadow(0 1px 3px rgba(255, 255, 255, 0.22));
}

.bottom-tab:hover svg {
  transform: translateY(-1px);
}

.bottom-tab:active {
  transform: scale(0.97);
}

.bottom-tab:focus-visible {
  outline: 2px solid var(--accent, #0f766e);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .bottom-tabbar {
    bottom: max(4px, env(safe-area-inset-bottom));
    width: min(calc(100% - 16px), 520px);
    border-radius: 18px;
  }
}
