body {
  background-color: #1a2a44;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  font-family: Arial, sans-serif;
  color: #000000;
}

#loginSection,
#gameSection {
  width: 100%;
  max-width: 1200px;
}

#loginSection {
  display: block;
  padding: 20px;
}

#gameSection {
  display: none;
  flex-direction: column;
  padding: 50px 20px 20px;
}

.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 {
  background-color: #ff3333;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100px;
}

.logout-btn:hover {
  background-color: #e60000;
}

/* 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);
}

.game-grid {
  padding: 15px;
  border-radius: 10px;
  position: absolute;
  top: 10%;
  left: 20%;
  right: 20%;
  margin: 0 auto;
  max-width: 1024px;
}

.game_button {
  width: 100%;
  max-width: 512px;
  aspect-ratio: 512 / 254;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.game_list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 25px;
  row-gap: 20px;
  padding: 0;
  margin: 0;
}

.game_list li {
  list-style: none;
  transition: transform 0.2s ease;
  text-align: center;
}

.game_list li:hover {
  transform: scale(1.05);
}

.game_button:hover {
  border-color: #ff3333;
}
#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));
}

/* Home bg layer */
:root {
  --home-bg-opacity: 0.5;
  --home-bg-z: 0;
}
#bg-image-home {
  position: fixed;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: var(--home-bg-z);
  opacity: 0;
  transition: opacity 0.48s ease, transform 0.48s ease;
  transform: scale(1.02);
}
#bg-image-home img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: var(--home-bg-opacity);
  display: block;
}
#bg-image-home.bg-visible {
  opacity: 1;
  transform: scale(1);
}
.bg-on-top {
  z-index: 200 !important;
}

/* 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));
}
