/* ============================================================
   rr888.lol - Core Base Stylesheet (Vietnamese gaming site)
   Class prefix: pg3d-
   Palette: #FFD700 (gold) | #212F3D (deep navy bg) | #B8860B (dark gold)
   Mobile-first design, max-width 430px viewport optimization
   ============================================================ */

/* CSS variables scoped to this site namespace */
:root {
  --pg3d-primary: #FFD700;
  --pg3d-bg: #212F3D;
  --pg3d-bg-deep: #16222e;
  --pg3d-bg-card: #1c2c39;
  --pg3d-bg-soft: #24384a;
  --pg3d-text: #FFFFFF;
  --pg3d-text-muted: #aeb9c4;
  --pg3d-accent: #B8860B;
  --pg3d-accent-soft: #d4a017;
  --pg3d-danger: #ff4d6d;
  --pg3d-success: #28c76f;
  --pg3d-radius: 14px;
  --pg3d-radius-sm: 10px;
  --pg3d-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  --pg3d-shadow-gold: 0 6px 20px rgba(255, 215, 0, 0.28);
  --pg3d-gap: 1.2rem;
}

/* Root font scaling: 62.5% -> 1rem = 10px */
html { font-size: 62.5%; }

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

body {
  font-family: "Segoe UI", "Inter", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--pg3d-bg);
  color: var(--pg3d-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Layout primitives ---------- */
.pg3d-container { width: 100%; padding: 0 1.4rem; }
.pg3d-wrapper { max-width: 430px; margin: 0 auto; position: relative; }
.pg3d-section { padding: 2.4rem 1.4rem; }
.pg3d-grid { display: grid; gap: var(--pg3d-gap); }

/* ---------- Header / top navigation ---------- */
.pg3d-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  z-index: 1000;
  background: linear-gradient(180deg, #1c2c39 0%, #16222e 100%);
  border-bottom: 2px solid var(--pg3d-accent);
  box-shadow: var(--pg3d-shadow);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.pg3d-brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.pg3d-logo { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; }
.pg3d-brand-name {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--pg3d-primary);
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
  white-space: nowrap;
}
.pg3d-brand-name span { color: #fff; }

.pg3d-header-actions { display: flex; align-items: center; gap: 0.5rem; }

.pg3d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--pg3d-radius-sm);
  padding: 0.75rem 1.1rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  min-height: 38px;
  text-align: center;
}
.pg3d-btn:active { transform: scale(0.96); }

.pg3d-btn-login {
  background: transparent;
  color: var(--pg3d-primary);
  border: 1.5px solid var(--pg3d-primary);
}
.pg3d-btn-login:hover { background: rgba(255,215,0,0.12); }

.pg3d-btn-register {
  background: linear-gradient(180deg, #FFD700 0%, #B8860B 100%);
  color: #16222e;
  box-shadow: var(--pg3d-shadow-gold);
}
.pg3d-btn-register:hover { filter: brightness(1.08); }

.pg3d-btn-block { width: 100%; }
.pg3d-btn-lg { padding: 1rem 1.4rem; font-size: 1.5rem; }

.pg3d-menu-toggle {
  background: transparent;
  border: none;
  color: var(--pg3d-primary);
  font-size: 2rem;
  cursor: pointer;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.pg3d-menu-toggle:hover { background: rgba(255,215,0,0.1); }

/* ---------- Slide-down mobile menu ---------- */
.pg3d-mobile-menu {
  position: fixed;
  top: 56px; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--pg3d-bg-deep);
  border-bottom: 2px solid var(--pg3d-accent);
  z-index: 9999;
  transform: translateY(-130%);
  transition: transform 0.3s ease;
  padding: 0.8rem 1.2rem 1.2rem;
  box-shadow: var(--pg3d-shadow);
}
.pg3d-mobile-menu.pg3d-open { transform: translateY(0); }
.pg3d-mobile-menu ul { list-style: none; display: grid; gap: 0.4rem; }
.pg3d-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 0.9rem;
  border-radius: var(--pg3d-radius-sm);
  color: var(--pg3d-text);
  font-size: 1.45rem;
  font-weight: 600;
  background: var(--pg3d-bg-card);
}
.pg3d-mobile-menu a:hover { background: var(--pg3d-bg-soft); color: var(--pg3d-primary); }
.pg3d-mobile-menu a i { color: var(--pg3d-primary); font-size: 1.8rem; }

/* ---------- Hero / carousel ---------- */
.pg3d-hero {
  margin-top: 56px;
  position: relative;
  overflow: hidden;
  background: var(--pg3d-bg-deep);
}
.pg3d-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.pg3d-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}
.pg3d-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}
.pg3d-slide img { width: 100%; height: 100%; object-fit: cover; }
.pg3d-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22,34,46,0.78) 0%, rgba(22,34,46,0.15) 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.4rem;
}
.pg3d-slide-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--pg3d-primary);
  margin-bottom: 0.4rem;
  line-height: 1.25;
}
.pg3d-slide-sub {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.8rem;
}
.pg3d-slide-cta {
  align-self: flex-start;
  background: linear-gradient(180deg, #FFD700 0%, #B8860B 100%);
  color: #16222e;
  font-weight: 800;
  padding: 0.7rem 1.2rem;
  border-radius: 20px;
  font-size: 1.3rem;
  box-shadow: var(--pg3d-shadow-gold);
}
.pg3d-carousel-dots {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.5rem;
  z-index: 4;
}
.pg3d-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none; cursor: pointer;
}
.pg3d-dot.pg3d-active { background: var(--pg3d-primary); width: 18px; border-radius: 5px; }

/* ---------- Section heading ---------- */
.pg3d-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--pg3d-primary);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pg3d-section-title i { color: var(--pg3d-primary); }
.pg3d-section-sub {
  font-size: 1.3rem;
  color: var(--pg3d-text-muted);
  margin-bottom: 1.4rem;
}

.pg3d-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--pg3d-primary);
  margin-bottom: 0.8rem;
}
.pg3d-lead {
  font-size: 1.4rem;
  color: var(--pg3d-text-muted);
  line-height: 1.6;
  margin-bottom: 1.4rem;
}

/* ---------- Game category tabs (anchor based) ---------- */
.pg3d-cat-anchor-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.6rem 0 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pg3d-cat-anchor-bar::-webkit-scrollbar { display: none; }
.pg3d-cat-anchor {
  flex: 0 0 auto;
  padding: 0.6rem 1.1rem;
  border-radius: 20px;
  background: var(--pg3d-bg-card);
  color: var(--pg3d-text-muted);
  font-size: 1.25rem;
  font-weight: 700;
  border: 1px solid #2c4156;
  white-space: nowrap;
}
.pg3d-cat-anchor:hover { color: var(--pg3d-primary); border-color: var(--pg3d-accent); }

/* ---------- Game grid ---------- */
.pg3d-game-block { margin-bottom: 2.4rem; scroll-margin-top: 70px; }
.pg3d-game-block-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.pg3d-game-block-head h2 {
  font-size: 1.7rem; font-weight: 800; color: var(--pg3d-primary);
  display: flex; align-items: center; gap: 0.5rem;
}
.pg3d-game-block-head .pg3d-more {
  font-size: 1.2rem; color: var(--pg3d-accent-soft); font-weight: 700;
}
.pg3d-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.pg3d-game-card {
  background: var(--pg3d-bg-card);
  border: 1px solid #2c4156;
  border-radius: var(--pg3d-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
}
.pg3d-game-card:hover {
  transform: translateY(-3px);
  border-color: var(--pg3d-accent);
  box-shadow: var(--pg3d-shadow-gold);
}
.pg3d-game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #0f1820;
}
.pg3d-game-name {
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 0.3rem;
  color: var(--pg3d-text);
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Feature cards / info modules ---------- */
.pg3d-card {
  background: var(--pg3d-bg-card);
  border: 1px solid #2c4156;
  border-radius: var(--pg3d-radius);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
}
.pg3d-card h2, .pg3d-card h3 { color: var(--pg3d-primary); margin-bottom: 0.8rem; }
.pg3d-card h2 { font-size: 1.8rem; }
.pg3d-card h3 { font-size: 1.5rem; }
.pg3d-card p { color: var(--pg3d-text-muted); font-size: 1.35rem; line-height: 1.6; margin-bottom: 0.8rem; }
.pg3d-card p:last-child { margin-bottom: 0; }
.pg3d-card ul { list-style: none; display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.pg3d-card ul li {
  position: relative; padding-left: 1.8rem;
  color: var(--pg3d-text-muted); font-size: 1.3rem; line-height: 1.5;
}
.pg3d-card ul li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: 0;
  color: var(--pg3d-primary); font-size: 1.1rem;
}

.pg3d-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.pg3d-feature-item {
  background: var(--pg3d-bg-card);
  border: 1px solid #2c4156;
  border-radius: var(--pg3d-radius-sm);
  padding: 1.2rem;
  text-align: center;
}
.pg3d-feature-item i {
  font-size: 2.4rem; color: var(--pg3d-primary); margin-bottom: 0.5rem; display: block;
}
.pg3d-feature-item h3 { font-size: 1.3rem; color: var(--pg3d-primary); margin-bottom: 0.3rem; }
.pg3d-feature-item p { font-size: 1.15rem; color: var(--pg3d-text-muted); line-height: 1.4; }

/* ---------- RTP / stats compact ---------- */
.pg3d-stat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 0; border-bottom: 1px dashed #2c4156;
}
.pg3d-stat-row:last-child { border-bottom: none; }
.pg3d-stat-label { font-size: 1.3rem; color: var(--pg3d-text-muted); }
.pg3d-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--pg3d-primary); }
.pg3d-stat-bar {
  height: 6px; border-radius: 4px; background: #0f1820; overflow: hidden; margin-top: 0.4rem;
}
.pg3d-stat-bar span { display: block; height: 100%; background: linear-gradient(90deg, #B8860B, #FFD700); }

/* ---------- Testimonials ---------- */
.pg3d-testi {
  background: var(--pg3d-bg-card);
  border-left: 3px solid var(--pg3d-primary);
  border-radius: var(--pg3d-radius-sm);
  padding: 1.2rem;
  margin-bottom: 0.9rem;
}
.pg3d-testi p { font-size: 1.3rem; color: var(--pg3d-text); line-height: 1.5; font-style: italic; margin-bottom: 0.6rem; }
.pg3d-testi-meta { font-size: 1.15rem; color: var(--pg3d-accent-soft); font-weight: 700; }
.pg3d-testi-meta i { color: var(--pg3d-primary); }

/* ---------- Winners showcase ---------- */
.pg3d-winner-row {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--pg3d-bg-card); border: 1px solid #2c4156;
  border-radius: var(--pg3d-radius-sm); padding: 0.7rem 0.9rem; margin-bottom: 0.6rem;
}
.pg3d-winner-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(180deg, #FFD700, #B8860B);
  display: flex; align-items: center; justify-content: center;
  color: #16222e; font-weight: 800; font-size: 1.4rem; flex-shrink: 0;
}
.pg3d-winner-info { flex: 1; min-width: 0; }
.pg3d-winner-name { font-size: 1.25rem; font-weight: 700; color: var(--pg3d-text); }
.pg3d-winner-game { font-size: 1.1rem; color: var(--pg3d-text-muted); }
.pg3d-winner-amount { font-size: 1.4rem; font-weight: 800; color: var(--pg3d-success); }

/* ---------- Payment methods ---------- */
.pg3d-pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.pg3d-pay-item {
  background: var(--pg3d-bg-card); border: 1px solid #2c4156;
  border-radius: var(--pg3d-radius-sm); padding: 0.8rem 0.4rem;
  text-align: center; font-size: 1rem; color: var(--pg3d-text-muted); font-weight: 600;
}
.pg3d-pay-item i { display: block; font-size: 1.8rem; color: var(--pg3d-primary); margin-bottom: 0.3rem; }

/* ---------- App download CTA ---------- */
.pg3d-app-cta {
  background: linear-gradient(135deg, #24384a 0%, #16222e 100%);
  border: 1px solid var(--pg3d-accent);
  border-radius: var(--pg3d-radius);
  padding: 1.6rem;
  text-align: center;
  margin-bottom: 1.4rem;
}
.pg3d-app-cta h2 { color: var(--pg3d-primary); font-size: 1.9rem; margin-bottom: 0.6rem; }
.pg3d-app-cta p { color: var(--pg3d-text-muted); font-size: 1.3rem; margin-bottom: 1.2rem; }
.pg3d-app-buttons { display: flex; flex-direction: column; gap: 0.6rem; }

/* ---------- Promo banner row ---------- */
.pg3d-promo-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--pg3d-primary); font-weight: 700;
  border-bottom: 1.5px solid var(--pg3d-accent);
  padding-bottom: 1px;
}
.pg3d-promo-link:hover { color: var(--pg3d-accent-soft); }

/* ---------- Inline SEO text ---------- */
.pg3d-seo-text {
  font-size: 1.3rem; color: var(--pg3d-text-muted); line-height: 1.7;
}
.pg3d-seo-text strong { color: var(--pg3d-primary); font-weight: 700; }
.pg3d-seo-text a { color: var(--pg3d-primary); font-weight: 600; border-bottom: 1px dashed var(--pg3d-accent); }

/* ---------- Footer ---------- */
.pg3d-footer {
  background: var(--pg3d-bg-deep);
  border-top: 2px solid var(--pg3d-accent);
  padding: 2.2rem 1.4rem 6rem;
  margin-top: 2rem;
}
.pg3d-footer-brand {
  font-size: 1.8rem; font-weight: 800; color: var(--pg3d-primary); margin-bottom: 0.6rem;
}
.pg3d-footer-desc { font-size: 1.25rem; color: var(--pg3d-text-muted); line-height: 1.6; margin-bottom: 1.2rem; }
.pg3d-footer-links {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1.2rem;
}
.pg3d-footer-links a {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 1.2rem; color: var(--pg3d-text-muted);
  padding: 0.5rem 0.6rem; background: var(--pg3d-bg-card); border-radius: 8px;
}
.pg3d-footer-links a:hover { color: var(--pg3d-primary); }
.pg3d-footer-links a i { color: var(--pg3d-primary); font-size: 1.4rem; }
.pg3d-footer-promo {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem;
}
.pg3d-footer-promo button, .pg3d-footer-promo a {
  flex: 1 1 auto; min-width: 45%;
  background: linear-gradient(180deg, #FFD700, #B8860B);
  color: #16222e; font-weight: 700; font-size: 1.2rem;
  padding: 0.7rem 0.6rem; border-radius: 8px; border: none; cursor: pointer; text-align: center;
}
.pg3d-footer-copy {
  font-size: 1.1rem; color: var(--pg3d-text-muted); text-align: center;
  border-top: 1px solid #2c4156; padding-top: 1rem;
}

/* ---------- Mobile bottom navigation ---------- */
.pg3d-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: 62px;
  background: linear-gradient(180deg, #1c2c39 0%, #16222e 100%);
  border-top: 2px solid var(--pg3d-accent);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}
.pg3d-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--pg3d-text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 60px;
  min-height: 60px;
  padding: 0.4rem;
  transition: color 0.18s ease, transform 0.18s ease;
  position: relative;
}
.pg3d-nav-btn i { font-size: 24px; }
.pg3d-nav-btn .material-icons-outlined,
.pg3d-nav-btn .material-icons { font-size: 24px; }
.pg3d-nav-btn:active { transform: scale(0.92); }
.pg3d-nav-btn:hover { color: var(--pg3d-primary); }
.pg3d-nav-btn.pg3d-active { color: var(--pg3d-primary); }
.pg3d-nav-btn.pg3d-active::before {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--pg3d-primary);
}
.pg3d-nav-btn .pg3d-badge {
  position: absolute; top: 6px; right: 14px;
  background: var(--pg3d-danger); color: #fff;
  font-size: 0.9rem; font-weight: 700;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}

/* Hide bottom nav on desktop, show inline footer nav instead */
@media (min-width: 769px) {
  .pg3d-bottom-nav { display: none; }
  body { max-width: 100%; }
  .pg3d-header, .pg3d-mobile-menu, .pg3d-bottom-nav { max-width: 430px; }
}

/* Mobile bottom padding so content is not hidden behind fixed bottom nav */
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
}

/* Focus / accessibility */
.pg3d-btn:focus-visible,
.pg3d-nav-btn:focus-visible,
.pg3d-game-card:focus-visible,
.pg3d-slide:focus-visible {
  outline: 2px solid var(--pg3d-primary);
  outline-offset: 2px;
}