:root {
  --global-header-height: 135px;
  --mobile-bottom-height: calc(60px + env(safe-area-inset-bottom, 0px));
}

html:has(#siteHeader) {
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--global-header-height) + 20px);
}

html body #siteHeader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: block !important;
  flex: none;
  width: auto;
  min-height: var(--global-header-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border-bottom: 1px solid #ffffff12 !important;
  background: #101112;
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.site-header-spacer { height: var(--global-header-height); flex: none; }

html body #siteHeader.is-scrolled {
  background: rgba(30, 30, 32, .94);
  border-bottom-color: transparent !important;
  box-shadow: 0 4px 20px #00000012;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html body #siteHeader.is-scrolled {
    background: rgba(30, 30, 32, .72);
  }
}

@media (prefers-reduced-motion: reduce) {
  html body #siteHeader { transition: none; }
}

html body #siteHeader .header-inner {
  display: block;
  width: var(--site-content) !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 auto;
}

#siteHeader .header-top-row {
  display: flex;
  align-items: center;
  height: 76px;
  gap: 32px;
}

#siteHeader .brand-lockup {
  flex: 0 0 168px;
  position: static;
  transform: none;
  margin: 0 auto 0 0 !important;
}

#siteHeader .brand-logo {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
}

#siteHeader .header-search {
  display: flex;
  flex: 0 1 380px;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  max-width: 380px;
  height: 40px;
  padding: 0 20px 0 16px;
  border: 1px solid #ffffff0d;
  border-radius: 8px;
  color: #a5a9ac;
  background: #202224;
  font-size: 13px;
  text-decoration: none;
}

#siteHeader .header-search span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#siteHeader .header-search img {
  display: block;
  flex: 0 0 17px;
  margin-right: 5px;
}

#siteHeader .header-download {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--site-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

#siteHeader .header-download svg { flex: none; width: 17px; height: 17px; }
#siteHeader .header-download:hover { background: var(--site-blue-hover); }
#siteHeader .header-download:focus-visible { outline: 2px solid var(--site-blue-text); outline-offset: 3px; }

#siteHeader .header-search:is(:hover, :focus-visible) { border-color: #ffffff29; }

#siteHeader .header-services {
  display: flex;
  flex: none;
  align-items: center;
  gap: 22px;
}

#siteHeader :is(.header-membership, .header-wallet) {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  color: #e4c695;
  line-height: 1.4;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

#siteHeader .header-membership .crown-icon { width: 19px; height: 19px; }
#siteHeader .header-wallet { font-size: 12px; }
#siteHeader .header-account-control { position: relative; }

#siteHeader .header-account {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  text-decoration: none;
}

#siteHeader :is(.account-avatar, .account-avatar-photo) {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

#siteHeader .account-avatar { background: url('/static/images/header/guest-pc.svg') center/contain no-repeat; }
#siteHeader .account-label { position: absolute; display: block; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
#siteHeader .header-account .account-status-badge {
  position: absolute;
  top: 100%;
  right: 0;
  padding: 1px 5px;
  font-size: 10px;
  line-height: 15px;
}

#siteHeader .header-nav {
  display: flex;
  align-items: stretch;
  height: 58px;
  gap: 32px !important;
  overflow-x: auto;
  scrollbar-width: none;
}

#siteHeader .header-nav::-webkit-scrollbar { display: none; }
#siteHeader .header-nav a {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  padding: 0 0 4px !important;
  color: #b5b7b9;
  background: none;
  font-size: 15px !important;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

#siteHeader .header-nav a:is(:hover, [aria-current="page"]) { color: #fff; }
#siteHeader .header-nav a[aria-current="page"] { font-weight: 650; }
#siteHeader .header-nav a[aria-current="page"]::after {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 18px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--site-blue, #1d9bf0);
  content: "";
}

#siteHeader .header-profile-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  width: min(280px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  gap: 0;
  padding: 18px 10px 8px;
  overflow: auto;
  overscroll-behavior: contain;
  color: #eee;
  border: 1px solid #ffffff20;
  border-radius: 12px;
  background: #1c1e20;
  box-shadow: 0 18px 50px #0006;
}

#siteHeader [hidden] { display: none !important; }
#siteHeader .header-profile-menu > a {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 12px;
  padding: 8px 11px;
  color: #eee;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
}

#siteHeader .header-profile-menu > a:is(:hover, :focus-visible) { background: #ffffff09; }
#siteHeader .header-profile-menu > .header-profile-identity {
  padding: 0 10px 18px;
  border-bottom: 1px solid #ffffff12;
  border-radius: 0;
}

#siteHeader .header-profile-identity img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  object-fit: cover;
}

#siteHeader .header-profile-identity > span { min-width: 0; }
#siteHeader .header-profile-identity strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#siteHeader .header-profile-menu small { display: block; margin-top: 4px; color: #9397a0; font-size: 11px; }
#siteHeader .header-profile-menu .header-profile-type { margin: 0 0 0 auto; font-size: 10px; white-space: nowrap; }

#siteHeader .header-profile-menu .header-profile-vip {
  min-height: 78px;
  margin: 0 0 6px;
  border-bottom: 1px solid #ffffff12;
  border-radius: 0;
  color: #e8c99b;
}

#siteHeader .header-profile-menu .header-profile-vip-entry { color: #ebd0a7; }
#siteHeader .header-profile-menu .header-profile-vip .header-profile-extra { color: inherit; font-weight: 650; }
#siteHeader .header-profile-menu .header-profile-row > .header-menu-icon:not(.header-menu-icon--next) { color: #9397a0; }
#siteHeader .header-profile-menu .header-profile-switch {
  margin-top: 6px;
  border-top: 1px solid #ffffff12;
  border-radius: 0;
  color: #a5a7ab;
}
#siteHeader .header-profile-menu .header-menu-icon,
#siteHeader .header-profile-menu .crown-icon { flex: none; width: 18px; height: 18px; }
#siteHeader .header-profile-menu .header-profile-extra,
#siteHeader .header-profile-menu > a > .header-menu-icon--next { margin-left: auto; color: #9397a0; }
#siteHeader .header-profile-menu .header-menu-icon--next { width: 16px; height: 16px; }
#siteHeader .header-profile-extra { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
#siteHeader .header-profile-vip .header-profile-extra { gap: 3px; font-size: 11px; }

#siteHeader a:focus-visible,
.mobile-site-nav a:focus-visible { outline: 2px solid var(--site-blue-text, #8dceff); outline-offset: -2px; }

@media (max-width: 1200px) {
  #siteHeader .header-nav { gap: 25px !important; }
  #siteHeader .header-top-row { gap: 24px; }
  #siteHeader .header-services { gap: 16px; }
}

@media (max-width: 1000px) {
  :root { --global-header-height: 126px; }
  #siteHeader .header-top-row { height: 70px; }
  #siteHeader .header-nav { height: 55px; gap: 28px !important; }
}

@media (min-width: 761px) and (max-width: 767px) {
  body:has(> #siteHeader) > .mobile-site-nav { display: none !important; }
  body:has(> #siteHeader + .mobile-site-nav):not(.is-detail-page, .is-play-page) { padding-bottom: 0; }
}

@media (max-width: 760px) {
  :root { --global-header-height: 115px; }
  #siteHeader .header-top-row { height: 64px; gap: 12px; }
  #siteHeader .brand-lockup { flex-basis: 122px; }
  #siteHeader .brand-logo { width: 122px; }
  #siteHeader .header-search { flex: 0 0 34px; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; background: transparent; }
  #siteHeader .header-search span { display: none; }
  #siteHeader .header-search img { flex-basis: 20px; width: 20px; height: 20px; margin-right: 0; }
  #siteHeader .header-download { gap: 5px; height: 34px; padding-inline: 10px; border-radius: 7px; font-size: 11px; }
  #siteHeader .header-download svg { width: 14px; height: 14px; }
  #siteHeader .header-services { gap: 10px; }
  #siteHeader :is(.header-membership, .header-coin-caption) { display: none; }
  #siteHeader .header-account { width: 27px; }
  #siteHeader :is(.account-avatar, .account-avatar-photo) { width: 27px; height: 27px; }
  #siteHeader .header-nav { display: flex; height: 50px; gap: 25px !important; }
  #siteHeader .header-nav a { font-size: 14px !important; }
  #siteHeader .header-nav a[aria-current="page"]::after { bottom: 6px; }

  body:has(> #siteHeader + .mobile-site-nav):not(.is-detail-page, .is-play-page) { padding-bottom: var(--mobile-bottom-height); }
  body:not(.is-detail-page, .is-play-page) > .mobile-site-nav {
    z-index: 180;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: var(--mobile-bottom-height);
    padding: 0 10px env(safe-area-inset-bottom, 0px);
    background: #191b1df5;
  }
  .mobile-site-nav a { min-height: 59px; color: #a6adb2; font-size: 10px; }
  .mobile-site-nav a[aria-current="page"] { color: #aecde6; }
}

@media (max-width: 360px) {
  #siteHeader .header-top-row { gap: 9px; }
  #siteHeader .brand-lockup { flex-basis: 110px; }
  #siteHeader .brand-logo { width: 110px; }
  #siteHeader .header-services { gap: 8px; }
}
