/* AF88 Link - Base styles (Vietnamese market)
   Class prefix: pg8e- | Palette: #34495E bg, #E0F2F1 / #E0FFFF accents */

:root {
  --pg8e-bg: #1f2d3d;
  --pg8e-bg-deep: #16202b;
  --pg8e-primary: #34495E;
  --pg8e-accent: #E0F2F1;
  --pg8e-soft: #E0FFFF;
  --pg8e-gold: #f5c451;
  --pg8e-text: #E0F2F1;
  --pg8e-muted: #9bb0c4;
  --pg8e-card: #243648;
  --pg8e-border: #3a5169;
}

* { 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: linear-gradient(160deg, #16202b 0%, #1f2d3d 60%, #243648 100%);
  color: var(--pg8e-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--pg8e-soft); text-decoration: none; }

.pg8e-container { width: 100%; padding: 0 1.2rem; }
.pg8e-wrapper { padding-top: 5.6rem; padding-bottom: 7.6rem; }

/* ---------- Header ---------- */
.pg8e-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  z-index: 1000;
  background: linear-gradient(90deg, #34495E, #243648);
  border-bottom: 1px solid var(--pg8e-border);
  box-shadow: 0 .2rem .8rem rgba(0,0,0,.35);
}
.pg8e-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 5.4rem; padding: 0 1rem;
}
.pg8e-brand { display: flex; align-items: center; gap: .6rem; }
.pg8e-brand img { width: 2.6rem; height: 2.6rem; border-radius: .5rem; }
.pg8e-brand b { font-size: 1.5rem; color: var(--pg8e-soft); letter-spacing: .03rem; }
.pg8e-actions { display: flex; align-items: center; gap: .5rem; }
.pg8e-btn {
  border: 0; cursor: pointer;
  font-weight: 700; font-size: 1.25rem;
  padding: .55rem 1.1rem; border-radius: 2.4rem;
  font-family: inherit;
}
.pg8e-btn-login {
  background: transparent; color: var(--pg8e-accent);
  border: 1px solid var(--pg8e-accent);
}
.pg8e-btn-reg {
  background: linear-gradient(90deg, var(--pg8e-gold), #e8a93a);
  color: #2a1f08;
  box-shadow: 0 .2rem .6rem rgba(245,196,81,.35);
}
.pg8e-btn:active { transform: scale(.95); }
.pg8e-menu-btn {
  background: transparent; border: 0; color: var(--pg8e-soft);
  font-size: 1.6rem; cursor: pointer; padding: .4rem .6rem;
}
.pg8e-nav {
  max-height: 0; overflow: hidden;
  background: var(--pg8e-bg-deep);
  transition: max-height .3s ease;
}
.pg8e-nav-open { max-height: 32rem; }
.pg8e-nav-list {
  list-style: none; margin: 0; padding: .4rem 1rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: .3rem;
}
.pg8e-nav-list a {
  display: block; padding: .7rem .8rem; font-size: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

/* ---------- Hero / Carousel ---------- */
.pg8e-hero { padding: 1rem 1.2rem .4rem; }
.pg8e-carousel { position: relative; border-radius: 1rem; overflow: hidden; box-shadow: 0 .4rem 1rem rgba(0,0,0,.4); }
.pg8e-slide { display: none; cursor: pointer; position: relative; }
.pg8e-slide-active { display: block; }
.pg8e-slide img { width: 100%; height: 16rem; object-fit: cover; }
.pg8e-slide-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .8rem 1rem; font-weight: 700; font-size: 1.3rem;
  background: linear-gradient(0deg, rgba(22,32,43,.92), transparent);
  color: var(--pg8e-soft);
}
.pg8e-dots { display: flex; justify-content: center; gap: .5rem; padding: .6rem 0; }
.pg8e-dot {
  width: .8rem; height: .8rem; border-radius: 50%;
  background: rgba(224,242,241,.35); cursor: pointer;
}
.pg8e-dot-active { background: var(--pg8e-gold); }

/* ---------- Section / heading ---------- */
.pg8e-section { padding: 1.4rem 1.2rem; }
.pg8e-section h2 {
  font-size: 1.7rem; margin: 0 0 .8rem;
  color: var(--pg8e-soft);
  border-left: .4rem solid var(--pg8e-gold); padding-left: .6rem;
}
.pg8e-section h3 { font-size: 1.35rem; margin: 1rem 0 .5rem; color: var(--pg8e-accent); }
.pg8e-section p { margin: .5rem 0; color: #cfe0ec; }

.pg8e-promo-link {
  color: var(--pg8e-gold); font-weight: 700; cursor: pointer;
  border-bottom: 1px dashed var(--pg8e-gold);
}

/* ---------- Filter chips ---------- */
.pg8e-filter { display: flex; gap: .5rem; overflow-x: auto; padding: .3rem 0 1rem; }
.pg8e-chip {
  flex: 0 0 auto; padding: .45rem 1rem; border-radius: 2rem;
  background: var(--pg8e-card); color: var(--pg8e-accent);
  border: 1px solid var(--pg8e-border); font-size: 1.2rem; cursor: pointer;
}
.pg8e-chip-active { background: var(--pg8e-gold); color: #2a1f08; border-color: transparent; }

/* ---------- Game grid ---------- */
.pg8e-cat-block { margin-bottom: 1.4rem; }
.pg8e-cat-title {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.4rem; margin: .4rem 0 .8rem; color: var(--pg8e-soft);
}
.pg8e-cat-title i { color: var(--pg8e-gold); }
.pg8e-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem;
}
.pg8e-game {
  display: block; background: var(--pg8e-card);
  border: 1px solid var(--pg8e-border); border-radius: .8rem;
  padding: .5rem; text-align: center; cursor: pointer;
  transition: transform .15s ease;
}
.pg8e-game:active { transform: scale(.95); }
.pg8e-game img { width: 100%; height: 6.4rem; object-fit: cover; border-radius: .5rem; }
.pg8e-game span { display: block; font-size: 1.05rem; color: var(--pg8e-accent); margin-top: .35rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Cards ---------- */
.pg8e-card {
  background: var(--pg8e-card); border: 1px solid var(--pg8e-border);
  border-radius: .9rem; padding: 1rem; margin-bottom: .9rem;
}
.pg8e-card-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .7rem;
}
.pg8e-stat {
  background: rgba(224,242,241,.06); border-radius: .7rem; padding: .8rem; text-align: center;
}
.pg8e-stat b { display: block; font-size: 1.6rem; color: var(--pg8e-gold); }
.pg8e-stat span { font-size: 1.1rem; color: var(--pg8e-muted); }

.pg8e-cta {
  display: block; text-align: center; margin: 1rem 0;
  padding: 1.1rem; border-radius: .8rem; font-weight: 800; font-size: 1.4rem;
  background: linear-gradient(90deg, var(--pg8e-gold), #e8a93a);
  color: #2a1f08; cursor: pointer; border: 0;
  box-shadow: 0 .3rem .8rem rgba(245,196,81,.3);
}
.pg8e-cta:active { transform: scale(.97); }

/* ---------- Testimonials ---------- */
.pg8e-quote {
  background: rgba(224,242,241,.05); border-left: .3rem solid var(--pg8e-gold);
  padding: .7rem .9rem; border-radius: .5rem; margin-bottom: .7rem;
}
.pg8e-quote b { color: var(--pg8e-soft); }
.pg8e-quote span { display: block; color: var(--pg8e-muted); font-size: 1.1rem; margin-top: .3rem; }

/* ---------- Payment ---------- */
.pg8e-pay { display: flex; flex-wrap: wrap; gap: .5rem; }
.pg8e-pay span {
  background: var(--pg8e-card); border: 1px solid var(--pg8e-border);
  padding: .45rem .8rem; border-radius: .5rem; font-size: 1.15rem; color: var(--pg8e-accent);
}

/* ---------- Footer ---------- */
.pg8e-footer {
  background: var(--pg8e-bg-deep); border-top: 1px solid var(--pg8e-border);
  padding: 1.4rem 1.2rem 1rem;
}
.pg8e-footer p { color: var(--pg8e-muted); font-size: 1.2rem; }
.pg8e-foot-links {
  display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin: .8rem 0;
}
.pg8e-foot-links a { color: var(--pg8e-accent); font-size: 1.15rem; text-decoration: underline; }
.pg8e-foot-promo {
  display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0;
}
.pg8e-foot-promo button {
  background: var(--pg8e-gold); color: #2a1f08; border: 0;
  padding: .5rem .9rem; border-radius: 2rem; font-weight: 700; font-size: 1.15rem; cursor: pointer;
}
.pg8e-copy { color: var(--pg8e-muted); font-size: 1.1rem; margin-top: .6rem; }

/* ---------- Mobile bottom nav ---------- */
.pg8e-bottom {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 430px; margin: 0 auto; z-index: 1000;
  height: 6rem; background: linear-gradient(180deg, #243648, #16202b);
  border-top: 1px solid var(--pg8e-border);
  display: flex; justify-content: space-around; align-items: stretch;
}
.pg8e-bottom a, .pg8e-bottom button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--pg8e-muted);
  font-size: 1.05rem; gap: .2rem; cursor: pointer; min-width: 60px; min-height: 56px;
  font-family: inherit;
}
.pg8e-bottom i, .pg8e-bottom .material-icons-outlined, .pg8e-bottom ion-icon {
  font-size: 2.2rem;
}
.pg8e-bottom .material-icons-outlined { font-size: 2.2rem; }
.pg8e-bottom ion-icon { font-size: 2.2rem; }
.pg8e-bottom a.pg8e-active, .pg8e-bottom button.pg8e-active { color: var(--pg8e-gold); }
.pg8e-bottom a:active, .pg8e-bottom button:active { transform: scale(.92); }

/* ---------- Back to top ---------- */
.pg8e-back {
  position: fixed; right: 1rem; bottom: 7rem; z-index: 900;
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  background: var(--pg8e-gold); color: #2a1f08; border: 0;
  font-size: 1.6rem; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.pg8e-show { opacity: 1; pointer-events: auto; }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .pg8e-bottom { display: none; }
  .pg8e-wrapper { padding-bottom: 2rem; }
}
