#futstats-pwa-install {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(7, 17, 31, 0.94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font: 700 14px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

#futstats-pwa-install:hover,
#futstats-pwa-install.is-ready {
  background: #4f46e5;
  transform: translateY(-1px);
}

#futstats-pwa-install:active {
  transform: translateY(1px);
}

.futstats-pwa-install-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 17px;
}

#futstats-pwa-help {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: end center;
  padding: 18px;
  padding-bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.futstats-pwa-help-card {
  position: relative;
  width: min(430px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  color: #ffffff;
  background: #0a1728;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.futstats-pwa-help-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 25px;
  cursor: pointer;
}

.futstats-pwa-help-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  border-radius: 17px;
  background: linear-gradient(145deg, #1476ff, #4f46e5);
  font-weight: 900;
  letter-spacing: -1px;
}

.futstats-pwa-help-title {
  margin-bottom: 9px;
  font-size: 20px;
  font-weight: 800;
}

.futstats-pwa-help-text {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.5;
}

#futstats-mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147482500;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 6px 7px max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line, #d6dee8);
  color: var(--muted, #53647a);
  background: color-mix(in srgb, var(--surface, #ffffff) 94%, transparent);
  box-shadow: 0 -10px 30px rgba(6, 26, 53, 0.12);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#futstats-mobile-nav.is-visible {
  display: grid;
}

.futstats-mobile-nav-item {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 56px;
  margin: 0;
  padding: 5px 2px;
  border: 0;
  border-radius: 14px;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 150ms ease, background 150ms ease, transform 120ms ease;
}

.futstats-mobile-nav-item:active {
  transform: scale(0.96);
}

.futstats-mobile-nav-item.is-active {
  color: var(--green, #4f46e5);
  background: var(--green-soft, #eef2ff);
}

.futstats-mobile-nav-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  line-height: 1;
}

.futstats-mobile-nav-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.futstats-mobile-nav-text-icon {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.futstats-mobile-nav-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#futstats-nav-toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 2147483400;
  max-width: calc(100vw - 32px);
  padding: 10px 15px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(7, 17, 31, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, 8px);
  font: 700 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

#futstats-nav-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  html.futstats-has-mobile-nav [data-testid="stAppViewContainer"] .block-container {
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
  }

  html.futstats-has-mobile-nav #futstats-pwa-install {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  html.futstats-mobile-keyboard #futstats-mobile-nav {
    display: none !important;
  }

  html.futstats-mobile-keyboard [data-testid="stAppViewContainer"] .block-container {
    padding-bottom: 1.35rem !important;
  }
}

@media (max-width: 360px) {
  .futstats-mobile-nav-label {
    font-size: 9px;
  }

  .futstats-mobile-nav-item {
    padding-inline: 0;
  }
}

@media (min-width: 901px) {
  #futstats-mobile-nav {
    display: none !important;
  }
}

@media (display-mode: standalone) {
  #futstats-pwa-install {
    display: none !important;
  }
}
