@font-face {
  font-family: 'Chawlewhieng';
  src: url('../fonts/JS-Chawlewhieng.woff2') format('woff2'),
    url('../fonts/JS-Chawlewhieng.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  background: #000;
  font-family: 'Noto Sans Thai', sans-serif;
}
body.modal-open{
  overflow: hidden;
  height: 100vh;
  touch-action: none;
}
.container {
  width: 100%;
  max-width: 600px;
}
.container-full-h {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.fixed-top-wrapper,
.fixed-bottom-wrapper {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 1000;
}
.fixed-top-wrapper {
  top: 0;
}
.fixed-bottom-wrapper {
  bottom: 0;
}
.top-bar {
  height: 130px;
}

.bottom-bar {
  height: auto;
}
.content-area {
  padding-top: 130px;
  padding-bottom: 100px;
  min-height: 100vh;
}
.bg-fixed {
  position: fixed;
  inset: 0;
  background-image: url('../img/bg-main.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  filter: blur(12px);
  transform: scale(1.1);
  z-index: -2;
}
.bg-fixed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.main-background {
  background-image: url('../img/bg-main.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.blur-background {
  backdrop-filter: blur(6px);
}
.home-bottom-background {
  background-image: url('../img/home-bg-bottom.png');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
}
.main-btn {
  width: 100%;
  height: 100px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: transparent;
  color: #fff;
  font-family: 'Chawlewhieng';
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.login-btn {
  background-image: url('../img/button_login.png');
}
.login-fb-btn {
  background-image: url('../img/button_login_fb.png');
}
.secondary-btn {
  width: auto;
  height: 40px;
  background-color: #fff;
  border-radius: 20px;
  color: #000;
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 40px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  display: block;
}
.marquee-wrap {
  width: 100%;
  height: 60px;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 10%,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0) 90%
  );
  display: flex;
  align-items: center;
}
.marquee-text {
  white-space: nowrap;
  padding-left: 100%;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  animation: scroll-left 12s linear infinite;
}
@keyframes scroll-left {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}
.profile-pic {
  border: 16px ridge #e0c38a;
  border-radius: 50%;
}
.profile-card {
  width: 100px;
  text-align: center;
  font-family: sans-serif;
}
.profile-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 5px ridge #e0c38a;
  overflow: hidden;
  margin: 0 auto;
  background: #fff;
}
.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-label {
  margin-top: -12px;
  padding: 4px 12px;
  background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 10%,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 0) 90%
      )
      padding-box,
    linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 10%,
        rgba(241, 178, 88, 1) 50%,
        rgba(0, 0, 0, 0) 90%
      )
      border-box;
  border: 2px solid transparent;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 1), -1px -1px 1px rgba(0, 0, 0, 0.5);
  color: #ffd700;
  font-family: 'Chawlewhieng';
  font-size: 16px;
  font-weight: bold;
  line-height: 1em;
  display: inline-block;
}
.wallet-balance {
  position: relative;
  width: auto;
  height: 40px;
  background-image: url('../img/wallet_balance.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
  background-color: transparent;
  color: #fff;
  font-family: 'Chawlewhieng';
  font-size: 22px;
  font-weight: bold;
  line-height: 1.75em;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 1), -1px -1px 1px rgba(0, 0, 0, 0.5);
  border: none;
  text-align: right;
  padding-right: 40px;
}
.wallet-btn {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  opacity: 0.5;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wallet-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}
.wallet-btn:hover {
  opacity: 0.9;
  transform: translateY(-50%) scale(1);
}
.circle-btn-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: sans-serif;
}
.circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background-image: url('../img/button_round_bg.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.btn-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
}
.btn-text {
  font-family: 'Chawlewhieng';
  font-size: 16px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 1), -1px -1px 1px rgba(0, 0, 0, 0.5);
  color: #ffd700;
  text-align: center;
}
.card-vertical {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 9 / 13;
  border-radius: 20px;
  background: linear-gradient(135deg, #734f34, #f0d497);
  padding: 5px;
  position: relative;
}
.card-img {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  object-fit: cover;
  display: block;
}
.card-label {
  position: absolute;
  bottom: -10px;
  left: -5px;
  right: -5px;
  width: 105%;
  height: 60px;
  background: url('../img/game_title_bg.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e40000;
  font-family: 'Chawlewhieng';
  font-size: 22px;
  font-weight: bold;
  line-height: 1.05;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  padding: 0 12px;
}
.card-label span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  text-align: center;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 16px;
  justify-items: center;
}

/* Noti Modal */
.noti-modal {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background: radial-gradient(circle at top, #9c0000, #6e0000 70%);
  border: 14px solid #f3c46b !important;
  overflow: hidden;
}
.noti-header {
  text-align: center;
  padding: 36px 16px 20px;
}
.noti-header h2 {
  color: #fff2be;
  font-family: 'Chawlewhieng';
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 4px;
  text-shadow: 0 2px 3px #000;
}
.noti-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-x: auto;
}
.noti-item {
  background: linear-gradient(180deg, #8b0000, #650000);
  border-radius: 18px;
  padding: 16px;
  color: #fff;

  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 6px 12px rgba(0, 0, 0, 0.3);
}
.noti-item-detail {
  border-radius: 18px;
  padding: 16px;
  color: #fff;
  border: 1px solid #a03b0e;
}
.noti-text {
  font-size: 18px;
}
.noti-time {
  margin-top: 8px;
  text-align: right;
  font-size: 14px;
  opacity: 0.85;
}
.noti-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 10;
  cursor: pointer;
}
.noti-modal .corner {
  position: absolute;
  width: 48px;
  height: 48px;
  background: #f3c46b;
  z-index: 2;
}
.corner.tl {
  top: -14px;
  left: -14px;
  border-bottom-right-radius: 48px;
}
.corner.tr {
  top: -14px;
  right: -14px;
  border-bottom-left-radius: 48px;
}
.corner.bl {
  bottom: -14px;
  left: -14px;
  border-top-right-radius: 48px;
}
.corner.br {
  bottom: -14px;
  right: -14px;
  border-top-left-radius: 48px;
}

/* Setting Modal */
/* .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
} */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 999;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.setting-modal {
  transform: scale(0.85);
  transition: 0.3s ease;
}
.modal-overlay.active .setting-modal {
  transform: scale(1);
}
.setting-modal {
  position: relative;
  width: 90%;
  max-width: 420px;
  height: 360px;
  background-image: url('../img/setting_modal_bg.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  padding-top: 90px;
  margin: 0 auto;
}
.modal-header {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 14px 50px;
}
.modal-header h2 {
  color: #cc0000;
  font-family: 'Chawlewhieng';
  font-size: 42px;
  font-weight: bold;
  letter-spacing: 4px;
  text-shadow: 0 2px 3px #fff;
}
.back-btn {
  position: absolute;
  top: -30px;
  right: 20px;
  cursor: pointer;
}
.modal-body {
  position: relative;
  z-index: 2;
  padding: 20px 60px;
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.setting-row label {
  flex: 0 0 100px;
  font-weight: bold;
  color: #b00000;
}
.setting-row input[type='range'] {
  flex: 1;
}
.red-btn {
  width: auto;
  font-size: 18px;
  font-weight: 700;
  color: #ffd778 !important;
  padding: 10px 30px;
  text-shadow: 0px 2px 2px #000000;
  border: 1px inset #cc0507;
  border-radius: 40px;
  background: #930306;
  background: linear-gradient(to top, rgba(147, 3, 6, 1), rgba(228, 26, 28, 1));
  cursor: pointer;
  transform: scale(1);
  transition: all 0.5s;
}
.red-btn:active, .red-btn:hover {
  transform: scale(0.96);
}
.text-btn {
  width: 100%;
  margin-top: 14px;
  background: none;
  border: none;
  color: #b00000;
  font-size: 18px;
  cursor: pointer;
  text-decoration: underline;
}
.game-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  border-radius: 20px;
  cursor: pointer;
  background: linear-gradient(
    to right,
    #c90000 0%,
    #ff4a00 70%,
    #3b2a22 70%,
    #3b2a22 100%
  );
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,.5);
}
.game-range::-webkit-slider-runnable-track {
  height: 14px;
  background: transparent;
}
.game-range::-moz-range-track {
  height: 14px;
  background: transparent;
}
.game-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -7px;
  background: radial-gradient(
    circle at top,
    #ffd37a,
    #ff9f1a,
    #c66a00
  );
  border-radius: 50%;
  border: 2px solid #ffefb0;
  box-shadow:
    0 3px 6px rgba(0,0,0,.6),
    inset 0 2px 3px rgba(255,255,255,.8);
}
.game-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle at top, #ffd37a, #ff9f1a, #c66a00);
  border-radius: 50%;
  border: 2px solid #ffefb0;
}
.game-range:active::-webkit-slider-thumb {
  transform: scale(1.1);
}
.game-range-wrap {
  position: relative;
}
.game-range-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 70%,
    rgba(255,215,120,.35)
  );
  pointer-events: none;
  border-radius: 20px;
}

/* Shop Modal */
.shop-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: .3s ease;
}
.shop-modal-overlay.active{
  opacity: 1;
  pointer-events: auto;
}
.shop-modal{
  width: 100%;
  max-width: 100%;
  height: 100%;
  position: relative;
  transform: scale(.9);
  transition: .3s ease;
  overflow-x: auto;
}
.shop-modal-overlay.active .shop-modal{
  transform: scale(1);
}
.shop-content-area{
  padding: 24px;
  width: 100%;
  height: 100%;
}
.shop-header h2 {
  color: #fff2be;
  font-family: 'Chawlewhieng';
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 4px;
  text-shadow: 0 2px 3px #000;
  margin-bottom: 0;
}
.shop-content {
  position: relative;
  width: 90%;
  min-height: 80%;
  height: auto;
  margin: 5% auto;
  border-radius: 0px;
  background: radial-gradient(circle at bottom, #795227, #e8de88 70%);
  border: 14px solid #660201 !important;
  overflow: hidden;
}
.shop-content .shop-corner {
  position: absolute;
  width: 48px;
  height: 48px;
  background: #660201;
  z-index: 2;
}
.shop-corner.tl {
  top: -14px;
  left: -14px;
  border-bottom-right-radius: 48px;
}
.shop-corner.tr {
  top: -14px;
  right: -14px;
  border-bottom-left-radius: 48px;
}
.shop-corner.bl {
  bottom: -14px;
  left: -14px;
  border-top-right-radius: 48px;
}
.shop-corner.br {
  bottom: -14px;
  right: -14px;
  border-top-left-radius: 48px;
}
.wallet-bg {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 13;
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% 100%;
  background-color: transparent;
}
.one {
  background-image: url('../img/wallet-bg-29.png');
}
.two {
  background-image: url('../img/wallet-bg-49.png');
}
