/**
 * 3999bd - Core Stylesheet
 * All classes use pgae- prefix for namespace isolation
 * Mobile-first design, max-width 430px, root font-size 62.5%
 */

:root {
  --pgae-primary: #FF1493;
  --pgae-bg: #212F3D;
  --pgae-bg-light: #2C3E50;
  --pgae-bg-dark: #1A252F;
  --pgae-text: #DEB887;
  --pgae-accent: #FF1493;
  --pgae-highlight: #FFBF00;
  --pgae-white: #FFFFFF;
  --pgae-gray: #A0A0A0;
  --pgae-border: #3D5166;
  --pgae-radius: 8px;
  --pgae-radius-lg: 12px;
  --pgae-shadow: 0 2px 8px rgba(0,0,0,0.3);
  --pgae-transition: all 0.3s ease;
}

/* Reset and 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, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--pgae-bg);
  color: var(--pgae-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--pgae-highlight);
  text-decoration: none;
  transition: var(--pgae-transition);
}

a:hover {
  color: var(--pgae-accent);
}

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

/* ========== HEADER ========== */
.pgae-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--pgae-bg-dark);
  z-index: 1000;
  border-bottom: 1px solid var(--pgae-border);
  padding: 0 1rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pgae-header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pgae-header-logo img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.pgae-header-logo span {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pgae-highlight);
  letter-spacing: 0.5px;
}

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

.pgae-header-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--pgae-radius);
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--pgae-transition);
  min-height: 32px;
}

.pgae-btn-register {
  background: var(--pgae-accent);
  color: var(--pgae-white);
}

.pgae-btn-register:hover {
  background: #E0127E;
  transform: scale(1.05);
}

.pgae-btn-login {
  background: transparent;
  color: var(--pgae-highlight);
  border: 1px solid var(--pgae-highlight);
}

.pgae-btn-login:hover {
  background: rgba(255, 191, 0, 0.1);
}

.pgae-menu-toggle {
  background: none;
  border: none;
  color: var(--pgae-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

/* ========== MOBILE MENU ========== */
.pgae-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
}

.pgae-overlay-active {
  display: block;
}

.pgae-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--pgae-bg-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 2rem 1.5rem;
}

.pgae-menu-active {
  right: 0;
}

.pgae-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--pgae-text);
  font-size: 2.2rem;
  cursor: pointer;
}

.pgae-menu-section {
  margin-bottom: 2rem;
}

.pgae-menu-section h3 {
  font-size: 1.3rem;
  color: var(--pgae-highlight);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--pgae-border);
}

.pgae-menu-link {
  display: block;
  padding: 0.7rem 0;
  color: var(--pgae-text);
  font-size: 1.3rem;
  transition: var(--pgae-transition);
}

.pgae-menu-link:hover {
  color: var(--pgae-highlight);
  padding-left: 0.5rem;
}

/* ========== CAROUSEL ========== */
.pgae-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 52px;
  border-radius: 0 0 var(--pgae-radius) var(--pgae-radius);
}

.pgae-carousel-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.pgae-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: pointer;
}

.pgae-slide-active {
  opacity: 1;
}

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

.pgae-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

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

.pgae-dot-active {
  background: var(--pgae-highlight);
  width: 20px;
  border-radius: 4px;
}

/* ========== MAIN CONTENT ========== */
.pgae-main {
  padding: 1rem;
  padding-top: 1.5rem;
}

.pgae-section {
  margin-bottom: 2rem;
}

.pgae-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pgae-highlight);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pgae-accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

h1.pgae-h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--pgae-highlight);
  line-height: 2.2rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

h2.pgae-h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pgae-highlight);
  margin-bottom: 0.8rem;
}

h3.pgae-h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--pgae-text);
  margin-bottom: 0.6rem;
}

p.pgae-text {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--pgae-text);
}

/* ========== GAME GRID ========== */
.pgae-category-label {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pgae-accent);
  margin: 1.5rem 0 0.8rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--pgae-accent);
}

.pgae-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.pgae-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--pgae-transition);
  border-radius: var(--pgae-radius);
  padding: 0.4rem;
  background: var(--pgae-bg-light);
}

.pgae-game-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--pgae-shadow);
  background: var(--pgae-bg-dark);
}

.pgae-game-item img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 0.3rem;
}

.pgae-game-item span {
  font-size: 1rem;
  color: var(--pgae-text);
  text-align: center;
  line-height: 1.2rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ========== CARDS / MODULES ========== */
.pgae-card {
  background: var(--pgae-bg-light);
  border-radius: var(--pgae-radius-lg);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--pgae-border);
}

.pgae-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pgae-highlight);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pgae-card-text {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--pgae-text);
  margin-bottom: 0.6rem;
}

.pgae-promo-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--pgae-accent), #FF69B4);
  color: var(--pgae-white);
  padding: 0.6rem 1.4rem;
  border-radius: var(--pgae-radius);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--pgae-transition);
  text-align: center;
}

.pgae-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 20, 147, 0.5);
}

.pgae-promo-link {
  color: var(--pgae-highlight);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.pgae-promo-link:hover {
  color: var(--pgae-accent);
}

/* ========== FAQ ========== */
.pgae-faq-item {
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--pgae-border);
}

.pgae-faq-q {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--pgae-highlight);
  margin-bottom: 0.4rem;
}

.pgae-faq-a {
  font-size: 1.2rem;
  color: var(--pgae-text);
  line-height: 1.5;
}

/* ========== FEATURES LIST ========== */
.pgae-feature-list {
  list-style: none;
  padding: 0;
}

.pgae-feature-list li {
  padding: 0.6rem 0;
  padding-left: 1.8rem;
  position: relative;
  font-size: 1.2rem;
  color: var(--pgae-text);
  line-height: 1.5;
}

.pgae-feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1rem;
  width: 8px;
  height: 8px;
  background: var(--pgae-accent);
  border-radius: 50%;
}

/* ========== WINNERS TABLE ========== */
.pgae-winners-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.1rem;
}

.pgae-winners-table th {
  background: var(--pgae-bg-dark);
  color: var(--pgae-highlight);
  padding: 0.6rem 0.4rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--pgae-accent);
}

.pgae-winners-table td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--pgae-border);
  color: var(--pgae-text);
}

.pgae-win-amount {
  color: var(--pgae-highlight);
  font-weight: 700;
}

/* ========== BOTTOM NAV ========== */
.pgae-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: var(--pgae-bg-dark);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 1px solid var(--pgae-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.pgae-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 52px;
  background: none;
  border: none;
  color: var(--pgae-gray);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--pgae-transition);
  gap: 2px;
}

.pgae-bottom-nav-btn .material-icons,
.pgae-bottom-nav-btn ion-icon,
.pgae-bottom-nav-btn i {
  font-size: 22px;
}

.pgae-bottom-nav-btn:hover {
  color: var(--pgae-highlight);
}

.pgae-bottom-nav-btn.pgae-nav-active {
  color: var(--pgae-accent);
}

.pgae-bottom-nav-btn.pgae-nav-active span:last-child {
  font-weight: 700;
}

/* ========== FOOTER ========== */
.pgae-footer {
  background: var(--pgae-bg-dark);
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--pgae-border);
  text-align: center;
}

.pgae-footer-brand {
  font-size: 1.2rem;
  color: var(--pgae-text);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.pgae-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1rem;
  margin-bottom: 1rem;
}

.pgae-footer-links a {
  font-size: 1.1rem;
  color: var(--pgae-gray);
  transition: var(--pgae-transition);
}

.pgae-footer-links a:hover {
  color: var(--pgae-highlight);
}

.pgae-footer-copy {
  font-size: 1rem;
  color: var(--pgae-gray);
  padding-top: 0.8rem;
  border-top: 1px solid var(--pgae-border);
}

/* ========== UTILITY ========== */
.pgae-text-center { text-align: center; }
.pgae-mt-1 { margin-top: 1rem; }
.pgae-mb-1 { margin-bottom: 1rem; }
.pgae-mb-2 { margin-bottom: 2rem; }
.pgae-hidden { display: none; }

.pgae-badge {
  display: inline-block;
  background: var(--pgae-accent);
  color: var(--pgae-white);
  font-size: 1rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-weight: 600;
}

.pgae-divider {
  border: none;
  border-top: 1px solid var(--pgae-border);
  margin: 1.5rem 0;
}

/* ========== SCROLL TO TOP ========== */
.pgae-scroll-top {
  position: fixed;
  bottom: 72px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: var(--pgae-accent);
  color: var(--pgae-white);
  border: none;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--pgae-shadow);
  transition: var(--pgae-transition);
}

.pgae-scroll-top:hover {
  background: var(--pgae-highlight);
  color: var(--pgae-bg);
}

/* ========== RESPONSIVE ========== */
@media (min-width: 769px) {
  .pgae-bottom-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .pgae-main {
    padding-bottom: 80px;
  }
}

/* Desktop specific: show wider layout */
@media (min-width: 431px) {
  body {
    border-left: 1px solid var(--pgae-border);
    border-right: 1px solid var(--pgae-border);
  }
}
