/**
 * JL 29 - Mobile Gaming Platform
 * Main Stylesheet
 * All classes use 'pg77-' prefix for namespace isolation
 */

/* CSS Variables - Color Palette */
:root {
  --pg77-primary: #00695C;
  --pg77-secondary: #00B8D4;
  --pg77-accent: #B2DFDB;
  --pg77-dark: #141414;
  --pg77-light: #ffffff;
  --pg77-gray: #666666;
  --pg77-border: #e0e0e0;
  --pg77-bg-light: #f5f5f5;
  --pg77-overlay: rgba(0, 0, 0, 0.8);
  --pg77-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  --pg77-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--pg77-dark);
  background-color: var(--pg77-bg-light);
  min-width: 320px;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  padding-bottom: 80px; /* Space for bottom nav on mobile */
}

/* Container */
.pg77-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.pg77-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--pg77-primary) 0%, var(--pg77-secondary) 100%);
  color: var(--pg77-light);
  padding: 1rem;
  z-index: 1000;
  box-shadow: var(--pg77-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.pg77-header-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg77-light);
}

.pg77-header-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.pg77-header-logo span {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg77-light);
}

.pg77-header-actions {
  display: flex;
  gap: 0.8rem;
}

.pg77-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.pg77-btn-primary {
  background-color: var(--pg77-light);
  color: var(--pg77-primary);
}

.pg77-btn-secondary {
  background-color: transparent;
  color: var(--pg77-light);
  border: 2px solid var(--pg77-light);
}

.pg77-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--pg77-shadow);
}

.pg77-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--pg77-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Menu */
.pg77-mobile-menu {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background-color: var(--pg77-dark);
  padding: 2rem 1rem;
  z-index: 9999;
  transition: left 0.3s ease;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}

.pg77-mobile-menu.pg77-menu-open {
  left: 0;
}

.pg77-menu-link {
  display: block;
  padding: 1rem;
  color: var(--pg77-light);
  text-decoration: none;
  font-size: 1.6rem;
  border-bottom: 1px solid var(--pg77-border);
  transition: background-color 0.3s ease;
}

.pg77-menu-link:hover {
  background-color: var(--pg77-primary);
}

/* Main Content */
.pg77-main {
  margin-top: 80px;
  padding: 1rem;
}

/* Carousel */
.pg77-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--pg77-shadow);
}

.pg77-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg77-carousel-slide.pg77-slide-active {
  opacity: 1;
}

.pg77-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* Section Styles */
.pg77-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background-color: var(--pg77-light);
  border-radius: 12px;
  box-shadow: var(--pg77-shadow);
}

.pg77-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pg77-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.pg77-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--pg77-primary), var(--pg77-secondary));
  border-radius: 2px;
}

/* Game Grid */
.pg77-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.pg77-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--pg77-dark);
  transition: transform 0.3s ease;
}

.pg77-game-item:hover {
  transform: scale(1.05);
}

.pg77-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: var(--pg77-shadow);
}

.pg77-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg77-game-name {
  font-size: 1rem;
  text-align: center;
  line-height: 1.2;
  color: var(--pg77-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Styles */
.pg77-card {
  background-color: var(--pg77-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--pg77-shadow);
}

.pg77-card-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--pg77-primary);
  margin-bottom: 1rem;
}

.pg77-card-content {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--pg77-gray);
}

/* Link Styles */
.pg77-link {
  color: var(--pg77-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.pg77-link:hover {
  color: var(--pg77-secondary);
  text-decoration: underline;
}

/* Bottom Navigation (Mobile Only) */
.pg77-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--pg77-dark) 0%, var(--pg77-primary) 100%);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem;
  z-index: 1000;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  height: 60px;
}

.pg77-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--pg77-accent);
  min-width: 60px;
  min-height: 60px;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 0.3rem;
}

.pg77-bottom-nav a:hover,
.pg77-bottom-nav a.pg77-nav-active {
  background-color: rgba(178, 223, 219, 0.2);
  color: var(--pg77-light);
  transform: scale(1.1);
}

.pg77-bottom-nav-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.pg77-bottom-nav-text {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

/* Footer */
.pg77-footer {
  background-color: var(--pg77-dark);
  color: var(--pg77-light);
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.pg77-footer-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--pg77-accent);
  text-align: center;
}

.pg77-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg77-footer-links a {
  color: var(--pg77-accent);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.pg77-footer-links a:hover {
  color: var(--pg77-secondary);
}

.pg77-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg77-partner-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.pg77-partner-logo:hover {
  opacity: 1;
}

.pg77-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--pg77-gray);
  padding-top: 1rem;
  border-top: 1px solid var(--pg77-border);
}

/* Desktop Styles - Hide bottom nav on desktop */
@media (min-width: 769px) {
  .pg77-bottom-nav {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  .pg77-menu-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .pg77-menu-toggle {
    display: block;
  }

  .pg77-header-actions {
    display: none;
  }
}

/* Utility Classes */
.pg77-text-center {
  text-align: center;
}

.pg77-mt-1 {
  margin-top: 1rem;
}

.pg77-mb-1 {
  margin-bottom: 1rem;
}

.pg77-mb-2 {
  margin-bottom: 2rem;
}

/* Highlight Links */
.pg77-promo-link {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--pg77-primary) 0%, var(--pg77-secondary) 100%);
  color: var(--pg77-light);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--pg77-shadow);
  margin: 0.5rem;
}

.pg77-promo-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--pg77-shadow-lg);
}

/* Responsive Adjustments */
@media (max-width: 380px) {
  .pg77-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pg77-section-title {
    font-size: 1.8rem;
  }
}
