/* =====================================================================
   Kuya King - design.css
   All custom classes use the "pg82-" prefix to isolate styles.
   Color palette: sienna/orange/burlywood accent on deep navy backgrounds.
   ===================================================================== */

:root {
  --pg82-primary: #A0522D;
  --pg82-accent: #FFB347;
  --pg82-burlywood: #DEB887;
  --pg82-muted: #495057;
  --pg82-bg: #0F0F23;
  --pg82-bg2: #14142b;
  --pg82-card: #1c1c3a;
  --pg82-peru: #CD853F;
  --pg82-text: #f5ede2;
  --pg82-text-dim: #b8a98f;
  --pg82-border: rgba(205, 133, 63, 0.25);
  --pg82-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.45);
  --pg82-radius: 1.2rem;
  --pg82-maxw: 430px;
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  background: var(--pg82-bg);
  color: var(--pg82-text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 62.5%;
  line-height: 1.5rem;
  min-height: 100%;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--pg82-accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---- Layout ---- */
.pg82-wrapper {
  max-width: var(--pg82-maxw);
  margin: 0 auto;
  position: relative;
}
.pg82-container { padding: 0 1.4rem; width: 100%; }

/* ---- Header ---- */
.pg82-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(15,15,35,0.98), rgba(15,15,35,0.88));
  border-bottom: 0.1rem solid var(--pg82-border);
  box-shadow: 0 0.2rem 0.8rem rgba(0,0,0,0.4);
}
.pg82-header-inner {
  max-width: var(--pg82-maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  gap: 0.8rem;
}
.pg82-brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.pg82-brand img { width: 3rem; height: 3rem; border-radius: 0.6rem; }
.pg82-brand-text { display: flex; flex-direction: column; line-height: 1.2rem; }
.pg82-brand-text strong { color: var(--pg82-accent); font-size: 1.6rem; font-weight: 800; }
.pg82-brand-text span { color: var(--pg82-burlywood); font-size: 1rem; }

.pg82-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.pg82-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  border-radius: 2rem;
  font-size: 1.3rem;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s;
  white-space: nowrap;
}
.pg82-btn:active { transform: scale(0.94); }
.pg82-btn-login {
  background: transparent;
  border: 0.12rem solid var(--pg82-burlywood);
  color: var(--pg82-burlywood);
}
.pg82-btn-register {
  background: linear-gradient(135deg, var(--pg82-accent), var(--pg82-peru));
  color: #1a1208;
  box-shadow: 0 0.4rem 1rem rgba(255,179,71,0.3);
}
.pg82-menu-btn {
  width: 3.4rem; height: 3.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pg82-accent);
  background: rgba(205,133,63,0.12);
  border-radius: 0.8rem;
}

/* ---- Mobile slide menu ---- */
#pg82-mobile-menu {
  position: fixed;
  top: 0; right: -85%;
  width: 82%;
  max-width: 320px;
  height: 100%;
  background: var(--pg82-bg2);
  z-index: 9999;
  padding: 6rem 1.6rem 2rem;
  transition: right 0.28s ease;
  overflow-y: auto;
  border-left: 0.1rem solid var(--pg82-border);
}
#pg82-mobile-menu.pg82-menu-open { right: 0; }
#pg82-mobile-menu h4 { color: var(--pg82-accent); font-size: 1.4rem; margin: 1.5rem 0 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; }
#pg82-mobile-menu a {
  display: block;
  padding: 0.9rem 0.6rem;
  color: var(--pg82-text);
  border-bottom: 0.05rem solid var(--pg82-border);
  font-size: 1.35rem;
}
#pg82-mobile-menu a:active { color: var(--pg82-accent); }
#pg82-menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
#pg2-menu-backdrop.pg82-backdrop-on,
#pg82-menu-backdrop.pg82-backdrop-on { opacity: 1; pointer-events: auto; }
body.pg82-no-scroll { overflow: hidden; }

/* ---- Main content ---- */
main { padding-top: 5.6rem; }
.pg82-section { padding: 2.4rem 0; }
.pg82-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.pg82-section-head h2 { color: var(--pg82-accent); font-size: 1.8rem; font-weight: 800; }
.pg82-section-head .pg82-link { color: var(--pg82-burlywood); font-size: 1.2rem; }

/* ---- Hero ---- */
.pg82-hero {
  position: relative;
  height: 18rem;
  border-radius: var(--pg82-radius);
  overflow: hidden;
  margin-bottom: 1.4rem;
  box-shadow: var(--pg82-shadow);
}
.pg82-hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.6rem;
  color: var(--pg82-text);
}
.pg82-hero-slide.pg82-slide-active { opacity: 1; }
.pg82-hero-slide:nth-child(1) { background: linear-gradient(135deg, #4a1f0a, #A0522D); }
.pg82-hero-slide:nth-child(2) { background: linear-gradient(135deg, #5a3a0d, #FFB347); }
.pg82-hero-slide:nth-child(3) { background: linear-gradient(135deg, #2c1d0a, #CD853F); }
.pg82-hero-slide h1, .pg82-hero-slide h2 { color: #fff; font-size: 2.2rem; font-weight: 900; margin-bottom: 0.4rem; text-shadow: 0 0.2rem 0.4rem rgba(0,0,0,0.5); }
.pg82-hero-slide p { font-size: 1.3rem; color: rgba(255,255,255,0.92); }
.pg82-hero-cta { margin-top: 1rem; display: inline-flex; align-self: flex-start; }

/* ---- Category tabs ---- */
.pg82-cats {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pg82-cats::-webkit-scrollbar { display: none; }
.pg82-cat-tab {
  flex: 0 0 auto;
  padding: 0.7rem 1.4rem;
  background: var(--pg82-card);
  color: var(--pg82-text-dim);
  border-radius: 2rem;
  font-size: 1.25rem;
  font-weight: 600;
  border: 0.1rem solid transparent;
}
.pg82-cat-tab.pg82-tab-active {
  background: linear-gradient(135deg, var(--pg82-accent), var(--pg82-peru));
  color: #1a1208;
}

/* ---- Game grid ---- */
.pg82-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.pg82-card {
  background: var(--pg82-card);
  border-radius: 1rem;
  overflow: hidden;
  border: 0.05rem solid var(--pg82-border);
  transition: transform 0.18s;
  position: relative;
}
.pg82-card:active { transform: scale(0.96); }
.pg82-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pg82-card-name { padding: 0.5rem; font-size: 1.05rem; color: var(--pg82-text); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Promo banner ---- */
.pg82-promo {
  background: linear-gradient(135deg, var(--pg82-primary), var(--pg82-peru));
  border-radius: var(--pg82-radius);
  padding: 1.6rem;
  color: #fff;
  margin: 1.6rem 0;
  text-align: center;
}
.pg82-promo h3 { font-size: 1.7rem; margin-bottom: 0.6rem; }
.pg82-promo p { font-size: 1.25rem; opacity: 0.92; margin-bottom: 1rem; }

/* ---- Text content ---- */
.pg82-content p { font-size: 1.3rem; line-height: 1.5rem; margin-bottom: 0.8rem; color: var(--pg82-text-dim); }
.pg82-content a { font-weight: 700; color: var(--pg82-accent); text-decoration: underline; }
.pg82-content h2 { color: var(--pg82-accent); font-size: 1.8rem; margin: 1.6rem 0 0.6rem; }
.pg82-content h3 { color: var(--pg82-burlywood); font-size: 1.5rem; margin: 1.2rem 0 0.4rem; }
.pg82-text-link { color: var(--pg82-accent); font-weight: 700; text-decoration: underline; }

/* ---- Reveal animation ---- */
.pg82-reveal { opacity: 0; transform: translateY(1.6rem); transition: opacity 0.6s ease, transform 0.6s ease; }
.pg82-reveal.pg82-is-visible { opacity: 1; transform: translateY(0); }
.pg82-hidden { display: none !important; }

/* ---- Footer ---- */
.pg82-footer {
  background: var(--pg82-bg2);
  border-top: 0.1rem solid var(--pg82-border);
  padding: 2.4rem 0 9rem;
  margin-top: 2rem;
  text-align: center;
}
.pg82-footer p { font-size: 1.2rem; color: var(--pg82-text-dim); margin-bottom: 0.6rem; padding: 0 1.4rem; }
.pg82-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 1rem 0; padding: 0 1rem; }
.pg82-footer-links a {
  font-size: 1.2rem;
  padding: 0.4rem 0.8rem;
  color: var(--pg82-burlywood);
  border: 0.05rem solid var(--pg82-border);
  border-radius: 1.4rem;
}
.pg82-footer-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; padding: 0 1.4rem; margin: 1rem 0; }
.pg82-copyright { font-size: 1.1rem; color: var(--pg82-muted); margin-top: 1rem; }

/* ---- Mobile bottom nav (unique style) ---- */
.pg82-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 6rem;
  background: linear-gradient(180deg, rgba(20,20,43,0.98), rgba(10,10,25,1));
  border-top: 0.1rem solid var(--pg82-border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.pg82-bottomnav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--pg82-text-dim);
  font-size: 1rem;
  font-weight: 600;
  transition: color 0.2s, transform 0.2s;
  position: relative;
}
.pg82-bottomnav a.pg82-bn-current { color: var(--pg82-accent); }
.pg82-bottomnav a:active { transform: scale(0.88); }
.pg82-bottomnav .material-icons,
.pg82-bottomnav .fas,
.pg82-bottomnav .far,
.pg82-bottomnav .bi,
.pg82-bottomnav .ion { font-size: 2.2rem; }
.pg82-bottomnav .pg82-bn-center {
  margin-top: -1.4rem;
  background: linear-gradient(135deg, var(--pg82-accent), var(--pg82-peru));
  color: #1a1208;
  width: 4.6rem; height: 4.6rem;
  border-radius: 50%;
  align-self: center;
  box-shadow: 0 0.4rem 1rem rgba(255,179,71,0.4);
  border: 0.2rem solid var(--pg82-bg);
}
.pg82-bottomnav .pg82-bn-center .fas,
.pg82-bottomnav .pg82-bn-center .material-icons { font-size: 2.4rem; }
.pg82-bottomnav .pg82-bn-center span:last-child { display: none; }

/* ---- Desktop behaviour ---- */
@media (min-width: 769px) {
  .pg82-bottomnav { display: none; }
  .pg82-footer { padding-bottom: 2.4rem; }
  .pg82-wrapper { max-width: 760px; }
  .pg82-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ---- Mobile clearance for bottom nav ---- */
@media (max-width: 768px) {
  main { padding-bottom: 8rem; }
  body { padding-bottom: 0; }
}
