/* PGAXE.COM — Mobile-First Gaming Platform Stylesheet (Royal Purple & Crimson Red Theme) */
:root {
  --pgx-purple: #9333ea;
  --pgx-crimson: #e11d48;
  --pgx-purple-deep: #3b0764;
  --pgx-cta-grad: linear-gradient(180deg, #f43f5e 0%, #dc2626 55%, #991b1b 100%);
  --pgx-bg: linear-gradient(155deg, #1b0b2e 0%, #11071e 50%, #09040f 100%);
  --pgx-surface: linear-gradient(180deg, #210e36 0%, #120720 100%);
  --pgx-card: linear-gradient(180deg, #24103a 0%, #11071d 100%);
  --pgx-text: #f8fafc;
  --pgx-muted: #c4b5fd;
  --pgx-line: #06c755;
  --pgx-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #0c0614; min-height: 100%; }
html.pgx-lock, body.pgx-lock { overflow: hidden; }
body {
  margin: 0;
  font-family: 'Kanit', 'Noto Sans Thai', 'Prompt', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--pgx-text);
  background: var(--pgx-bg);
  min-height: 100vh;
  overflow-x: clip;
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); /* Space for mobile bottom nav */
}
a { color: inherit; text-decoration: none; }
a, button, .g-card { -webkit-tap-highlight-color: transparent; }
button, a, .g-card, .wallet-tab, .hero-dot { touch-action: manipulation; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }

/* Subtle floating $ coins layer (never blocks clicks or modals) */
.coin-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden;
}
.coin-particle {
  position: absolute; top: -40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fbcfe8, #e11d48 52%, #581c87 100%);
  border: 1.5px solid #f472b6;
  color: #fff1f2; font-weight: 900; display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(225,29,72,0.4);
  opacity: 0.28;
  animation: coinFall linear infinite;
}
body.pgx-hidden .coin-particle { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .coin-particle, .pgx-marquee-text { animation: none !important; }
}
@keyframes coinFall {
  0% { transform: translateY(-40px) rotate(0deg); opacity: 0; }
  12% { opacity: 0.28; }
  88% { opacity: 0.24; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}

/* Sticky Royal Purple -> Crimson Red Header (Mobile-First) */
.pgx-header {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(135deg, #6d28d9 0%, #9333ea 45%, #be123c 100%);
  border-bottom: 2px solid rgba(253,164,175,0.45);
  box-shadow: 0 6px 22px rgba(0,0,0,0.45);
}
.pgx-header-inner {
  max-width: 1380px; margin: 0 auto;
  height: 58px; padding: 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pgx-brand-link {
  display: flex; align-items: center; flex-shrink: 0;
}
.pgx-brand-logo {
  height: 44px; width: auto; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.45));
}
.pgx-auth-btns {
  display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center; min-width: 0;
}
.btn-login-pill {
  background: var(--pgx-cta-grad);
  color: #ffffff; font-weight: 700; font-size: 13px;
  border: 1px solid #fda4af; border-radius: 8px;
  padding: 7px 12px; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(225,29,72,0.5);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  transition: transform .15s ease, filter .15s ease;
}
.btn-reg-pill {
  background: rgba(255,255,255,0.14);
  color: #ffffff; font-weight: 600; font-size: 13px;
  border: 1.5px solid #ffffff; border-radius: 8px;
  padding: 6px 12px; white-space: nowrap;
  transition: background .15s ease;
}
.btn-login-pill:active, .btn-reg-pill:active { transform: scale(0.97); }
.pgx-header-right {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.pgx-nav-icon-btn {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; color: #f8fafc; font-size: 11px; font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  background: transparent; border: none; padding: 2px 6px; position: relative;
}
.pgx-nav-icon-btn img { width: 26px; height: 26px; object-fit: contain; }
.notify-badge {
  position: absolute; top: 0; right: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: #ef4444; border: 1.5px solid #fff;
}
.box-hamburger {
  width: 38px; height: 38px; border-radius: 9px;
  background: rgba(24,7,42,0.38); border: 1.5px solid rgba(255,255,255,0.48);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 6px;
}
.box-hamburger span {
  display: block; width: 22px; height: 3px; border-radius: 99px;
  background: linear-gradient(90deg, #fda4af, #f43f5e);
}

/* Announcement Marquee */
.pgx-marquee-bar {
  background: linear-gradient(90deg, #140622 0%, #3b0764 42%, #9f1239 100%);
  border-bottom: 1px solid rgba(244,63,94,0.45);
  height: 30px; display: flex; align-items: center; overflow: hidden;
  font-size: 13px; color: #ffffff;
}
.pgx-marquee-label {
  background: #19072b; color: #fda4af; font-weight: 700;
  padding: 0 12px; height: 100%; display: flex; align-items: center; flex-shrink: 0;
  border-right: 2px solid #e11d48; z-index: 2;
}
.pgx-marquee-track {
  flex: 1; overflow: hidden; white-space: nowrap; position: relative;
}
.pgx-marquee-text {
  display: inline-block; padding-left: 100%;
  animation: pgxMarquee 18s linear infinite;
}
@keyframes pgxMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Main Shell */
.pgx-main {
  position: relative; z-index: 10;
  max-width: 1320px; margin: 0 auto; padding: 10px 10px 24px;
}

/* Hero Banner Carousel (Mobile-First 1-up, Desktop 3-up peek) */
.pgx-hero { margin-bottom: 12px; position: relative; }
.hero-viewport {
  overflow: hidden; border-radius: 14px; position: relative;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.hero-track {
  display: flex; transition: transform .42s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.hero-slide {
  flex: 0 0 100%; padding: 0 2px;
}
.hero-slide a { display: block; border-radius: 14px; overflow: hidden; border: 1.5px solid rgba(192,132,252,0.45); box-shadow: 0 10px 26px rgba(0,0,0,0.5); }
.hero-slide img { width: 100%; aspect-ratio: 1080/580; object-fit: cover; -webkit-user-drag: none; }
.hero-dots {
  display: flex; justify-content: center; gap: 4px; margin-top: 6px;
}
.hero-dot {
  min-width: 24px; height: 24px; border: none; background: transparent; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.hero-dot::after {
  content: ''; width: 10px; height: 10px; border-radius: 99px;
  background: rgba(255,255,255,0.28); transition: all .2s ease;
}
.hero-dot.active::after { width: 24px; background: #f43f5e; }
.hero-arrow {
  display: none; position: absolute; top: 44%; transform: translateY(-50%); z-index: 15;
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(244,114,182,0.55);
  background: rgba(25,7,43,0.82); color: #fff; font-size: 18px; font-weight: 800;
}
.hero-arrow.prev { left: 10px; }
.hero-arrow.next { right: 10px; }

/* Category Strip (Mobile-First: 3 Top Feature Cards + 4x2 Purple-Crimson Tiles) */
.pgx-cats {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px;
}
.cats-featured {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.cat-feat-card {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.16);
  background: #19072b; transition: transform .18s ease, border-color .18s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}
.cat-feat-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.cat-feat-card.active, .cat-feat-card:hover { border-color: #f43f5e; box-shadow: 0 0 18px rgba(244,63,94,0.48); transform: translateY(-2px); }

.cats-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px;
}
.cat-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 4px; border-radius: 10px;
  background: linear-gradient(135deg, #581c87 0%, #7e22ce 58%, #9f1239 100%);
  border: 1.5px solid rgba(244,114,182,0.55);
  color: #ffffff; font-weight: 800; font-size: 12.5px; text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  box-shadow: 0 4px 12px rgba(0,0,0,0.38);
  transition: transform .15s ease, filter .15s ease;
}
.cat-tile img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45)); }
.cat-tile.active {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); border-color: #fecdd3;
  box-shadow: 0 0 14px rgba(239,68,68,0.55);
}
.cat-tile:active { transform: scale(0.96); }

/* Quick Filter & Search Strip */
.pgx-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin: 10px 0 14px; padding: 8px 10px;
  background: rgba(25,7,43,0.8); border: 1px solid rgba(192,132,252,0.32); border-radius: 12px;
}
.pgx-search-wrap {
  position: relative; flex: 1 1 200px; min-width: 180px; display: flex; align-items: center;
}
.pgx-search-input {
  width: 100%; background: #0b0514; color: #fff;
  border: 1px solid rgba(192,132,252,0.42); border-radius: 8px;
  padding: 8px 36px 8px 12px; font-family: inherit; font-size: 16px; outline: none;
}
.pgx-search-input:focus { border-color: #f43f5e; }
.pgx-search-clear {
  position: absolute; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(192,132,252,0.22); color: #f5d0fe;
  font-size: 13px; font-weight: 800; display: none; place-items: center;
}
.pgx-search-clear.show { display: grid; }
.pgx-search-meta {
  margin: -6px 0 12px; padding: 0 4px; font-size: 13px; color: #f0abfc;
}
.pgx-empty-state {
  background: linear-gradient(180deg, #210e36 0%, #120720 100%);
  border: 1.5px solid rgba(192,132,252,0.4); border-radius: 16px;
  padding: 26px 16px; text-align: center; margin-bottom: 18px;
}
.pgx-quick-pills {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px;
}
.pgx-pill-link {
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(168,85,247,0.18); border: 1px solid rgba(192,132,252,0.4); color: #f5d0fe; white-space: nowrap;
}
.pgx-pill-link.active, .pgx-pill-link:hover { background: var(--pgx-cta-grad); color: #fff; border-color: #fda4af; }

/* Section Header */
.pgx-sec { margin-bottom: 22px; }
.pgx-sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.pgx-sec-title {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 18px; font-weight: 800; color: #ffffff;
}
.pgx-sec-title::before {
  content: ''; display: inline-block; width: 4px; height: 20px; border-radius: 4px; background: #f43f5e;
}
.pgx-sec-count { font-size: 14px; font-weight: 500; color: #c4b5fd; }
.pgx-see-all {
  font-size: 12.5px; font-weight: 600; color: #f0abfc;
  background: rgba(168,85,247,0.18); border: 1px solid rgba(192,132,252,0.45);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}

/* Horizontal Scroll Rail (Home) & Responsive Grid (Category pages) */
.pgx-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 3.15);
  gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
}
.pgx-rail::-webkit-scrollbar { height: 5px; }
.pgx-rail::-webkit-scrollbar-thumb { background: rgba(244,63,94,0.5); border-radius: 99px; }

.pgx-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}

/* Game & Provider Cards */
.g-card {
  position: relative; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: var(--pgx-card); border: 1px solid rgba(255,255,255,0.12);
  scroll-snap-align: start; display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease;
}
.g-card:hover { transform: translateY(-2px); border-color: #f43f5e; }
.g-thumb-wrap {
  position: relative; width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #140724;
}
.g-thumb-wrap.wide { aspect-ratio: 4/3; }
.g-thumb { width: 100%; height: 100%; object-fit: cover; }
.g-badge-hot {
  position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; pointer-events: none;
}
.g-badge-new {
  position: absolute; top: 0; left: 0; width: 44px; pointer-events: none;
}
.g-fav-btn {
  position: absolute; top: 5px; right: 5px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.62); color: #cbd5e1; font-size: 15px;
  display: grid; place-items: center;
}
.g-fav-btn.is-fav { color: #e11d48; background: rgba(255,255,255,0.95); }
.g-meta {
  padding: 6px 7px 7px; display: flex; flex-direction: column; gap: 3px;
}
.g-prov { font-size: 10.5px; font-weight: 700; color: #f472b6; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-name { font-size: 12.5px; font-weight: 600; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* RTP Win-Rate Progress Bar */
.rtp-wrap {
  position: relative; height: 15px; border-radius: 99px; background: rgba(18,6,34,0.92);
  border: 1px solid rgba(255,255,255,0.2); overflow: hidden; margin-top: 2px;
}
.rtp-fill {
  height: 100%; border-radius: 99px; transition: width .5s ease;
}
.rtp-fill.high { background: linear-gradient(90deg, #16a34a, #4ade80); }
.rtp-fill.mid { background: linear-gradient(90deg, #be123c, #fb7185); }
.rtp-txt {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000;
}

/* Contact & Line Page Cards */
.pgx-panel {
  background: linear-gradient(180deg, #210e36 0%, #120720 100%);
  border: 1.5px solid rgba(244,63,94,0.45); border-radius: 16px;
  padding: 16px; margin-bottom: 16px;
}
.contact-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  background: #160926; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 12px 14px;
}
.contact-id { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.contact-id img { width: 34px; height: 34px; border-radius: 8px; }
.contact-actions { display: flex; align-items: center; gap: 8px; }
.btn-orange-sm {
  background: var(--pgx-cta-grad); color: #fff; font-weight: 700; font-size: 13.5px;
  border: none; border-radius: 8px; padding: 7px 14px; display: inline-flex; align-items: center; gap: 6px;
}

/* Wallet & Promotions Tabs */
.wallet-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px;
}
.wallet-tab {
  padding: 9px 6px; border-radius: 10px; font-size: 12.5px; font-weight: 700;
  background: #160926; border: 1px solid rgba(192,132,252,0.35); color: #f3e8ff; text-align: center;
}
.wallet-tab.active {
  background: var(--pgx-cta-grad); color: #fff; border-color: #fda4af;
}
.wallet-pane { display: none; }
.wallet-pane.active { display: block; }
.promo-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.promo-card {
  background: #1a0b2e; border: 1.5px solid rgba(244,63,94,0.45); border-radius: 14px; overflow: hidden;
}
.promo-card img { width: 100%; aspect-ratio: 1080/580; object-fit: cover; }
.promo-body { padding: 14px; }
.promo-body h3 { margin: 0 0 6px; font-size: 17px; color: #fda4af; }
.promo-body p { margin: 0 0 10px; font-size: 13.5px; color: #e2e8f0; }

/* Footer (Royal Purple -> Crimson Red) */
.pgx-footer {
  background: linear-gradient(180deg, #3b0764 0%, #581c87 55%, #7f1d1d 100%);
  color: #ffffff; padding: 26px 12px 18px; margin-top: 24px;
  text-align: center; border-top: 2px solid #f43f5e; position: relative; z-index: 10;
}
.pgx-footer-inner { max-width: 1120px; margin: 0 auto; }
.pgx-footer-logo { height: 64px; width: auto; margin: 0 auto 10px; }
.pgx-footer-tagline { font-size: 13.5px; color: #f5d0fe; max-width: 560px; margin: 0 auto 18px; }
.pgx-footer-heading { font-size: 15px; font-weight: 700; margin: 16px 0 10px; color: #ffffff; }
.footer-prov-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 960px; margin: 0 auto;
}
.footer-prov-grid img {
  width: 56px; height: 42px; object-fit: contain; border-radius: 8px;
  background: rgba(255,255,255,0.92); border: 1px solid rgba(244,114,182,0.45);
  padding: 3px; box-shadow: 0 2px 6px rgba(0,0,0,0.28);
}
.footer-bank-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 820px; margin: 0 auto;
}
.footer-bank-grid img {
  width: 38px; height: 38px; object-fit: contain; border-radius: 8px;
  background: #ffffff; padding: 2px; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.footer-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.footer-tag {
  padding: 4px 14px; border-radius: 999px; border: 1px solid rgba(253,164,175,0.7);
  font-size: 12.5px; color: #fff;
}
.pgx-copyright {
  background: #09040f; color: #cbd5e1; text-align: center; padding: 12px;
  font-size: 12px; position: relative; z-index: 10;
}

/* Floating Right-Edge LINE Contact Widget (starts tucked on mobile so cards stay unobstructed) */
.floating-line {
  position: fixed; right: 0; top: 56%; transform: translateY(-50%); z-index: 55;
  display: flex; align-items: center; transition: transform .25s ease;
}
@media (max-width: 639px) {
  .floating-line:not(.expanded) { transform: translate(56px, -50%); }
}
.floating-line.collapsed { transform: translate(56px, -50%); }
.open-contact {
  width: 26px; height: 52px; border: none; border-radius: 10px 0 0 10px;
  background: rgba(25,7,43,0.94); color: #fb7185; font-weight: 900; font-size: 14px;
  display: grid; place-items: center; box-shadow: -2px 2px 10px rgba(0,0,0,0.45);
}
.floating-line-box {
  background: rgba(25,7,43,0.94); padding: 8px; border-radius: 0 0 0 10px;
  border: 1px solid rgba(244,63,94,0.45);
}
.floating-line-box img { width: 40px; height: 40px; border-radius: 8px; }

/* Mobile Bottom Nav Bar (< 1024px) */
.mobile-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  min-height: 62px; height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: linear-gradient(135deg, #581c87 0%, #7e22ce 50%, #be123c 100%);
  border-top: 2px solid rgba(244,114,182,0.55);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.5);
}
.mob-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #f8fafc; text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  font-size: 11px; font-weight: 700; background: transparent; border: none; padding: 4px 2px;
}
.mob-nav-item img { width: 26px; height: 26px; object-fit: contain; transition: transform .15s ease; }
.mob-nav-item.active { color: #fde047; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.mob-nav-item.active img { filter: drop-shadow(0 0 6px rgba(255,255,255,0.85)); transform: translateY(-1px); }
.mob-nav-center {
  position: relative; top: -14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mob-nav-center-ring {
  width: 62px; height: 62px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fca5a5, #e11d48 52%, #581c87 100%);
  border: 3px solid #ffffff; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5); overflow: hidden;
}
.mob-nav-center-ring img { width: 54px; height: 54px; object-fit: cover; }

/* Modals & Drawer */
.pgx-modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.74);
  backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 14px;
}
.pgx-modal-backdrop.open { display: flex; }
.pgx-modal-card {
  position: relative; width: 100%; max-width: 440px;
  background: linear-gradient(180deg, #210e36 0%, #0f061a 100%);
  border: 1.5px solid rgba(244,63,94,0.45); border-radius: 18px;
  padding: 22px 20px; color: #fff; box-shadow: 0 24px 60px rgba(0,0,0,0.88);
  max-height: 92vh; max-height: 90dvh; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.modal-close-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  border-radius: 50%; border: none; background: #ffffff; color: #1e0533;
  font-size: 18px; font-weight: 900; display: grid; place-items: center;
}
.modal-logo { height: 58px; width: auto; margin: 0 auto 8px; }
.modal-title { text-align: center; font-size: 22px; font-weight: 800; margin: 0 0 14px; }
.pgx-input-group { position: relative; margin-bottom: 11px; }
.pgx-input {
  width: 100%; background: #0b0514; color: #ffffff;
  border: 1px solid rgba(192,132,252,0.28); border-radius: 10px;
  padding: 11px 14px; font-family: inherit; font-size: 16px; outline: none;
}
.pgx-input.with-eye { padding-right: 44px; }
.pgx-input:focus { border-color: #f43f5e; }
.toggle-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: none; color: #c4b5fd; font-size: 16px;
}
.toggle-eye.is-visible { color: #f472b6; }
.modal-meta-row {
  display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin: 8px 0 14px;
}
.btn-modal-primary {
  width: 100%; padding: 11px; border-radius: 10px; border: none;
  background: var(--pgx-cta-grad); color: #fff; font-size: 16px; font-weight: 800;
  margin-bottom: 10px; box-shadow: 0 6px 16px rgba(225,29,72,0.4);
}
.btn-modal-primary:disabled { background: #332046; color: #94a3b8; box-shadow: none; cursor: not-allowed; }
.btn-modal-outline {
  width: 100%; padding: 10px; border-radius: 10px;
  background: transparent; border: 1.5px solid #f43f5e; color: #fda4af; font-size: 15px; font-weight: 700;
}
.ref-banner-pill {
  margin: 0 0 12px; padding: 8px 12px; border-radius: 10px;
  background: rgba(168,85,247,0.16); border: 1px solid rgba(244,63,94,0.5);
  font-size: 13px; color: #f5d0fe; text-align: center; font-weight: 700;
}
.stepper {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 18px; position: relative;
}
.step-item { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: #c4b5fd; text-align: center; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; background: #ffffff; color: #1e0533;
  display: grid; place-items: center; font-weight: 900; font-size: 14px;
}
.step-item.active { color: #fda4af; font-weight: 700; }
.step-item.active .step-dot { background: #e11d48; color: #ffffff; }
.step-item.done .step-dot { background: #22c55e; color: #ffffff; }
.form-status { margin-top: 10px; text-align: center; font-size: 13.5px; color: #4ade80; min-height: 20px; }
.form-status.is-error { color: #f87171; }
.form-status.is-ok { color: #4ade80; }

/* Right Slide-out Language & Contact Drawer */
.pgx-drawer-backdrop {
  position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,0.62);
  display: flex; justify-content: flex-end;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .24s ease, visibility .24s ease;
}
.pgx-drawer-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }
.pgx-drawer {
  width: 290px; max-width: 86vw; height: 100%;
  background: linear-gradient(180deg, #4c1d95 0%, #6b21a8 52%, #881337 100%);
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px)); color: #fff;
  display: flex; flex-direction: column; align-items: center;
  position: relative; box-shadow: -8px 0 30px rgba(0,0,0,0.45);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.22,.61,.36,1);
}
.pgx-drawer-backdrop.open .pgx-drawer { transform: translateX(0); }
.drawer-flags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0 18px; max-width: 230px; }
.lang-btn {
  width: 44px; height: 44px; border-radius: 50%; padding: 0; border: 2px solid transparent;
  background: transparent; position: relative; overflow: hidden;
}
.lang-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lang-btn.active { border-color: #ffffff; box-shadow: 0 0 0 2px #f43f5e; }
.drawer-contact-btn { width: 100%; margin-bottom: 10px; display: block; border-radius: 12px; overflow: hidden; }
.drawer-links { width: 100%; margin-top: 14px; border-top: 1px solid rgba(255,255,255,0.28); padding-top: 12px; display: grid; gap: 8px; }
.drawer-links a {
  background: rgba(18,5,32,0.38); border: 1px solid rgba(253,164,175,0.32);
  padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; text-align: center;
}

/* Mobile Toast & Back-to-Top Button */
.pgx-toast {
  position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px); z-index: 110;
  background: rgba(18,5,32,0.96); color: #f8fafc;
  border: 1.5px solid #e11d48; border-radius: 999px;
  padding: 9px 18px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 28px rgba(0,0,0,0.65); max-width: calc(100vw - 28px);
  text-align: center; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.pgx-toast.show { opacity: 1; transform: translate(-50%, 0); }
.pgx-back-top {
  position: fixed; left: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 54;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid rgba(244,63,94,0.75); background: rgba(25,7,43,0.92);
  color: #fda4af; font-size: 18px; font-weight: 900;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.pgx-back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Compact Narrow Mobile Header (320px-373px) */
@media (max-width: 374px) {
  .pgx-header-inner { padding: 0 6px; gap: 4px; }
  .pgx-brand-logo { height: 34px; }
  .pgx-auth-btns { gap: 4px; }
  .btn-login-pill, .btn-reg-pill { font-size: 11px; padding: 6px 7px; }
  .pgx-header-right { gap: 4px; }
  .box-hamburger { width: 34px; height: 34px; padding: 5px; }
  .box-hamburger span { width: 18px; }
}

/* Tablet Breakpoint (>= 640px) */
@media (min-width: 640px) {
  .pgx-header-inner { padding: 0 20px; }
  .pgx-brand-logo { height: 50px; }
  .btn-login-pill, .btn-reg-pill { font-size: 14px; padding: 8px 20px; min-width: 120px; }
  .pgx-rail { grid-auto-columns: calc((100% - 40px) / 4.5); gap: 10px; }
  .pgx-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .promo-grid { grid-template-columns: repeat(2, 1fr); }
  .wallet-tabs { grid-template-columns: repeat(6, 1fr); }
}

/* Desktop Breakpoint (>= 1024px) */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .mobile-bottom-nav { display: none; }
  .pgx-nav-icon-btn { display: flex; }
  .btn-login-pill, .btn-reg-pill { min-width: 220px; font-size: 15px; padding: 9px 24px; }
  .pgx-main { padding: 14px 20px 30px; }
  .pgx-toast { bottom: 24px; }
  .pgx-back-top { left: 20px; bottom: 24px; }
  /* 3-up peek banner carousel on desktop */
  .hero-slide { flex: 0 0 42%; padding: 0 6px; }
  .hero-arrow { display: grid; place-items: center; }
  /* 3 big category cards left + 4x2 tiles right */
  .pgx-cats { grid-template-columns: 41% 1fr; gap: 12px; align-items: stretch; }
  .cat-tile { flex-direction: row; justify-content: flex-start; padding: 10px 14px; gap: 10px; font-size: 16px; }
  .cat-tile img { width: 46px; height: 46px; }
  .pgx-rail { grid-auto-columns: calc((100% - 66px) / 7); gap: 11px; }
  .pgx-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
}
