/* =========================================================================
   Game Zon - layout-bacb.css
   Prefix: pgba-
   Palette: #AFEEEE (pale turquoise) | #273746 (deep slate)
            #D3D3D3 (light gray)  | #2E8B57 (sea green)
   Dark = backgrounds, Light = text. Mobile-first, max-width 430px.
   ========================================================================= */

:root {
  --pgba-bg: #273746;
  --pgba-bg-2: #1f2c38;
  --pgba-bg-3: #34485c;
  --pgba-card: #2d3f51;
  --pgba-text: #d3d3d3;
  --pgba-text-soft: #b9c4ce;
  --pgba-accent: #afeeee;
  --pgba-green: #2e8b57;
  --pgba-gold: #f5c451;
  --pgba-border: #3a4d61;
  --pgba-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  --pgba-radius: 14px;
  --pgba-header-h: 58px;
  --pgba-nav-h: 62px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--pgba-bg);
  background-image: radial-gradient(circle at 20% 10%, #2e8b57 0%, transparent 38%),
                    radial-gradient(circle at 90% 0%, #afeeee22 0%, transparent 30%),
                    linear-gradient(180deg, #273746 0%, #1f2c38 100%);
  background-attachment: fixed;
  color: var(--pgba-text);
  line-height: 1.55;
  font-size: 15px;
  overflow-x: hidden;
}

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

.pgba-wrap { width: 100%; max-width: 430px; margin: 0 auto; position: relative; }

/* ===================== Header ===================== */
.pgba-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #1f2c38 0%, #273746 60%, #2d3f51 100%);
  border-bottom: 1px solid var(--pgba-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.pgba-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  max-width: 430px;
  margin: 0 auto;
}
.pgba-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.3px;
}
.pgba-logo .pgba-logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #afeeee, #2e8b57);
  display: flex; align-items: center; justify-content: center;
  color: #1f2c38; font-weight: 900; font-size: 17px;
  box-shadow: inset 0 0 0 2px #ffffff44;
}
.pgba-logo small { color: var(--pgba-accent); font-size: 11px; font-weight: 600; display: block; }

.pgba-head-actions { display: flex; align-items: center; gap: 6px; }
.pgba-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
}
.pgba-btn:active { transform: scale(0.96); }
.pgba-btn-login {
  background: transparent;
  color: var(--pgba-accent);
  border: 1px solid var(--pgba-accent);
}
.pgba-btn-register {
  background: linear-gradient(135deg, #2e8b57, #afeeee);
  color: #1f2c38;
  box-shadow: 0 3px 10px rgba(46, 139, 87, 0.45);
}
.pgba-icon-btn {
  background: transparent;
  border: 1px solid var(--pgba-border);
  color: var(--pgba-accent);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ===================== Mobile menu ===================== */
.pgba-mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #1c2731;
  border-bottom: 1px solid var(--pgba-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
  z-index: 9999;
}
.pgba-mobile-menu.pgba-menu-open { max-height: 80vh; overflow-y: auto; }
.pgba-menu-list { list-style: none; margin: 0; padding: 8px 14px 18px; }
.pgba-menu-list li { border-bottom: 1px solid #2a3a48; }
.pgba-menu-list a {
  display: block;
  padding: 13px 6px;
  color: var(--pgba-text);
  font-weight: 600;
  font-size: 15px;
}
.pgba-menu-list a i { width: 22px; color: var(--pgba-accent); margin-right: 8px; }
.pgba-menu-close {
  text-align: right;
  padding: 8px 14px;
  color: var(--pgba-accent);
  font-size: 22px;
  cursor: pointer;
}

/* ===================== Hero / Carousel ===================== */
.pgba-hero {
  position: relative;
  margin: 12px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--pgba-shadow);
}
.pgba-hero-track { position: relative; height: 210px; }
.pgba-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #fff;
}
.pgba-hero-slide.pgba-slide-active { opacity: 1; }
.pgba-hero-slide.s1 {
  background: linear-gradient(120deg, #2e8b57 0%, #273746 70%), linear-gradient(45deg, #afeeee33, transparent);
}
.pgba-hero-slide.s2 {
  background: linear-gradient(120deg, #afeeee 0%, #2e8b57 100%);
  color: #1f2c38;
}
.pgba-hero-slide.s3 {
  background: linear-gradient(120deg, #34485c 0%, #2e8b57 130%);
}
.pgba-hero-slide h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.2; }
.pgba-hero-slide p { margin: 0 0 12px; font-size: 13px; max-width: 90%; }
.pgba-hero-cta {
  align-self: flex-start;
  background: #1f2c38;
  color: var(--pgba-accent);
  border: 1px solid var(--pgba-accent);
  padding: 9px 16px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 13px;
}
.pgba-hero-slide.s2 .pgba-hero-cta {
  background: #1f2c38; color: var(--pgba-accent);
}
.pgba-hero-dots {
  position: absolute;
  bottom: 8px; right: 12px;
  display: flex; gap: 5px;
  z-index: 2;
}
.pgba-hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ffffff66;
  cursor: pointer;
}
.pgba-hero-dot.pgba-dot-active { background: var(--pgba-accent); }

/* ===================== Section general ===================== */
.pgba-section { padding: 18px 12px 8px; }
.pgba-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pgba-section-title { font-size: 18px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.pgba-section-title::before { content: ""; width: 4px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, #afeeee, #2e8b57); }
.pgba-section-more { font-size: 12px; color: var(--pgba-accent); font-weight: 600; }

/* ===================== Category filter ===================== */
.pgba-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 12px 12px;
  scrollbar-width: none;
}
.pgba-filter-bar::-webkit-scrollbar { display: none; }
.pgba-filter-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--pgba-bg-3);
  color: var(--pgba-text);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--pgba-border);
  cursor: pointer;
  white-space: nowrap;
}
.pgba-filter-tab.pgba-tab-active {
  background: linear-gradient(135deg, #2e8b57, #afeeee);
  color: #1f2c38;
  border-color: transparent;
}

/* ===================== Game grid & cards ===================== */
.pgba-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 4px 12px; }
.pgba-game-card {
  background: var(--pgba-card); border: 1px solid var(--pgba-border);
  border-radius: 12px; overflow: hidden; position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pgba-game-card:active { transform: scale(0.97); }
.pgba-game-thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #1c2731; }
.pgba-game-body { padding: 6px 8px 9px; text-align: center; }
.pgba-game-name { font-size: 11px; color: var(--pgba-text); font-weight: 600; line-height: 1.25; height: 28px; overflow: hidden; }
.pgba-game-play { display: inline-block; margin-top: 5px; font-size: 10px; color: var(--pgba-accent); border: 1px solid var(--pgba-accent); padding: 3px 8px; border-radius: 12px; font-weight: 700; }
.pgba-game-badge { position: absolute; top: 6px; left: 6px; background: linear-gradient(135deg, #f5c451, #ff8a3c); color: #1f2c38; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 8px; }

/* Featured row */
.pgba-feature-card { background: var(--pgba-card); border: 1px solid var(--pgba-border); border-radius: 14px; overflow: hidden; margin-bottom: 12px; display: flex; gap: 10px; padding: 10px; }
.pgba-feature-card img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.pgba-feature-info { flex: 1; min-width: 0; }
.pgba-feature-info h3 { margin: 0 0 4px; font-size: 15px; color: #fff; }
.pgba-feature-info .pgba-tag { display: inline-block; font-size: 10px; padding: 2px 7px; background: #2e8b5733; color: var(--pgba-accent); border-radius: 8px; margin-bottom: 6px; font-weight: 700; }
.pgba-feature-info p { margin: 0 0 8px; font-size: 12px; color: var(--pgba-text-soft); }
.pgba-feature-cta { display: inline-block; background: linear-gradient(135deg, #2e8b57, #afeeee); color: #1f2c38; font-weight: 800; font-size: 12px; padding: 7px 14px; border-radius: 18px; }

/* ===================== Promo banner ===================== */
.pgba-promo-banner {
  margin: 16px 12px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, #2e8b57 0%, #34485c 100%);
  border: 1px solid #afeeee44;
  text-align: center;
}
.pgba-promo-banner h3 { margin: 0 0 6px; color: #fff; font-size: 17px; }
.pgba-promo-banner p { margin: 0 0 12px; font-size: 12px; color: var(--pgba-accent); }
.pgba-promo-banner .pgba-btn-register { padding: 11px 22px; font-size: 14px; }

/* ===================== SEO content ===================== */
.pgba-seo {
  padding: 6px 14px 10px;
  color: var(--pgba-text);
  font-size: 13.5px;
}
.pgba-seo h2 {
  color: #fff; font-size: 19px; margin: 18px 0 8px;
  border-left: 4px solid var(--pgba-green); padding-left: 10px;
}
.pgba-seo h3 { color: var(--pgba-accent); font-size: 15px; margin: 14px 0 6px; }
.pgba-seo p { margin: 0 0 10px; }
.pgba-seo ul { padding-left: 20px; margin: 0 0 12px; }
.pgba-seo li { margin-bottom: 5px; }
.pgba-seo a { color: var(--pgba-accent); text-decoration: underline; }

/* ===================== FAQ ===================== */
.pgba-faq { padding: 6px 14px 10px; }
.pgba-faq-item { background: var(--pgba-card); border: 1px solid var(--pgba-border); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.pgba-faq-q { padding: 13px 14px; font-weight: 700; color: #fff; font-size: 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.pgba-faq-q .pgba-faq-icon { color: var(--pgba-accent); transition: transform 0.25s; }
.pgba-faq-item.pgba-faq-open .pgba-faq-icon { transform: rotate(45deg); }
.pgba-faq-a { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; padding: 0 14px; color: var(--pgba-text-soft); font-size: 13px; }
.pgba-faq-item.pgba-faq-open .pgba-faq-a { max-height: 360px; padding: 0 14px 14px; }

/* ===================== Footer ===================== */
.pgba-footer {
  background: #1c2731;
  border-top: 1px solid var(--pgba-border);
  padding: 20px 14px 28px;
  margin-top: 16px;
}
.pgba-footer h4 { color: #fff; margin: 0 0 10px; font-size: 14px; }
.pgba-footer-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-bottom: 16px;
}
.pgba-footer-links a { color: var(--pgba-text-soft); font-size: 12px; }
.pgba-footer-copy { font-size: 11px; color: #7a8794; text-align: center; padding-top: 12px; border-top: 1px solid #2a3a48; }
.pgba-footer-pay { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.pgba-footer-pay span {
  background: #2a3a48; color: var(--pgba-accent);
  font-size: 10px; padding: 3px 8px; border-radius: 6px; font-weight: 700;
}

/* ===================== Mobile bottom nav ===================== */
.pgba-bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--pgba-nav-h);
  background: linear-gradient(180deg, #2d3f51 0%, #1c2731 100%);
  border-top: 1px solid #afeeee44;
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000; box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.4);
}
.pgba-bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--pgba-text-soft); font-size: 10px; gap: 3px;
  padding: 6px 0; min-width: 60px; min-height: 60px;
  text-decoration: none; transition: color 0.15s;
}
.pgba-bottomnav a i { font-size: 22px; }
.pgba-bottomnav a.active { color: var(--pgba-accent); }
.pgba-bottomnav a:active { color: #fff; }
.pgba-bottomnav .pgba-nav-promo { color: var(--pgba-gold); }
.pgba-bottomnav .pgba-nav-promo i {
  background: linear-gradient(135deg, #2e8b57, #afeeee);
  color: #1f2c38; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; margin-top: -18px;
  box-shadow: 0 3px 10px rgba(46, 139, 87, 0.6);
  border: 2px solid #afeeee;
}

/* Back to top */
.pgba-top {
  position: fixed; bottom: 72px; right: 14px;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #2e8b57, #afeeee);
  color: #1f2c38;
  display: flex; align-items: center; justify-content: center;
  z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--pgba-shadow); cursor: pointer;
}
.pgba-top.pgba-top-show { opacity: 1; pointer-events: auto; }

/* ===================== Desktop ===================== */
@media (min-width: 769px) {
  .pgba-bottomnav { display: none; }
  .pgba-wrap { max-width: 960px; }
  .pgba-header-inner { max-width: 960px; }
  .pgba-grid { grid-template-columns: repeat(6, 1fr); }
  .pgba-hero-track { height: 320px; }
}

@media (max-width: 768px) {
  main { padding-bottom: 80px; }
  .pgba-section-more { display: none; }
}

@media (max-width: 360px) {
  .pgba-grid { grid-template-columns: repeat(2, 1fr); }
  .pgba-hero-slide h2 { font-size: 19px; }
}
