body {
  background-color: #1a2a44;
  margin: 0;
  font-family: Arial, sans-serif;
  color: #000000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#loginSection,
#gameSection {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loginSection {
  padding: 20px;
}

#gameSection {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.login-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 300px;
  text-align: center;
  margin: 0 auto;
}

.login-card input {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.login-card input#userPw {
  color: #000;
}

.login-card .login-btn {
  background-color: #ff3333;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 125px;
}

.login-card .login-btn:hover {
  background-color: #e60000;
}

.login-card .register-btn {
  background-color: #007bff;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 125px;
}

.login-card .register-btn:hover {
  background-color: #0056b3;
}

.login-card .d-flex {
  gap: 24px;
}

#errorMessage {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
  padding: 5px;
  margin-bottom: 10px;
  border-radius: 4px;
  display: none;
}

.user-section {
  background-color: #fff;
  width: 100%;
  margin: 0 auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-section-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 5px 20px;
}

.user-info {
  font-size: 16px;
  color: #000;
}

.logout-btn {
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100px;
}

/* Wallet / Item button shared styles (landscape) */
.wallet-btn {
  background: linear-gradient(90deg, #ffd86a, #ffb84d);
  border: none;
  color: #111;
  padding: 8px 12px;
  margin-left: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}
.wallet-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.item-btn {
  background: linear-gradient(90deg, #7bffb3, #00d1ff);
  color: #003046;
  padding: 8px 14px;
}

@media (max-width: 768px) {
  .wallet-btn,
  .item-btn {
    padding: 6px 8px;
    font-size: 14px;
    margin-left: 6px;
  }
}

.game-list-header {
  text-align: center;
  font-size: 28px;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#bg-video-land {
  display: block;
}
#bg-video-port {
  display: none;
}

/* unified titleWrap position and simplified bright glow (match portrait/default) */
#titleWrap {
  position: fixed;
  top: 18px;
  right: 14px;
  z-index: 220;
  pointer-events: none;
  display: inline-block;
  width: clamp(96px, 12vw, 240px);
  height: auto;
  transform-origin: center right;
}
/* keep only duplicated tint layer + simple image drop-shadow */

/* duplicated image tint layer: gold hue + blur + breathing */
#titleWrap .titleTint {
  position: fixed;
  top: 18px;
  right: 14px;
  width: clamp(96px, 12vw, 240px);
  z-index: 210; /* behind the main image but above back */
  pointer-events: none;
  transform-origin: center right;
  filter: blur(8px) saturate(1.1)
    drop-shadow(0 12px 28px rgba(255, 200, 80, 0.14));
  mix-blend-mode: screen;
  opacity: 0.9;
  animation: tintBreath 9s ease-in-out infinite;
}

@keyframes tintBreath {
  0% {
    transform: translateY(0) scale(0.98);
    opacity: 0.82;
    filter: blur(7px) saturate(1.02);
  }
  50% {
    transform: translateY(-4px) scale(1.06);
    opacity: 1;
    filter: blur(10px) saturate(1.18);
  }
  100% {
    transform: translateY(0) scale(0.98);
    opacity: 0.82;
    filter: blur(7px) saturate(1.02);
  }
}

/* ensure image fills wrapper and sits above tint */
#titleWrap #titleImage {
  position: relative;
  z-index: 400;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 26px 60px rgba(0, 0, 0, 0.18));
}

/* withdraw button distinct override (landscape) - appended */
#withdrawBtn {
  background: linear-gradient(90deg, #8e6cff, #d27bff);
  color: #fff;
  padding: 8px 14px;
  margin-left: 8px;
  border-radius: 8px;
  border: none;
  box-shadow: 0 6px 12px rgba(142, 108, 255, 0.12);
}
#withdrawBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(142, 108, 255, 0.18);
}

/* Deposit/Withdraw modal theming (landscape) */
.deposit-modal {
  background: #fff;
  padding: 18px;
  border-radius: 10px;
  color: #111;
  position: relative;
}
.deposit-modal .close-x {
  background: transparent;
  border: none;
  color: #333;
  font-size: 20px;
  position: absolute;
  right: 12px;
  top: 10px;
}
.deposit-modal .confirm-btn {
  background: linear-gradient(90deg, #ffd86a, #ffb84d);
  color: #081018;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
}
.deposit-modal .cancel-btn {
  background: #f3f3f3;
  color: #333;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  margin-left: 8px;
}

.deposit-modal.mode-deposit .confirm-btn {
  background: linear-gradient(90deg, #ffd86a, #ffb84d);
  box-shadow: 0 8px 18px rgba(255, 184, 77, 0.08);
}
.deposit-modal.mode-deposit .deposit-modal-anim svg {
  filter: drop-shadow(0 6px 14px rgba(255, 180, 70, 0.08));
}

.deposit-modal.mode-withdraw .confirm-btn {
  background: linear-gradient(90deg, #8e6cff, #d27bff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(142, 108, 255, 0.08);
}
.deposit-modal.mode-withdraw .deposit-modal-anim svg {
  filter: drop-shadow(0 6px 14px rgba(142, 108, 255, 0.08));
}

/* Homepage v1.1 landscape responsive overrides */
@media (orientation: landscape) and (max-width: 1366px) {
  :root {
    --home-header-banner-h: 220px;
    --home-header-strip-h: 20px;
    --home-header-total-h: 296px;
  }

  #uiTopBar .top-brand-mark {
    width: 36px;
    height: 36px;
    top: 9px;
    left: 9px;
  }

  .user-section-content {
    padding-left: 56px;
    gap: 8px;
  }

  #userInfo {
    text-align: center;
    width: 210px;
    padding-left: 36px;
  }

  #userMoney,
  #userWallet {
    width: 236px;
    font-size: clamp(14px, 1.35vw, 24px);
  }

  #itemBtn,
  #logoutButton {
    width: 132px;
    height: 44px;
  }

  .slot_game_list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 1320px;
    gap: 10px;
  }
}

@media (orientation: landscape) and (max-width: 1024px) {
  :root {
    --home-header-bar-h: 48px;
    --home-header-banner-h: 170px;
    --home-header-strip-h: 16px;
    --home-header-total-h: 234px;
    --home-footer-h: 74px;
  }

  #uiTopBar .top-brand-mark {
    width: 30px;
    height: 30px;
    top: 9px;
    left: 8px;
  }

  .login-main-copy {
    font-size: clamp(22px, 2.7vw, 32px);
  }

  .login-sub-copy {
    font-size: clamp(12px, 1.3vw, 14px);
  }

  .user-section-content {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 8px 0 46px;
    gap: 6px;
  }

  .user-section-content::-webkit-scrollbar {
    display: none;
  }

  #userInfo {
    width: 190px;
    height: 44px;
    padding-left: 30px;
    font-size: 11px;
  }

  #userMoney,
  #userWallet {
    width: 196px;
    height: 44px;
    padding-left: 38px;
    font-size: 16px;
  }

  #depositBtn,
  #withdrawBtn {
    width: 56px;
    height: 28px;
  }

  #itemBtn,
  #logoutButton {
    width: 108px;
    height: 36px;
  }

  .game-group-title {
    font-size: clamp(24px, 3.2vw, 34px);
  }

  .card_game_list .game_button {
    width: min(620px, 94vw);
  }

  .slot_game_list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
    padding: 0 6px;
  }
}

/* Hard fix: keep game top area visible in landscape */
body:not(.policy-page):not(.support-page) #gameSection {
  position: relative !important;
  margin-top: var(--home-header-total-h) !important;
  padding: 14px 16px calc(var(--home-footer-h) + 14px) !important;
  overflow: visible !important;
}

body:not(.policy-page):not(.support-page) #gameSection .user-section {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: var(--home-header-bar-h) !important;
  z-index: 360 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body:not(.policy-page):not(.support-page) #gameSection .game-grid {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: none !important;
  padding-top: 20px !important;
}

body:not(.policy-page):not(.support-page) #gameSection .card_game_list {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 0 24px !important;
}

body:not(.policy-page):not(.support-page)
  #gameSection
  .card_game_list
  .game_button {
  display: block !important;
  width: min(640px, 78vw) !important;
  max-width: 640px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ===========================
   Ultrawide landscape (≥ 1800px)
   예: 3840×1440, 2560×1440, 21:9 등
   max-width 제한 해제 + 열 수 확장으로 중앙 정렬
   =========================== */
@media (orientation: landscape) and (min-width: 1800px) {
  #loginSection,
  #gameSection {
    max-width: min(90vw, 3200px) !important;
  }

  .slot_game_list {
    grid-template-columns: repeat(7, minmax(0, 304px)) !important;
    max-width: none !important;
    justify-content: center !important;
  }

  .card_game_list .game_button {
    width: min(640px, 40vw) !important;
  }
}
