.big-content { margin: 40px 0; }

/* ===== 外層 ===== */
.first-5game-wrap {
  max-width: 1540px;
  margin: 0 auto;
  padding: 40px 24px 72px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* ===== 左側 Tab 選單 ===== */
.gameBox-nav {
  flex: 0 0 220px;
}

.gameBox-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
      align-items: center;
}

.gameBox-nav li {
  margin: 0;
  padding: 0;
  width:150px;
}

.game-tab {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  border-radius: 999px;
  border: 1px solid #dedede;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition:
    background .2s ease,
    color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.game-item.active .game-tab {
  border-color: #f97363;
  color: #b91c1c;
  background: #fff4f2;
  box-shadow: 0 0 0 1px rgba(249,115,99,.15);
}

/* ===== 右側內容卡片 ===== */
.first-5game-main {
  flex: 1;
}

.gameBox-content {
  display: none;
}
.gameBox-content.active {
  display: block;
}

.games-wrap {
  width: 100%;
}

/* 卡片本體：左文字欄 + 右大 ICON */
.gameBox-bg {
  position: relative;
  width: auto;
  min-height: 320px;
  border-radius: 28px;
  padding: 32px 32px;
  background-color: #020617;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15,23,42,.6);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 32px;
}

/* 背景漸層光暈 */
.gameBox-bg::before {
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 0% 0%, rgba(251,113,133,.25), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(56,189,248,.18), transparent 55%);
  opacity:.9;
  pointer-events:none;
}

/* 左側文字 + 小 icon 列 */
.gameBox-mainCol {
  position: relative;
  z-index: 1;
  flex: 1;
}

.gameBox-bg .text {
  margin: 0;
  max-width: 560px;
}

.gameBox-bg .text h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 800;
  color: #f9fafb;
}

.gameBox-bg .text p {
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 1.9;
  color: #e5e7eb;
}

/* 下方小 icon 列 */
.gameBox-bg .game-box {
  margin: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.gameBox-bg .game-box a {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  color: #e5e7eb;
}

.gameBox-bg .game-box a img {
  width: 64px;
  aspect-ratio: 1/1;
  margin-bottom: 6px;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(15,23,42,.7);
}

.gameBox-bg .game-box .game-ball {
  animation-name: lottoballJump;
  animation-duration: 7s;
  animation-fill-mode: both;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.gameBox-bg .game-box .game-ball.ball-2 { animation-delay: .25s; }
.gameBox-bg .game-box .game-ball.ball-3 { animation-delay: .5s; }
.gameBox-bg .game-box .game-ball.ball-4 { animation-delay: .75s; }

@keyframes lottoballJump {
  0%, 20%, 30%, 100% { transform: translateY(0); }
  25% { transform: translateY(-8px); }
}

/* 右側放大的 ICON 區塊 */
.gameBox-hero {
  position: relative;
  z-index: 1;
  flex: 0 0 32%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.gameBox-hero img {
  width: 100%;
  max-width: 360px;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15,23,42,.8);
  object-fit: cover;
}

/* hover（桌機） */
@media (min-width: 1025px) {
  .gameBox-bg .game-box a:hover {
    color: #facc15;
    transform: translateY(-2px);
  }
}

/* 平板（左右結構保留） */
@media (max-width: 999px) and (min-width: 768px) {
  .first-5game-wrap {
    flex-direction: column;
    padding: 32px 16px 60px;
    gap: 20px;
  }

  .gameBox-nav {
    width: 100%;
    flex: 0 0 auto;
  }

  .gameBox-nav ul {
    flex-direction: row;      
    flex-wrap: wrap;          
    justify-content: flex-start;
    align-items: flex-start; 
    gap: 32px;                
  }

  .gameBox-nav li {
    flex: 0 1 calc(50% - 12px); 
    width: auto;                 
    max-width: 150px;
    margin: 0;
  }

  .game-tab {
    width: 100%;
    padding: 10px 12px;
  }

  .first-5game-main {
    flex: 0 0 auto;
    width: 100%;
  }

  .gameBox-bg {
    padding: 28px 22px;
    gap: 20px;
  }

  .gameBox-hero {
    flex-basis: 36%;
  }
}


@media (max-width: 767px) {
  .first-5game-wrap {
    flex-direction: column;        /* 上下排：tab 在上，內容在下 */
    padding: 24px 16px 48px;
    gap: 20px;
  }

  .gameBox-nav {
    flex: 0 0 auto;               /* 不要再吃 220px，改成自動高度 */
    width: 100%;
  }

  .gameBox-nav ul {
    flex-direction: row;         
    gap: 35px;
    overflow-x: auto;             
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .gameBox-nav li {
    flex: 0 0 auto;               /* 依寬度排，不要被壓縮 */
    width: 100px;                 /* 每顆一樣寬，會超出就橫向捲動 */
  }

  .game-tab {
    font-size: 14px;
    padding: 9px 12px;
    letter-spacing: 0.05em;
    white-space: nowrap;          /* 文字不要換行，避免長度把高度撐爆 */
  }

  .first-5game-main {
    flex: 0 0 auto;
    width: 100%;
  }

  .gameBox-bg {
    flex-direction: column;       /* 上：文字，下：大圖 */
    padding: 22px 18px 20px;
    min-height: 0;
  }

  .gameBox-mainCol {
    order: 1;
  }

  .gameBox-hero {
    order: 2;
    justify-content: center;
    flex-basis: auto;
    margin-top: 14px;
  }

  .gameBox-hero img {
    max-width: 260px;
  }

  .gameBox-bg .text h2 {
    font-size: 22px;
  }

  .gameBox-bg .text p {
    font-size: 14px;
  }

  .gameBox-bg .game-box {
    gap: 12px;
  }

  .gameBox-bg .game-box a {
    width: 72px;
  }

  .gameBox-bg .game-box a img {
    width: 56px;
  }
}