/* Fix home framing, scroll clipping, responsive RPG menus and fighting lobby */
body:not(.in-match) .app-main {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

body:not(.in-match) .page {
  height: auto;
  min-height: 100%;
  max-width: 1500px;
}

/* Trang chủ Fantasy RPG */
body:not(.in-match) #home {
  max-width: 100%;
  padding: 0;
}

@media (max-width: 900px) {
  .app-header {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 4%;
  }
  .main-nav {
    order: 3;
    width: 100%;
    height: auto;
    overflow-x: auto;
    gap: 6px;
    padding: 3px 0;
  }
  .main-nav button {
    height: auto;
    flex: none;
    padding: 8px 12px;
  }
  .header-profile {
    margin-left: auto;
  }
}

@media (max-width: 600px) {
  .brand { font-size: 13px; }
  .brand-mark { font-size: 28px; }
  .brand small { font-size: 7px; }
  .header-profile { gap: 6px; }
  .coin { padding: 4px 8px; font-size: 11px; }
  .profile-button { max-width: 115px; padding: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .fantasy-castle-glow,
  .btn-play-primary .btn-shine,
  .vs-glow-orb,
  .ambient * {
    animation: none !important;
  }
}
