:root {
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #fff;
  background: #061633;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
button,
input,
textarea {
  font: inherit;
}
button {
  border: 0;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:focus-visible {
  outline: 3px solid #9ff7ff;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
img {
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
button canvas {
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
#viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
#stage {
  position: absolute;
  width: 1624px;
  height: 750px;
  transform-origin: center;
  overflow: hidden;
  background: #173a87 url("../assets/images/hall_datingbbg_jpg.jpg") center/100%
    100% no-repeat;
  isolation: isolate;
}
#stage.night {
  filter: brightness(0.72);
}
.ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 20%, #5eb3ef24, transparent 35%),
    radial-gradient(ellipse at 95% 70%, #c276f322, transparent 45%);
}
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, #e0f4ff9c 1px, transparent 3px),
    radial-gradient(circle, #a7e7ffa8 1px, transparent 4px);
  background-size:
    263px 181px,
    397px 287px;
  opacity: 0.38;
  animation: float-bg 28s linear infinite;
}
@keyframes float-bg {
  to {
    transform: translateY(-50px);
  }
}
.header {
  position: absolute;
  top: 8px;
  left: 50%;
  width: min(1260px, calc(100% - 58px));
  height: 89px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}
.profile {
  display: grid;
  grid-template-columns: 70px 20px 65px 14px minmax(0, 109px);
  align-items: center;
  flex: 0 0 278px;
  width: 278px;
  background: none;
  padding: 0;
  white-space: nowrap;
  height: 78px;
  text-align: left;
}
.avatar {
  height: 72px;
  width: 72px;
  border: 3px solid #d1d4d8;
  border-radius: 3px;
  background: linear-gradient(#606489, #322f67);
}
.profile-portrait {
  grid-column: 1;
  position: relative;
  width: 70px;
  height: 70px;
}
.profile .avatar {
  position: absolute;
  z-index: 1;
  inset: 3px;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 3px;
  background: #fff;
}
.profile .avatar-frame {
  position: absolute;
  inset: 0;
  width: 70px;
  height: 70px;
}
.profile .vip {
  grid-column: 3;
  width: 65px;
  height: 34px;
  transform: translateY(5px);
}
.profile .player-name {
  grid-column: 5;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  color: #d1e4ff;
  text-shadow: none;
  transform: translateY(5px);
}
.wallet {
  margin-left: 60px;
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 235px;
  height: 67px;
  padding: 6px 0 6px 12px;
  background: linear-gradient(90deg, #14297000, #091c5199 40%);
  border-radius: 38px;
}
.wallet > img {
  width: 43px;
  height: 43px;
}
.wallet strong {
  color: #ffdb64;
  font-size: 29px;
  min-width: 86px;
  text-align: center;
  text-shadow: 0 2px 2px #66421c;
}
.wallet button {
  width: 56px;
  height: 56px;
  padding: 0;
  background: none;
}
.wallet button img {
  width: 100%;
  height: 100%;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  height: 100%;
  padding-left: 16px;
}
.top-actions > button {
  position: relative;
  width: 140px;
  height: 95px;
  background: none;
  padding: 0;
}
.top-actions canvas {
  width: 100%;
  height: 100%;
}
.top-actions > button:first-child {
  width: 145px;
}
.activity-tip {
  position: absolute;
  top: 100%;
  left: -18px;
  width: 176px;
  font-size: 21px;
  color: #d3f5ff;
  border-radius: 6px;
  padding: 6px 2px;
  background: linear-gradient(#627accda, #4160adb5);
  box-shadow: 0 2px 8px #20469b;
  opacity: 0;
  animation: tip 10s infinite;
  z-index: 8;
}
@keyframes tip {
  20%,
  58% {
    opacity: 1;
  }
  65%,
  100% {
    opacity: 0;
  }
}
.community {
  filter: drop-shadow(0 4px 3px #171d69);
}
.community .bubble {
  position: absolute;
  display: block;
  border: 6px solid #f5d784;
  border-radius: 18px;
  box-shadow: inset 0 0 14px #c391ff;
  color: #ffe595;
  text-shadow: 0 3px 3px #a86b37;
}
.community .gold {
  background: linear-gradient(#f8d581, #8364cf 50%, #6045b8);
  width: 88px;
  height: 72px;
  right: 3px;
  top: 4px;
  font-size: 48px;
  line-height: 37px;
  letter-spacing: 1px;
}
.community .purple {
  left: 9px;
  top: 30px;
  width: 61px;
  height: 49px;
  background: linear-gradient(#aca0ff, #5350b3);
  border: 3px solid #9c7ce8;
  border-radius: 7px;
  font-size: 34px;
  line-height: 44px;
  color: #cfb8ff;
}
.community b {
  position: absolute;
  bottom: 1px;
  left: 30px;
  color: #e9d8ff;
  font-size: 33px;
  letter-spacing: 2px;
  text-shadow:
    0 3px #795aca,
    -2px -2px #8065bd,
    2px 0 #8065bd;
}
.ticker {
  position: absolute;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 40px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, transparent, #10245c65, transparent);
  font-weight: bold;
  font-size: 25px;
  z-index: 4;
}
.ticker > img {
  width: 35px;
  height: 33px;
  margin-right: 7px;
}
.ticker-clip {
  overflow: hidden;
  flex: 1;
  height: 40px;
  mask-image: linear-gradient(90deg, #000 96%, transparent);
}
#tickerText {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 40px;
  gap: 5px;
  animation: ticker 22s linear infinite;
  padding-left: 100%;
}
@keyframes ticker {
  to {
    transform: translateX(-100%);
  }
}
.notice-name {
  color: #72e0eb;
}
.notice-game {
  color: #ffc37c;
}
.notice-win {
  color: #ffcd70;
}
.notice-multiplier {
  color: #e6a1f8;
}
.inline-vip {
  width: 47px;
  height: 29px;
  vertical-align: middle;
  margin: 0 3px;
}
.inline-coin {
  width: 29px;
  height: 29px;
  vertical-align: middle;
  margin: 0 3px;
}
#gameScroll {
  position: absolute;
  top: 125px;
  left: 0;
  right: 0;
  height: 523px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior: contain;
  touch-action: pan-x;
  cursor: grab;
  padding-left: 32px;
  padding-right: 36px;
  outline: 0;
}
#gameScroll::-webkit-scrollbar {
  display: none;
}
#gameScroll.dragging {
  cursor: grabbing;
}
#games {
  position: relative;
  width: 1984px; /* [接入] 原 1706px，新增森林舞会/鱼虾蟹一列 */
  height: 523px;
  user-select: none;
}
.game-card {
  position: absolute;
  padding: 0;
  background: none;
  border-radius: 23px;
  text-align: left;
  transition: filter 0.15s;
  outline-offset: -3px;
}
.game-card:hover {
  filter: brightness(1.06);
}
.game-card:active {
  filter: brightness(1.14);
}
.game-card .art {
  position: absolute;
  left: -26px;
  top: -26px;
  width: 304px;
  height: 278px;
}
.game-card .tag-art {
  position: absolute;
  width: 112px;
  height: 94px;
  left: -22px;
  top: -37px;
  z-index: 5;
  filter: drop-shadow(0 0 7px #ff884960);
}
.game-card.wide .art {
  width: 444px;
  height: 322px;
  left: -24px;
  top: -69px;
}
.game-card.wide.jxlw .art {
  width: 444px;
  height: 280px;
  top: -27px;
}
.game-card.tall .art {
  width: 304px;
  height: 532px;
  left: -26px;
  top: -26px;
}
.card-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 23px;
}
.game-card.tall .creatures {
  width: 580px;
  height: 418px;
  left: -151px;
  top: 0;
}
.game-card.tall .title-art {
  width: 252px;
  height: 76px;
  left: 0;
  top: 404px;
}
.game-card .soft-glow {
  position: absolute;
  inset: 0;
  box-shadow: 0 12px 19px #092b724d;
  border-radius: 23px;
  z-index: -1;
}
.page-arrow {
  position: absolute;
  top: 352px;
  width: 38px;
  height: 80px;
  z-index: 7;
  font-size: 65px;
  line-height: 50px;
  background: #1130686b;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}
.page-arrow.left {
  left: 0;
}
.page-arrow.right {
  right: 0;
}
#stage:hover .page-arrow {
  opacity: 0.75;
}
.page-arrow:disabled {
  opacity: 0 !important;
}
.bottom-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1304px, calc(100% - 30px));
  height: 112px;
  background: url("../assets/images/hall_b12datingdiban_png.png") center
    bottom/100% 92px no-repeat;
  display: flex;
  align-items: center;
  padding: 0 18px 8px;
}
.bottom-bar nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bottom-bar nav button {
  background: none;
  width: 98px;
  height: 90px;
  position: relative;
  padding: 0 5px;
}
.bottom-bar nav img {
  width: 100%;
  height: 80px;
}
.money-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 5px;
}
.money-actions button {
  padding: 0;
  background: none;
  width: 202px;
  height: 112px;
}
.money-actions canvas {
  width: 100%;
  height: 100%;
}
.money-actions button:last-child {
  width: 212px;
}
.badge {
  position: absolute;
  top: 0;
  right: 12px;
  border: 3px solid #fff;
  background: #ed0920;
  color: #fff;
  border-radius: 50%;
  height: 33px;
  width: 33px;
  line-height: 26px;
  font-size: 25px;
  box-shadow: 0 2px 4px #081838;
}
.sparkle {
  position: absolute;
  left: 19px;
  top: -10px;
  color: white;
  font-size: 58px;
  text-shadow: 0 0 14px #a6eeff;
  animation: sparkle 4s linear infinite;
}
@keyframes sparkle {
  50% {
    transform: scale(0.5) rotate(120deg);
    opacity: 0.15;
  }
}
.demo-label {
  position: absolute;
  bottom: 5px;
  left: 10px;
  background: none;
  font-size: 12px;
  color: #beccec8c;
  padding: 0;
}
.win-notice {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1300px, 92%);
  height: 94px;
  z-index: 12;
  background: linear-gradient(
    90deg,
    transparent,
    #ac923377 12%,
    #483b268f 70%,
    transparent
  );
  border-top: 1px solid #f0d49188;
  border-bottom: 2px solid #ffe18794;
  pointer-events: none;
  display: flex;
  align-items: center;
  padding: 0 22px 0 125px;
  animation: notice-in 0.5s ease-out;
}
.win-notice .wealth {
  position: absolute;
  left: 0;
  top: -18px;
  width: 135px;
  height: 120px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
#winText {
  white-space: nowrap;
  font-size: 26px;
  font-weight: bold;
  text-shadow: 0 2px 3px #493b42;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 4px;
}
.win-notice .inline-vip {
  width: 55px;
  height: 35px;
}
@keyframes notice-in {
  from {
    opacity: 0;
    transform: translate(-50%, -30px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.win-notice {
  height: 137px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border: 0;
  padding-left: 155px;
}
.win-notice .wealth {
  display: none;
}
.game-card[data-game="fqzs"] .art,
.game-card[data-game="qznn"] .art,
.game-card[data-game="dfdc"] .art {
  top: -9px;
}
.game-card[data-game="zjh"] .card-clip,
.game-card[data-game="ddz"] .card-clip {
  transform: translateY(-17px);
}

/* Keep the portrait on the card edge; VIP/name sit slightly below its center. */
.profile {
  transform: translateY(-3px);
}
.wallet {
  transform: translateY(-2px);
}
#gameScroll {
  padding-left: max(32px, calc((100% - 1270px) / 2));
}
.header {
  z-index: 15;
}
.community-menu {
  position: absolute;
  right: -6px;
  top: 101px;
  width: 230px;
  height: 126px;
  display: flex;
  justify-content: center;
  gap: 19px;
  align-items: center;
  background: linear-gradient(135deg, #314285f5, #3958a3f5);
  border: 3px solid #6c85eb;
  border-radius: 18px;
  box-shadow: 0 5px 10px #1c286b60;
  z-index: 18;
}
.community-menu:before {
  content: "";
  position: absolute;
  right: 99px;
  top: -17px;
  width: 25px;
  height: 25px;
  background: #3c51a0;
  border-top: 3px solid #6c85eb;
  border-left: 3px solid #6c85eb;
  transform: rotate(45deg);
  z-index: -1;
}
.community-menu button {
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 18px;
  line-height: 25px;
}
.social-icon {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  display: block;
  overflow: hidden;
}
.social-icon.telegram {
  background: #23a9e7;
  padding: 5px;
}
.social-icon svg {
  width: 100%;
  height: 100%;
}
.social-icon.facebook {
  background: #1879ed;
  font: bold 74px/82px Arial;
  padding-left: 4px;
}

/* Mobile viewport, safe areas and rotated pointer scrolling. */
html, body { overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
#viewport { box-sizing: border-box; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.mobile-drag-scroll { touch-action: none !important; overscroll-behavior: contain; scrollbar-width: none !important; cursor: grab; user-select: none; -webkit-user-select: none; }
.mobile-drag-scroll::-webkit-scrollbar { display: none; }
.mobile-drag-scroll.dragging { cursor: grabbing; }
.mobile-drag-scroll input, .mobile-drag-scroll textarea { user-select: text; -webkit-user-select: text; }


#stage{background-size:cover}#gameScroll{top:calc(125px + var(--extra-height,0px))}.page-arrow{top:calc(352px + var(--extra-height,0px))}

/* [接入] 森林舞会、鱼虾蟹静态入口卡（大厅原稿没有这两款的入口动画） */
.static-card {
  background: #0d2a4a;
  box-shadow: inset 0 0 0 3px #f7d77a99;
}
.static-card .static-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}
.static-card .static-logo {
  position: absolute;
  left: 6%;
  width: 88%;
  top: 50%;
  transform: translateY(-50%);
  filter: drop-shadow(0 4px 8px #0008);
}
.game-card.tall-static .static-logo {
  top: auto;
  bottom: 6%;
  transform: none;
}

/* [接入] 普通模式 / 演示模式 悬浮开关（大厅左侧空白带，设计尺寸 1624×750） */
#modeSwitch {
  position: absolute;
  left: 20px;
  top: 250px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(8, 24, 70, 0.72);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(120, 180, 255, 0.35);
}
#modeSwitch button {
  width: 128px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #b9c9ef;
  font: bold 22px/48px "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
#modeSwitch button.on {
  color: #3a2200;
  background: linear-gradient(#ffe79a, #f5b73b);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
