/**
 * ph987 - Theme Stylesheet
 * Mobile-first gaming platform design
 * All classes use pg22- prefix for namespace isolation
 */

/* CSS Variables */
:root {
  --pg22-primary: #FF5722;
  --pg22-secondary: #FFCCCB;
  --pg22-highlight: #FF8A80;
  --pg22-muted: #BDC3C7;
  --pg22-bg: #262626;
  --pg22-bg-card: #2e2e2e;
  --pg22-bg-dark: #1a1a1a;
  --pg22-text: #FFCCCB;
  --pg22-text-light: #ffffff;
  --pg22-radius: 8px;
  --pg22-radius-lg: 12px;
  --pg22-shadow: 0 2px 8px rgba(0,0,0,0.3);
  --pg22-transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--pg22-bg);
  color: var(--pg22-text);
  line-height: 1.5;
  max-width: 430px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Links */
a { color: var(--pg22-primary); text-decoration: none; transition: var(--pg22-transition); }
a:hover { color: var(--pg22-highlight); }

/* Header */
.pg22-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 56px;
  background: var(--pg22-bg-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,87,34,0.3);
}
.pg22-header-left { display: flex; align-items: center; gap: 8px; }
.pg22-logo { width: 28px; height: 28px; border-radius: 4px; }
.pg22-site-name { color: var(--pg22-primary); font-size: 1.6rem; font-weight: 700; }
.pg22-header-right { display: flex; align-items: center; gap: 8px; }
.pg22-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--pg22-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--pg22-transition);
  min-height: 32px;
}
.pg22-btn-register {
  background: var(--pg22-primary);
  color: #fff;
}
.pg22-btn-register:hover { background: #e64a19; }
.pg22-btn-login {
  background: transparent;
  color: var(--pg22-primary);
  border: 1px solid var(--pg22-primary);
}
.pg22-btn-login:hover { background: rgba(255,87,34,0.1); }
.pg22-hamburger {
  background: none;
  border: none;
  color: var(--pg22-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* Mobile Menu */
.pg22-menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--pg22-transition);
}
.pg22-overlay-active { opacity: 1; visibility: visible; }
.pg22-mobile-menu {
  position: fixed;
  top: 0; right: -280px;
  width: 260px;
  height: 100%;
  background: var(--pg22-bg-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}
.pg22-menu-active { right: 0; }
.pg22-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.pg22-menu-title { color: var(--pg22-primary); font-size: 1.8rem; font-weight: 700; }
.pg22-menu-close { background: none; border: none; color: var(--pg22-text); font-size: 2.4rem; cursor: pointer; }
.pg22-menu-list { list-style: none; }
.pg22-menu-item {
  border-bottom: 1px solid rgba(255,87,34,0.15);
}
.pg22-menu-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  color: var(--pg22-text);
  font-size: 1.4rem;
  transition: var(--pg22-transition);
}
.pg22-menu-item a:hover { color: var(--pg22-primary); padding-left: 14px; }
.pg22-menu-item .material-icons { font-size: 20px; color: var(--pg22-primary); }

/* Main Content */
.pg22-main { padding-top: 56px; }
@media (max-width: 768px) {
  .pg22-main { padding-bottom: 80px; }
}

/* Carousel */
.pg22-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 var(--pg22-radius-lg) var(--pg22-radius-lg);
}
.pg22-carousel-track { position: relative; width: 100%; height: 200px; }
.pg22-carousel-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}
.pg22-slide-active { opacity: 1; }
.pg22-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.pg22-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.pg22-carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
}
.pg22-dot-active { background: var(--pg22-primary); }

/* Sections */
.pg22-section { padding: 16px 12px; }
.pg22-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg22-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg22-section-title .material-icons { font-size: 22px; }

/* Game Grid */
.pg22-category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pg22-highlight);
  margin: 16px 0 10px;
  padding-left: 4px;
  border-left: 3px solid var(--pg22-primary);
  padding-left: 8px;
}
.pg22-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.pg22-game-item {
  text-align: center;
  cursor: pointer;
  transition: var(--pg22-transition);
  border-radius: var(--pg22-radius);
  padding: 6px 4px;
}
.pg22-game-item:hover { background: var(--pg22-bg-card); transform: scale(1.03); }
.pg22-game-item img {
  width: 64px; height: 64px;
  border-radius: var(--pg22-radius);
  margin-bottom: 4px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.pg22-game-name {
  font-size: 1.1rem;
  color: var(--pg22-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Content Modules */
.pg22-card {
  background: var(--pg22-bg-card);
  border-radius: var(--pg22-radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,87,34,0.15);
}
.pg22-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pg22-primary);
  margin-bottom: 10px;
}
.pg22-card p {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--pg22-secondary);
  margin-bottom: 8px;
}

/* Promo Link */
.pg22-promo-link {
  color: var(--pg22-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--pg22-transition);
}
.pg22-promo-link:hover { color: var(--pg22-highlight); }

/* CTA Button */
.pg22-cta-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--pg22-primary), #ff7043);
  color: #fff;
  border: none;
  border-radius: var(--pg22-radius-lg);
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: var(--pg22-transition);
  margin: 12px 0;
}
.pg22-cta-btn:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(255,87,34,0.4); }

/* FAQ */
.pg22-faq-item { margin-bottom: 10px; }
.pg22-faq-q {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--pg22-highlight);
  margin-bottom: 4px;
}
.pg22-faq-a { font-size: 1.2rem; color: var(--pg22-secondary); line-height: 1.5; }

/* Testimonials */
.pg22-testimonial {
  background: var(--pg22-bg-card);
  border-radius: var(--pg22-radius);
  padding: 12px;
  margin-bottom: 8px;
  border-left: 3px solid var(--pg22-primary);
}
.pg22-testimonial-name { font-size: 1.2rem; color: var(--pg22-primary); font-weight: 600; }
.pg22-testimonial-text { font-size: 1.2rem; color: var(--pg22-secondary); margin-top: 4px; }

/* Winners */
.pg22-winner-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,87,34,0.1);
  font-size: 1.2rem;
}
.pg22-winner-name { color: var(--pg22-primary); font-weight: 600; }
.pg22-winner-amount { color: var(--pg22-highlight); font-weight: 700; }
.pg22-winner-game { color: var(--pg22-muted); }

/* Payment */
.pg22-payment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.pg22-payment-item {
  background: var(--pg22-bg-card);
  padding: 8px 14px;
  border-radius: var(--pg22-radius);
  font-size: 1.2rem;
  color: var(--pg22-secondary);
  border: 1px solid rgba(255,87,34,0.2);
}

/* Features */
.pg22-feature-list { list-style: none; }
.pg22-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 1.3rem;
  color: var(--pg22-secondary);
}
.pg22-feature-icon { color: var(--pg22-primary); font-size: 18px; flex-shrink: 0; margin-top: 2px; }

/* Footer */
.pg22-footer {
  background: var(--pg22-bg-dark);
  padding: 20px 12px;
  border-top: 1px solid rgba(255,87,34,0.2);
}
.pg22-footer-brand { font-size: 1.3rem; color: var(--pg22-muted); line-height: 1.5; margin-bottom: 12px; }
.pg22-footer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pg22-footer-links a {
  font-size: 1.2rem;
  color: var(--pg22-secondary);
  padding: 4px 8px;
  background: var(--pg22-bg-card);
  border-radius: var(--pg22-radius);
  transition: var(--pg22-transition);
}
.pg22-footer-links a:hover { color: var(--pg22-primary); }
.pg22-footer-copy { font-size: 1.1rem; color: var(--pg22-muted); text-align: center; }

/* Bottom Navigation */
.pg22-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: var(--pg22-bg-dark);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 1px solid rgba(255,87,34,0.3);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}
.pg22-bottom-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 52px;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--pg22-transition);
  padding: 4px;
}
.pg22-bottom-btn:hover { transform: scale(1.1); }
.pg22-bottom-btn:active { transform: scale(0.95); }
.pg22-bottom-btn i,
.pg22-bottom-btn .material-icons {
  font-size: 22px;
  color: var(--pg22-muted);
  transition: var(--pg22-transition);
}
.pg22-bottom-btn span {
  font-size: 1rem;
  color: var(--pg22-muted);
  margin-top: 2px;
  transition: var(--pg22-transition);
}
.pg22-bottom-btn:hover i,
.pg22-bottom-btn:hover .material-icons,
.pg22-bottom-btn:hover span { color: var(--pg22-primary); }
.pg22-bottom-active i,
.pg22-bottom-active .material-icons,
.pg22-bottom-active span { color: var(--pg22-primary); }

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .pg22-bottom-nav { display: none; }
  .pg22-header { max-width: 100%; }
  body { max-width: 100%; }
}

/* Internal Link */
.pg22-internal-link {
  color: var(--pg22-highlight);
  text-decoration: underline;
  font-weight: 500;
}

/* Utility */
.pg22-text-center { text-align: center; }
.pg22-mt-8 { margin-top: 8px; }
.pg22-mt-16 { margin-top: 16px; }
.pg22-mb-8 { margin-bottom: 8px; }
.pg22-mb-16 { margin-bottom: 16px; }
