/* ===== Reset & Global ===== */
* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%
}

/* Preloader overlay */
  #preloader{
    position:fixed; inset:0;
    display:flex; flex-direction:column;
    justify-content:center; align-items:center;
    background:#0b0b0f;           /* พื้นหลังมืด */
    z-index:9999;
    font-family:'Kanit',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  }
  #preloader i{
    font-size:130px;
    color:#00e7ff;
    text-shadow:0 0 12px rgba(0,231,255,.8);
    margin-bottom:18px;
  }
  .pre-msg{
    font-size:1.2rem; font-weight:700;
    color:#00ffd5;
    text-shadow:0 0 10px rgba(0,255,180,.6);
  }

  /* ลด/ปิดอนิเมชันสำหรับผู้ใช้ที่ตั้งค่าลดการเคลื่อนไหว */
  @media (prefers-reduced-motion: reduce){
    #preloader i{ animation: none !important; }
  }



/* ===== Background แบบเสถียร ไม่เกิดเส้นคั่น ===== */
body {
  margin: 0;
  font-family: 'Kanit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #eaf1ff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #0a1415;
  /* สีฐานทึบ */
  overflow-x: hidden;
  position: relative;
}

/* ชั้นเดียว ครอบทั้ง viewport แบบ fixed */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(0, 195, 255, 0.18), transparent 60%),
    radial-gradient(1000px 600px at 5% 120%, rgba(0, 229, 255, 0.12), transparent 60%),
    linear-gradient(180deg, #000b81 0%, #00a5f1 50%, #001e72 100%);
  background-repeat: no-repeat;
  will-change: transform;
}

/* ปิดเลเยอร์ตกแต่งที่ทำให้เกิดเส้นคั่น */
body::after {
  display: none !important;
}

/* ===== Mobile container (ล็อกเป็นมือถือเสมอ) ===== */
.phone {
  width: 414px;
  max-width: 100vw;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: 35px;
}

/* ===== THEME ===== */
:root {
  --panel: #0f1126;
  --glass: rgba(17, 19, 42, .55);
  --border: #252b52;
  --text-muted: #9aa3c6;
  --accent1: #7a5cff;
  --accent2: #00e7ff;
  /* default */
}

body[data-theme="pg"] {
  --accent1: #00ffd5;
  --accent2: #a9ff2f;
}

body[data-theme="pp"] {
  --accent1: #00ffd5;
  --accent2: #a9ff2f;
}

/* ===== Header ===== */
.logo-top {
  display: block;
  margin: 18px auto 8px;
  width: 170px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35));
  animation: floatLogo 2s ease-in-out infinite;
}

@keyframes floatLogo {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

header {
  text-align: center;
  padding: 0 14px
}

header h1 {
  margin: 0;
  font-weight: 800;
  font-size: 22px;

  /* Gradient text */
  background: linear-gradient(90deg,
      #09ff00 0%,
      #d9ff00 50%,
      #00ff2a 100%);
  -webkit-background-clip: text;
  background-clip: text;

  /* Transparent text to show gradient */
  -webkit-text-fill-color: transparent;
  color: transparent;

  /* Glow effect */
  text-shadow:
    0 0 12px rgba(0, 255, 76, 0.4),
    0 0 20px rgba(9, 255, 0, 0.25);
}

.back {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 70;
  color: #fff;
  background: linear-gradient(50deg, #2f0aff, #00e7ff);
  margin: 10px;
}

.online-bar{
  width:min(640px, 92%);
  margin: 8px auto 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg,#11142a,#0f1b35);
  border:1px solid rgba(255,255,255,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
  color:#dfe7ff;
  text-align:center;
  font-weight:700;
  letter-spacing:.2px;
  position:relative;
}
.online-bar strong{
  color:#21ffc3;
  text-shadow:0 0 10px rgba(33,255,195,.5);
  font-weight:800;
}
.ping-dot{
  width:10px;height:10px;border-radius:50%;
  background:#21ffc3;
  box-shadow:0 0 12px rgba(33,255,195,.9);
  display:inline-block;
  margin-right:8px;
  vertical-align:middle;
  animation:pulse 1.4s infinite ease-in-out;
}
@keyframes pulse{
  0%,100%{ transform:scale(.9); opacity:.9 }
  50%    { transform:scale(1.15); opacity:1 }
}


.promo-slider-wrapper {
  margin: 16px auto;
  padding: 0 10px;
}



/* กล่องสไลด์: ล็อกสัดส่วน 700:400 */
.slider {
  width: 100%;
  max-width: 414px;
  /* ขนาดมือถือ */
  aspect-ratio: 7/4;
  /* 700:400 */
  margin: 12px auto 0;
  overflow: hidden;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

/* แถบสไลด์ */
.slides {
  display: flex;
  height: 100%;
  width: 100%;
  animation: slider-autoplay 20s infinite;
}

/* แต่ละสไลด์ต้องกว้าง 100% ของคอนเทนเนอร์ */
.slide {
  flex: 0 0 100%;
  height: 100%;
}

/* รูป: เติมเต็มกล่อง, ครอปเก็บสัดส่วน */
.slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* ถ้าอยากให้เห็นเต็มไม่ครอป เปลี่ยนเป็น contain */
  display: block;
}

/* เลื่อนทีละรูป (0, -100, -200, -300, -400%) */
@keyframes slider-autoplay {
  0% {
    transform: translateX(0%);
  }

  16% {
    transform: translateX(0%);
  }

  20% {
    transform: translateX(-100%);
  }

  36% {
    transform: translateX(-100%);
  }

  40% {
    transform: translateX(-200%);
  }

  56% {
    transform: translateX(-200%);
  }

  60% {
    transform: translateX(-300%);
  }

  76% {
    transform: translateX(-300%);
  }

  80% {
    transform: translateX(-400%);
  }

  100% {
    transform: translateX(-400%);
  }
}



/* ===== Sticky CTA ปุ่มลอย ===== */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  /* ยกขึ้นจากขอบเล็กน้อย */
  z-index: 9999;
  display: flex;
  justify-content: center;
  pointer-events: none;
  /* กันไม่ให้ container block การคลิกนอกปุ่ม */
}

.sticky-cta .cta-btn {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: min(410px, 90vw);
  min-height: 60px;
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;

  background: linear-gradient(90deg, #389900 0%, #00a708 50%, #00721d 100%);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.6);

  color: #ffffff;
  text-align: center;
  font-family: 'Kanit', sans-serif;
  font-weight: 800;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease;
}

/* แสงไฮไลต์วิ่ง */
.sticky-cta .cta-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
      rgba(136, 255, 0, 0) 0%,
      rgba(136, 255, 0, 0.3) 40%,
      rgba(0, 255, 100, 0.6) 50%,
      rgba(136, 255, 0, 0.3) 60%,
      rgba(136, 255, 0, 0) 100%);
  filter: blur(12px);
  /* เบลอให้ฟุ้ง */
  transform: translateX(-120%) skewX(-15deg);
  opacity: 0;
  animation: sweepSmooth 4s ease-in-out infinite;
}

@keyframes sweepSmooth {
  0% {
    transform: translateX(-120%) skewX(-15deg);
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  50% {
    transform: translateX(120%) skewX(-15deg);
    opacity: 1;
  }

  85% {
    opacity: 0.6;
  }

  100% {
    transform: translateX(120%) skewX(-15deg);
    opacity: 0;
  }
}


/* ข้อความหลัก/รอง */
.sticky-cta .cta-btn .main-text {
  font-size: 18px;
  line-height: 1.2;
}

.sticky-cta .cta-btn .sub-text {
  font-size: 16px;
  font-weight: 700;
  color: #ff0000;
  /* ข้อความแดง */
  margin-top: 2px;
}

/* Hover / Active */
.sticky-cta .cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 10px 28px rgba(94, 255, 0, 0.75),

}

.sticky-cta .cta-btn:active {
  transform: translateY(0) scale(0.98);
}


/* ===== Grid (มือถือคงที่) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 12px
}

/* ===== Game Card (กรอบไฟวิ่ง + กระจก) ===== */
.game-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(21, 22, 45, .9), rgba(12, 14, 28, .95));
  border: 1px solid var(--border);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .35);
  isolation: isolate;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  z-index: 0;
  background: conic-gradient(from var(--ang, 0deg), var(--accent1), var(--accent2), var(--accent1));
  filter: blur(12px) opacity(.28);
  animation: spin 6s linear infinite;
}

@keyframes spin {
  to {
    --ang: 360deg
  }
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 14px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .06);
}

.game-card img.thumb {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  border: 4px solid transparent;
  /* เริ่มต้น */
  border-radius: 12px;
  /* มุมโค้งเล็กน้อย */
  box-sizing: border-box;
}

/* ทำขอบรูปตามสีเดียวกับ meter-fill */
/* HOT — ขอบเขียวเรืองแสง RGB */
.game-card.hot img.thumb {
  border: 4px solid #20ff93;
  animation: rgbGlow 4s infinite linear;
}

/* Animation แสงเปลี่ยนวน */
@keyframes rgbGlow {
  0% {
    box-shadow: 0 0 20px #ff0040, 0 0 40px #ff0080, 0 0 60px #ff00ff;
    border-color: #ff0040;
  }

  20% {
    box-shadow: 0 0 25px #ff6600, 0 0 50px #ff9900, 0 0 70px #ffff00;
    border-color: #ff9900;
  }

  40% {
    box-shadow: 0 0 25px #20ff93, 0 0 55px #00ffcc, 0 0 75px #00ff88;
    border-color: #20ff93;
  }

  60% {
    box-shadow: 0 0 25px #00aaff, 0 0 55px #0066ff, 0 0 75px #00ffff;
    border-color: #00aaff;
  }

  80% {
    box-shadow: 0 0 25px #9900ff, 0 0 55px #cc00ff, 0 0 75px #ff00ff;
    border-color: #cc00ff;
  }

  100% {
    box-shadow: 0 0 20px #ff0040, 0 0 40px #ff0080, 0 0 60px #ff00ff;
    border-color: #ff0040;
  }
}



.game-card.warm img.thumb {
  border: 4px solid #ffd257;
  box-shadow: 0 0 18px rgba(255, 175, 50, .7);
}

.game-card.cold img.thumb {
  border: 4px solid #ff7aa5;
  box-shadow: 0 0 18px rgba(255, 60, 120, .7);
}



/* ===== % เป็นหลอดเด่นๆ ===== */
.meter {
  position: absolute;
  z-index: 3;
  bottom: 8px;
  left: 8px;
  right: 8px;
  height: 20px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .6);
  /* ดำทึบขึ้น ให้ตัดกับภาพ */
  border: 2px solid rgba(255, 255, 255, .25);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, .8), inset 0 2px 4px rgba(0, 0, 0, .5);
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  box-shadow: 0 0 20px rgba(0, 231, 255, .8);
  /* เพิ่มไฟ */
  transition: width .25s ease;
}

.meter-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #fff;
  /* ขาวชัด */
  text-shadow: 0 0 5px rgba(0, 0, 0, .8), 0 0 10px rgba(0, 0, 0, .9);
  pointer-events: none;
}

/* ไล่สีตามระดับ */
.meter-fill.hot {
  background: linear-gradient(90deg, #20ff93, #00d2ff);
  box-shadow: 0 0 25px rgba(0, 255, 180, .9);
}

.meter-fill.warm {
  background: linear-gradient(90deg, #ffd257, #ff9f3f);
  box-shadow: 0 0 25px rgba(255, 175, 50, .9);
}

.meter-fill.cold {
  background: linear-gradient(90deg, #ff7aa5, #ff3b70);
  box-shadow: 0 0 25px rgba(255, 60, 120, .9);
}

/* ====== กล่องแจ้งเตือนล่าสุด ====== */
.notifications-wrapper {
  width: 100%;
  max-width: 370px;
  margin: 20px auto;
  border-radius: 14px;
  overflow: hidden;
  background: #101522;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
}

/* ขอบ gradient ด้านล่าง */
.notifications-wrapper::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 12px;
  /* ความหนาเหมือนด้านบน */
  background: linear-gradient(90deg, #ff2d92, #00e0ff);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}


/* หัวข้อ */
.notifications-header {
  text-align: center;
  padding: 10px;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  /* ข้อความขาวชัด */
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #ff2d92, #00e0ff);
}


/* พื้นหลังของ list */
#notifications {
  background: #1a1c2b;
  padding: 12px;
}

/* การ์ดแจ้งเตือนแต่ละอัน */
.notification {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #23263d;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInUp 0.45s ease;
}

/* ไอคอนธนาคาร */
.notification img.icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ข้อความ */
.notification p {
  margin: 2px 0;
  font-size: 13px;
  color: #cfd5f0;
  line-height: 1.4;
}

/* ไฮไลต์ข้อความ */
.notification .highlight {
  color: #ff2d92;
  font-weight: 700;
}

.status {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.status.pending {
  color: #ffc107;
  background: rgba(255, 193, 7, .15);
}

.status.success {
  color: #00ff00;
  background: rgba(32, 227, 162, .15);
}


/* แอนิเมชันเลื่อนขึ้น */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===== Footer ===== */
footer {
  text-align: center;
  margin-top: 50px;
  color: #7f8ba4;
  font-size: 12px
}

