/*!
 * king ph apk - core stylesheet (basefiles)
 * Class prefix: pg4d-
 * Palette: #1C2833 (dark bg) | #E9ECEF (light text) | #AD1457 (brand pink) | #00CED1 (cyan accent)
 * Mobile-first: container max-width 430px.
 */

:root {
  --pg4d-bg: #1C2833;
  --pg4d-bg-2: #243447;
  --pg4d-bg-3: #11191f;
  --pg4d-text: #E9ECEF;
  --pg4d-muted: #9aa7b2;
  --pg4d-primary: #AD1457;
  --pg4d-accent: #00CED1;
  --pg4d-gold: #f5c451;
  --pg4d-radius: 14px;
  --pg4d-header-h: 58px;
  --pg4d-bottomnav-h: 62px;
  --pg4d-shadow: 0 6px 22px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: linear-gradient(180deg, #16202b 0%, #1C2833 40%, #16202b 100%);
  color: var(--pg4d-text);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  min-height: 100vh;
}

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

a { color: var(--pg4d-accent); text-decoration: none; }
a:hover { color: var(--pg4d-gold); }

.pg4d-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

/* ---------- Header ---------- */
.pg4d-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  height: var(--pg4d-header-h);
  background: linear-gradient(90deg, var(--pg4d-bg-3) 0%, #2a1620 60%, var(--pg4d-bg-3) 100%);
  border-bottom: 2px solid var(--pg4d-primary);
  box-shadow: var(--pg4d-shadow);
}

.pg4d-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pg4d-brand img { width: 28px; height: 28px; border-radius: 6px; }
.pg4d-brand-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg4d-brand-name b { color: var(--pg4d-accent); }

.pg4d-header-actions { display: flex; align-items: center; gap: 6px; }

.pg4d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  min-height: 38px;
  color: #fff;
}
.pg4d-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.pg4d-btn:active { transform: scale(.96); }
.pg4d-btn-register { background: linear-gradient(135deg, var(--pg4d-primary), #d8237a); box-shadow: 0 4px 12px rgba(173,20,87,.45); }
.pg4d-btn-login { background: linear-gradient(135deg, var(--pg4d-accent), #02969b); color: #062a2c; box-shadow: 0 4px 12px rgba(0,206,209,.35); }

.pg4d-menu-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--pg4d-text);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ---------- Mobile expandable menu ---------- */
.pg4d-mobile-menu {
  position: fixed;
  top: var(--pg4d-header-h);
  left: 0; right: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--pg4d-bg-2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: max-height .28s ease;
  z-index: 9999;
}
.pg4d-mobile-menu.pg4d-menu-open { max-height: 80vh; box-shadow: var(--pg4d-shadow); }
.pg4d-mobile-menu ul { list-style: none; margin: 0; padding: 6px 12px; }
.pg4d-mobile-menu li { border-bottom: 1px solid rgba(255,255,255,.05); }
.pg4d-mobile-menu li:last-child { border-bottom: 0; }
.pg4d-mobile-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 6px;
  color: var(--pg4d-text);
  font-size: 1.45rem;
  font-weight: 600;
}
.pg4d-mobile-menu a i { color: var(--pg4d-accent); width: 22px; text-align: center; }

/* ---------- Main ---------- */
main.pg4d-main { padding: 14px 12px 90px; }

.pg4d-section { margin: 22px 0; }
.pg4d-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.7rem; font-weight: 800;
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--pg4d-primary);
  color: var(--pg4d-text);
}
.pg4d-section-title i { color: var(--pg4d-accent); }
.pg4d-section-title em { color: var(--pg4d-accent); font-style: normal; }

/* ---------- Carousel ---------- */
.pg4d-carousel {
  position: relative;
  border-radius: var(--pg4d-radius);
  overflow: hidden;
  box-shadow: var(--pg4d-shadow);
  margin: 6px 0 18px;
}
.pg4d-slides { position: relative; }
.pg4d-slide {
  display: none;
  cursor: pointer;
  position: relative;
}
.pg4d-slide.pg4d-slide-active { display: block; }
.pg4d-slide img { width: 100%; height: 190px; object-fit: cover; }
.pg4d-slide-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,.78), transparent);
  font-weight: 700; font-size: 1.45rem;
}
.pg4d-dots {
  position: absolute; bottom: 8px; right: 10px;
  display: flex; gap: 5px;
}
.pg4d-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: 0; padding: 0; cursor: pointer;
}
.pg4d-dot.pg4d-dot-active { background: var(--pg4d-accent); }

/* ---------- Game grid ---------- */
.pg4d-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 0 10px;
}
.pg4d-cat-head h2 {
  margin: 0;
  font-size: 1.6rem; font-weight: 800;
  color: var(--pg4d-text);
}
.pg4d-cat-head h2 i { color: var(--pg4d-primary); margin-right: 6px; }
.pg4d-cat-tag {
  font-size: 1.2rem; color: var(--pg4d-accent);
  background: rgba(0,206,209,.12);
  padding: 3px 8px; border-radius: 8px;
}

.pg4d-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pg4d-game {
  background: var(--pg4d-bg-2);
  border-radius: 12px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  border: 1px solid rgba(255,255,255,.04);
}
.pg4d-game:hover { transform: translateY(-2px); box-shadow: var(--pg4d-shadow); border-color: var(--pg4d-primary); }
.pg4d-game img {
  width: 100%; height: 78px; object-fit: cover;
  border-radius: 8px;
}
.pg4d-game-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 4px;
  color: var(--pg4d-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Cards / generic ---------- */
.pg4d-card {
  background: var(--pg4d-bg-2);
  border-radius: var(--pg4d-radius);
  padding: 14px;
  box-shadow: var(--pg4d-shadow);
  border: 1px solid rgba(255,255,255,.04);
}
.pg4d-card h3 { margin: 0 0 8px; font-size: 1.5rem; color: var(--pg4d-accent); }
.pg4d-card p { margin: 0 0 8px; color: var(--pg4d-muted); font-size: 1.35rem; }

.pg4d-cta {
  display: block; width: 100%;
  text-align: center;
  background: linear-gradient(135deg, var(--pg4d-primary), var(--pg4d-accent));
  color: #fff;
  font-weight: 800;
  padding: 14px;
  border-radius: 12px;
  font-size: 1.6rem;
  margin: 14px 0;
  box-shadow: var(--pg4d-shadow);
  cursor: pointer;
  border: 0;
}
.pg4d-cta:hover { filter: brightness(1.1); transform: translateY(-1px); color: #fff; }

.pg4d-text-link {
  color: var(--pg4d-accent);
  font-weight: 700;
  border-bottom: 1px dashed var(--pg4d-accent);
}
.pg4d-text-link:hover { color: var(--pg4d-gold); border-bottom-color: var(--pg4d-gold); }

.pg4d-list { padding-left: 18px; margin: 8px 0; color: var(--pg4d-muted); }
.pg4d-list li { margin: 4px 0; }
.pg4d-list b, .pg4d-list strong { color: var(--pg4d-text); }

/* Feature chip row */
.pg4d-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pg4d-chip {
  font-size: 1.2rem;
  padding: 5px 10px;
  border-radius: 20px;
  background: rgba(0,206,209,.12);
  color: var(--pg4d-accent);
  border: 1px solid rgba(0,206,209,.25);
}

/* Stat tiles */
.pg4d-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.pg4d-stat {
  background: var(--pg4d-bg-3);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.05);
}
.pg4d-stat b { display: block; font-size: 1.8rem; color: var(--pg4d-gold); }
.pg4d-stat span { font-size: 1.15rem; color: var(--pg4d-muted); }

/* Testimonials */
.pg4d-quote {
  background: var(--pg4d-bg-2);
  border-left: 3px solid var(--pg4d-accent);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 8px 0;
  font-size: 1.3rem;
  color: var(--pg4d-text);
}
.pg4d-quote small { color: var(--pg4d-muted); display: block; margin-top: 4px; }

/* Payment icons row */
.pg4d-pay { display: flex; flex-wrap: wrap; gap: 8px; }
.pg4d-pay span {
  background: #fff; color: #1C2833;
  font-weight: 700; font-size: 1.15rem;
  padding: 6px 10px; border-radius: 8px;
}

/* ---------- Footer ---------- */
.pg4d-footer {
  background: var(--pg4d-bg-3);
  padding: 18px 14px calc(var(--pg4d-bottomnav-h) + 24px);
  border-top: 2px solid var(--pg4d-primary);
  margin-top: 22px;
}
.pg4d-footer p { font-size: 1.3rem; color: var(--pg4d-muted); margin: 0 0 12px; }
.pg4d-footer-links {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 8px 0 12px;
}
.pg4d-footer-links a {
  font-size: 1.2rem;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(255,255,255,.05);
  color: var(--pg4d-text);
}
.pg4d-footer-links a:hover { background: var(--pg4d-primary); color: #fff; }
.pg4d-copy { font-size: 1.15rem; color: var(--pg4d-muted); margin-top: 10px; }

/* ---------- Bottom navigation ---------- */
.pg4d-bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--pg4d-bottomnav-h);
  background: linear-gradient(180deg, #1f2c39, #11191f);
  border-top: 2px solid var(--pg4d-primary);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1000;
  box-shadow: 0 -4px 18px rgba(0,0,0,.45);
}
.pg4d-bottomnav-btn {
  flex: 1;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: 0;
  color: var(--pg4d-muted);
  cursor: pointer;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color .15s ease, transform .15s ease;
  padding: 4px 2px;
}
.pg4d-bottomnav-btn .material-icons,
.pg4d-bottomnav-btn i { font-size: 24px; }
.pg4d-bottomnav-btn:hover { color: var(--pg4d-accent); transform: translateY(-1px); }
.pg4d-bottomnav-btn.pg4d-bottomnav-active { color: var(--pg4d-accent); }
.pg4d-bottomnav-btn.pg4d-bottomnav-promo { color: var(--pg4d-gold); }
.pg4d-bottomnav-btn.pg4d-bottomnav-promo:hover { color: var(--pg4d-primary); }

/* ---------- Reveal animation ---------- */
.pg4d-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.pg4d-reveal.pg4d-revealed { opacity: 1; transform: none; }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .pg4d-bottomnav { display: none; }
  .pg4d-footer { padding-bottom: 24px; }
  main.pg4d-main { padding-bottom: 24px; }
  .pg4d-wrapper { max-width: 720px; }
}
