:root {
  --bg-page: #fff1f5;   /* พื้นหลักสว่างชมพูอ่อน */
  --bg-soft: #ffe7ef;   /* ชมพูอ่อนสลับ section */
  --accent: #ff2d6a;
  --accent-2: #ff7a2f;
  --accent-grad: linear-gradient(55deg, #ff2d6a 0%, #ff8c2f 100%);
  --candy-grad: linear-gradient(150deg, #ff4f86 0%, #ff6a5e 45%, #ff9440 100%);
  --deep: #5a0f2c;      /* ตัวหนังสือเข้ม (พลัม) */
  --text: #5a0f2c;
  --text-muted: #a2607a;
  --border: rgba(255, 61, 114, .22);
}

* { font-family: 'Kanit', system-ui, sans-serif; }

body {
  background: var(--bg-page);
  color: var(--text);
  overflow-x: hidden;
}

a { text-decoration: none; }
.text-accent { color: var(--accent) !important; }
.text-muted-light { color: var(--text-muted) !important; }

/* ===== Buttons (flat gradient สด + ขอบทองบาง) ===== */
.btn-accent {
  background: var(--accent-grad);
  border: 2px solid #ffb84d;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(255, 61, 114, .35);
  position: relative;
  overflow: hidden;
}
.btn-accent:active { transform: translateY(1px); box-shadow: 0 2px 10px rgba(255, 61, 114, .3); }
/* แสง "วิ้ง" วิ่งผ่านปุ่ม */
.btn-accent::after {
  content: '';
  position: absolute; top: 0; left: -80%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.4) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: shine 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine { 0% { left: -80%; } 55% { left: 140%; } 100% { left: 140%; } }
.btn-accent:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
.btn-outline-accent {
  border: 2px solid #ff9f43;
  color: #e0175a;
  font-weight: 600;
  background: #fff;
  box-shadow: 0 3px 12px rgba(255, 61, 114, .15);
}
.btn-outline-accent:hover {
  background: var(--accent-grad);
  border-color: #ffb84d;
  color: #fff;
}
.btn-outline-accent:active { transform: translateY(1px); }
.btn { transition: all .15s ease; border-radius: 12px; }

/* ===== Topbar ===== */
.topbar {
  background: #8f1140;
  color: #ffd9e5;
  padding: 7px 0;
  font-size: .82rem;
}
.topbar a { color: #ffc3d6; }
.topbar a:hover { color: #fff; }

/* ===== Navbar ===== */
.main-nav {
  border-bottom: 1px solid var(--border);
  padding: .65rem 0;
}
/* พื้นหลัง + blur อยู่บน ::before — ถ้าใส่ backdrop-filter ที่ .main-nav ตรง ๆ
   offcanvas (position: fixed) ข้างในจะยึดตำแหน่งกับ navbar แทน viewport */
.main-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 244, 248, .92);
  backdrop-filter: blur(10px);
}
.brand-logo { height: 50px; width: auto; filter: drop-shadow(0 2px 8px rgba(255, 61, 114, .35)); }
.main-nav .nav-link { color: #9c536d; font-weight: 500; padding: .5rem 1rem; }
.main-nav .nav-link:hover,
.main-nav .nav-link.active { color: var(--accent); }

/* ปุ่ม CTA บน navbar: ใหญ่สมส่วน + ปุ่มสมัครมีแสงเรืองหายใจ */
.nav-cta {
  padding: .5rem 1.35rem;
  font-size: .95rem;
  font-weight: 700;
  white-space: nowrap;
}
.nav-cta-glow { animation: glowPulse 2.2s ease-in-out infinite; }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(255, 61, 114, .4); }
  50% { box-shadow: 0 4px 26px rgba(255, 122, 47, .8), 0 0 40px rgba(255, 61, 114, .45); }
}

/* Hamburger แบบขีด gradient ไร้กรอบ (กลายเป็น X ตอนเมนูเปิด) */
.navbar-toggler {
  width: 42px; height: 40px;
  padding: 0; border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler .bar {
  display: block; width: 26px; height: 3px; border-radius: 3px;
  background: var(--accent-grad);
  box-shadow: 0 1px 4px rgba(255, 61, 114, .35);
  transition: transform .25s ease, opacity .25s ease;
}
.navbar-toggler.is-open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar-toggler.is-open .bar:nth-child(2) { opacity: 0; }
.navbar-toggler.is-open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Offcanvas mobile menu ===== */
.main-nav .offcanvas {
  --bs-offcanvas-width: 300px;
  background: #fff6f9;
  color: var(--text);
  border-left: 1px solid var(--border);
}
.main-nav .offcanvas-header { border-bottom: 1px solid var(--border); }
@media (max-width: 991.98px) {
  .main-nav .offcanvas .nav-link {
    padding: .8rem .25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }
  .main-nav .offcanvas .nav-item:last-child .nav-link { border-bottom: 0; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 80px;
  /* ฉากประตู Fortune Gods เคลือบเฉดชมพู-ส้มสว่าง เฟดล่างเข้าพื้นสว่างของหน้า */
  background:
    linear-gradient(180deg, rgba(255, 80, 135, .82) 0%, rgba(255, 105, 90, .5) 40%,
      rgba(255, 148, 64, .35) 70%, #fff1f5 100%),
    url('../img/pg/bg-hero.webp') center 30% / cover no-repeat,
    var(--candy-grad);
}
.hero .container { position: relative; z-index: 1; }

.hero-logo {
  width: min(360px, 82%); height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 8px 28px rgba(160, 20, 60, .5));
  animation: float 6s ease-in-out infinite;
}

/* ตัวละครตกแต่งสองข้าง hero (จอใหญ่) */
.hero-char {
  position: absolute; bottom: -8px; width: 220px; z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 12px 30px rgba(120, 20, 50, .45));
}
.hero-char-left { left: -16px; animation: float 6s ease-in-out infinite; }
.hero-char-right { right: -16px; animation: float 7s ease-in-out infinite reverse; }

/* เหรียญ/สัญลักษณ์ลอยประดับ hero */
.hero-float {
  position: absolute; z-index: 0; pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(140, 25, 60, .4));
  animation: float 5s ease-in-out infinite;
}
.hero-float-1 { width: 92px; left: 5%; top: 16%; animation-duration: 6s; }
.hero-float-2 { width: 72px; right: 7%; top: 13%; animation-delay: 1.2s; }
.hero-float-3 { width: 88px; left: 11%; bottom: 10%; animation-delay: .6s; animation-duration: 7s; }
.hero-float-4 { width: 52px; right: 13%; bottom: 18%; animation-delay: 1.8s; }
@media (max-width: 767.98px) {
  .hero-float-1, .hero-float-3 { display: none; }
  .hero-float-2 { width: 44px; }
  .hero-float-4 { width: 40px; }
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.15;
  color: #fff;
  text-shadow: 0 4px 20px rgba(150, 20, 60, .55);
}
.hero-title .text-accent { color: #ffe27a !important; }
.hero-sub {
  color: #fff2f6; font-size: 1.05rem; margin: 1.2rem 0 1.8rem; max-width: 480px;
  text-shadow: 0 2px 10px rgba(150, 20, 60, .55);
}
.hero .stat-num { color: #ffe27a !important; text-shadow: 0 2px 10px rgba(150, 20, 60, .6); }
.hero .stat-label { color: #fff2f6; text-shadow: 0 2px 8px rgba(150, 20, 60, .6); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.hero-img {
  max-height: 520px; width: auto;
  filter: drop-shadow(0 0 60px rgba(255, 226, 122, .45)) drop-shadow(0 20px 50px rgba(160, 20, 60, .45));
  animation: float 5s ease-in-out infinite;
}
.hero-stats { margin-top: 1.5rem; }
.stat-num { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: .82rem; color: var(--text-muted); }

.badge-accent {
  background: rgba(255, 255, 255, .28);
  backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  padding: .5rem .9rem;
  border-radius: 30px;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(150, 20, 60, .5);
}

/* ===== Section headings ===== */
.section-title {
  font-weight: 700; font-size: 2rem; position: relative; display: inline-block;
  color: var(--deep);
}
.section-title::after {
  content: ''; display: block; width: 60px; height: 3px;
  background: var(--accent-grad); margin: .6rem auto 0; border-radius: 3px;
}
.section-sub { color: var(--text-muted); margin-top: .8rem; }

/* ===== Section backgrounds: ทุก section มีสี + รูปตกแต่งจาง ๆ ===== */
section { position: relative; }
section > .container { position: relative; z-index: 1; }

/* ===== Category strip ===== */
.category-strip {
  background: var(--bg-soft);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.category-strip::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background-image: url('../img/pg/coin-stack.webp'), url('../img/pg/coin.webp');
  background-repeat: no-repeat;
  background-position: 2% 20%, 97% 75%;
  background-size: 90px auto, 64px auto;
}
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1.2rem .5rem; border-radius: 14px; color: var(--deep);
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(255, 61, 114, .12);
  transition: all .25s;
}
.cat-card i { font-size: 1.8rem; color: var(--accent); }
.cat-card .cat-img {
  height: 64px; width: auto; max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(150, 25, 65, .3));
  transition: transform .25s;
}
.cat-card:hover .cat-img { transform: scale(1.1); }
.cat-card span { font-weight: 500; }
.cat-card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--accent); }

/* ===== Games section ===== */
#games {
  background:
    radial-gradient(800px 320px at 50% 0%, rgba(255, 61, 114, .12), transparent 70%),
    var(--bg-page);
}
#games::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .28;
  background-image: url('../img/pg/symbol-ingot.webp'), url('../img/pg/coin.webp'), url('../img/pg/coin-stack.webp');
  background-repeat: no-repeat;
  background-position: 3% 6%, 96% 12%, 95% 92%;
  background-size: 80px auto, 56px auto, 100px auto;
}

/* ===== Game cards ===== */
.game-card {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(255, 61, 114, .14);
  transition: all .25s;
}
.game-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 14px 30px rgba(255, 61, 114, .28); }
.game-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.game-card .game-info { padding: .7rem .8rem; }
.game-card .game-name { font-weight: 500; font-size: .9rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--deep); }
.game-card .game-tag { font-size: .72rem; color: var(--accent); }
.game-card .play-overlay {
  position: absolute; inset: 0; background: rgba(90, 15, 44, .55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s;
}
.game-card:hover .play-overlay { opacity: 1; }
.play-overlay .btn { border-radius: 30px; }
.hot-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: #ffb400; color: #3a2500; font-size: .68rem; font-weight: 600;
  padding: .15rem .5rem; border-radius: 6px;
}

/* ===== Promo (แถบ gradient จัดเต็มแบบเว็บสล็อต) ===== */
.promo-bg {
  background: var(--candy-grad);
  border-top: 1px solid rgba(255, 255, 255, .35); border-bottom: 1px solid var(--border);
}
.promo-bg::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background-image: url('../img/pg/symbol-angbao.webp'), url('../img/pg/symbol-pouch.webp'), url('../img/pg/coin.webp');
  background-repeat: no-repeat;
  background-position: 96% 8%, 3% 88%, 6% 14%;
  background-size: 90px auto, 84px auto, 48px auto;
}
.promo-bg .section-title { color: #fff; text-shadow: 0 2px 12px rgba(150, 20, 60, .5); }
.promo-bg .section-sub { color: #ffe3ec; }
.promo-card {
  background: #fff; border: 0;
  border-radius: 16px; padding: 1.8rem 1.5rem; text-align: center; transition: all .25s;
  box-shadow: 0 10px 26px rgba(150, 25, 65, .28);
}
.promo-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(150, 25, 65, .38); }
.promo-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 61, 114, .1); color: var(--accent); font-size: 1.6rem;
}
.promo-icon img { width: 46px; height: auto; }
.promo-card h5 { font-weight: 600; color: var(--deep); }
.promo-card p { color: var(--text-muted); font-size: .9rem; }

/* ===== Providers ===== */
#providers {
  background:
    radial-gradient(720px 300px at 50% 100%, rgba(255, 140, 47, .14), transparent 70%),
    var(--bg-page);
}
#providers::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .26;
  background-image: url('../img/pg/coin-stack.webp'), url('../img/pg/coin.webp');
  background-repeat: no-repeat;
  background-position: 97% 10%, 3% 85%;
  background-size: 84px auto, 60px auto;
}
.provider-chip {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem; text-align: center; transition: all .25s;
  display: flex; flex-direction: column; align-items: center; gap: .5rem; height: 100%;
  box-shadow: 0 4px 14px rgba(255, 61, 114, .12);
}
.provider-chip i { font-size: 1.8rem; color: var(--accent); }
.provider-chip span { font-size: .8rem; color: var(--text-muted); }
.provider-chip:hover { border-color: var(--accent); transform: translateY(-3px); }

/* ===== Steps (แถบ gradient) ===== */
.steps-bg { background: linear-gradient(160deg, #ff5d8f 0%, #ff7a5c 55%, #ff9440 100%); }
.steps-bg::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background-image: url('../img/pg/symbol-ingot.webp'), url('../img/pg/coin.webp');
  background-repeat: no-repeat;
  background-position: 96% 14%, 4% 82%;
  background-size: 88px auto, 56px auto;
}
.steps-bg .section-title { color: #fff; text-shadow: 0 2px 12px rgba(150, 20, 60, .5); }
.steps-bg h5 { color: #fff; text-shadow: 0 1px 8px rgba(150, 20, 60, .5); }
.steps-bg .text-muted-light { color: #ffe3ec !important; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  color: var(--accent); font-weight: 700; font-size: 1.4rem;
  box-shadow: 0 6px 18px rgba(150, 25, 65, .35);
}
/* ตัวละครประจำขั้นตอน + เลขเป็นป้ายเกาะมุม */
.step-figure {
  position: relative; width: 140px; height: 124px; margin: 0 auto 1rem;
  display: flex; align-items: flex-end; justify-content: center;
}
.step-figure img {
  max-height: 120px; max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(150, 25, 65, .4));
  animation: float 5s ease-in-out infinite;
}
.step-figure .step-num {
  position: absolute; right: -4px; top: -8px; margin: 0;
  width: 42px; height: 42px; font-size: 1.1rem;
  border: 2px solid #ffd469;
}
.steps-bg .col-md-4:nth-child(2) .step-figure img { animation-delay: .8s; }
.steps-bg .col-md-4:nth-child(3) .step-figure img { animation-delay: 1.6s; }

/* ===== FAQ ===== */
#faq {
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(255, 61, 114, .1), transparent 70%),
    var(--bg-page);
}
#faq::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .26;
  background-image: url('../img/pg/symbol-pouch.webp'), url('../img/pg/coin-stack.webp');
  background-repeat: no-repeat;
  background-position: 3% 12%, 96% 86%;
  background-size: 80px auto, 90px auto;
}
.faq-accordion .accordion-item { background: #fff; border: 1px solid var(--border); border-radius: 12px !important; margin-bottom: .7rem; overflow: hidden; box-shadow: 0 4px 14px rgba(255, 61, 114, .1); }
.faq-accordion .accordion-button { background: #fff; color: var(--deep); font-weight: 500; }
.faq-accordion .accordion-button:not(.collapsed) { background: var(--bg-soft); color: var(--accent); box-shadow: none; }
.faq-accordion .accordion-button:focus { box-shadow: none; }
.faq-accordion .accordion-body { color: var(--text-muted); }

/* ===== Footer (เข้มตัดจบ + texture ประตูทอง) ===== */
.footer {
  position: relative;
  background:
    linear-gradient(180deg, rgba(58, 8, 28, .93) 0%, rgba(40, 5, 20, .97) 100%),
    url('../img/pg/bg-hero.webp') center 40% / cover no-repeat;
  border-top: 1px solid var(--border);
}
.footer > .container { position: relative; z-index: 1; }
.footer-head { color: #fff; font-weight: 600; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #e3aec3; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer .text-muted-light { color: #e3aec3 !important; }
.footer-divider { border-color: rgba(255, 255, 255, .18); margin: 2rem 0 1.2rem; }
.footer .form-control { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.footer .form-control::placeholder { color: #d9a9bc; }
.pay-chip { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: .35rem .6rem; font-size: .8rem; color: #e3aec3; }

/* ===== Footer menu badges ===== */
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-badge {
  display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px;
  border: 1px solid rgba(255, 130, 165, .45); background: rgba(255, 61, 114, .16);
  color: #ffc3d6; font-size: .85rem; font-weight: 500; transition: .15s;
}
.footer-badge:hover { background: var(--accent-grad); border-color: #ffd469; color: #fff; }

/* ===== Floating bottom menu (mobile) — 2 ปุ่มบนแถบ gradient ===== */
.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1030; /* ใต้ offcanvas (1045) และ backdrop (1040) */
  display: flex;
  gap: .6rem;
  padding: .6rem .8rem calc(.55rem + env(safe-area-inset-bottom));
  /* พื้นแถบ: ภาพประตู Fortune Gods เคลือบเฉดชมพูจัด */
  background:
    linear-gradient(180deg, rgba(255, 79, 134, .9) 0%, rgba(199, 22, 76, .95) 100%),
    url('../img/pg/bg-hero.webp') center 68% / cover no-repeat;
  border-top: 2px solid #ffd469;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 24px rgba(255, 61, 114, .4);
}
.mobile-cta .btn {
  flex: 1; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  padding-top: .5rem; padding-bottom: .5rem;
}
.mcta-ico { height: 26px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }

/* ===== Float contact (ตัวละคร + ป้ายติดต่อเรา) ===== */
.float-contact {
  position: fixed; right: 16px; bottom: 20px; z-index: 999;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  animation: float 4s ease-in-out infinite;
}
.float-contact img {
  width: 76px; height: auto;
  filter: drop-shadow(0 6px 16px rgba(150, 25, 65, .45));
  transition: transform .2s ease;
}
.float-contact:hover img { transform: scale(1.08); }
.float-contact-label {
  background: var(--accent-grad);
  color: #fff; font-size: .72rem; font-weight: 600;
  padding: .2rem .7rem; border-radius: 30px;
  border: 1px solid #ffd469;
  box-shadow: 0 3px 10px rgba(255, 61, 114, .45);
  white-space: nowrap;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,61,114,.5); } 70% { box-shadow: 0 0 0 14px rgba(255,61,114,0); } 100% { box-shadow: 0 0 0 0 rgba(255,61,114,0); } }

/* จอเล็ก: เผื่อที่ให้แถบ CTA ล่าง + ยกปุ่มแชทขึ้นเหนือแถบ
   (บล็อกนี้ต้องอยู่หลังกฎ .float-contact หลัก ไม่งั้นโดน override) */
@media (max-width: 991.98px) {
  body { padding-bottom: 76px; }
  .float-contact { bottom: 88px; }
}
