/* ============================================================
 * 990k3 theme stylesheet (basefiles)
 * Mobile-first. All custom classes use the pg24- prefix.
 * Palette: #F8F8FF #DDA0DD #BDB76B #1A1A2E #BA55D3 #F0F0F0
 * Dark colors = background, light colors = text.
 * ============================================================ */

:root {
  --pg24-bg: #1A1A2E;
  --pg24-bg-soft: #2a1f3d;
  --pg24-bg-deep: #121225;
  --pg24-card: #20203a;
  --pg24-card-2: #25253f;
  --pg24-border: #3a3a5c;
  --pg24-primary: #BA55D3;
  --pg24-primary-2: #DDA0DD;
  --pg24-gold: #BDB76B;
  --pg24-gold-2: #d4c97a;
  --pg24-text: #F8F8FF;
  --pg24-text-muted: #F0F0F0;
  --pg24-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

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

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

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Be Vietnam Pro', sans-serif;
  background: var(--pg24-bg);
  color: var(--pg24-text);
  font-size: 1.5rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--pg24-primary-2); }

/* Mobile-first wrapper capped at 430px wide. */
.pg24-wrapper {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: linear-gradient(180deg, #1A1A2E 0%, #2a1f3d 60%, #1A1A2E 100%);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}

/* ---------- Header ---------- */
.pg24-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #1A1A2E, #2d1b4e);
  border-bottom: 2px solid var(--pg24-primary);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg24-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.pg24-logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--pg24-primary), var(--pg24-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
}

.pg24-logo-text {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--pg24-primary-2);
  letter-spacing: 0.5px;
}

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

.pg24-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: 2rem;
  font-size: 1.25rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: 36px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pg24-btn:active { transform: scale(0.95); }

.pg24-btn-login {
  background: transparent;
  color: var(--pg24-text);
  border: 1.5px solid var(--pg24-primary-2);
}

.pg24-btn-register {
  background: linear-gradient(90deg, var(--pg24-primary), var(--pg24-primary-2));
  color: #fff;
  box-shadow: 0 3px 10px rgba(186, 85, 211, 0.4);
}

.pg24-menu-toggle {
  background: transparent;
  border: none;
  color: var(--pg24-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

/* ---------- Mobile expandable menu ---------- */
.pg24-mobile-menu {
  position: fixed;
  top: 0;
  right: -105%;
  width: 82%;
  max-width: 320px;
  height: 100vh;
  background: var(--pg24-bg-deep);
  z-index: 9999;
  padding: 5.5rem 1.2rem 2rem;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.55);
}

.pg24-mobile-menu.pg24-menu-open { right: 0; }

.pg24-menu-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: transparent;
  border: none;
  color: var(--pg24-text);
  font-size: 2.2rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.pg24-menu-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pg24-gold);
  margin-bottom: 0.8rem;
  padding: 0 0.6rem;
}

.pg24-menu-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 1rem;
  color: var(--pg24-text);
  text-decoration: none;
  font-size: 1.45rem;
  font-weight: 600;
  border-bottom: 1px solid #2a2a45;
}

.pg24-menu-link i { color: var(--pg24-primary); font-size: 1.6rem; width: 22px; text-align: center; }

.pg24-menu-link:hover,
.pg24-menu-link:focus {
  color: var(--pg24-primary-2);
  background: rgba(186, 85, 211, 0.12);
}

.pg24-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  display: none;
}

.pg24-overlay.pg24-menu-open { display: block; }

/* ---------- Main / sections ---------- */
main { padding-bottom: 84px; }

.pg24-section { padding: 1.8rem 1.2rem 0.4rem; }

.pg24-section-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--pg24-primary-2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pg24-section-title i { color: var(--pg24-gold); font-size: 1.8rem; }

/* ---------- Carousel ---------- */
.pg24-carousel {
  position: relative;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  margin: 1rem 0;
  box-shadow: var(--pg24-shadow);
}

.pg24-carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
}

.pg24-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.pg24-carousel-slide.pg24-slide-active { opacity: 1; }

.pg24-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg24-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  z-index: 3;
}

.pg24-carousel-prev { left: 8px; }
.pg24-carousel-next { right: 8px; }

.pg24-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}

.pg24-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
}

.pg24-carousel-dot.pg24-dot-active { background: var(--pg24-primary-2); }

/* ---------- Hero ---------- */
.pg24-hero { text-align: center; padding: 1.4rem 1rem 0.6rem; }

.pg24-hero h1 {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 0.7rem;
  background: linear-gradient(90deg, var(--pg24-primary-2), var(--pg24-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.pg24-hero p { color: var(--pg24-text-muted); font-size: 1.35rem; margin-bottom: 1.2rem; }

.pg24-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, var(--pg24-gold), var(--pg24-gold-2));
  color: #1A1A2E;
  padding: 1rem 2.4rem;
  border-radius: 2.5rem;
  font-size: 1.6rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(189, 183, 107, 0.45);
}

.pg24-cta:active { transform: scale(0.96); }

/* ---------- Category quick chips ---------- */
.pg24-cat-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.4rem 0 0.8rem;
  -webkit-overflow-scrolling: touch;
}

.pg24-cat-chip {
  background: var(--pg24-card-2);
  border: 1px solid var(--pg24-border);
  color: var(--pg24-text);
  padding: 0.5rem 1rem;
  border-radius: 1.4rem;
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.pg24-cat-chip:active { background: var(--pg24-primary); color: #fff; }

/* ---------- Game grid ---------- */
.pg24-game-section { margin-bottom: 1.6rem; scroll-margin-top: 70px; }

.pg24-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, var(--pg24-primary), var(--pg24-primary-2));
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.pg24-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.pg24-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--pg24-text);
  background: var(--pg24-card);
  border-radius: 0.8rem;
  padding: 0.5rem 0.35rem;
  border: 1px solid var(--pg24-border);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  min-height: 44px;
}

.pg24-game-card:hover,
.pg24-game-card:active {
  transform: translateY(-2px);
  border-color: var(--pg24-primary);
  box-shadow: 0 4px 12px rgba(186, 85, 211, 0.25);
}

.pg24-game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 0.35rem;
}

.pg24-game-name {
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.5rem;
}

/* ---------- Card / content box ---------- */
.pg24-card {
  background: var(--pg24-card);
  border: 1px solid var(--pg24-border);
  border-radius: 1rem;
  padding: 1.4rem 1.2rem;
  margin-bottom: 1rem;
}

.pg24-card h2,
.pg24-card h3 { color: var(--pg24-primary-2); margin-bottom: 0.6rem; }
.pg24-card h2 { font-size: 1.7rem; }
.pg24-card h3 { font-size: 1.45rem; }
.pg24-card p { color: var(--pg24-text-muted); font-size: 1.35rem; line-height: 1.6; margin-bottom: 0.5rem; }
.pg24-card ul { padding-left: 1.5rem; }
.pg24-card li { color: var(--pg24-text-muted); margin-bottom: 0.4rem; font-size: 1.35rem; line-height: 1.5; }

/* Inline promotional text link */
.pg24-promo-link {
  color: var(--pg24-gold);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px dashed var(--pg24-gold);
}

/* ---------- Feature grid ---------- */
.pg24-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.pg24-feature {
  background: var(--pg24-card);
  border: 1px solid var(--pg24-border);
  border-radius: 0.8rem;
  padding: 1rem 0.7rem;
  text-align: center;
}

.pg24-feature i { font-size: 2.2rem; color: var(--pg24-primary); margin-bottom: 0.4rem; }
.pg24-feature h3 { font-size: 1.3rem; color: var(--pg24-text); margin-bottom: 0.3rem; }
.pg24-feature p { font-size: 1.15rem; color: var(--pg24-text-muted); line-height: 1.4; }

/* ---------- Testimonials ---------- */
.pg24-testimonial {
  background: var(--pg24-card);
  border-left: 3px solid var(--pg24-gold);
  border-radius: 0.6rem;
  padding: 1rem;
  margin-bottom: 0.7rem;
}

.pg24-testimonial p { font-size: 1.3rem; font-style: italic; color: var(--pg24-text-muted); }
.pg24-testimonial .pg24-author { color: var(--pg24-primary-2); font-weight: 700; margin-top: 0.4rem; font-size: 1.2rem; }

/* ---------- Latest winners ---------- */
.pg24-winner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--pg24-border);
  font-size: 1.25rem;
}

.pg24-winner-row:last-child { border-bottom: none; }
.pg24-winner-name { color: var(--pg24-text); font-weight: 600; }
.pg24-winner-game { color: var(--pg24-text-muted); font-size: 1.1rem; }
.pg24-winner-amount { color: var(--pg24-gold); font-weight: 800; }

/* ---------- Payment methods ---------- */
.pg24-pay-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.pg24-pay-chip {
  background: var(--pg24-card-2);
  border: 1px solid var(--pg24-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.8rem;
  font-size: 1.2rem;
  color: var(--pg24-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pg24-pay-chip i { color: var(--pg24-primary-2); }

/* ---------- App download ---------- */
.pg24-app-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  padding: 1.2rem;
}

.pg24-app-img { width: 100%; max-width: 360px; border-radius: 0.8rem; }

.pg24-app-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }

.pg24-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, var(--pg24-primary), var(--pg24-primary-2));
  color: #fff;
  padding: 0.7rem 1.3rem;
  border-radius: 1.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- FAQ ---------- */
.pg24-faq-item {
  background: var(--pg24-card);
  border: 1px solid var(--pg24-border);
  border-radius: 0.7rem;
  padding: 1rem;
  margin-bottom: 0.7rem;
}

.pg24-faq-item h3 { color: var(--pg24-gold); font-size: 1.35rem; margin-bottom: 0.4rem; }
.pg24-faq-item p { color: var(--pg24-text-muted); font-size: 1.3rem; line-height: 1.55; }

/* ---------- Footer ---------- */
.pg24-footer {
  background: var(--pg24-bg-deep);
  padding: 2rem 1.2rem 1.4rem;
  border-top: 2px solid var(--pg24-primary);
  margin-top: 1.5rem;
}

.pg24-footer-about { color: var(--pg24-text-muted); font-size: 1.25rem; margin-bottom: 1rem; line-height: 1.6; }

.pg24-footer-promo { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }

.pg24-footer-btn {
  background: linear-gradient(90deg, var(--pg24-primary), var(--pg24-primary-2));
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.pg24-footer-links-title { color: var(--pg24-primary-2); font-size: 1.3rem; font-weight: 700; margin: 0.6rem 0 0.4rem; }

.pg24-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem 0.8rem;
  margin-bottom: 1rem;
}

.pg24-footer-links a {
  color: var(--pg24-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.2rem 0;
}

.pg24-footer-links a:hover { color: var(--pg24-primary-2); }

.pg24-copyright {
  text-align: center;
  color: #8a8aa3;
  font-size: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid #2a2a45;
}

/* ---------- Bottom navigation ---------- */
.pg24-bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: var(--pg24-bg-deep);
  border-top: 2px solid var(--pg24-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  max-width: 430px;
  margin: 0 auto;
}

.pg24-navbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--pg24-text-muted);
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  gap: 2px;
  transition: color 0.15s, transform 0.15s;
  font-family: inherit;
}

.pg24-navbtn i { font-size: 22px; }
.pg24-navbtn:active { transform: scale(0.9); }
.pg24-navbtn:hover { color: var(--pg24-primary-2); }
.pg24-navbtn.pg24-navbtn-active { color: var(--pg24-gold); }

.pg24-navbtn-promo {
  background: linear-gradient(180deg, var(--pg24-primary), #7a2fa3);
  color: #fff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin-top: -18px;
  box-shadow: 0 3px 12px rgba(186, 85, 211, 0.55);
  border: 2px solid var(--pg24-bg-deep);
}

.pg24-navbtn-promo i { font-size: 22px; }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .pg24-bottomnav { display: none; }
  .pg24-wrapper { max-width: 768px; box-shadow: 0 0 60px rgba(0, 0, 0, 0.5); }
  main { padding-bottom: 0; }
  .pg24-game-grid { grid-template-columns: repeat(4, 1fr); }
  .pg24-feature-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 360px) {
  .pg24-game-grid { grid-template-columns: repeat(2, 1fr); }
  .pg24-hero h1 { font-size: 2rem; }
}
