/* 789club app - core styles
   Prefix: pg51- | Mobile-first | root font-size 62.5% (1rem = 10px) */

:root {
  --pg51-bg: #0E1621;
  --pg51-bg-2: #162133;
  --pg51-bg-3: #3C3C3C;
  --pg51-primary: #BA55D3;
  --pg51-primary-2: #8e3fb0;
  --pg51-text: #F8F9FA;
  --pg51-muted: #BDC3C7;
  --pg51-silver: #C0C0C0;
  --pg51-gold: #f2c14e;
  --pg51-line: rgba(189,195,199,0.16);
  --pg51-radius: 14px;
  --pg51-shadow: 0 8px 24px rgba(0,0,0,0.32);
  --pg51-header-h: 5.6rem;
  --pg51-nav-h: 6.2rem;
}

* { box-sizing: border-box; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--pg51-bg);
  color: var(--pg51-text);
  line-height: 1.5;
  font-size: 1.5rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--pg51-primary); text-decoration: none; }
a:hover { color: #d99bf0; }

.pg51-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.pg51-wrapper { padding: 1.6rem 0; }

/* ===== Header ===== */
.pg51-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(135deg, rgba(14,22,33,0.96), rgba(22,33,51,0.96));
  border-bottom: 1px solid var(--pg51-line);
  backdrop-filter: blur(8px);
}
.pg51-header-inner {
  height: var(--pg51-header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 1.2rem; max-width: 430px; margin: 0 auto;
}
.pg51-brand { display: flex; align-items: center; gap: 0.7rem; }
.pg51-brand-logo {
  width: 3.2rem; height: 3.2rem; border-radius: 9px;
  background: linear-gradient(135deg, var(--pg51-primary), var(--pg51-primary-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.4rem; box-shadow: var(--pg51-shadow);
}
.pg51-brand-name { font-weight: 700; font-size: 1.7rem; letter-spacing: 0.4px; }
.pg51-brand-name span { color: var(--pg51-primary); }
.pg51-header-actions { display: flex; align-items: center; gap: 0.6rem; }
.pg51-btn {
  border: 0; border-radius: 10px; padding: 0.8rem 1.3rem; font-size: 1.3rem;
  font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
  transition: transform 0.15s ease, opacity 0.15s ease; min-height: 3.6rem;
}
.pg51-btn:active { transform: scale(0.96); }
.pg51-btn-login {
  background: transparent; color: var(--pg51-text); border: 1px solid var(--pg51-line);
}
.pg51-btn-register {
  background: linear-gradient(135deg, var(--pg51-primary), var(--pg51-primary-2));
  color: #fff;
}
.pg51-icon-btn {
  width: 3.6rem; height: 3.6rem; border-radius: 9px; background: transparent;
  border: 1px solid var(--pg51-line); color: var(--pg51-text); display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; font-size: 1.8rem;
}

/* ===== Mobile Menu ===== */
.pg51-menu-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9998;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.pg51-mobile-menu {
  position: fixed; top: 0; right: -82%; width: 80%; max-width: 340px; height: 100vh;
  background: var(--pg51-bg-2); z-index: 9999; padding: 2rem 1.6rem; overflow-y: auto;
  transition: right 0.28s ease; border-left: 1px solid var(--pg51-line);
}
.pg51-mobile-menu.pg51-menu-open { right: 0; }
.pg51-menu-open + .pg51-menu-backdrop,
.pg51-mobile-menu.pg51-menu-open ~ .pg51-menu-backdrop { opacity: 1; pointer-events: auto; }
.pg51-menu-title { font-size: 1.6rem; font-weight: 700; margin: 1.2rem 0 0.6rem; color: var(--pg51-silver); }
.pg51-menu-link {
  display: block; padding: 1.1rem 0.6rem; color: var(--pg51-text); border-bottom: 1px solid var(--pg51-line);
  font-size: 1.45rem; display: flex; align-items: center; gap: 0.8rem;
}
.pg51-menu-link i { color: var(--pg51-primary); width: 2rem; }
.pg51-menu-cta { margin-top: 1.6rem; width: 100%; justify-content: center; }

/* ===== Layout / Main ===== */
.pg51-main { padding-top: var(--pg51-header-h); }

/* ===== Carousel ===== */
.pg51-carousel {
  position: relative; border-radius: var(--pg51-radius); overflow: hidden;
  margin: 1.2rem 0; box-shadow: var(--pg51-shadow); aspect-ratio: 16/9;
  background: var(--pg51-bg-2);
}
.pg51-carousel-track { position: relative; width: 100%; height: 100%; }
.pg51-carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease;
  cursor: pointer;
}
.pg51-carousel-slide.pg51-slide-active { opacity: 1; }
.pg51-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.pg51-carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.78), transparent);
}
.pg51-carousel-caption h3 { margin: 0 0 0.3rem; font-size: 1.6rem; color: #fff; }
.pg51-carousel-caption p { margin: 0; font-size: 1.25rem; color: var(--pg51-silver); }
.pg51-carousel-dots {
  position: absolute; bottom: 0.8rem; right: 1rem; display: flex; gap: 0.5rem; z-index: 2;
}
.pg51-carousel-dot {
  width: 0.8rem; height: 0.8rem; border-radius: 50%; background: rgba(255,255,255,0.45);
  border: 0; cursor: pointer; padding: 0;
}
.pg51-carousel-dot.pg51-dot-active { background: var(--pg51-primary); }

/* ===== Section ===== */
.pg51-section { padding: 1.6rem 0; }
.pg51-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.pg51-section-title { font-size: 1.9rem; font-weight: 800; margin: 0; }
.pg51-section-title span { color: var(--pg51-primary); }
.pg51-section-sub { color: var(--pg51-muted); font-size: 1.3rem; margin: 0.2rem 0 0; }

/* ===== Filter Pills ===== */
.pg51-filter-row { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.6rem; margin-bottom: 0.6rem; }
.pg51-filter-btn {
  flex: 0 0 auto; border: 1px solid var(--pg51-line); background: transparent;
  color: var(--pg51-text); padding: 0.7rem 1.2rem; border-radius: 999px; font-size: 1.25rem;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pg51-filter-btn.pg51-filter-active { background: var(--pg51-primary); border-color: var(--pg51-primary); color: #fff; }

/* ===== Game Grid (icon-style compact) ===== */
.pg51-game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem;
}
.pg51-game-card {
  background: var(--pg51-bg-2); border-radius: 12px; overflow: hidden; border: 1px solid var(--pg51-line);
  cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease;
}
.pg51-game-card:hover { transform: translateY(-2px); border-color: var(--pg51-primary); }
.pg51-game-card-img { aspect-ratio: 1/1; background: #0a111c; }
.pg51-game-card-img img { width: 100%; height: 100%; object-fit: cover; }
.pg51-game-card-name {
  padding: 0.5rem 0.6rem; font-size: 1.15rem; text-align: center; color: var(--pg51-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg51-game-badge {
  display: inline-block; font-size: 1.05rem; padding: 0.15rem 0.6rem; border-radius: 6px;
  background: rgba(186,85,211,0.18); color: var(--pg51-primary); font-weight: 700; margin-bottom: 0.4rem;
}

/* ===== CTA Buttons ===== */
.pg51-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--pg51-primary), var(--pg51-primary-2));
  color: #fff; font-weight: 800; padding: 1.1rem 2rem; border-radius: 12px; font-size: 1.45rem;
  border: 0; cursor: pointer; box-shadow: var(--pg51-shadow); text-decoration: none;
}
.pg51-cta:active { transform: scale(0.97); }
.pg51-cta-ghost {
  background: transparent; color: var(--pg51-primary); border: 1px solid var(--pg51-primary);
}

/* ===== Feature / Card ===== */
.pg51-card {
  background: var(--pg51-bg-2); border-radius: var(--pg51-radius); padding: 1.4rem;
  border: 1px solid var(--pg51-line); box-shadow: var(--pg51-shadow);
}
.pg51-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
.pg51-feature {
  background: var(--pg51-bg-2); border: 1px solid var(--pg51-line); border-radius: 12px;
  padding: 1.2rem; text-align: center;
}
.pg51-feature i { font-size: 2.4rem; color: var(--pg51-primary); margin-bottom: 0.5rem; }
.pg51-feature h4 { margin: 0.3rem 0; font-size: 1.35rem; }
.pg51-feature p { margin: 0; font-size: 1.15rem; color: var(--pg51-muted); }

/* ===== Steps ===== */
.pg51-steps { counter-reset: step; padding: 0; list-style: none; margin: 0; }
.pg51-step {
  position: relative; padding: 1rem 1rem 1rem 4.2rem; margin-bottom: 0.8rem;
  background: var(--pg51-bg-2); border-radius: 12px; border: 1px solid var(--pg51-line);
}
.pg51-step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--pg51-primary); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.pg51-step h4 { margin: 0 0 0.2rem; font-size: 1.35rem; }
.pg51-step p { margin: 0; font-size: 1.2rem; color: var(--pg51-muted); }

/* ===== Testimonials ===== */
.pg51-testimonial-grid { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
.pg51-testimonial { background: var(--pg51-bg-2); border-radius: 12px; padding: 1.2rem; border: 1px solid var(--pg51-line); }
.pg51-testimonial-stars { color: var(--pg51-gold); margin-bottom: 0.4rem; font-size: 1.3rem; }
.pg51-testimonial p { margin: 0 0 0.6rem; font-size: 1.25rem; }
.pg51-testimonial-author { font-size: 1.15rem; color: var(--pg51-silver); font-weight: 700; }

/* ===== Winners ===== */
.pg51-winners { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.4rem; }
.pg51-winner {
  flex: 0 0 auto; background: var(--pg51-bg-2); border: 1px solid var(--pg51-line);
  border-radius: 10px; padding: 0.8rem 1rem; min-width: 14rem;
}
.pg51-winner-name { font-weight: 700; font-size: 1.2rem; }
.pg51-winner-game { color: var(--pg51-muted); font-size: 1.1rem; }
.pg51-winner-amount { color: var(--pg51-gold); font-weight: 800; font-size: 1.35rem; }

/* ===== Payment ===== */
.pg51-pay-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pg51-pay-chip {
  background: var(--pg51-bg-2); border: 1px solid var(--pg51-line); border-radius: 10px;
  padding: 0.7rem 1rem; font-size: 1.2rem; color: var(--pg51-text);
  display: inline-flex; align-items: center; gap: 0.4rem;
}

/* ===== RTP table ===== */
.pg51-rtp-table { width: 100%; border-collapse: collapse; }
.pg51-rtp-table th, .pg51-rtp-table td {
  padding: 0.9rem; border-bottom: 1px solid var(--pg51-line); text-align: left; font-size: 1.2rem;
}
.pg51-rtp-table th { color: var(--pg51-silver); font-weight: 700; }
.pg51-rtp-bar { height: 0.6rem; border-radius: 4px; background: var(--pg51-bg-3); overflow: hidden; }
.pg51-rtp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--pg51-primary), var(--pg51-gold)); }

/* ===== App download ===== */
.pg51-app-cta {
  background: linear-gradient(135deg, rgba(186,85,211,0.18), rgba(186,85,211,0.05));
  border: 1px solid var(--pg51-line); border-radius: var(--pg51-radius); padding: 1.6rem; text-align: center;
}
.pg51-app-cta h3 { margin: 0 0 0.5rem; font-size: 1.7rem; }
.pg51-app-cta p { margin: 0 0 1rem; color: var(--pg51-muted); font-size: 1.25rem; }
.pg51-app-btns { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* ===== SEO content block ===== */
.pg51-seo-text { color: var(--pg51-muted); font-size: 1.3rem; line-height: 1.7; }
.pg51-seo-text h2 { color: var(--pg51-text); font-size: 1.7rem; margin: 1.4rem 0 0.6rem; }
.pg51-seo-text h3 { color: var(--pg51-text); font-size: 1.45rem; margin: 1.2rem 0 0.5rem; }
.pg51-seo-text p { margin: 0 0 0.8rem; }
.pg51-seo-text a { color: var(--pg51-primary); border-bottom: 1px dashed rgba(186,85,211,0.4); }
.pg51-faq-item { border-bottom: 1px solid var(--pg51-line); padding: 0.8rem 0; }
.pg51-faq-item h4 { margin: 0 0 0.3rem; font-size: 1.35rem; color: var(--pg51-text); }
.pg51-faq-item p { margin: 0; font-size: 1.2rem; color: var(--pg51-muted); }

/* ===== Reveal animation ===== */
.pg51-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.pg51-reveal.pg51-revealed { opacity: 1; transform: none; }

/* ===== Top button ===== */
.pg51-top-btn {
  position: fixed; right: 1.2rem; bottom: calc(var(--pg51-nav-h) + 1.2rem); z-index: 998;
  width: 4rem; height: 4rem; border-radius: 50%; background: var(--pg51-primary); color: #fff;
  border: 0; font-size: 1.8rem; cursor: pointer; box-shadow: var(--pg51-shadow); display: flex;
  align-items: center; justify-content: center;
}

/* ===== Footer ===== */
.pg51-footer { background: var(--pg51-bg-2); border-top: 1px solid var(--pg51-line); padding: 2rem 0 1rem; }
.pg51-footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.pg51-footer-intro { color: var(--pg51-muted); font-size: 1.2rem; line-height: 1.6; margin-bottom: 1.2rem; }
.pg51-footer-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; margin-bottom: 1.2rem; }
.pg51-footer-links a { color: var(--pg51-silver); font-size: 1.2rem; }
.pg51-footer-cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.2rem; }
.pg51-footer-copy { color: var(--pg51-muted); font-size: 1.1rem; border-top: 1px solid var(--pg51-line); padding-top: 1rem; }

/* ===== Mobile bottom nav ===== */
.pg51-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; height: var(--pg51-nav-h);
  background: linear-gradient(180deg, rgba(22,33,51,0.98), rgba(14,22,33,0.99));
  border-top: 1px solid var(--pg51-line); display: flex; justify-content: space-around; align-items: stretch;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.35);
}
.pg51-nav-btn {
  flex: 1; min-width: 60px; min-height: 60px; background: transparent; border: 0; color: var(--pg51-silver);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  font-size: 1.05rem; font-weight: 600; cursor: pointer; padding: 0.4rem 0; transition: color 0.15s ease, transform 0.15s ease;
}
.pg51-nav-btn i { font-size: 2.2rem; }
.pg51-nav-btn:active { transform: scale(0.92); }
.pg51-nav-btn.pg51-nav-active { color: var(--pg51-primary); }
.pg51-nav-btn.pg51-nav-promo { color: var(--pg51-gold); }
.pg51-nav-btn.pg51-nav-promo i { filter: drop-shadow(0 0 6px rgba(242,193,78,0.45)); }

/* ===== Desktop: hide bottom nav, widen container ===== */
@media (min-width: 769px) {
  .pg51-bottom-nav { display: none; }
  .pg51-container { max-width: 960px; }
  .pg51-game-grid { grid-template-columns: repeat(6, 1fr); }
  .pg51-feature-grid { grid-template-columns: repeat(4, 1fr); }
  .pg51-testimonial-grid { grid-template-columns: repeat(3, 1fr); }
  .pg51-header-inner, .pg51-footer .pg51-container { max-width: 960px; }
}

/* ===== Mobile: reserve space for bottom nav ===== */
@media (max-width: 768px) {
  .pg51-main { padding-bottom: calc(var(--pg51-nav-h) + 1.2rem); }
}
