:root {
  --tabbar-h: calc(58px + max(30px, env(safe-area-inset-bottom, 0px)));
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(100%, 480px);
  height: var(--tabbar-h);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 8px max(30px, env(safe-area-inset-bottom, 0px));
  background: transparent;
  overflow: visible;
}

.tabbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -108px;
  height: calc(100% + 108px);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.12) 28%,
    rgba(0, 0, 0, 0.35) 52%,
    rgba(0, 0, 0, 0.7) 68%,
    rgba(0, 0, 0, 0.9) 78%,
    #000 88%,
    #000 100%
  );
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 22%, rgba(0, 0, 0, 0.8) 48%, #000 64%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 22%, rgba(0, 0, 0, 0.8) 48%, #000 64%, #000 100%);
}

.tabbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: max(30px, env(safe-area-inset-bottom, 0px));
  background: #000;
  z-index: -1;
  pointer-events: none;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}

.tab img {
  width: 26px;
  height: 26px;
  opacity: 0.5;
}

.tab.active {
  color: #fff;
}

.tab.active img {
  opacity: 1;
}

.tab:active img {
  transform: scale(0.92);
}

.tab-games {
  position: relative;
  overflow: visible;
}

.tab-owl-slot {
  width: 26px;
  height: 26px;
}

.tab .tab-owl {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 68px;
  height: 68px;
  opacity: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

.tab.active .tab-owl,
.tab:active .tab-owl {
  opacity: 1;
  transform: translateX(-50%);
}
