html,
body {
  font-family: Arial, sans-serif;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  font-size: 16px;
  color: white;
  margin: 0;
  padding: 0;
  background-color: rgb(20 20 20);
}

.stat-value,
#jackpot-number {
  font-family: "Orbitron", monospace;
  letter-spacing: 1px;
}

.header-logo {
  text-align: center;
}
.container {
  max-width: 789px;
  margin: auto;
}

img.fix-logo {
  width: 560px;
  height: auto;
}

header {
  font-weight: bold;
  width: 100%;
  padding: 50px 10px;
  background: linear-gradient(rgb(107 255 0 / 10%), rgb(0 21 1)),
    url(/assets/backgroun-gif-2.gif) center repeat;
}

h1 {
  font-size: 22px;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 0 10px #21ff61;
}

h2 {
  margin: 10px;
  color: #00ff2a;
  text-align: center;
  font-size: 18px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.15);
}
.framed-title {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #2ef653;
  text-transform: uppercase;
  font-family: "Orbitron", monospace;
  font-size: 1.6rem;
  margin: 40px auto;
  gap: 8px; /* ระยะห่างระหว่าง svg กับ text */
}

.frame-text {
  display: inline-block;
  padding: 4px 40px;
  letter-spacing: 2px;
  text-shadow: 0 0 6px rgba(46, 246, 83, 0.7);
  position: relative;
  z-index: 2;
}

.frame-top,
.frame-bottom {
  width: 380px; /* ปรับตามความกว้างข้อความ */
  height: auto;
  pointer-events: none;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(46, 246, 83, 0.6));
}

.frame-top path,
.frame-bottom path {
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.framed-title:hover .frame-top path,
.framed-title:hover .frame-bottom path {
  filter: brightness(1.4);
  opacity: 1;
}
.section-title {
   font-family: "Noto Sans Thai", sans-serif;
  display: grid;
  place-items: center;
  position: relative;
  color: #fc0;
  font-size: 20px;
  font-weight: bold;
  margin:15px;
}
.section-title .h2-frame {
    grid-area: 1 / 1;
    width: 400px;
    height: auto;
    filter: drop-shadow(0 0 6px rgba(46, 246, 83, 0.6));
}

span.countdown-wrap {
    display: flex
;
    align-items: baseline;
    justify-content: center;
}
.section-title span {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
}

h3#popup-title {
  margin-top: 5px;
  font-size: 32px;
  margin-bottom: 10px;
}
.popup-content .stat-set {
  margin-bottom: 25px;
}
.top-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px;
}
.top-detail a {
  text-align: center;
}
img.btn-play {
  width: 200px !important;
  margin: auto;
}
.top-item {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 5px;
  padding: 35px 40px;
  align-items: center;
  margin-bottom: 15px;

  overflow: hidden;
  z-index: 1;
}

.content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.stat-set {
  line-height: normal;
  padding-top: 10px;
  padding-left: 5px;
  padding-right: 5px;
}
.top-detail {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 6px;
  height: auto;
  z-index: 1;
}

.top-item img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border-radius: 25px;
  z-index: 1;
}

.stat {
  display: flex;
  justify-content: space-between;
}

.stat-value {
  color: #17ff21;
  font-weight: bold;
}

.bd-bt {
  border-bottom: 1px solid white;
  padding-bottom: 8px;
  width: 100%;
}

.stat.bd-bt {
  margin-bottom: 5px;
}
#all-games .stat-value {
  font-size: 24px;
}

.game-card .stat {
  justify-content: center;
}

.bar {
  height: 8px;
  background: #333;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 5px;
  margin-bottom: 8px;
}

.bar-fill {
  height: 100%;
  transition:
    width 0.8s ease-in-out,
    background-color 0.4s ease-in-out;
}
#popup .bar-fill {
  transition: width 0.7s ease-in-out;
}
.frame-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.provider-section {
  position: relative;
  margin:auto;
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
}
.provider-menu {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: nowrap;
  padding: 10px 0;
  overflow: visible;
  position: relative;
  scroll-behavior: smooth;
}
.provider-btn {
  aspect-ratio: 1 / 1;
  width: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
  flex: 0 0 auto;
  cursor: pointer;
}

.provider-btn.active {
  transform: scale(1.05);
}

.bt-ct img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: brightness(1.1);
}

@media (max-width: 1024px) {
  .section-title .h2-frame {
  width: 100%;
}
  .provider-menu {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 10px;
    gap: 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none; 
  }
  .provider-menu::-webkit-scrollbar {
    display: none;
  }
  .provider-btn {
    scroll-snap-align: center;
  }

  .provider-section::before,
  .provider-section::after {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    width: 60px;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
    opacity: 0; /* เริ่มต้นไม่เห็น */
  }

  /* ซ้าย fade */
  .provider-section.fade-left::before {
    opacity: 1;
    left: 0;
    background: linear-gradient(to right, rgba(5, 5, 5, 0.9), transparent);
  }

  /* ขวา fade */
  .provider-section.fade-right::after {
    opacity: 1;
    right: 0;
    background: linear-gradient(to left, rgba(5, 5, 5, 0.9), transparent);
  }
}
/* ========== COUNTDOWN STATUS & TIMER ========== */
.countdown-wrap {
  text-align: center;
  margin-top: 10px;
}
span.top10-title {
    letter-spacing: 0.6px;
}
.countdown-status {
  font-family: "Noto Sans Thai", sans-serif;
  font-size: 15px;
  color: #ccc;
  padding-right: 5px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.15);
}

#countdown-timer {
  font-family: "Orbitron", monospace;
  font-size: 18px;
  color: #f1bc30;
  text-align: center;
  letter-spacing: 2px;
  text-shadow:
    0 0 10px #f1bc30,
    0 0 20px rgba(241, 188, 48, 0.5);
  animation: clockGlow 1s infinite alternate;
}

@keyframes clockGlow {
  from {
    text-shadow: 0 0 5px #f1bc30, 0 0 10px rgba(241, 188, 48, 0.4);
  }
  to {
    text-shadow: 0 0 15px #f1bc30, 0 0 30px rgba(241, 188, 48, 0.6);
  }
}

/* กระพริบ ":" แบบ digital */
#countdown-timer span.colon {
  animation: blink 1s step-start infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* 🎨 Aspect Ratio per Provider (actual asset sizes) */
.game-card.pgsoft img,
.popup-image.pgsoft img { aspect-ratio: 1 / 1; }

.game-card.nolimit img,
.popup-image.nolimit img,
.game-card.fachai img,
.popup-image.fachai img,
.game-card.spadegaming img,
.popup-image.spadegaming img ,
.game-card.redtiger img,
.popup-image.redtiger img,
.game-card.kagaming img,
.popup-image.kagaming img{ aspect-ratio: 1 / 1; }

.game-card.jili img,
.popup-image.jili img { aspect-ratio: 1 / 1; }

.game-card.joker img,
.popup-image.joker img { aspect-ratio: 1 / 1.5; }

.popup-image.\32 j img,
.popup-image.\32 j img { aspect-ratio: 1 / 1.5; }

.game-card.ygr img,
.popup-image.ygr img { aspect-ratio: 1 / 1.5; }

.game-card.simpleplay img,
.popup-image.simpleplay img { aspect-ratio: 1 / 1.5; }

.game-card.nextspin img,
.popup-image.nextspin img { aspect-ratio: 1 / 1.5; }

.game-card.playtech img,
.popup-image.playtech img { aspect-ratio: 1 / 1.5; }

.game-card.pragmatic img,
.popup-image.pragmatic img { aspect-ratio: 2 / 1; }

.game-card.playngo img,
.popup-image.playngo img { aspect-ratio: 1 / 1.5; }

.popup-image.pgsoft img ,
.popup-image.nolimit img,
.popup-image.jili img,
.popup-image.fachai img,
.popup-image.spadegaming img,
.popup-image.redtiger img,
.popup-image.kagaming img
{
    width: 180px;
    height: auto;
    border-radius: 12px;
}
.game-card.pgsoft img,
.game-card.nolimit img,
.game-card.jili img{
  border-radius: 12px;
}

.popup-image.joker img,.popup-image.playngo img ,.popup-image.simpleplay img,
.popup-image.nextspin img,
.popup-image.playtech img,
.popup-image.pragmatic img,
.popup-image.playngo img {
    width: 150px;
    height: auto;
}
.popup-image.pragmatic img {
    width: 270px;
    height: auto;
}

.popup-image.pragmatic {
    top: 10%;
}
.popup-image.playngo {
    top: 10%;
}

.provider-btn .bt-ct {
  position: relative;
  width: 100%;
  height: 100%;
}

.provider-btn .bt-ct svg {
  width: 100%;
  height: 100%;
  display: block;
}
.provider-btn svg path {
  fill: #00ff2a; /* เขียว */
  transition: fill 0.3s ease;
}

/* เมื่อ active */
.provider-btn.active svg path {
  fill: #ffcc00; /* เหลือง */
}
/* โลโก้ด้านใน */
.provider-btn .bt-ct img {
  position: absolute;
  top: 50%;
  left: 50%;
     width: 50%;
    height: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  pointer-events: none;
}

/* เอฟเฟกต์ hover/active */
.provider-btn:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.provider-btn.active {
  opacity: 1;
}

.all-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 10px 0;
}

.game-card {
  background: rgb(0 0 0 / 31%);
  border-radius: 16px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.3s;
}

.game-card img {
  width: 100%;
  object-fit: cover;
}

.tier-low {
  opacity: 0.5;
}

.popup {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.popup.show {
  opacity: 1;
  pointer-events: auto;
}

.popup-content {
  position: relative;
  overflow: visible;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #FFE500;
  box-shadow: 0 0 5px #FFE500, 0 0 20px #E69900;
  padding: 140px 15px 20px;
  width: 460px;
  text-align: center;
  border-radius: 12px;
  z-index: 1;
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.popup-content .decorator {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 15px solid transparent;
  transition: all 0.35s cubic-bezier(0.75, 0, 0.25, 1);
}

.popup-content .decorator.top {
  top: 0px;
}

.popup-content .decorator.bottom {
  bottom: 0px;
}

.popup-content .decorator.left {
  left: 0px;
}

.popup-content .decorator.right {
  right: 0px;
}

.popup-content .decorator.top {
  border-top: 10px solid #ffe500;
}

.popup-content .decorator.bottom {
  border-bottom: 10px solid #ffe500;
}

.popup-content .decorator.left {
  border-left: 10px solid #ffe500;
}

.popup-content .decorator.right {
  border-right: 10px solid #ffe500;
}

.popup-image {
  position: absolute;
  top: 15%;
  border-radius: 12px;
  overflow: visible;
  z-index: 3;
}
.popup-image img {
  border-radius: 12px;
  object-fit: cover;
  display: block;
}
.popup.show .popup-image {
  display: block !important; /* override ทุกกรณี */
  opacity: 1;
}
.btn-wrap {
    text-align: center;
}
.popup .sunburst {
  position: absolute;
  top: 0;
  left: 50%;
   transform: translate(-50%, calc(-50% - 100px));
  width: 500px;
  height: 500px;
  animation: spinSunburst 25s linear infinite;
  opacity: 0.7;
  filter: blur(8px);
  pointer-events: none;
  z-index: 1;
   background: radial-gradient(circle, #ffe066 10%, #f9a825 70%, transparent 100%);
  -webkit-mask: url("/assets/sunburst-rays.webp") center/contain no-repeat;
  mask: url("/assets/sunburst-rays.webp") center/contain no-repeat;
}

/* 🔆 Sunburst base — no position, just spin */
.sunburst.active {
  display: block !important;
  animation: spinSunburst 25s linear infinite;
}

@keyframes spinSunburst {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.popup.show .popup-content {
  transform: scale(1);
}

.error-msg {
  text-align: center;
  color: #ef5350;
  margin: 20px 0;
}

@media (max-width: 1024px) {
  .top-detail {
    padding-bottom: 15px;
  }

  body {
    font-size: 16px;
    max-width: 100%;
  }
  .container {
    max-width: 100%;
  }
  .top-item {
    grid-template-columns: 120px 1fr;
    padding: 15px 13px;
  }
  .all-grid {
    gap: 5px;
  }
  .game-card {
    padding: 5px;
  }
  .frame-border {
    max-width: 100%;
  }

  #all-games .stat-value {
    font-size: 18px;
  }
  img.fix-logo {
    width: 300px;
    height: auto;
  }


  .bar {
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
  }

  .popup-content {
    width: 760px;
    margin: 0px 10px;
  }
}
/* ===========================
   PC Layout: Provider Menu 2-Row Grid
   =========================== */
@media (min-width: 1025px) {
  .provider-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px 50px; /* แถว × คอลัมน์ */
    padding: 15px 0;
  }

  .provider-btn {
    width: 100px;
    aspect-ratio: 1/1;
  }

  /* ปิด fade gradient บน PC */
  .provider-section::before,
  .provider-section::after {
    display: none;
  }
}