/* 银河体育首页 - V9 风格 */
:root {
  --color-page-bg: #F4F6FA;
  --color-rank-bg: #000000;
  --color-body: var(--color-page-bg);
  --color-paper: #fff;
  --color-primary: #E60013;
  --color-text: #1F2734;
  --color-text-sub: rgba(21, 29, 52, 0.5);
  --color-text-50: rgba(31, 39, 52, 0.5);
  --header-bg: #202936;
  --header-gradient: linear-gradient(to bottom, #1e2734 0%, #242D3A 70%, transparent 100%);
  --tab-inactive: #EAEDF2;
  --bottom-nav-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.home-v9 {
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-body);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 60px);
  overflow-x: hidden;
}

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* 顶部渐变背景 */
.home-bg-gradient {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 275px;
  background: var(--header-gradient);
  z-index: 0;
  pointer-events: none;
}

/* 固定顶栏 */
.home-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 1000;
  background: var(--header-bg);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  min-height: 55px;
}

.header-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo {
  height: 23px;
  width: auto;
  object-fit: contain;
}

.header-brand {
  display: flex;
  flex-direction: column;
  color: #fff;
}

.header-brand-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.header-brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.53);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-pill {
  display: flex;
  align-items: center;
  height: 35px;
  padding: 3px 4px 3px 8px;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
}

.wallet-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.wallet-amount {
  margin: 0 8px;
  font-size: 14px;
  font-weight: 600;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-btn {
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 15px;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.header-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  font-size: 14px;
}

.header-icon-btn .badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FF0200;
}

/* 公告滚动 */
.notice-row {
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 16px 10px;
  position: relative;
}

.notice-row-inner {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.notice-bar-v9 {
  display: flex;
  align-items: center;
  height: 20px;
  padding-left: 4px;
}

.notice-bar-v9 img,
.notice-bar-v9 i {
  width: 10px;
  height: 10px;
  margin-right: 8px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.8);
  font-size: 10px;
}

.notice-marquee {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  font-size: 10px;
}

.notice-marquee-track {
  display: inline-flex;
  animation: noticeScroll 30s linear infinite;
}

.notice-marquee-track span {
  padding-right: 40px;
}

@keyframes noticeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.notice-fade-right {
  position: absolute;
  right: 0;
  top: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(to left, var(--header-bg), transparent);
  pointer-events: none;
}

/* 主内容区偏移 */
.home-page {
  position: relative;
  padding-top: 85px;
  z-index: 1;
}

/* 轮播 - 对齐 V9 目标站 var-swipe */
.banner-swipe {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.banner-swipe-viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  aspect-ratio: 430 / 120;
  max-height: 52vw;
}

.banner-swipe-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  height: 100%;
  transition: transform 300ms ease;
  will-change: transform;
}

.banner-slide {
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 10px;
  box-sizing: border-box;
}

.banner-slide-inner {
  width: 100%;
  height: 100%;
  min-width: 0;
}

.banner-slide-img-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  background: #1e2734;
  line-height: 0;
}

.banner-slide-img-wrap img.banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;
  background: #1e2734;
}

.banner-slide-img-wrap img.banner-img.is-loading {
  opacity: 0;
}

.banner-slide-img-wrap img.banner-img.is-error {
  opacity: 0;
}

.banner-slide-caption {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  padding: 26px 0 0 36px;
  box-sizing: border-box;
}

.banner-slide-title {
  max-width: 72%;
  font-size: 23px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.banner-slide-subtitle {
  max-width: 72%;
  font-size: 23px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.banner-slide-tagline {
  position: absolute;
  left: 36px;
  bottom: 5px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.3;
}

.banner-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  z-index: 6;
  pointer-events: auto;
}

.banner-dot-v9 {
  width: 4px;
  height: 4px;
  margin: 0 2.5px;
  border-radius: 50%;
  background: #797979;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.banner-dot-v9.active {
  background: #fff;
}

.banner-loading {
  flex: 0 0 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 20px);
  margin: 0 10px;
  min-height: 120px;
  max-height: 52vw;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  background: rgba(0, 0, 0, 0.2);
}

/* 用户余额与快捷操作 */
.home-wallet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 12px 0;
  padding: 12px 14px;
  background: var(--color-paper);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 1px 6px rgba(31, 39, 52, 0.06);
}

.home-wallet-info {
  flex: 1;
  min-width: 0;
}

.home-wallet-user {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.home-wallet-vip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  background: #3a3f4b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.home-wallet-name {
  font-size: 12px;
  color: var(--color-text-50);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-wallet-balance-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-wallet-balance {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-wallet-refresh {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: #8a93a3;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-wallet-refresh.is-spinning i {
  animation: homeWalletSpin 0.6s linear;
}

@keyframes homeWalletSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.home-wallet-actions {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.home-wallet-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 40px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 11px;
  line-height: 1.2;
}

.home-wallet-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f8efe3 0%, #e8d5b8 55%, #dcc9a8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 1px 3px rgba(120, 90, 50, 0.12);
  color: #8b7355;
}

.home-wallet-action-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.home-wallet-action-icon i {
  font-size: 18px;
  line-height: 1;
}

/* 白色内容区 */
.home-content {
  background: var(--color-paper);
  min-height: 50vh;
  padding-bottom: 20px;
  margin: 0 12px;
}

/* 区块标题 */
.section-head {
  display: flex;
  align-items: center;
  padding: 10px 10px 10px 10px;
}

.section-head-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-head-title {
  font-size: 14px;
  font-weight: 600;
}

.section-head-more {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-50);
  border: 1px solid rgba(31,39,52,0.1);
  border-radius: 25px;
  padding: 4px 12px;
  cursor: pointer;
  text-decoration: none;
}

.section-head-accent {
  padding-left: 14px;
  position: relative;
}

.section-head-accent::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--color-primary);
}

.section-head-tag {
  margin-left: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #FF003A, #E60013);
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.section-head-live {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: livePulse 1.2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* 热门快捷入口 */
.hot-entry-section {
  margin-bottom: 4px;
}

.hot-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 10px 16px;
}

.hot-entry-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(31, 39, 52, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.hot-entry-item:active {
  transform: scale(0.96);
}

.hot-entry-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 2, 0, 0.85);
  padding: 1px 5px;
  border-radius: 6px;
}

.hot-entry-item.has-img {
  background: #EAEDF2;
  padding: 0;
  justify-content: flex-end;
}

.hot-entry-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}

.hot-entry-item.has-img .hot-entry-name {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 6px 4px;
  margin-top: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
  color: #fff;
  font-size: 10px;
}

.hot-entry-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.hot-entry-name {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 实时爆奖 */
.jackpot-scroll {
  display: flex;
  overflow-x: auto;
  padding: 0 10px 15px;
  gap: 0;
  justify-content: flex-end;
}

.jackpot-card {
  flex-shrink: 0;
  width: 48%;
  max-width: 200px;
  position: relative;
  display: flex;
  padding-top: 8px;
  padding-left: 10px;
}

.jackpot-card-img {
  width: 45px;
  height: 68px;
  border-radius: 10px 0 0 10px;
  overflow: hidden;
  background: #1e2734;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jackpot-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jackpot-card-emoji {
  font-size: 22px;
  line-height: 1;
}

.jackpot-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jackpot-card-info {
  flex: 1;
  padding: 5px 6px 3px 5px;
  background: linear-gradient(to left, #F5F5FA, transparent);
  border-radius: 0 10px 10px 0;
}

.jackpot-card-name {
  font-size: 10px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jackpot-card-amount {
  font-size: 20px;
  font-weight: bold;
  color: #FF0200;
  line-height: 1.2;
  margin-top: 4px;
}

.jackpot-card-amount small {
  font-size: 10px;
  font-weight: normal;
}

.jackpot-card-user {
  font-size: 9px;
  color: var(--color-text-sub);
}

.jackpot-multiply {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 10px 2px 4px;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(to right, #FF003A 50%, transparent 90%);
  border-radius: 7px 0 0 0;
}

/* 大横幅 */
.feature-banner {
  padding: 0 10px 15px;
  cursor: pointer;
}

.feature-banner-pro .feature-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e2734 0%, #2a3544 40%, #E60013 100%);
  box-shadow: 0 8px 24px rgba(230, 0, 19, 0.25);
  overflow: hidden;
  position: relative;
}

.feature-banner-pro .feature-banner-inner::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.feature-banner-kicker {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.feature-banner-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.feature-banner-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 6px;
}

.feature-banner-deco {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  flex-shrink: 0;
  margin-left: 12px;
}

.feature-banner img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

/* 横向游戏卡片 */
.h-scroll-games {
  display: flex;
  overflow-x: auto;
  padding: 0 10px 15px 0;
  gap: 10px;
  scroll-snap-type: x mandatory;
}

.game-h-card {
  flex-shrink: 0;
  width: 88px;
  cursor: pointer;
  position: relative;
  margin-left: 0;
  scroll-snap-align: start;
  transition: transform 0.15s ease;
}

.game-h-card:first-child { margin-left: 10px; }

.game-h-card:active {
  transform: scale(0.96);
}

.game-card-cover {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 14px rgba(31, 39, 52, 0.15);
  overflow: hidden;
  background: #EAEDF2;
}

.game-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}

.game-card-emoji-fallback {
  position: relative;
  z-index: 0;
}

.game-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.game-card-emoji {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
  position: relative;
  z-index: 1;
}

.game-card-name {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 88px;
}

.game-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.game-badge.hot {
  background: linear-gradient(135deg, #FF003A, #E60013);
}

.game-badge.new {
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

.sub-game-card .game-card-cover {
  background: #EAEDF2;
}

/* 加载骨架 */
.game-card-skeleton {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: linear-gradient(90deg, #EAEDF2 25%, #f5f6fa 50%, #EAEDF2 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
  margin-left: 5px;
}

.game-card-skeleton:first-child { margin-left: 10px; }

.hot-entry-skeleton {
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(90deg, #EAEDF2 25%, #f5f6fa 50%, #EAEDF2 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.section-empty-tip {
  padding: 20px 16px;
  font-size: 12px;
  color: rgba(31,39,52,.45);
}

.game-h-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-h-card-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 游戏分区 */
.game-section {
  margin-bottom: 15px;
}

/* ===== 游戏区（统一白底） ===== */
.home-game-zone {
  --home-game-zone-pad: 44px;
  --home-game-card-gap: 8px;
  /* 三列铺满可视区，不露出第 4 个 */
  --home-game-card-size: calc(
    (100vw - var(--home-game-zone-pad) - var(--home-game-card-gap) * 2) / 3
  );
  background: #fff;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 8px;
  padding: 4px 22px 8px;
  color: var(--color-text);
  box-sizing: border-box;
}

.home-game-zone .section-head-dark {
  color: var(--color-text);
  padding: 12px 0 8px;
}

.home-game-zone .section-head-dark .section-head-title {
  color: #1F2734;
  font-size: 15px;
  font-weight: 700;
}

.home-game-zone .section-head-icon {
  font-size: 16px;
}

.home-game-zone .section-head-more {
  color: rgba(31, 39, 52, 0.45);
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
}

.home-game-zone .section-head-more:hover {
  color: rgba(31, 39, 52, 0.7);
}

.home-game-zone .game-section-dark {
  margin-bottom: 6px;
}

.home-game-zone .h-scroll-games {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 0 12px;
  gap: var(--home-game-card-gap);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.home-game-zone .h-scroll-games::-webkit-scrollbar {
  display: none;
}

.home-game-zone .game-h-card.v9-game-card {
  width: var(--home-game-card-size);
  scroll-snap-align: start;
}

.home-game-zone .game-h-card.v9-game-card:first-child {
  margin-left: 0;
}

.home-game-zone .v9-game-card .game-card-cover {
  width: var(--home-game-card-size);
  height: var(--home-game-card-size);
  border-radius: 12px;
  background: #EAEDF2;
  box-shadow: 0 2px 8px rgba(31, 39, 52, 0.08);
}

.home-game-zone .v9-game-card .game-card-cover::after {
  display: none;
}

.home-game-zone .v9-game-card .game-card-img {
  object-fit: contain;
}

.home-game-zone .v9-game-card .game-card-name {
  display: none;
}

.home-game-zone .v9-game-card .game-badge {
  top: 5px;
  right: 5px;
  left: auto;
  font-size: 7px;
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 4;
}

.home-game-zone .v9-game-card .game-badge.hot {
  background: #e60013;
}

.home-game-zone .v9-game-card .game-card-emoji {
  font-size: calc(var(--home-game-card-size) * 0.36);
  opacity: 0.35;
}

.home-game-zone .game-provider-tag {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 3;
  font-size: 8px;
  font-weight: 700;
  color: #222;
  background: rgba(255, 255, 255, 0.88);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  line-height: 1.35;
  border: 1px solid #e8e8e8;
}

.game-card-shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  z-index: 1;
  pointer-events: none;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.45) 45%,
    transparent 100%
  );
}

.game-card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  z-index: 2;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.home-game-zone .game-card-title {
  font-size: 11px;
  bottom: 7px;
}

.home-game-zone .game-card-skeleton.v9-skeleton {
  flex-shrink: 0;
  width: var(--home-game-card-size);
  height: var(--home-game-card-size);
  border-radius: 12px;
  margin-left: 0;
  background: linear-gradient(90deg, #EAEDF2 25%, #f5f6fa 50%, #EAEDF2 75%);
  background-size: 200% 100%;
}

.home-game-zone .game-more-card .game-card-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #EAEDF2 !important;
}

.home-game-zone .game-more-card .game-card-emoji {
  position: relative;
  z-index: 2;
  font-size: 26px;
  opacity: 0.5;
}

.h-scroll-wrap {
  position: relative;
}

.home-game-zone .h-scroll-wrap {
  overflow: hidden;
}

.home-game-zone .h-scroll-wrap::after {
  display: none;
}

.home-game-zone .h-scroll-arrow {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #dcdfe6;
  background: rgba(255, 255, 255, 0.95);
  color: #666;
  font-size: 18px;
  line-height: 1;
  z-index: 4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 1px 2px;
  box-shadow: 0 1px 6px rgba(31, 39, 52, 0.1);
}

.home-game-zone .h-scroll-arrow:active {
  transform: translateY(-50%) scale(0.92);
  background: #f4f6fa;
}

.game-filter-row {
  display: flex;
  gap: 6px;
  padding: 0 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.game-filter-row::-webkit-scrollbar {
  display: none;
}

.home-game-zone .game-filter-tag {
  flex-shrink: 0;
  border: 1px solid #dcdfe6;
  background: #f4f6fa;
  color: rgba(31, 39, 52, 0.55);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  font-family: inherit;
}

.home-game-zone .game-filter-tag.active {
  border-color: #c9a96e;
  color: #1F2734;
  background: #fff;
}

/* 供应商 */
.provider-scroll {
  display: flex;
  overflow-x: auto;
  padding: 10px;
  gap: 5px;
}

.provider-item {
  flex-shrink: 0;
  width: 100px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(31, 39, 52, 0.1);
  position: relative;
  background: #EAEDF2;
}

.provider-item.has-img {
  background: #EAEDF2;
}

.provider-item-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.provider-item-name {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
}

.provider-item:not(.has-img) .provider-item-name {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.provider-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 排行榜 */
.rank-section {
  margin-bottom: 20px;
}

.rank-podium-wrap {
  background: #F4F6FA;
  margin: 0 -12px;
  padding: 0 10px 14px;
}

.rank-podium {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 22px 2px 0;
  overflow: visible;
}

.rank-item {
  flex: 1;
  text-align: center;
  position: relative;
  min-width: 0;
}

.rank-item.center {
  flex: 1.08;
}

.rank-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  clip-path: polygon(50% 0%, 92% 18%, 92% 62%, 50% 100%, 8% 62%, 8% 18%);
  line-height: 1;
  padding-bottom: 2px;
}

.rank-badge--1 { background: linear-gradient(180deg, #ffd54f 0%, #f5a623 100%); }
.rank-badge--2 { background: linear-gradient(180deg, #d8e4ea 0%, #9eb7bf 100%); }
.rank-badge--3 { background: linear-gradient(180deg, #f0b27a 0%, #d4854a 100%); }

.rank-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 6px 10px;
  border-radius: 12px;
  background: #fff;
  color: var(--color-text);
  min-height: 108px;
  box-shadow: 0 2px 10px rgba(31, 39, 52, 0.08);
}

.rank-item.center .rank-card {
  min-height: 128px;
  padding-top: 26px;
}

.rank-game-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 92%;
}

.rank-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.2;
}

.rank-coin-icon,
.profit-coin-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 35%, #ff6b6b, #e60013 70%);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.15);
}

.rank-enter {
  margin-top: 10px;
  padding: 5px 18px;
  border-radius: 20px;
  background: rgba(230, 0, 19, 0.08);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  line-height: 1.3;
}

.rank-enter:active {
  background: rgba(230, 0, 19, 0.14);
}

/* 利润列表 */
.rank-section .profit-panel {
  margin: 0 10px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 6px rgba(31, 39, 52, 0.06);
}

.rank-section .profit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  font-size: 12px;
  color: var(--color-text-50);
}

.rank-section .profit-header-profit {
  flex-shrink: 0;
  min-width: 72px;
  text-align: right;
}

.rank-section .profit-list {
  max-height: 360px;
  overflow-y: hidden;
}

.profit-row {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  white-space: nowrap;
  background: #fff;
}

.profit-row:nth-child(even) {
  background: #F7FAFF;
}

.profit-game-icon {
  font-size: 14px;
  color: rgba(31, 39, 52, 0.35);
  margin-right: 9px;
  flex-shrink: 0;
}

.profit-game {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--color-text);
}

.profit-value {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 72px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  text-align: right;
}

.profit-value.positive { color: #FF0200; }
.profit-value.negative { color: var(--color-text-50); font-weight: 500; }

/* 折叠菜单 */
.accordion-wrap {
  padding: 15px 10px;
}

.accordion-item {
  background: var(--color-paper);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.accordion-head i {
  transition: transform 0.2s;
  color: var(--color-text-50);
}

.accordion-item.open .accordion-head i {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  border-top: 1px solid rgba(31,39,52,0.1);
  padding: 8px 0;
}

.accordion-item.open .accordion-body { display: block; }

.accordion-link {
  display: block;
  padding: 10px 15px;
  font-size: 12px;
  color: var(--color-text);
  text-decoration: none;
}

.accordion-link:active { background: #EAEDF2; }

/* 18+ 免责声明 */
.disclaimer {
  padding: 25px 15px;
  text-align: center;
}

.disclaimer-icon {
  width: 35px;
  height: 35px;
  margin: 0 auto 15px;
  border: 2px solid var(--color-text-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--color-text-50);
}

.disclaimer-text {
  text-align: left;
  font-size: 10px;
  color: var(--color-text-50);
  line-height: 1.5;
}

.disclaimer-text p { margin-bottom: 15px; }

/* APP 下载条 */
.app-download-bar {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(7px);
  border-radius: 15px 15px 0 0;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.08);
}

.app-download-bar.hidden { display: none; }

.app-download-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  margin-right: 10px;
  flex-shrink: 0;
}

.app-download-info { flex: 1; min-width: 0; }

.app-download-title {
  font-size: 15px;
  font-weight: bold;
}

.app-download-sub {
  font-size: 10px;
  color: var(--color-text-50);
  margin-top: 2px;
}

.app-download-sub em {
  color: var(--color-primary);
  font-style: normal;
}

.app-download-btn {
  height: 35px;
  padding: 0 18px;
  border: none;
  border-radius: 18px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  margin-left: 8px;
  flex-shrink: 0;
}

.app-download-close {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--color-text-50);
  font-size: 16px;
  cursor: pointer;
  margin-left: 4px;
}

/* 浮动按钮 - 新人好礼（默认半藏，悬停/靠近左缘滑出） */
.float-task-zone {
  --float-peek: 34px;
  position: fixed;
  left: 0;
  bottom: 200px;
  z-index: 90;
  width: 96px;
  height: 130px;
  display: flex;
  align-items: center;
  overflow: visible;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 透明感应条：扩大 hover 命中区域（不受 transform 影响） */
.float-task-hit {
  position: absolute;
  left: 0;
  top: -16px;
  width: 40px;
  height: calc(100% + 32px);
  z-index: 3;
}

.float-task {
  position: relative;
  left: 0;
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform: translateX(calc(-100% + var(--float-peek)));
  transition: transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
  z-index: 2;
}

.float-task-zone.is-open .float-task,
.float-task-zone:hover .float-task,
.float-task-zone:focus-within .float-task {
  transform: translateX(0);
}

.float-task-img {
  width: 70px;
  height: auto;
  aspect-ratio: 140 / 121;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}

.float-task-progress {
  width: 45px;
  height: 16px;
  border-radius: 16px;
  background: linear-gradient(286.06deg, #C70700 -31.31%, #FF7236 73.34%);
  padding: 4px 5px;
  box-sizing: border-box;
  margin-top: -6px;
  pointer-events: none;
}

.float-task-progress-inner {
  height: 100%;
  border-radius: 16px;
  background: #4D0603;
  overflow: hidden;
}

.float-task-progress-bar {
  height: 100%;
  width: 75%;
  background: #FFC400;
  border-radius: 16px;
  transition: width 0.32s ease;
}

/* 触屏：默认多露出一点，点按展开 */
@media (hover: none), (pointer: coarse) {
  .float-task-zone {
    --float-peek: 40px;
  }
}

/* V9 底部导航 */
.v9-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 1000;
  background: var(--color-paper);
  box-shadow: 0 -1px 8px rgba(0,0,0,0.15);
  padding-bottom: var(--safe-bottom);
}

.v9-tabbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bottom-nav-height);
}

.v9-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-50);
  text-decoration: none;
  font-size: 9px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px 0;
}

.v9-tab-item.active {
  color: var(--color-tab-active, #E60013);
  font-weight: 600;
}

.v9-tab-item i,
.v9-tab-item svg {
  font-size: 22px;
  width: 22px;
  height: 22px;
  margin-bottom: 3px;
  color: inherit;
}

.v9-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: -2px;
  color: inherit;
}

.v9-tab-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.v9-tab-icon--kefu-active {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: -2px;
  color: var(--color-tab-active, #E60013);
}

.v9-tab-icon--kefu-active svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* 转账弹窗 */
.transfer-popup { border-radius: 16px !important; }
.transfer-popup .swal2-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1a1a2e !important;
}
.transfer-popup .swal2-confirm {
  background: linear-gradient(135deg, #ff6b6b 0%, #e60012 100%) !important;
  border-radius: 25px !important;
}
.transfer-content { text-align: left; padding-top: 16px; }
.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid #eee;
}
.balance-row .value.game { color: #4CAF50; font-weight: 600; }
.balance-row .value.main { color: #FF9800; font-weight: 600; }
.quick-amount-btns { display: flex; gap: 8px; margin: 16px 0 12px; }
.quick-amount-btn {
  flex: 1;
  padding: 10px 0;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.quick-amount-btn.primary {
  background: linear-gradient(135deg, #ff6b6b, #e60012);
  color: #fff;
  border: none;
}
.transfer-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
}
.transfer-input:focus { border-color: #e60012; }

/* ===== 首页备用域名弹窗 ===== */
body.domain-popup-open {
  overflow: hidden;
}

.domain-popup {
  position: fixed;
  inset: 0;
  z-index: 2005;
}

.domain-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2006;
}

.domain-popup__wrap {
  position: absolute;
  inset: 0;
  z-index: 2007;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 28px;
  overflow-y: auto;
}

.domain-popup__card {
  position: relative;
  width: min(340px, calc(100vw - 40px));
  color: #111;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.domain-popup__hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff8f0 0%, #ffecee 100%);
}

.domain-popup__header-img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  object-position: right center;
}

.domain-popup__title {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 58%;
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  pointer-events: none;
}

.domain-popup__body {
  position: relative;
  padding: 14px 16px 18px;
  background: #fff;
}

.domain-popup__scroll {
  max-height: min(280px, 42vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.domain-popup__scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.domain-popup__section + .domain-popup__section {
  margin-top: 12px;
}

.domain-popup__label {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.domain-popup__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 4px 4px 4px 14px;
  border-radius: 22px;
  background: #f4f6fa;
}

.domain-popup__row--gap {
  margin-top: 8px;
}

.domain-popup__domain {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-popup__copy-btn {
  flex-shrink: 0;
  height: 34px;
  line-height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 17px;
  background: #fff;
  color: #ff0200;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.domain-popup__copy-btn:active {
  transform: scale(0.98);
}

.domain-popup__backup-list {
  margin-top: 2px;
}

.domain-popup__actions {
  margin-top: 14px;
}

.domain-popup__save-btn {
  display: block;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(135deg, #ff4757, #e60012);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(230, 0, 18, 0.25);
}

.domain-popup__save-btn:active {
  transform: scale(0.99);
}

.domain-popup__hide-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.domain-popup__hide-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.domain-popup__hide-opt.is-checked .domain-popup__hide-check {
  background: #e60012;
  border-color: #e60012;
  box-shadow: inset 0 0 0 3px #fff;
}

.domain-popup__hide-opt span:last-child {
  margin-left: 8px;
  font-size: 12px;
  color: #999;
}

.domain-popup__close {
  display: block;
  margin: 20px auto 0;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  opacity: 0.9;
}

.domain-popup__close:active {
  opacity: 0.7;
}

.domain-popup__close svg {
  width: 44px;
  height: 44px;
  display: block;
}

@media (min-width: 481px) {
  .domain-popup__card {
    width: min(380px, calc(100vw - 48px));
  }

  .domain-popup__header-img {
    height: 108px;
  }

  .domain-popup__title {
    left: 22px;
    font-size: 20px;
    max-width: 55%;
  }

  .domain-popup__body {
    padding: 16px 20px 20px;
  }

  .domain-popup__label {
    font-size: 13px;
  }

  .domain-popup__domain {
    font-size: 16px;
  }

  .domain-popup__copy-btn {
    height: 36px;
    line-height: 36px;
    font-size: 13px;
    padding: 0 14px;
  }

  .domain-popup__save-btn {
    height: 48px;
    font-size: 16px;
  }
}
