*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  margin: 0;
  padding: 0;
  font-family: 'Kanit', 'Prompt', sans-serif;
  color: #162a45;
  background-color: #eaf4ff;
  background-image:
    radial-gradient(circle at 8% 12%, rgba(92, 184, 255, 0.35) 0%, transparent 32%),
    radial-gradient(circle at 92% 8%, rgba(56, 165, 255, 0.28) 0%, transparent 36%),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.92) 0%, rgba(232, 245, 255, 0.6) 65%),
    linear-gradient(180deg, #ddeeff 0%, #eef6ff 38%, #f5faff 70%, #dfeeff 100%);
  background-attachment: fixed;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Soft 3D White Card */
.pt-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1.5px solid #ffffff;
  border-bottom: 3.5px solid #c5e1ff;
  border-radius: 1.35rem;
  box-shadow:
    0 14px 32px -8px rgba(13, 88, 175, 0.12),
    0 4px 12px -2px rgba(13, 88, 175, 0.07),
    inset 0 2px 0 #ffffff;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pt-card-hover:hover {
  transform: translateY(-4px);
  border-color: #84c5ff;
  border-bottom-color: #2b8eff;
  box-shadow:
    0 20px 38px -8px rgba(10, 102, 214, 0.2),
    0 6px 16px -3px rgba(10, 102, 214, 0.12),
    inset 0 2px 0 #ffffff;
}

/* Glossy Blue Button */
.btn-glossy-blue {
  background: linear-gradient(180deg, #29b6ff 0%, #0072f5 55%, #0058c7 100%);
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom: 3px solid #003e91;
  box-shadow:
    0 8px 20px -4px rgba(0, 102, 235, 0.45),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45);
  transition: all 0.2s ease;
}

.btn-glossy-blue:hover {
  transform: translateY(-1.5px);
  background: linear-gradient(180deg, #3ec0ff 0%, #0a7cff 55%, #0062de 100%);
  box-shadow:
    0 12px 24px -4px rgba(0, 102, 235, 0.58),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55);
}

/* Flash Sale Blue Container */
.flash-sale-box {
  background:
    radial-gradient(circle at 18% 15%, rgba(77, 210, 255, 0.42) 0%, transparent 45%),
    linear-gradient(180deg, #007cf5 0%, #0a68d6 38%, #cae6ff 92%, #e3f2ff 100%);
  border: 2px solid #ffffff;
  border-bottom: 4px solid #9bcbff;
  border-radius: 1.6rem;
  box-shadow:
    0 20px 44px -10px rgba(0, 88, 198, 0.25),
    0 6px 16px -4px rgba(0, 88, 198, 0.14),
    inset 0 2px 1px rgba(255, 255, 255, 0.65);
}

/* Glossy Blue Banner */
.blue-hero-banner {
  background:
    radial-gradient(circle at 80% 30%, rgba(89, 222, 255, 0.55) 0%, transparent 45%),
    linear-gradient(105deg, #0058c4 0%, #007ef5 52%, #19b5ff 100%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-bottom: 4px solid #0047a0;
  box-shadow:
    0 16px 34px -8px rgba(0, 92, 208, 0.35),
    inset 0 2px 1px rgba(255, 255, 255, 0.45);
}

.timer-box {
  background: linear-gradient(180deg, #0c2b59 0%, #071b3b 100%);
  border: 1.5px solid rgba(114, 196, 255, 0.45);
  box-shadow: 0 4px 10px rgba(5, 22, 48, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.game-icon-frame {
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: 0 6px 14px -3px rgba(15, 42, 74, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
}

.center-plus-orb {
  background: radial-gradient(circle at 35% 25%, #6be0ff 0%, #0088ff 50%, #0051cc 100%);
  box-shadow:
    0 10px 24px -2px rgba(0, 110, 255, 0.55),
    0 0 0 6px #ffffff,
    0 -4px 14px rgba(13, 88, 175, 0.12),
    inset 0 2px 3px rgba(255, 255, 255, 0.7);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.marquee-viewport {
  overflow: hidden;
  width: 100%;
  min-width: 0;
  position: relative;
}

@keyframes tickerSlide {
  0% { transform: translate3d(0%, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerSlide 30s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

/* 3D Moon / Sun Theme Toggle Switch */
.theme-switch-pill {
  position: relative;
  width: 60px;
  height: 32px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #b8dcff 0%, #d8ecff 100%);
  border: 2.5px solid #e2d9ff;
  box-shadow:
    inset 0 3px 6px rgba(12, 74, 145, 0.22),
    0 2px 6px rgba(13, 88, 175, 0.12);
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.theme-switch-pill .bg-moon-icon {
  color: #9bb5d1;
  font-size: 13px;
  margin-left: 2px;
}

.theme-switch-pill .bg-sun-icon {
  color: #f59e0b;
  font-size: 13px;
  margin-right: 2px;
  opacity: 0;
}

.theme-switch-thumb {
  position: absolute;
  top: 2px;
  left: 30px;
  width: 23px;
  height: 23px;
  border-radius: 9999px;
  background: linear-gradient(145deg, #ffbe0b 0%, #fb8500 100%);
  box-shadow:
    0 3px 8px rgba(251, 133, 0, 0.55),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode Overrides */
html.dark-mode .theme-switch-pill {
  background: linear-gradient(180deg, #091326 0%, #162947 100%);
  border-color: #335280;
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.65), 0 2px 8px rgba(0, 119, 255, 0.25);
}

html.dark-mode .theme-switch-pill .bg-moon-icon { opacity: 0; }
html.dark-mode .theme-switch-pill .bg-sun-icon { opacity: 0.55; color: #fbbf24; }
html.dark-mode .theme-switch-thumb {
  left: 3px;
  background: linear-gradient(145deg, #38bdf8 0%, #0266c8 100%);
  box-shadow: 0 3px 10px rgba(56, 189, 248, 0.55), inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
}

html.dark-mode,
html.dark-mode body {
  background-color: #07101f;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(0, 132, 255, 0.22) 0%, transparent 35%),
    radial-gradient(circle at 90% 12%, rgba(25, 195, 255, 0.16) 0%, transparent 38%),
    linear-gradient(180deg, #060d1a 0%, #0a1528 45%, #0d1b33 80%, #07101f 100%);
  color: #e2eeff;
}

html.dark-mode header { background: rgba(7, 16, 31, 0.85) !important; }
html.dark-mode .pt-card {
  background: linear-gradient(180deg, #12233f 0%, #0c182d 100%) !important;
  border-color: #213d68 !important;
  border-bottom-color: #060d1a !important;
  box-shadow: 0 16px 34px -8px rgba(0, 0, 0, 0.55), inset 0 1.5px 0 rgba(148, 205, 255, 0.14) !important;
}
html.dark-mode .flash-sale-box {
  background: linear-gradient(180deg, #0055b3 0%, #083978 45%, #0d2142 95%, #0a1830 100%) !important;
  border-color: #2c5894 !important;
}
html.dark-mode #flashSaleDeck > div {
  background: linear-gradient(180deg, #142847 0%, #0e1d36 100%) !important;
  border-color: #264878 !important;
}
html.dark-mode .text-slate-900, html.dark-mode .text-slate-800 { color: #f0f7ff !important; }
html.dark-mode .text-slate-700, html.dark-mode .text-slate-600 { color: #b5cce8 !important; }
html.dark-mode .text-slate-500, html.dark-mode .text-slate-400 { color: #7997bd !important; }
html.dark-mode .text-\[\#0058c7\], html.dark-mode .text-\[\#0066eb\] { color: #4cc2ff !important; }
html.dark-mode input[type="text"], html.dark-mode input[type="password"] {
  background-color: #091324 !important;
  border-color: #23426e !important;
  color: #e6f1ff !important;
}
html.dark-mode .bg-\[\#f4f9ff\], html.dark-mode .bg-\[\#f0f7ff\], html.dark-mode .bg-\[\#f3f8ff\], html.dark-mode .bg-\[\#eef6ff\], html.dark-mode .bg-\[\#eaf4ff\] {
  background-color: #0c182e !important;
  border-color: #23426e !important;
  color: #d4e7ff !important;
}
html.dark-mode #bottomNavExpanded, html.dark-mode #bottomNavCompact {
  background: rgba(13, 26, 48, 0.95) !important;
  border-color: #274a7a !important;
}

/* Universal Cross-OS / Cross-Browser Responsive Hardening (iOS Safari, Android Chrome, Tablet, Desktop) */
@media screen and (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

.modal-safe-scroll {
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#mobileBottomNav {
  padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
}

