/*
 * Shared navigation bar across Play / Learn / Arena.
 *
 * --app-nav-height is the visible bar height; consumers use
 *   calc(var(--app-nav-height) + env(safe-area-inset-top, 0px))
 * for top padding so their first content row clears the bar (otherwise
 * the bar sits over the top ~52px of the page — Hoppo gets clipped).
 */
:root {
  --app-nav-height: 52px;
}

.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--app-nav-height);
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.3);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.app-nav.nav-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.app-nav-logo {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #fff;
  font-family: 'Nunito', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 16px;
}

.app-nav-logo-icon {
  /* Was a 🎮 emoji (cross-platform inconsistent — gray on iOS, color on
   * Android, mono on Safari desktop). Now a Hoppo head img tag for a
   * brand-consistent mark in the persistent nav. */
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.app-nav-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.app-nav-tabs {
  display: flex;
  gap: 4px;
}

.app-nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 24px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.app-nav-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.app-nav-tab.active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.app-nav-tab-icon {
  font-size: 16px;
}

/*
 * Mobile: drop the logo entirely so it can't collide with centered
 * tabs on narrow viewports (was hiding just the text, but the
 * absolutely-positioned icon still stole horizontal space from the
 * tabs on 360px and smaller screens). Tabs already say Play / Learn /
 * Arena — the logo is decorative duplication. Tabs themselves get a
 * tighter pad so all three fit comfortably on a 320px iPhone SE.
 */
@media (max-width: 480px) {
  .app-nav-logo {
    display: none;
  }
  .app-nav-tab {
    padding: 8px 14px;
    font-size: 13px;
  }
  .app-nav-tab-label {
    /* Hide labels on the very narrowest screens so 3 tabs fit cleanly */
    display: inline;
  }
}

@media (max-width: 360px) {
  .app-nav-tab {
    padding: 8px 10px;
    font-size: 12px;
    gap: 4px;
  }
}
