/* Boss77 CFD Gaming Platform - Layout CSS */
/* Version: 0b16 | Last Updated: 2025 */
/* CSS Prefix: pg0b- for all classes to avoid conflicts */
/* Color Theme: Cyan/Teal Professional Gaming */

/* CSS Reset and Base Configuration */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px for easy calculations */
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CSS Custom Properties - Boss77 Cyan/Teal Color Scheme */
:root {
  --pg0b-primary: #00FFFF;
  --pg0b-secondary: #0097A7;
  --pg0b-accent: #20B2AA;
  --pg0b-success: #00CED1;
  --pg0b-warning: #FFE135;
  --pg0b-light: #FAFAFA;
  --pg0b-dark: #0C0C0C;
  --pg0b-neutral: #607D8B;
  --pg0b-border: #B0BEC5;
  --pg0b-shadow: rgba(0, 255, 255, 0.1);
  --pg0b-gradient-primary: linear-gradient(135deg, #00FFFF, #0097A7);
  --pg0b-gradient-secondary: linear-gradient(135deg, #0097A7, #20B2AA);
  --pg0b-gradient-accent: linear-gradient(135deg, #20B2AA, #00CED1);
  --pg0b-border-radius: 0.8rem;
  --pg0b-border-radius-sm: 0.4rem;
  --pg0b-border-radius-lg: 1.6rem;
  --pg0b-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --pg0b-shadow-sm: 0 0.1rem 0.3rem rgba(0, 255, 255, 0.12);
  --pg0b-shadow-md: 0 0.4rem 0.6rem rgba(0, 255, 255, 0.15);
  --pg0b-shadow-lg: 0 1rem 1.5rem rgba(0, 255, 255, 0.2);
}

/* Typography Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--pg0b-dark);
  background: var(--pg0b-light);
  overflow-x: hidden;
}

/* Responsive Typography Scale */
.pg0b-h1 {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.6rem;
  color: var(--pg0b-dark);
}

.pg0b-h2 {
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  color: var(--pg0b-dark);
}

.pg0b-h3 {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--pg0b-dark);
}

.pg0b-h4 {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  color: var(--pg0b-dark);
}

/* Container System */
.pg0b-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--pg0b-light);
}

.pg0b-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
  box-sizing: border-box;
}

.pg0b-main {
  flex: 1;
  padding: 2rem 0;
  min-height: calc(100vh - 140px);
}

/* Grid System */
.pg0b-grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.pg0b-grid-1 { grid-template-columns: 1fr; }
.pg0b-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pg0b-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 480px) {
  .pg0b-grid-2,
  .pg0b-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Header Navigation */
.pg0b-header {
  background: var(--pg0b-gradient-primary);
  box-shadow: var(--pg0b-shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--pg0b-transition);
}

.pg0b-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.6rem;
  max-width: 430px;
  margin: 0 auto;
}

.pg0b-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--pg0b-dark);
  font-weight: 700;
  font-size: 1.8rem;
  gap: 0.8rem;
}

.pg0b-logo-img {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  object-fit: cover;
}

.pg0b-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Mobile Hamburger Menu */
.pg0b-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--pg0b-border-radius-sm);
  transition: var(--pg0b-transition);
}

.pg0b-hamburger span {
  display: block;
  width: 2.2rem;
  height: 0.2rem;
  background: var(--pg0b-dark);
  margin: 0.3rem 0;
  transition: var(--pg0b-transition);
  border-radius: 0.1rem;
}

.pg0b-hamburger.pg0b-active span:nth-child(1) {
  transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.pg0b-hamburger.pg0b-active span:nth-child(2) {
  opacity: 0;
}

.pg0b-hamburger.pg0b-active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.7rem, -0.6rem);
}

/* Mobile Menu */
.pg0b-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--pg0b-light);
  box-shadow: var(--pg0b-shadow-lg);
  transition: var(--pg0b-transition);
  z-index: 1001;
  overflow-y: auto;
}

.pg0b-mobile-menu.pg0b-active {
  right: 0;
}

.pg0b-menu-list {
  list-style: none;
  padding: 6rem 0 2rem;
  margin: 0;
}

.pg0b-menu-item {
  border-bottom: 1px solid var(--pg0b-border);
}

.pg0b-nav-link {
  display: flex;
  align-items: center;
  padding: 1.6rem 2rem;
  color: var(--pg0b-dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--pg0b-transition);
  gap: 1rem;
}

.pg0b-nav-link:hover,
.pg0b-nav-link.pg0b-active {
  background: var(--pg0b-primary);
  color: var(--pg0b-dark);
  transform: translateX(0.5rem);
}

.pg0b-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--pg0b-transition);
  z-index: 999;
}

.pg0b-menu-overlay.pg0b-active {
  opacity: 1;
  visibility: visible;
}

/* Button Components */
.pg0b-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  border: none;
  border-radius: var(--pg0b-border-radius);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--pg0b-transition);
  min-height: 4.4rem;
  gap: 0.8rem;
  user-select: none;
  line-height: 1;
}

.pg0b-btn-primary {
  background: var(--pg0b-gradient-primary);
  color: var(--pg0b-dark);
  box-shadow: var(--pg0b-shadow-sm);
}

.pg0b-btn-primary:hover {
  transform: translateY(-0.2rem);
  box-shadow: var(--pg0b-shadow-md);
}

.pg0b-btn-secondary {
  background: var(--pg0b-gradient-secondary);
  color: var(--pg0b-light);
  box-shadow: var(--pg0b-shadow-sm);
}

.pg0b-btn-secondary:hover {
  transform: translateY(-0.2rem);
  box-shadow: var(--pg0b-shadow-md);
}

.pg0b-btn-outline {
  background: transparent;
  border: 2px solid var(--pg0b-primary);
  color: var(--pg0b-primary);
}

.pg0b-btn-outline:hover {
  background: var(--pg0b-primary);
  color: var(--pg0b-dark);
}

.pg0b-btn-sm {
  padding: 0.8rem 1.6rem;
  font-size: 1.2rem;
  min-height: 3.6rem;
}

.pg0b-btn-lg {
  padding: 1.6rem 3.2rem;
  font-size: 1.6rem;
  min-height: 5.2rem;
}

.pg0b-btn:active,
.pg0b-btn.pg0b-touching {
  transform: scale(0.98);
}

/* Card Components */
.pg0b-card {
  background: var(--pg0b-light);
  border-radius: var(--pg0b-border-radius-lg);
  box-shadow: var(--pg0b-shadow-md);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: var(--pg0b-transition);
  border: 1px solid rgba(0, 255, 255, 0.1);
}

.pg0b-card:hover {
  transform: translateY(-0.4rem);
  box-shadow: var(--pg0b-shadow-lg);
}

.pg0b-card-header {
  padding: 2rem 2rem 0;
  border-bottom: 1px solid var(--pg0b-border);
  background: var(--pg0b-light);
}

.pg0b-card-body {
  padding: 2rem;
  line-height: 1.6;
}

.pg0b-gaming-glow {
  box-shadow: 0 0 2rem rgba(0, 255, 255, 0.2);
  border: 2px solid rgba(0, 255, 255, 0.3);
}

.pg0b-gaming-glow:hover {
  box-shadow: 0 0 3rem rgba(0, 255, 255, 0.4);
}

/* Carousel Component */
.pg0b-carousel {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--pg0b-border-radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--pg0b-shadow-lg);
}

.pg0b-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.pg0b-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--pg0b-light);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg0b-slide.pg0b-active {
  opacity: 1;
  transform: translateX(0);
}

.pg0b-slide-content {
  max-width: 90%;
  z-index: 2;
}

.pg0b-slide h1,
.pg0b-slide h2 {
  color: var(--pg0b-light);
  margin-bottom: 1rem;
  text-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.7);
}

.pg0b-slide p {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  text-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.7);
}

.pg0b-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 3;
}

.pg0b-dot {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--pg0b-transition);
}

.pg0b-dot.pg0b-active,
.pg0b-dot:hover {
  background: var(--pg0b-primary);
  transform: scale(1.2);
}

/* Games Grid */
.pg0b-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.6rem;
  margin: 2rem 0;
}

.pg0b-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--pg0b-dark);
  padding: 1.2rem;
  border-radius: var(--pg0b-border-radius);
  background: var(--pg0b-light);
  border: 2px solid transparent;
  transition: var(--pg0b-transition);
  box-shadow: var(--pg0b-shadow-sm);
}

.pg0b-game-item:hover {
  transform: translateY(-0.4rem);
  border-color: var(--pg0b-primary);
  box-shadow: var(--pg0b-shadow-md);
}

.pg0b-game-img {
  width: 8rem;
  height: 8rem;
  border-radius: var(--pg0b-border-radius);
  object-fit: cover;
  margin-bottom: 0.8rem;
  box-shadow: var(--pg0b-shadow-sm);
}

.pg0b-game-name {
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  color: var(--pg0b-dark);
}

/* Statistics Grid */
.pg0b-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  margin: 2rem 0;
}

.pg0b-stat-item {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--pg0b-light);
  border-radius: var(--pg0b-border-radius);
  box-shadow: var(--pg0b-shadow-sm);
  border: 2px solid rgba(0, 255, 255, 0.1);
  transition: var(--pg0b-transition);
}

.pg0b-stat-item:hover {
  transform: translateY(-0.2rem);
  border-color: var(--pg0b-primary);
  box-shadow: var(--pg0b-shadow-md);
}

.pg0b-stat-number {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--pg0b-primary);
  margin-bottom: 0.4rem;
  line-height: 1;
}

.pg0b-stat-label {
  font-size: 1.2rem;
  color: var(--pg0b-neutral);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile Bottom Navigation */
.pg0b-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pg0b-gradient-primary);
  box-shadow: 0 -0.2rem 1rem rgba(0, 255, 255, 0.2);
  z-index: 1000;
  border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.pg0b-bottom-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
  padding: 0.8rem 0;
}

.pg0b-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--pg0b-dark);
  padding: 0.4rem 0.8rem;
  border-radius: var(--pg0b-border-radius-sm);
  transition: var(--pg0b-transition);
  min-width: 4.4rem;
  min-height: 4.4rem;
  justify-content: center;
}

.pg0b-bottom-nav-item:hover,
.pg0b-bottom-nav-item.pg0b-active {
  background: rgba(0, 255, 255, 0.2);
  transform: translateY(-0.2rem);
}

.pg0b-bottom-nav-item i,
.pg0b-bottom-nav-item ion-icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

.pg0b-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
}

/* Footer */
.pg0b-footer {
  background: var(--pg0b-dark);
  color: var(--pg0b-light);
  padding: 3rem 0 8rem;
  margin-top: 4rem;
}

.pg0b-footer-content {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

.pg0b-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg0b-footer-link {
  color: var(--pg0b-light);
  text-decoration: none;
  font-size: 1.4rem;
  padding: 0.8rem 0;
  transition: var(--pg0b-transition);
  border-bottom: 1px solid transparent;
}

.pg0b-footer-link:hover {
  color: var(--pg0b-primary);
  border-bottom-color: var(--pg0b-primary);
}

.pg0b-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--pg0b-neutral);
  line-height: 1.5;
}

.pg0b-copyright p {
  margin-bottom: 0.5rem;
}

/* Utility Classes */
.pg0b-text-center { text-align: center; }
.pg0b-text-left { text-align: left; }
.pg0b-text-right { text-align: right; }

.pg0b-mt-sm { margin-top: 1rem; }
.pg0b-mt-md { margin-top: 2rem; }
.pg0b-mt-lg { margin-top: 3rem; }

.pg0b-mb-sm { margin-bottom: 1rem; }
.pg0b-mb-md { margin-bottom: 2rem; }
.pg0b-mb-lg { margin-bottom: 3rem; }

.pg0b-p-sm { padding: 1rem; }
.pg0b-p-md { padding: 2rem; }
.pg0b-p-lg { padding: 3rem; }

/* Animation Classes */
.pg0b-animate-in {
  animation: pg0bFadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pg0bFadeInUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pg0b-pulse {
  animation: pg0bPulse 2s infinite;
}

@keyframes pg0bPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Scrolled Header State */
.pg0b-header.pg0b-scrolled {
  background: rgba(0, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--pg0b-shadow-lg);
}

/* Progress Bar */
.pg0b-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0.3rem;
  background: var(--pg0b-primary);
  transition: width 0.3s ease;
  z-index: 9999;
}

/* Loading States */
.pg0b-loading {
  position: relative;
  overflow: hidden;
}

.pg0b-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.4), transparent);
  animation: pg0bShimmer 1.5s infinite;
}

@keyframes pg0bShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
  .pg0b-container {
    padding: 0 1.2rem;
  }
  
  .pg0b-h1 { font-size: 2.8rem; }
  .pg0b-h2 { font-size: 2.4rem; }
  .pg0b-h3 { font-size: 2rem; }
  
  .pg0b-card-body {
    padding: 1.6rem;
  }
  
  .pg0b-games-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.2rem;
  }
  
  .pg0b-game-img {
    width: 6rem;
    height: 6rem;
  }
  
  .pg0b-stats-grid {
    gap: 1.2rem;
  }
  
  .pg0b-stat-item {
    padding: 1.6rem 0.8rem;
  }
  
  .pg0b-stat-number {
    font-size: 2.4rem;
  }
  
  .pg0b-btn {
    padding: 1rem 2rem;
    font-size: 1.3rem;
  }
  
  .pg0b-btn-lg {
    padding: 1.4rem 2.8rem;
    font-size: 1.5rem;
  }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .pg0b-game-img,
  .pg0b-logo-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --pg0b-light: #1a1a1a;
    --pg0b-dark: #f5f5f5;
    --pg0b-border: #404040;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .pg0b-carousel .pg0b-slide {
    transition: none;
  }
}