/* phwin77 Main CSS File - Mobile Gaming Platform */
/* Author: phwin77 Development Team */
/* Version: 1.0.0 */

/* CSS Variables */
:root {
  --pgae-primary: #F0E68C;
  --pgae-dark: #0D1117;
  --pgae-secondary: #F4A460;
  --pgae-accent: #BAE1FF;
  --pgae-light: #FFFACD;
  --pgae-gradient: linear-gradient(135deg, #F0E68C 0%, #F4A460 100%);
  --pgae-shadow: 0 4px 20px rgba(13, 17, 23, 0.3);
  --pgae-radius: 12px;
  --pgae-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --pgae-header-height: 64px;
  --pgae-bottom-nav-height: 64px;
  --pgae-max-width: 430px;
  --pgae-spacing: 1rem;
  --pgae-spacing-sm: 0.5rem;
  --pgae-spacing-lg: 2rem;
  --pgae-text-sm: 0.875rem;
  --pgae-text-base: 1rem;
  --pgae-text-lg: 1.125rem;
  --pgae-text-xl: 1.25rem;
  --pgae-text-2xl: 1.5rem;
  --pgae-text-3xl: 1.875rem;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--pgae-text-base);
  line-height: 1.5;
  color: var(--pgae-light);
  background: var(--pgae-dark);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.pgae-mobile-ready {
  max-width: var(--pgae-max-width);
  margin: 0 auto;
  position: relative;
}

body.pgae-menu-lock {
  overflow: hidden;
}

body.pgae-loading {
  opacity: 0.8;
  pointer-events: none;
}

/* Container */
.pgae-container {
  max-width: var(--pgae-max-width);
  margin: 0 auto;
  padding: 0 var(--pgae-spacing);
}

.pgae-wrapper {
  padding-top: var(--pgae-header-height);
  padding-bottom: var(--pgae-bottom-nav-height);
  min-height: 100vh;
}

/* Header */
.pgae-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--pgae-max-width);
  height: var(--pgae-header-height);
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(240, 230, 140, 0.2);
  z-index: 1000;
  transition: var(--pgae-transition);
}

.pgae-header-scrolled {
  box-shadow: var(--pgae-shadow);
  background: rgba(13, 17, 23, 0.98);
}

.pgae-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--pgae-spacing);
}

.pgae-logo {
  display: flex;
  align-items: center;
  gap: var(--pgae-spacing-sm);
  text-decoration: none;
  color: var(--pgae-primary);
  font-weight: 700;
  font-size: var(--pgae-text-lg);
}

.pgae-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.pgae-auth-buttons {
  display: flex;
  gap: var(--pgae-spacing-sm);
}

.pgae-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--pgae-radius);
  font-weight: 600;
  font-size: var(--pgae-text-sm);
  text-decoration: none;
  transition: var(--pgae-transition);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  position: relative;
  overflow: hidden;
}

.pgae-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.pgae-btn:hover::before {
  left: 100%;
}

.pgae-btn-primary {
  background: var(--pgae-gradient);
  color: var(--pgae-dark);
}

.pgae-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--pgae-shadow);
}

.pgae-btn-secondary {
  background: transparent;
  color: var(--pgae-primary);
  border: 1px solid var(--pgae-primary);
}

.pgae-btn-secondary:hover {
  background: var(--pgae-primary);
  color: var(--pgae-dark);
}

.pgae-btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--pgae-text-sm);
}

/* Menu Toggle */
.pgae-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.pgae-menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--pgae-primary);
  margin: 2px 0;
  transition: var(--pgae-transition);
  transform-origin: center;
}

.pgae-menu-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.pgae-menu-active span:nth-child(2) {
  opacity: 0;
}

.pgae-menu-active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation */
.pgae-nav {
  position: fixed;
  top: var(--pgae-header-height);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--pgae-max-width);
  background: rgba(13, 17, 23, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(240, 230, 140, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: var(--pgae-transition);
  z-index: 999;
}

.pgae-nav-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.pgae-nav-list {
  list-style: none;
  padding: var(--pgae-spacing) 0;
}

.pgae-nav-item {
  display: block;
  padding: 1rem var(--pgae-spacing);
  color: var(--pgae-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 230, 140, 0.1);
  transition: var(--pgae-transition);
}

.pgae-nav-item:hover {
  background: rgba(240, 230, 140, 0.1);
  color: var(--pgae-primary);
}

/* Main Content */
.pgae-main {
  flex: 1;
  padding: var(--pgae-spacing);
}

/* Hero Section */
.pgae-hero {
  padding: var(--pgae-spacing-lg) 0;
}

.pgae-hero-title {
  font-size: var(--pgae-text-3xl);
  font-weight: 800;
  color: var(--pgae-primary);
  text-align: center;
  margin-bottom: var(--pgae-spacing-lg);
  line-height: 1.2;
}

/* Carousel */
.pgae-carousel {
  position: relative;
  margin-bottom: var(--pgae-spacing-lg);
  border-radius: var(--pgae-radius);
  overflow: hidden;
  box-shadow: var(--pgae-shadow);
}

.pgae-carousel-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.pgae-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  cursor: pointer;
}

.pgae-carousel-slide.pgae-active {
  opacity: 1;
}

.pgae-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pgae-carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.pgae-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--pgae-transition);
}

.pgae-carousel-dot.pgae-active {
  background: var(--pgae-primary);
}

/* Game Grid */
.pgae-game-section {
  margin-bottom: var(--pgae-spacing-lg);
}

.pgae-section-title {
  font-size: var(--pgae-text-xl);
  font-weight: 700;
  color: var(--pgae-primary);
  margin-bottom: var(--pgae-spacing);
  text-align: center;
}

.pgae-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: var(--pgae-spacing-sm);
  margin-bottom: var(--pgae-spacing);
}

.pgae-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--pgae-spacing-sm);
  border-radius: var(--pgae-radius);
  background: rgba(240, 230, 140, 0.05);
  border: 1px solid rgba(240, 230, 140, 0.1);
  transition: var(--pgae-transition);
  cursor: pointer;
  min-height: 100px;
  position: relative;
  overflow: hidden;
}

.pgae-game-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--pgae-shadow);
  background: rgba(240, 230, 140, 0.1);
}

.pgae-game-item.pgae-hover {
  background: rgba(240, 230, 140, 0.15);
}

.pgae-game-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-bottom: var(--pgae-spacing-sm);
  object-fit: cover;
}

.pgae-game-name {
  font-size: var(--pgae-text-sm);
  font-weight: 600;
  color: var(--pgae-light);
  line-height: 1.2;
}

.pgae-game-item.pgae-loaded {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Content Sections */
.pgae-content-section {
  margin-bottom: var(--pgae-spacing-lg);
  padding: var(--pgae-spacing-lg);
  background: rgba(240, 230, 140, 0.05);
  border-radius: var(--pgae-radius);
  border: 1px solid rgba(240, 230, 140, 0.1);
}

.pgae-content-title {
  font-size: var(--pgae-text-xl);
  font-weight: 700;
  color: var(--pgae-primary);
  margin-bottom: var(--pgae-spacing);
}

.pgae-content-text {
  color: var(--pgae-light);
  line-height: 1.6;
  margin-bottom: var(--pgae-spacing);
}

.pgae-promo-link {
  color: var(--pgae-primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--pgae-transition);
}

.pgae-promo-link:hover {
  color: var(--pgae-secondary);
  text-decoration: underline;
}

/* Footer */
.pgae-footer {
  background: rgba(13, 17, 23, 0.95);
  border-top: 1px solid rgba(240, 230, 140, 0.2);
  padding: var(--pgae-spacing-lg) var(--pgae-spacing);
  margin-top: var(--pgae-spacing-lg);
}

.pgae-footer-content {
  text-align: center;
}

.pgae-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pgae-spacing);
  margin-bottom: var(--pgae-spacing-lg);
}

.pgae-footer-link {
  color: var(--pgae-primary);
  text-decoration: none;
  font-size: var(--pgae-text-sm);
  transition: var(--pgae-transition);
}

.pgae-footer-link:hover {
  color: var(--pgae-secondary);
}

.pgae-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pgae-spacing-sm);
  margin-bottom: var(--pgae-spacing-lg);
}

.pgae-partner-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: var(--pgae-transition);
}

.pgae-partner-logo:hover {
  opacity: 1;
}

.pgae-copyright {
  color: rgba(255, 250, 205, 0.7);
  font-size: var(--pgae-text-sm);
}

/* Bottom Navigation */
.pgae-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--pgae-max-width);
  height: var(--pgae-bottom-nav-height);
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(240, 230, 140, 0.2);
  z-index: 1000;
  transition: var(--pgae-transition);
}

.pgae-bottom-nav-visible {
  box-shadow: 0 -4px 20px rgba(13, 17, 23, 0.3);
}

.pgae-bottom-nav-list {
  display: flex;
  height: 100%;
  list-style: none;
}

.pgae-bottom-nav-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pgae-bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--pgae-light);
  font-size: var(--pgae-text-sm);
  transition: var(--pgae-transition);
  padding: 8px;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
}

.pgae-bottom-nav-link:hover {
  color: var(--pgae-primary);
  background: rgba(240, 230, 140, 0.1);
}

.pgae-bottom-nav-link.pgae-active {
  color: var(--pgae-primary);
}

.pgae-bottom-nav-icon {
  font-size: 20px;
  line-height: 1;
}

.pgae-bottom-nav-text {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

/* Responsive Design */
@media (max-width: 480px) {
  .pgae-container {
    padding: 0 var(--pgae-spacing-sm);
  }
  
  .pgae-main {
    padding: var(--pgae-spacing-sm);
  }
  
  .pgae-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  }
  
  .pgae-game-icon {
    width: 40px;
    height: 40px;
  }
  
  .pgae-hero-title {
    font-size: var(--pgae-text-2xl);
  }
}

@media (max-width: 320px) {
  .pgae-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
  }
  
  .pgae-game-icon {
    width: 36px;
    height: 36px;
  }
}

/* Utility Classes */
.pgae-text-center {
  text-align: center;
}

.pgae-text-left {
  text-align: left;
}

.pgae-text-right {
  text-align: right;
}

.pgae-mb-1 {
  margin-bottom: var(--pgae-spacing-sm);
}

.pgae-mb-2 {
  margin-bottom: var(--pgae-spacing);
}

.pgae-mb-3 {
  margin-bottom: var(--pgae-spacing-lg);
}

.pgae-mt-1 {
  margin-top: var(--pgae-spacing-sm);
}

.pgae-mt-2 {
  margin-top: var(--pgae-spacing);
}

.pgae-mt-3 {
  margin-top: var(--pgae-spacing-lg);
}

.pgae-hidden {
  display: none;
}

.pgae-visible {
  display: block;
}

/* Loading States */
.pgae-loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(240, 230, 140, 0.3);
  border-radius: 50%;
  border-top-color: var(--pgae-primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Accessibility */
.pgae-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus States */
*:focus {
  outline: 2px solid var(--pgae-primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .pgae-header,
  .pgae-bottom-nav,
  .pgae-carousel {
    display: none;
  }
  
  .pgae-wrapper {
    padding: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --pgae-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
} 