/**
 * 1jl ph - Main Stylesheet
 * All classes use pg4a- prefix for namespace isolation
 */

/* 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, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  background-color: #1C2833;
  color: #AFEEEE;
  min-width: 320px;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* CSS Variables */
:root {
  --pg4a-primary: #CD853F;
  --pg4a-secondary: #87CEEB;
  --pg4a-accent: #0097A7;
  --pg4a-bg: #1C2833;
  --pg4a-text: #AFEEEE;
  --pg4a-border: #2C3E50;
}

/* Container */
.pg4a-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.pg4a-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1C2833 0%, #2C3E50 100%);
  padding: 0.8rem 1rem;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pg4a-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pg4a-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #CD853F;
  font-size: 1.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.pg4a-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #CD853F 0%, #87CEEB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1C2833;
  font-size: 1.4rem;
}

.pg4a-header-buttons {
  display: flex;
  gap: 0.5rem;
}

.pg4a-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}

.pg4a-btn-primary {
  background: linear-gradient(135deg, #CD853F 0%, #0097A7 100%);
  color: #FFFFFF;
}

.pg4a-btn-secondary {
  background: transparent;
  color: #87CEEB;
  border: 2px solid #87CEEB;
}

.pg4a-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(205, 133, 63, 0.4);
}

.pg4a-btn:active {
  transform: translateY(0);
}

.pg4a-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.pg4a-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #CD853F;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.pg4a-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #1C2833 0%, #2C3E50 100%);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 5rem 1.5rem 1rem;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
}

.pg4a-mobile-menu.pg4a-active {
  right: 0;
}

.pg4a-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pg4a-menu-overlay.pg4a-active {
  opacity: 1;
  visibility: visible;
}

.pg4a-menu-header {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.pg4a-menu-close {
  background: none;
  border: none;
  color: #AFEEEE;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.pg4a-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pg4a-menu-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  color: #AFEEEE;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1.4rem;
}

.pg4a-menu-link:hover {
  background: rgba(205, 133, 63, 0.1);
  color: #CD853F;
}

.pg4a-menu-link i {
  font-size: 1.6rem;
  color: #87CEEB;
}

/* Main Content */
.pg4a-main {
  padding-top: 70px;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* Carousel */
.pg4a-carousel {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border-radius: 12px;
}

.pg4a-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.pg4a-carousel-slide {
  min-width: 100%;
  height: 100%;
}

.pg4a-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg4a-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.pg4a-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(175, 238, 238, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg4a-carousel-dot.pg4a-active {
  background: #CD853F;
  width: 24px;
  border-radius: 4px;
}

/* Section */
.pg4a-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(44, 62, 80, 0.5);
  border-radius: 12px;
  border: 1px solid #2C3E50;
}

.pg4a-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #CD853F;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pg4a-section-title i {
  color: #87CEEB;
}

.pg4a-section-content {
  color: #AFEEEE;
  line-height: 1.8;
}

/* Game Grid */
.pg4a-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.pg4a-game-item {
  display: block;
  text-decoration: none;
  color: #AFEEEE;
  text-align: center;
  transition: all 0.3s ease;
}

.pg4a-game-item:hover {
  transform: translateY(-4px);
}

.pg4a-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  margin-bottom: 0.4rem;
  border: 2px solid #2C3E50;
  transition: all 0.3s ease;
}

.pg4a-game-item:hover .pg4a-game-icon {
  border-color: #CD853F;
  box-shadow: 0 4px 12px rgba(205, 133, 63, 0.3);
}

.pg4a-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg4a-game-name {
  font-size: 1rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #87CEEB;
}

/* Promo Link */
.pg4a-promo-link {
  display: inline-block;
  color: #CD853F;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #CD853F;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg4a-promo-link:hover {
  color: #87CEEB;
  border-color: #87CEEB;
}

/* Footer */
.pg4a-footer {
  background: linear-gradient(180deg, #1C2833 0%, #0D1318 100%);
  padding: 2rem 1rem 1rem;
  border-top: 2px solid #2C3E50;
}

.pg4a-footer-content {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pg4a-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pg4a-footer-link {
  color: #87CEEB;
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.pg4a-footer-link:hover {
  color: #CD853F;
}

.pg4a-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pg4a-partner-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.pg4a-partner-icon:hover {
  opacity: 1;
}

.pg4a-copyright {
  color: #666;
  font-size: 1.1rem;
  text-align: center;
}

/* Bottom Navigation */
.pg4a-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: linear-gradient(180deg, #2C3E50 0%, #1C2833 100%);
  border-top: 2px solid #CD853F;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.pg4a-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 60px;
  min-height: 56px;
  justify-content: center;
  color: #AFEEEE;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.pg4a-nav-item i {
  font-size: 24px;
  color: #87CEEB;
  transition: all 0.3s ease;
}

.pg4a-nav-item.pg4a-active i {
  color: #CD853F;
}

.pg4a-nav-item.pg4a-active {
  color: #CD853F;
}

.pg4a-nav-item:active i {
  transform: scale(0.9);
}

/* Responsive */
@media (min-width: 769px) {
  .pg4a-bottom-nav {
    display: none;
  }

  .pg4a-main {
    padding-bottom: 2rem;
  }

  .pg4a-menu-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  .pg4a-main {
    padding-bottom: 80px;
  }
}

/* Utilities */
.pg4a-text-center {
  text-align: center;
}

.pg4a-mb-1 {
  margin-bottom: 1rem;
}

.pg4a-mb-2 {
  margin-bottom: 2rem;
}

.pg4a-highlight {
  color: #CD853F;
  font-weight: 700;
}
