html.hf-home-legacy-route,
html.hf-home-legacy-route body,
html.hf-home-legacy-route #app {
  background: #f7f7f7 !important;
}

html.hf-home-legacy-route #app {
  overflow-x: hidden !important;
}

html.hf-home-legacy-route[data-ui-contain="1"] #app {
  zoom: 1 !important;
  width: min(100vw, var(--app-max-width, 100%)) !important;
  max-width: min(100vw, var(--app-max-width, 100%)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html.hf-home-legacy-route #app .page-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  left: 0 !important;
  right: 0 !important;
  overflow-x: hidden !important;
}

html.hf-home-legacy-route #app .home-v5 {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 100vh !important;
  background: #f7f7f7 !important;
  overflow-x: hidden !important;
}

html.hf-home-legacy-route #app .home-v5 .main-scroll {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: calc(100vh - 50px) !important;
  background: #f7f7f7 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

html.hf-home-legacy-route #app .home-v5 .main-scroll > :not(.hf-home-legacy) {
  display: none !important;
}

html.hf-home-legacy-route body > .activity-popup-overlay,
html.hf-home-legacy-route .activity-popup-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#app .hf-home-legacy {
  width: min(100%, var(--hf-home-shell-width, 375px)) !important;
  max-width: var(--hf-home-shell-width, 375px) !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  min-height: calc(100vh - 50px) !important;
  padding: 16px 15px calc(82px + env(safe-area-inset-bottom)) !important;
  box-sizing: border-box !important;
  background: #f7f7f7 !important;
  color: #111 !important;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  overflow-x: hidden !important;
}

#app .hf-home-legacy,
#app .hf-home-legacy * {
  box-sizing: border-box !important;
  -webkit-tap-highlight-color: transparent !important;
}

#app .hf-home-banner {
  display: block !important;
  width: 100% !important;
  height: clamp(132px, 38.65vw, 156px) !important;
  border: 0 !important;
  border-radius: 10px !important;
  background-image: url("/assets/home-legacy-assets/banner-wallet.jpg") !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  box-shadow: none !important;
}

#app .hf-home-notice {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 40px !important;
  margin-top: 16px !important;
  padding: 0 12px !important;
  background: #fff !important;
  border-radius: 0 !important;
  color: #252525 !important;
  overflow: hidden !important;
}

#app .hf-home-notice-icon {
  flex: 0 0 auto !important;
  width: 18px !important;
  height: 18px !important;
  margin-right: 12px !important;
  color: #f43f3b !important;
}

#app .hf-home-notice-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  color: #252525 !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 40px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#app .hf-home-notice-menu {
  flex: 0 0 auto !important;
  width: 21px !important;
  height: 21px !important;
  margin-left: 12px !important;
  color: #aeb4b8 !important;
}

#app .hf-home-wallet {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-height: 74px !important;
  margin-top: 12px !important;
  padding: 17px 22px 15px 20px !important;
  background: #fff !important;
  border-radius: 5px !important;
  box-shadow: none !important;
}

#app .hf-home-user {
  min-width: 0 !important;
  color: #111 !important;
}

#app .hf-home-username {
  display: block !important;
  max-width: 170px !important;
  margin-bottom: 8px !important;
  color: #111 !important;
  font-size: 15px !important;
  line-height: 18px !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#app .hf-home-balance-row {
  display: flex !important;
  align-items: center !important;
  color: #111 !important;
  font-size: 14px !important;
  line-height: 17px !important;
}

#app .hf-home-balance-currency {
  margin-right: 6px !important;
  color: #111 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

#app .hf-home-balance-value {
  min-width: 56px !important;
  color: #111 !important;
  letter-spacing: 1px !important;
}

#app .hf-home-eye {
  width: 22px !important;
  height: 18px !important;
  margin-left: 4px !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #222 !important;
  cursor: pointer !important;
}

#app .hf-home-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 22px !important;
  flex: 0 0 auto !important;
}

#app .hf-home-action {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #111 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

#app .hf-home-action-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  margin-bottom: 5px !important;
  border-radius: 50% !important;
  color: #fff !important;
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, .86) 0 10%, rgba(255, 255, 255, 0) 24%),
    linear-gradient(145deg, #ffd992 0%, #ff8d5c 50%, #ff504f 100%) !important;
  box-shadow: 0 2px 7px rgba(242, 83, 74, .22) !important;
}

#app .hf-home-action-icon svg {
  width: 24px !important;
  height: 24px !important;
  display: block !important;
}

#app .hf-home-action span:last-child {
  color: #111 !important;
  font-size: 14px !important;
  line-height: 18px !important;
  white-space: nowrap !important;
}

#app .hf-home-lottery-card {
  width: calc(100% + 30px) !important;
  margin: 10px -15px 0 !important;
  padding: 0 15px 18px !important;
  background: #fff !important;
  border-radius: 4px 4px 0 0 !important;
}

#app .hf-home-tabs {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  align-items: center !important;
  height: 44px !important;
  border-bottom: 1px solid #ececec !important;
}

#app .hf-home-tab {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  border: 0 !important;
  background: transparent !important;
  color: #555 !important;
  font-size: 16px !important;
  font-weight: 400 !important;
}

#app .hf-home-tab.active {
  color: #d42e3e !important;
}

#app .hf-home-tab.active::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  bottom: 1px !important;
  width: 40px !important;
  height: 3px !important;
  border-radius: 3px !important;
  background: #d42e3e !important;
  transform: translateX(-50%) !important;
}

#app .hf-home-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  column-gap: 0 !important;
  row-gap: 24px !important;
  width: 100% !important;
  padding: 30px 0 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

#app .hf-home-game {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-width: 0 !important;
  color: #111 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

#app .hf-home-game-icon-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 66px !important;
  height: 66px !important;
  margin-bottom: 8px !important;
}

#app .hf-home-game-icon {
  display: block !important;
  width: 66px !important;
  height: 66px !important;
  object-fit: contain !important;
}

#app .hf-home-game-icon-fallback {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #ff6b75 0%, #d42e3e 100%) !important;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 58px !important;
  text-align: center !important;
}

#app .hf-home-game-missing .hf-home-game-icon-fallback {
  display: inline-flex !important;
}

#app .hf-home-game-name {
  display: block !important;
  width: 100% !important;
  color: #111 !important;
  font-size: 14px !important;
  line-height: 18px !important;
  font-weight: 400 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#app .hf-home-pager {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  min-height: 32px !important;
  margin: 18px 0 0 !important;
}

#app .hf-home-pager[hidden] {
  display: none !important;
}

#app .hf-home-page-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 58px !important;
  height: 28px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 15px !important;
  background: linear-gradient(180deg, #ff5968 0%, #d93545 100%) !important;
  color: #fff !important;
  font-size: 13px !important;
  line-height: 28px !important;
  box-shadow: 0 3px 8px rgba(216, 49, 65, 0.22) !important;
}

#app .hf-home-page-btn:disabled {
  background: #e6e6e6 !important;
  color: #aaa !important;
  box-shadow: none !important;
}

#app .hf-home-page-indicator {
  min-width: 40px !important;
  color: #666 !important;
  font-size: 13px !important;
  line-height: 28px !important;
  text-align: center !important;
}

@media (max-width: 360px) {
  #app .hf-home-legacy {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #app .hf-home-lottery-card {
    width: calc(100% + 24px) !important;
    margin-left: -12px !important;
    margin-right: -12px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #app .hf-home-actions {
    gap: 14px !important;
  }

  #app .hf-home-game-icon-wrap,
  #app .hf-home-game-icon {
    width: 60px !important;
    height: 60px !important;
  }

  #app .hf-home-game-name {
    font-size: 13px !important;
  }

  #app .hf-home-pager {
    gap: 9px !important;
    margin-top: 16px !important;
  }

  #app .hf-home-page-btn {
    min-width: 52px !important;
    padding: 0 10px !important;
  }
}

@media (min-width: 430px) {
  #app .hf-home-legacy {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  #app .hf-home-lottery-card {
    width: calc(100% + 30px) !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}
