* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #d3e7ff;
  color: #577897;
  font:
    16px Arial,
    'Microsoft YaHei',
    sans-serif;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #268aff;
  outline-offset: 2px;
}
button:hover {
  filter: brightness(1.04);
}
.app {
  max-width: 540px;
  min-height: 100vh;
  margin: auto;
  background: linear-gradient(130deg, #edf9ff, #dbeefa 65%, #edf8fd);
  padding-bottom: 95px;
  position: relative;
}
header {
  height: 65px;
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 19px;
}
.brand img {
  width: 155px;
  height: 48px;
  object-fit: contain;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-tools button {
  padding: 0;
  color: #72b8ea;
}
#currency {
  border-radius: 22px;
  background: #ecfaffbb;
  padding: 2px 7px;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.coin {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2dbd9c;
  border: 2px solid #eed16b;
  color: white;
  font-weight: bold;
}
.tool {
  font-size: 35px;
  line-height: 1;
}
.hero {
  height: 245px;
  position: relative;
  overflow: hidden;
}
.hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  background: #d4e9f4;
  border: 1px solid #b9deef;
}
.dots button.active {
  background: #73b9e7;
}
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  margin: 7px 15px 0;
  padding: 0 12px;
  border-radius: 20px;
  background: #ffffffb5;
  font-size: 13px;
  color: #161d27;
  font-weight: bold;
}
.notice > span {
  color: #74b9ed;
  font-size: 20px;
}
.notice > div {
  overflow: hidden;
  flex: 1;
  white-space: nowrap;
}
.notice p {
  display: inline-block;
  margin: 0;
  animation: marquee 22s linear infinite;
  padding-left: 5px;
}
.notice button {
  position: relative;
  color: #78b5e7;
  font-size: 23px;
  padding: 0;
}
.notice b {
  position: absolute;
  right: -4px;
  top: -3px;
  font-size: 9px;
  background: #ef6c6c;
  color: white;
  border-radius: 8px;
  padding: 1px 4px;
}
@keyframes marquee {
  0%,
  15% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-70%);
  }
}
.quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px 14px;
  gap: 10px;
}
.account {
  display: flex;
  gap: 12px;
  flex: 1.2;
}
.account button {
  height: 37px;
  border-radius: 6px;
  font-size: 15px;
  min-width: 85px;
}
.outline {
  border: 1px solid #3896dd;
  color: #388fce;
  background: #ffffff30;
}
.primary {
  color: #fff;
  background: linear-gradient(#359efa, #317ced);
  box-shadow: 0 3px 10px #7ebef633;
}
.quick > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  white-space: nowrap;
  padding: 0;
  font-size: 15px;
  gap: 4px;
}
.quick img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.game-grid {
  padding: 0 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.category {
  background: #ffffffb3;
  border-radius: 17px;
  overflow: hidden;
  min-width: 0;
  padding: 0 16px 7px;
}
.category-title {
  width: 100%;
  height: 30px;
  display: block;
  position: relative;
  font-size: 16px;
}
.category-title span {
  position: absolute;
  right: 0;
  font-size: 27px;
  color: #c9deed;
  top: -1px;
}
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tiles button {
  padding: 0;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(#deedf7, #f7fcff);
}
.tiles img {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: contain;
}
.popular {
  grid-row: span 2;
  padding: 0 24px 7px;
}
.hot-game {
  display: block;
  padding: 0;
  width: 100%;
  height: calc(100% - 30px);
  border-radius: 14px;
  overflow: hidden;
}
.hot-game img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.more-card > button:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 1px;
  font-size: 13px;
}
.more-symbol {
  color: #51a9ee;
  font-size: 62px;
  line-height: 1.15;
}
footer {
  text-align: center;
  padding: 27px 0 10px;
  color: #86a4bf;
}
footer img {
  width: 110px;
  opacity: 0.55;
}
footer p {
  font-size: 13px;
  margin: 8px;
}
footer small {
  font-size: 11px;
}
.bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(540px, 100%);
  height: 80px;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: #fff;
  z-index: 5;
  box-shadow: 0 -2px 8px #a9cce533;
}
.bottom button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #86b4d5;
  gap: 1px;
  padding: 4px;
}
.bottom img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.bottom .selected {
  color: #2997e6;
}
.diamond {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: white;
  font-weight: bold;
  font-size: 41px;
  background: linear-gradient(130deg, #a2f7ff, #1385e7 45%, #60c9fc 60%, #0753b5);
  clip-path: polygon(18% 0, 82% 0, 100% 25%, 50% 100%, 0 25%);
  filter: drop-shadow(0 2px 3px #177bca);
  margin-top: -24px;
  margin-bottom: 6px;
}
.deposit > span:last-child {
  margin-top: 0;
}
dialog {
  width: min(420px, calc(100% - 36px));
  border: 0;
  border-radius: 18px;
  padding: 22px;
  background: #f5fbff;
  color: #52728f;
  box-shadow: 0 20px 90px #143c6455;
}
dialog::backdrop {
  background: #193d6470;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-head h2 {
  font-size: 20px;
  margin: 0;
}
.dialog-head button {
  font-size: 28px;
  line-height: 1;
}
label {
  display: block;
  font-size: 14px;
  margin-bottom: 15px;
}
input {
  width: 100%;
  padding: 12px;
  border: 1px solid #c7dfef;
  background: white;
  border-radius: 8px;
  display: block;
  margin-top: 7px;
  font: inherit;
  color: #315677;
}
.submit {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
}
.hint {
  font-size: 12px;
  line-height: 1.8;
  color: #8a9fb0;
}
.switch-form {
  display: block;
  margin: 14px auto 0;
  color: #218fdf;
}
.option-list {
  display: grid;
  gap: 10px;
}
.option-list button {
  background: #e4f2fd;
  padding: 13px;
  border-radius: 8px;
  text-align: left;
}
.page-head {
  padding: 20px;
  text-align: center;
}
.page-head h1 {
  font-size: 24px;
  margin: 8px 0;
}
.empty,
.offer,
.profile {
  margin: 14px 16px;
  border-radius: 16px;
  padding: 24px;
  background: #ffffffb3;
  text-align: center;
}
.empty p,
.offer p,
.profile p {
  font-size: 14px;
  line-height: 1.8;
  color: #849cb0;
}
.empty button,
.profile button {
  padding: 10px 26px;
  border-radius: 7px;
}
.offer img {
  width: 100%;
  border-radius: 10px;
}
.profile .avatar {
  font-size: 48px;
}
#toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: #245378ed;
  color: white;
  padding: 12px 20px;
  border-radius: 9px;
  max-width: 85%;
  font-size: 14px;
  z-index: 20;
  display: none;
}
@media (max-width: 500px) {
  header {
    height: 55px;
    padding: 6px 13px;
  }
  .brand img {
    width: 130px;
    height: 41px;
  }
  .header-tools {
    gap: 7px;
  }
  .tool {
    font-size: 29px;
  }
  #currency {
    font-size: 15px;
  }
  .coin {
    width: 22px;
    height: 22px;
  }
  .hero {
    height: auto;
    aspect-ratio: 540/245;
  }
  .quick {
    padding: 10px 12px 13px;
    gap: 9px;
  }
  .account {
    gap: 7px;
  }
  .account button {
    min-width: 0;
    flex: 1;
    width: 58px;
    height: 30px;
    font-size: 12px;
  }
  .quick > button {
    font-size: 11px;
    gap: 3px;
  }
  .quick img {
    width: 30px;
    height: 30px;
  }
  .game-grid {
    gap: 10px;
    padding: 0 11px;
  }
  .category {
    padding: 0 11px 6px;
    border-radius: 13px;
  }
  .popular {
    padding: 0 17px 6px;
  }
  .category-title {
    height: 25px;
    font-size: 13px;
  }
  .hot-game {
    height: calc(100% - 25px);
  }
  .tiles {
    gap: 7px;
  }
  .tiles button {
    border-radius: 12px;
  }
  .notice {
    margin: 6px 11px 0;
    height: 26px;
    font-size: 11px;
  }
  .bottom {
    height: 72px;
  }
  .bottom img {
    width: 37px;
    height: 37px;
  }
  .more-symbol {
    font-size: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .notice p {
    animation: none;
  }
}
/* Five-second entry screen */
body.is-loading {
  overflow: hidden;
}
body.is-loading .app {
  visibility: hidden;
}
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(ellipse at 50% 30%, #fff 0%, #edf9ff 35%, #d3e7ff 100%);
  display: grid;
  place-items: center;
  padding: 24px;
}
#loading-screen[hidden] {
  display: none;
}
.loading-card {
  width: min(320px, 100%);
  text-align: center;
}
.loading-card > img {
  width: 190px;
  max-width: 80%;
  height: auto;
}
.loading-card h1 {
  font-size: 22px;
  font-weight: 500;
  margin: 28px 0 12px;
  color: #408bd0;
}
.loading-card p {
  font-size: 14px;
  color: #7b9cba;
}
.loading-card strong {
  color: #258ee5;
  font-variant-numeric: tabular-nums;
}
.loading-spinner {
  margin: 38px auto 0;
  width: 46px;
  height: 46px;
  border: 3px solid #d4eafb;
  border-top-color: #379bee;
  border-radius: 50%;
  animation: loading-spin 1s linear infinite;
}
.loading-track {
  height: 5px;
  border-radius: 8px;
  background: #d5e9fa;
  overflow: hidden;
  margin-top: 26px;
}
#loading-progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8acdf5, #328bea);
  border-radius: 8px;
}
@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }
}
