/* ==========================================================================
   789b - Core Stylesheet (Basefiles)
   All custom classes use the pg57- prefix.
   Palette: #2C2C2C (bg) | #C71585 (primary) | #CD853F (accent) | #EEEEEE (text)
   Mobile-first, max-width 430px. Root font 62.5% (1rem = 10px).
   ========================================================================== */

:root {
  --pg57-bg: #2c2c2c;
  --pg57-bg-alt: #1f1f1f;
  --pg57-bg-card: #3a3a3a;
  --pg57-primary: #c71585;
  --pg57-primary-dark: #9b0f64;
  --pg57-accent: #cd853f;
  --pg57-accent-dark: #a86d2e;
  --pg57-text: #eeeeee;
  --pg57-text-muted: #b9b9b9;
  --pg57-border: rgba(238, 238, 238, 0.12);
  --pg57-radius: 12px;
  --pg57-radius-sm: 8px;
  --pg57-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  --pg57-gradient: linear-gradient(135deg, #c71585 0%, #cd853f 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  background: var(--pg57-bg);
  color: var(--pg57-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pg57-accent); text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ============================== Header ============================== */
.pg57-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(31, 31, 31, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--pg57-border);
}
.pg57-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  gap: 0.8rem;
}
.pg57-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.pg57-logo img { width: 30px; height: 30px; border-radius: 6px; }
.pg57-logo-text {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--pg57-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.pg57-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.pg57-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--pg57-radius-sm);
  padding: 0.7rem 1.2rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 36px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  color: var(--pg57-text);
  white-space: nowrap;
}
.pg57-btn:active { transform: scale(0.94); }
.pg57-btn-login {
  background: transparent;
  border: 1px solid var(--pg57-accent);
  color: var(--pg57-accent);
}
.pg57-btn-register {
  background: var(--pg57-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(199, 21, 133, 0.4);
}
.pg57-menu-btn {
  background: transparent;
  border: none;
  color: var(--pg57-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  min-width: 40px;
  min-height: 40px;
}

/* ========================== Mobile slide menu ========================== */
.pg57-mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--pg57-bg-alt);
  border-bottom: 1px solid var(--pg57-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.pg57-menu-open { max-height: 420px; }
.pg57-mobile-menu ul {
  list-style: none;
  max-width: 430px;
  margin: 0 auto;
  padding: 1rem 1.2rem 1.4rem;
}
.pg57-mobile-menu li { border-bottom: 1px solid var(--pg57-border); }
.pg57-mobile-menu li:last-child { border-bottom: none; }
.pg57-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 0.4rem;
  color: var(--pg57-text);
  font-size: 1.4rem;
  font-weight: 600;
}
.pg57-mobile-menu a i { color: var(--pg57-accent); width: 22px; text-align: center; }
.pg57-mobile-menu a:hover { color: var(--pg57-primary); }
.pg57-mobile-menu a:hover i { color: var(--pg57-primary); }

/* ============================== Main ============================== */
.pg57-main {
  padding-top: 6rem;
  max-width: 430px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .pg57-main { padding-bottom: 80px; }
}

/* ============================== Hero / Carousel ============================== */
.pg57-carousel {
  position: relative;
  width: 100%;
  border-radius: var(--pg57-radius);
  overflow: hidden;
  margin-bottom: 1.6rem;
  box-shadow: var(--pg57-shadow);
}
.pg57-carousel-track { position: relative; width: 100%; aspect-ratio: 16/9; }
.pg57-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  cursor: pointer;
}
.pg57-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.pg57-carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%);
}
.pg57-slide-active { opacity: 1; }
.pg57-carousel-caption {
  position: absolute;
  left: 1.2rem; bottom: 1.2rem;
  z-index: 2;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.pg57-carousel-dots {
  position: absolute;
  right: 1.2rem; bottom: 1.2rem;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}
.pg57-carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  padding: 0;
}
.pg57-dot-active { background: var(--pg57-primary); width: 22px; border-radius: 4px; }

/* ============================== Sections ============================== */
.pg57-section { margin-bottom: 2.4rem; }
.pg57-section-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.pg57-section-head i { color: var(--pg57-primary); font-size: 2rem; }
.pg57-section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--pg57-text);
}
.pg57-section-sub {
  font-size: 1.3rem;
  color: var(--pg57-text-muted);
  margin-bottom: 1rem;
  line-height: 1.6rem;
}

.pg57-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 2.8rem;
  margin-bottom: 1rem;
  background: var(--pg57-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pg57-lead {
  font-size: 1.4rem;
  color: var(--pg57-text-muted);
  line-height: 2rem;
  margin-bottom: 1.4rem;
}

/* ============================== Game grid ============================== */
.pg57-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.pg57-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  border-radius: var(--pg57-radius-sm);
  overflow: hidden;
  background: var(--pg57-bg-card);
  padding: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pg57-game-card:active {
  transform: scale(0.95);
  box-shadow: 0 0 0 2px var(--pg57-primary);
}
.pg57-game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}
.pg57-game-name {
  font-size: 1.05rem;
  color: var(--pg57-text);
  margin-top: 0.4rem;
  line-height: 1.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6rem;
}

/* ============================== Cards / panels ============================== */
.pg57-card {
  background: var(--pg57-bg-card);
  border-radius: var(--pg57-radius);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--pg57-border);
}
.pg57-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--pg57-accent);
}
.pg57-card p { font-size: 1.35rem; color: var(--pg57-text-muted); line-height: 2rem; margin-bottom: 0.8rem; }
.pg57-card p:last-child { margin-bottom: 0; }

.pg57-list { list-style: none; }
.pg57-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.8rem;
  font-size: 1.35rem;
  color: var(--pg57-text-muted);
  line-height: 2rem;
  border-bottom: 1px solid var(--pg57-border);
}
.pg57-list li:last-child { border-bottom: none; }
.pg57-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 0.8rem;
  color: var(--pg57-primary);
  font-size: 1.1rem;
}

/* ============================== Promo inline link ============================== */
.pg57-promo-link {
  color: var(--pg57-accent);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.pg57-promo-link:hover { color: var(--pg57-primary); }

.pg57-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.6rem;
  background: var(--pg57-gradient);
  border-radius: var(--pg57-radius);
  text-align: center;
  margin: 1.6rem 0;
}
.pg57-cta h3 { color: #fff; font-size: 1.7rem; font-weight: 800; }
.pg57-cta p { color: rgba(255,255,255,0.9); font-size: 1.3rem; }
.pg57-cta .pg57-btn {
  background: #fff;
  color: var(--pg57-primary);
  font-size: 1.5rem;
  padding: 1rem 2rem;
  width: 100%;
}

/* ============================== Stats / RTP ============================== */
.pg57-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.pg57-stat {
  background: var(--pg57-bg-alt);
  border-radius: var(--pg57-radius-sm);
  padding: 1rem;
  text-align: center;
  border-left: 3px solid var(--pg57-accent);
}
.pg57-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--pg57-primary);
}
.pg57-stat-label { font-size: 1.2rem; color: var(--pg57-text-muted); }

/* ============================== Testimonials ============================== */
.pg57-review {
  background: var(--pg57-bg-alt);
  border-radius: var(--pg57-radius-sm);
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--pg57-primary);
}
.pg57-review-text { font-size: 1.3rem; color: var(--pg57-text); line-height: 1.9rem; margin-bottom: 0.6rem; }
.pg57-review-author { font-size: 1.2rem; color: var(--pg57-accent); font-weight: 700; }
.pg57-stars { color: var(--pg57-accent); font-size: 1.2rem; letter-spacing: 1px; }

/* ============================== Payment ============================== */
.pg57-pay-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.pg57-pay-chip {
  background: var(--pg57-bg-alt);
  border: 1px solid var(--pg57-border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  color: var(--pg57-text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.pg57-pay-chip i { color: var(--pg57-accent); }

/* ============================== Footer ============================== */
.pg57-footer {
  background: var(--pg57-bg-alt);
  border-top: 1px solid var(--pg57-border);
  padding: 2rem 1.2rem 2.4rem;
  max-width: 430px;
  margin: 0 auto;
}
.pg57-footer-brand { font-size: 1.3rem; color: var(--pg57-text-muted); line-height: 2rem; margin-bottom: 1.2rem; }
.pg57-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 1.2rem;
}
.pg57-footer-links a {
  font-size: 1.2rem;
  color: var(--pg57-text);
  text-decoration: underline;
}
.pg57-footer-links a:hover { color: var(--pg57-primary); }
.pg57-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.pg57-footer-promo .pg57-btn {
  background: var(--pg57-bg-card);
  border: 1px solid var(--pg57-accent);
  color: var(--pg57-accent);
  font-size: 1.2rem;
  padding: 0.6rem 1rem;
}
.pg57-copyright {
  font-size: 1.1rem;
  color: var(--pg57-text-muted);
  border-top: 1px solid var(--pg57-border);
  padding-top: 1rem;
  text-align: center;
}

/* ======================== Mobile bottom navigation ======================== */
.pg57-bnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: 62px;
  background: var(--pg57-bg-alt);
  border-top: 1px solid var(--pg57-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.4);
}
.pg57-bnav-btn {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  background: none;
  border: none;
  color: var(--pg57-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  padding: 0.3rem;
  transition: color 0.2s ease, transform 0.15s ease;
}
.pg57-bnav-btn:active { transform: scale(0.9); }
.pg57-bnav-btn .pg57-bnav-icon { font-size: 22px; line-height: 1; }
.pg57-bnav-btn .pg57-bnav-label { font-size: 1.1rem; line-height: 1.2rem; }
.pg57-bnav-btn:hover { color: var(--pg57-accent); }
.pg57-bnav-active { color: var(--pg57-primary); }
.pg57-bnav-active .pg57-bnav-icon { transform: translateY(-2px); }
.pg57-bnav-promo {
  background: var(--pg57-gradient);
  color: #fff;
  border-radius: 50%;
  width: 48px; height: 48px;
  margin-top: -22px;
  box-shadow: 0 2px 10px rgba(199,21,133,0.5);
}
.pg57-bnav-promo .pg57-bnav-icon { font-size: 22px; }
.pg57-bnav-promo .pg57-bnav-label { display: none; }

/* ============================== Desktop ============================== */
@media (min-width: 769px) {
  .pg57-bnav { display: none; }
  .pg57-menu-btn { display: none; }
  body { background: #181818; }
  .pg57-header, .pg57-main, .pg57-footer, .pg57-bnav { max-width: 430px; }
}
