:root {
  --bg: #0b1220;
  --panel: #0f1b2e;
  --panel2: #0d1729;
  --text: #eaf0ff;
  --muted: rgba(234, 240, 255, .7);
  --red: #ff3a68;
  --red2: #ff5a79;
  --card: #101b2c;
  --stroke: rgba(255, 255, 255, .10);
  --stroke2: rgba(255, 255, 255, .14);

  --chip-bg: rgba(255, 255, 255, .06);
  --chip-border: rgba(255, 255, 255, .10);
  --chip-border-hover: rgba(255, 255, 255, .16);
  --chip-radius: 16px;
  --chip-radius-wide: 14px;
  --chip-gap: 10px;

  --chip-size-desktop: 64px;
  --chip-size-mobile: 58px;

  --chip-wide-h-desktop: 56px;
  --chip-wide-h-mobile: 54px;

  --logo-scale-active-desktop: 1.12;
  --logo-scale-active-mobile: 1.14;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html {
  overflow-y: scroll;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: radial-gradient(1200px 500px at 50% -10%, rgba(255, 58, 104, .22), transparent 60%), var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100%;
  padding-bottom: 82px;
}

.weui-wide {
  width: 100%;
}

.weui-max-width {
  width: min(1100px, calc(100vw - 32px));
  margin: 0 auto;
}

.weui-navbar-fixed {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, .88);
  backdrop-filter: blur(10px);
}

.weui-navbar {
  height: auto;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.weui-navbar__item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-link {
  display: flex;
  align-items: center;
}

.brand-img {
  width: clamp(120px, 18vw, 220px);
  height: auto;
  display: block;
}

.weui-header-right span {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
}

.weui-header-right i {
  font-size: 1.8rem;
}

.weui-wide-swiper {
  padding: 16px 0 8px;
}

.hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  touch-action: pan-y;
}

.hero-track,
.hero-slide,
.hero-slide img {
  pointer-events: none;
}

.hero-slide a {
  pointer-events: auto;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform .28s ease;
  will-change: transform;
}

.hero-slide {
  flex: 0 0 100%;
}

.hero-slide a,
.hero-slide img {
  display: block;
  width: 100%;
}

.hero-slide img {
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 28px;
  line-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  pointer-events: auto;
  user-select: none;
}

.hero-prev {
  left: 10px;
}

.hero-next {
  right: 10px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dots .dot {
  width: 18px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .25);
  cursor: pointer;
  pointer-events: auto;
}

.hero-dots .dot.active {
  background: var(--red);
}

.search-wrap {
  width: 100%;
  margin: 12px 0 10px;
  padding: 0 2px;
}

.search-inner {
  width: 100%;
  position: relative;
  height: 46px;
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.search-input {
  flex: 1;
  height: 46px;
  border: 0;
  outline: none;
  font-size: 15px;
  padding: 0 92px 0 16px;
}

.search-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, .06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-ok {
  right: 48px;
}

.search-x {
  right: 8px;
}

.search-btn i {
  font-size: 16px;
  color: #111;
}

.search-platform {
  width: min(1100px, calc(100vw - 32px));
  margin: 10px auto 14px;
  padding: 12px;
}

.search-platform .weui-max-width {
  width: 100%;
  margin: 0;
}

.provider-list {
  list-style: none;
  padding: 0;
  margin: 0;
  gap: var(--chip-gap);
}

@media (min-width: 901px) {
  #providerBar .provider-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--chip-gap);
    width: 100%;
    overflow: hidden;
  }

  #providerBar .provider-item {
    flex: 1 1 0;
    min-width: 0;
    height: var(--chip-wide-h-desktop);
    border-radius: var(--chip-radius-wide);

    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;

    transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease, background .14s ease;
  }

  #providerBar .provider-item:hover {
    transform: translateY(-1px);
    border-color: var(--chip-border-hover);
  }

  #providerBar .provider-item.active {
    background: linear-gradient(180deg, rgba(255, 90, 121, .95), rgba(255, 58, 104, .95));
    border-color: rgba(255, 255, 255, .20);
    box-shadow: 0 0 0 2px rgba(255, 58, 104, .16) inset, 0 10px 20px rgba(0, 0, 0, .18);
  }

  #providerBar .provider-logo {
    width: clamp(44px, 36%, 66px);
    height: clamp(44px, 70%, 44px);
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .32));
    transition: transform .16s ease;
    transform-origin: center;
  }

  #providerBar .provider-item.active .provider-logo {
    transform: scale(var(--logo-scale-active-desktop));
  }
}

@media (max-width: 900px) {
  #providerBar .provider-list {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--chip-gap);

    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0 0 2px;
  }

  #providerBar .provider-list::-webkit-scrollbar {
    display: none;
  }

  #providerBar .provider-item {
    flex: 1 0 25%;
    min-width: 90px;
    height: var(--chip-wide-h-mobile);
    border-radius: var(--chip-radius-wide);

    background: var(--chip-bg);
    border: 1px solid rgba(255, 255, 255, .10);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;

    scroll-snap-align: start;
    transition: background .14s ease, box-shadow .14s ease, border-color .14s ease;
  }

  #providerBar .provider-item.active {
    background: linear-gradient(180deg, rgba(255, 90, 121, .95), rgba(255, 58, 104, .95));
    border-color: rgba(255, 255, 255, .16);
    box-shadow: 0 0 0 2px rgba(255, 58, 104, .14) inset;
  }

  #providerBar .provider-logo {
    width: clamp(40px, 40%, 56px);
    height: clamp(40px, 70%, 40px);
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .30));
    transition: transform .16s ease;
    transform-origin: center;
  }

  #providerBar .provider-item.active .provider-logo {
    transform: scale(var(--logo-scale-active-mobile));
  }
}

.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding-bottom: 8px;
}

@media (max-width: 900px) {
  .game-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media (max-width: 680px) {
  .hero-slide img {
    height: 200px;
  }

  .hero-arrow {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 26px;
  }

  .hero-prev {
    left: 8px;
  }

  .hero-next {
    right: 8px;
  }

  .game-list {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}

.game-card {
  border-radius: 16px;
  padding: 10px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.game-card:hover {
  transform: translateY(-2px);
}

.game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  object-fit: cover;
  background: #0a0f18;
  display: block;
}

.game-name {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 18px 0 8px;
}

.btn-loadmore {
  width: min(860px, 100%);
  height: 54px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(180deg, var(--red2), var(--red));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-loadmore i {
  font-size: 16px;
}

.weui-tabbar-fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(11, 18, 32, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.weui-tabbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.weui-tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(255, 255, 255, .85);
  padding: 10px 6px;
  border-radius: 14px;
}

.weui-tabbar__icon i {
  font-size: 2rem;
}

.weui-tabbar__label {
  margin: 0;
  font-size: .75rem;
}

.weui-tabbar__item.active,
.weui-tabbar__item.active .weui-tabbar__label,
.weui-tabbar__item.active i {
  color: var(--red);
}

.weui-float {
  position: fixed;
  right: 14px;
  bottom: 90px;
  z-index: 70;
}

.weui-float img {
  width: 100px;
  height: auto;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
}

@media (max-width: 900px) {
  .weui-float img {
    width: 80px;
  }
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.popup-modal {
  width: min(720px, calc(100vw - 32px));
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .45);
}

.popup-head {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.popup-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.popup-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, .06);
  color: #111;
  font-size: 20px;
  cursor: pointer;
}

.popup-body {
  padding: 18px 16px 22px;
  display: grid;
  gap: 14px;
}

.lang-btn {
  height: 54px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5a79, #ff3a68);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.popup-game .popup-body {
  padding-top: 22px;
}

.popup-game-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.popup-game-img {
  width: 150px;
  height: 150px;
  border-radius: 18px;
  object-fit: cover;
  background: #eee;
  margin-bottom: 12px;
}

.btn-primary {
  width: min(520px, 100%);
  height: 54px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(180deg, #ff5a79, #ff3a68);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary:disabled {
  opacity: .75;
  cursor: not-allowed;
}

.btn-play-icon {
  font-size: 18px;
}

#dialog-providers .popup-modal {
  width: min(420px, calc(100vw - 24px));
}

#dialog-providers .popup-body {
  padding: 12px 14px 14px;
}

#providersMenuList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: min(60vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

#providersMenuList .lang-btn {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 600;
  line-height: 44px;
  text-align: center;
  margin: 0;
}

#providersMenuList .lang-btn:hover {
  filter: brightness(0.98);
}

#providersMenuList .lang-btn:active {
  transform: translateY(1px);
}

.ads-image {
  margin: 10px 0 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .ads-image {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ads-img-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ads-img-link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: transform .14s ease, border-color .14s ease;
}

.ads-img-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .14);
}

.ads-img {
  width: 100%;
  aspect-ratio: 2.6 / 1;
  object-fit: cover;
  display: block;
}

.ads-img-text {
  font-size: 12px;
  text-align: center;
  color: rgba(59, 130, 246, .85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ads-text {
  margin: 8px 0 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}


.ads-text-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: #3b82f6;
  border: 1px solid rgba(255, 255, 255, .16);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.ads-text-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
}

.ads-text-chip:active {
  transform: translateY(1px);
  filter: brightness(.98);
}