:root {
  color-scheme: dark;
  font-family:
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  background: #020308;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  align-items: flex-start;
  background:
    radial-gradient(circle at 50% 6%, rgba(111, 44, 165, 0.34), transparent 34%),
    linear-gradient(180deg, #020308, #05040a 44%, #020308);
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  padding-bottom: calc(98px + env(safe-area-inset-bottom));
}

.game-home-v2 {
  background: #020308;
  box-shadow: 0 0 54px rgba(126, 40, 188, 0.28);
  display: block;
  isolation: isolate;
  max-width: 1024px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.hero-hud {
  aspect-ratio: 1024 / 220;
  background-image: url("./assets/game-home-v2/game-home-master.png");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% auto;
  position: relative;
}

.hero-metric {
  background:
    radial-gradient(circle at 14% 15%, rgba(255, 230, 166, 0.18), transparent 26%),
    radial-gradient(circle at 82% 24%, rgba(186, 75, 255, 0.24), transparent 34%),
    linear-gradient(180deg, #1b141a, #08070d 54%, #150d0f);
  box-shadow:
    inset 0 0 54px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 240, 190, 0.2);
  clip-path: polygon(9% 0, 91% 0, 100% 39%, 100% 61%, 91% 100%, 9% 100%, 0 61%, 0 39%);
  height: 73%;
  left: 19.3%;
  position: absolute;
  top: 21%;
  width: 61.4%;
}

.hero-metric::before,
.hero-metric::after {
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.hero-metric::before {
  background:
    linear-gradient(118deg, transparent 5%, rgba(255, 214, 128, 0.86) 13%, transparent 18%),
    linear-gradient(242deg, transparent 4%, rgba(203, 93, 255, 0.88) 14%, transparent 20%),
    linear-gradient(180deg, rgba(255, 242, 199, 0.34), transparent 16%, transparent 82%, rgba(255, 196, 92, 0.24));
  clip-path: polygon(9% 0, 91% 0, 100% 39%, 100% 61%, 91% 100%, 9% 100%, 0 61%, 0 39%, 9% 0, 9.7% 3%, 1.2% 40%, 1.2% 60%, 9.7% 97%, 90.3% 97%, 98.8% 60%, 98.8% 40%, 90.3% 3%, 9.7% 3%);
  opacity: 0.88;
}

.hero-metric::after {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent),
    radial-gradient(ellipse at 50% 0%, rgba(255, 223, 143, 0.2), transparent 46%);
  height: 37%;
  opacity: 0.58;
}

.metric-title {
  color: #fff7e1;
  font-size: clamp(11px, 2.2vw, 23px);
  font-weight: 900;
  left: 0;
  letter-spacing: 0;
  line-height: 1;
  position: absolute;
  right: 0;
  text-align: center;
  text-shadow: 0 0 16px rgba(255, 200, 99, 0.52);
  top: 15%;
}

.metric-number {
  background: linear-gradient(180deg, #fffdf4 0%, #fff6dc 20%, #ffdc76 63%, #c88319 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(38px, 11.9vw, 122px);
  font-weight: 900;
  left: 15%;
  letter-spacing: 0;
  line-height: 0.86;
  position: absolute;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.7),
    0 10px 18px rgba(0, 0, 0, 0.72),
    0 0 30px rgba(255, 202, 82, 0.58);
  top: 35%;
  white-space: nowrap;
}

.metric-number::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  content: attr(data-text);
  left: 0;
  opacity: 0.34;
  position: absolute;
  top: 0;
  transform: translateY(-5%);
}

.metric-number.is-ticking {
  animation: metricTick 0.58s cubic-bezier(0.18, 1.25, 0.28, 1);
}

.metric-growth {
  color: #23ff8d;
  font-size: clamp(12px, 2.6vw, 28px);
  font-weight: 950;
  position: absolute;
  right: 7%;
  text-shadow:
    0 0 8px rgba(32, 255, 138, 0.86),
    0 0 18px rgba(32, 255, 138, 0.34);
  top: 39%;
}

.metric-growth.is-ticking {
  animation: metricGrowthTick 0.58s ease;
}

.metric-trend {
  align-items: end;
  border-bottom: 1px solid rgba(255, 229, 151, 0.26);
  border-left: 1px solid rgba(178, 98, 255, 0.24);
  bottom: 24%;
  display: grid;
  gap: 7%;
  grid-template-columns: repeat(5, 1fr);
  height: 28%;
  overflow: hidden;
  position: absolute;
  right: 6.7%;
  width: 23%;
}

.metric-trend::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 100% 33%, 25% 100%;
  content: "";
  inset: 0;
  opacity: 0.44;
  position: absolute;
}

.metric-trend span {
  background: linear-gradient(180deg, #ec79ff, #7c22ca 62%, rgba(124, 34, 202, 0.2));
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 18px rgba(190, 67, 255, 0.72);
  display: block;
  height: var(--h);
  position: relative;
  transition: height 0.48s ease;
  z-index: 1;
}

.metric-trend i {
  border-top: 2px solid rgba(255, 214, 97, 0.95);
  box-shadow: 0 -1px 12px rgba(255, 214, 97, 0.8);
  height: 40%;
  left: 5%;
  position: absolute;
  top: 24%;
  transform: skewY(-11deg);
  width: 90%;
  z-index: 2;
}

.metric-times {
  bottom: 8%;
  color: rgba(255, 240, 203, 0.68);
  display: flex;
  font-size: clamp(6px, 0.9vw, 9px);
  justify-content: space-between;
  position: absolute;
  right: 5.4%;
  width: 25%;
}

.master-crop {
  aspect-ratio: 1024 / 1316;
  overflow: hidden;
  position: relative;
}

.master-image {
  display: block;
  height: auto;
  pointer-events: none;
  transform: translateY(-14.3229167%);
  user-select: none;
  width: 100%;
}

.game-link {
  border-radius: 18px;
  display: block;
  outline: 0;
  position: absolute;
}

.game-link:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(255, 222, 126, 0.92), 0 0 26px rgba(182, 88, 255, 0.7);
}

.game-link-texas {
  height: 17.6%;
  left: 3%;
  top: 29.6%;
  width: 94%;
}

.game-link-niuniu {
  height: 16.7%;
  left: 3%;
  top: 49.2%;
  width: 94%;
}

.game-link-three-card {
  height: 16.9%;
  left: 3%;
  top: 68.3%;
  width: 94%;
}

.vip-lounge-card {
  background: #050209;
  border: 1px solid rgba(255, 224, 153, 0.84);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 42px rgba(255, 206, 98, 0.12),
    0 0 0 1px rgba(192, 50, 232, 0.3),
    0 16px 0 #020308,
    0 0 24px rgba(179, 42, 218, 0.38),
    0 18px 34px rgba(0, 0, 0, 0.62);
  color: #fff1bb;
  display: block;
  height: 12.9%;
  left: 2.9%;
  overflow: hidden;
  position: absolute;
  text-decoration: none;
  top: 86.1%;
  width: 94.2%;
  z-index: 8;
}

.vip-lounge-card::before,
.vip-lounge-card::after {
  content: "";
  pointer-events: none;
  position: absolute;
}

.vip-lounge-card::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 243, 184, 0.88), transparent),
    radial-gradient(circle, rgba(255, 233, 153, 0.52), transparent 64%);
  filter: blur(0.2px);
  height: 2px;
  left: 5%;
  opacity: 0.88;
  top: 0;
  width: 90%;
}

.vip-lounge-card::after {
  background:
    linear-gradient(90deg, transparent 0 42%, rgba(0, 0, 0, 0.5) 58%, rgba(0, 0, 0, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%);
  inset: 0;
}

.vip-lounge-bg {
  display: block;
  height: 100%;
  left: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  user-select: none;
  width: 100%;
}

.vip-lounge-copy {
  align-content: center;
  display: grid;
  justify-items: start;
  min-width: 0;
  position: absolute;
  right: 5%;
  top: 0;
  bottom: 0;
  width: 45.5%;
  z-index: 2;
}

.vip-lounge-copy strong {
  background: linear-gradient(180deg, #fffdf0 0%, #fff0ae 38%, #e4a642 72%, #8c5417 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(20px, 6.25vw, 72px);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 0.95;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.38),
    0 8px 18px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(255, 210, 111, 0.38);
  white-space: nowrap;
}

.vip-lounge-copy > span {
  color: rgba(255, 237, 188, 0.92);
  font-size: clamp(10px, 2.75vw, 34px);
  font-weight: 900;
  line-height: 1;
  margin-top: 3%;
  text-shadow: 0 0 14px rgba(255, 210, 111, 0.24);
  white-space: nowrap;
}

.vip-lounge-copy > span::after {
  background:
    linear-gradient(90deg, rgba(255, 230, 154, 0.72), rgba(255, 230, 154, 0.14)),
    radial-gradient(circle, #f7d987 0 2px, transparent 3px);
  content: "";
  display: block;
  height: 1px;
  margin-top: 4%;
  width: 84%;
}

.vip-lounge-copy i {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(232, 64, 255, 0.34), rgba(95, 8, 102, 0.88)),
    linear-gradient(180deg, rgba(255, 240, 179, 0.16), rgba(255, 240, 179, 0));
  border: 1px solid rgba(255, 224, 153, 0.94);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 18px rgba(215, 54, 255, 0.44),
    0 0 16px rgba(255, 206, 91, 0.24);
  color: #ffe9a6;
  display: inline-flex;
  font-size: clamp(11px, 2.95vw, 36px);
  font-style: normal;
  font-weight: 1000;
  gap: 0.24em;
  line-height: 1;
  margin-top: 4%;
  padding: 0.42em 0.92em;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.52);
  white-space: nowrap;
}

.vip-lounge-copy b {
  font-size: 1.35em;
  line-height: 0.7;
}

@keyframes metricTick {
  0% {
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }

  38% {
    filter: brightness(1.42);
    transform: translateY(-3%) scale(1.055);
  }

  100% {
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes metricGrowthTick {
  0% {
    opacity: 0.72;
    transform: translateY(2px) scale(0.96);
  }

  36% {
    opacity: 1;
    transform: translateY(-2px) scale(1.12);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.game-bottom-nav {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(20, 10, 24, 0.96), rgba(6, 3, 9, 0.98)),
    rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 226, 154, 0.24);
  border-radius: 28px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(196, 42, 255, 0.12),
    0 12px 34px rgba(0, 0, 0, 0.56),
    0 0 26px rgba(174, 46, 214, 0.22);
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 74px;
  left: 50%;
  max-width: 960px;
  padding: 7px;
  position: fixed;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 960px);
  z-index: 50;
}

.game-bottom-nav a {
  align-items: center;
  border-radius: 21px;
  color: rgba(255, 235, 184, 0.78);
  display: grid;
  gap: 3px;
  height: 100%;
  justify-items: center;
  min-width: 0;
  text-decoration: none;
}

.game-bottom-nav a.active {
  background: linear-gradient(135deg, #6e18df 0%, #b832a2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 20px rgba(170, 56, 255, 0.4);
  color: #fff2be;
}

.game-bottom-nav b {
  display: block;
  font-size: clamp(15px, 4.6vw, 22px);
  line-height: 1;
}

.game-bottom-nav span {
  display: block;
  font-size: clamp(10px, 3vw, 14px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 560px) {
  html,
  body {
    min-height: 100svh;
  }

  body {
    background: #020308;
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .game-home-v2 {
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: calc(100svh - 84px - env(safe-area-inset-bottom));
    max-width: none;
    min-height: 660px;
    width: 100%;
  }

  .hero-hud {
    aspect-ratio: auto;
    background-size: 100% calc(100% * 1536 / 220);
    flex: 0 0 14.6%;
  }

  .master-crop {
    aspect-ratio: auto;
    flex: 1 1 auto;
  }

  .master-image {
    height: calc(100% * 1536 / 1316);
    object-fit: fill;
    width: 100%;
  }

  .metric-trend,
  .metric-times {
    opacity: 0.9;
  }
}
