/**
 * Wild Gate - Design System Stylesheet
 * All classes use 'pg01-' prefix for namespace isolation
 */

/* CSS Custom Properties (Color Palette) */
:root {
  --pg01-primary: #AFEEEE;
  --pg01-secondary: #B0E0E6;
  --pg01-bg-dark: #1C2833;
  --pg01-bg-light: #F0F8FF;
  --pg01-accent: #D2B48C;

  --pg01-text-dark: #1C2833;
  --pg01-text-light: #F0F8FF;
  --pg01-text-muted: #6B7A8F;

  --pg01-success: #28A745;
  --pg01-warning: #FFC107;
  --pg01-danger: #DC3545;
  --pg01-info: #17A2B8;

  --pg01-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --pg01-border-radius: 8px;
  --pg01-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --pg01-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
  --pg01-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.2);
  --pg01-transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--pg01-font-family);
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--pg01-text-dark);
  background: var(--pg01-bg-light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--pg01-bg-dark);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1.6rem; }
h6 { font-size: 1.4rem; }

p {
  margin-bottom: 1rem;
  color: var(--pg01-text-dark);
}

a {
  color: var(--pg01-bg-dark);
  text-decoration: none;
  transition: var(--pg01-transition);
}

a:hover {
  color: var(--pg01-primary);
}

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

/* Header Styles */
.pg01-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--pg01-bg-dark);
  color: var(--pg01-text-light);
  z-index: 1000;
  box-shadow: var(--pg01-shadow-md);
  transition: var(--pg01-transition);
}

.pg01-header-scrolled {
  box-shadow: var(--pg01-shadow-lg);
}

.pg01-header-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg01-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg01-text-light);
}

.pg01-logo-icon {
  width: 32px;
  height: 32px;
}

.pg01-header-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.pg01-btn {
  padding: 0.6rem 1.5rem;
  border-radius: var(--pg01-border-radius);
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--pg01-transition);
  border: none;
  display: inline-block;
}

.pg01-btn-primary {
  background: var(--pg01-primary);
  color: var(--pg01-bg-dark);
}

.pg01-btn-primary:hover {
  background: var(--pg01-secondary);
  transform: translateY(-2px);
  box-shadow: var(--pg01-shadow-md);
}

.pg01-btn-outline {
  background: transparent;
  color: var(--pg01-primary);
  border: 2px solid var(--pg01-primary);
}

.pg01-btn-outline:hover {
  background: var(--pg01-primary);
  color: var(--pg01-bg-dark);
}

.pg01-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--pg01-text-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Menu */
.pg01-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--pg01-bg-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: var(--pg01-shadow-lg);
}

.pg01-menu-open {
  right: 0 !important;
}

.pg01-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pg01-menu-close {
  background: none;
  border: none;
  color: var(--pg01-text-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
}

.pg01-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pg01-menu-nav a {
  color: var(--pg01-text-light);
  padding: 1rem;
  border-radius: var(--pg01-border-radius);
  transition: var(--pg01-transition);
}

.pg01-menu-nav a:hover {
  background: rgba(175, 238, 238, 0.1);
  color: var(--pg01-primary);
}

.pg01-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pg01-menu-open + .pg01-menu-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Main Content */
.pg01-main {
  padding-top: 80px;
  padding-bottom: 80px;
  min-height: 100vh;
}

.pg01-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.pg01-section {
  padding: 3rem 0;
}

/* Carousel */
.pg01-carousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  overflow: hidden;
  border-radius: var(--pg01-border-radius);
  box-shadow: var(--pg01-shadow-lg);
}

.pg01-carousel-slide {
  display: none;
  width: 100%;
}

.pg01-carousel-slide:first-child {
  display: block;
}

.pg01-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.pg01-carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
}

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

.pg01-carousel-dot.pg01-active {
  background: var(--pg01-primary);
  width: 30px;
  border-radius: 6px;
}

/* Game Grid */
.pg01-games-section {
  padding: 3rem 0;
}

.pg01-section-title {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 2rem;
  color: var(--pg01-bg-dark);
}

.pg01-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.pg01-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--pg01-transition);
}

.pg01-game-item:hover {
  transform: translateY(-5px);
}

.pg01-game-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--pg01-border-radius);
  overflow: hidden;
  margin-bottom: 0.8rem;
  box-shadow: var(--pg01-shadow-sm);
  transition: var(--pg01-transition);
}

.pg01-game-item:hover .pg01-game-icon {
  box-shadow: var(--pg01-shadow-md);
}

.pg01-game-name {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--pg01-bg-dark);
  line-height: 1.3;
}

/* Content Cards */
.pg01-card {
  background: white;
  border-radius: var(--pg01-border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--pg01-shadow-sm);
  transition: var(--pg01-transition);
}

.pg01-card:hover {
  box-shadow: var(--pg01-shadow-md);
}

.pg01-card-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--pg01-bg-dark);
}

.pg01-card-content {
  color: var(--pg01-text-dark);
  line-height: 1.6;
}

/* Footer */
.pg01-footer {
  background: var(--pg01-bg-dark);
  color: var(--pg01-text-light);
  padding: 3rem 0 2rem;
}

.pg01-footer-content {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.pg01-footer-section {
  padding: 1rem;
}

.pg01-footer-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--pg01-primary);
}

.pg01-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.pg01-footer-links a {
  color: var(--pg01-text-light);
  transition: var(--pg01-transition);
}

.pg01-footer-links a:hover {
  color: var(--pg01-primary);
  padding-left: 0.5rem;
}

.pg01-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
}

.pg01-partner-logo {
  width: 60px;
  height: 40px;
  object-fit: contain;
  opacity: 0.8;
  transition: var(--pg01-transition);
}

.pg01-partner-logo:hover {
  opacity: 1;
}

.pg01-copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--pg01-text-muted);
  font-size: 1.2rem;
}

/* Mobile Bottom Navigation */
.pg01-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pg01-bg-dark);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 0 0.5rem;
}

.pg01-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  color: var(--pg01-text-muted);
  transition: var(--pg01-transition);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0.5rem;
  border-radius: var(--pg01-border-radius);
}

.pg01-nav-item:hover {
  color: var(--pg01-primary);
  background: rgba(175, 238, 238, 0.1);
  transform: scale(1.05);
}

.pg01-nav-item.pg01-nav-active {
  color: var(--pg01-primary);
}

.pg01-nav-icon {
  font-size: 24px;
  margin-bottom: 0.3rem;
}

.pg01-nav-label {
  font-size: 10px;
  font-weight: 500;
}

/* Utility Classes */
.pg01-text-center {
  text-align: center;
}

.pg01-mt-1 { margin-top: 1rem; }
.pg01-mt-2 { margin-top: 2rem; }
.pg01-mt-3 { margin-top: 3rem; }

.pg01-mb-1 { margin-bottom: 1rem; }
.pg01-mb-2 { margin-bottom: 2rem; }
.pg01-mb-3 { margin-bottom: 3rem; }

.pg01-p-1 { padding: 1rem; }
.pg01-p-2 { padding: 2rem; }
.pg01-p-3 { padding: 3rem; }

.pg01-highlight {
  color: var(--pg01-primary);
  font-weight: 600;
}

.pg01-link {
  color: var(--pg01-bg-dark);
  font-weight: 600;
  text-decoration: underline;
}

.pg01-link:hover {
  color: var(--pg01-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .pg01-main {
    padding-bottom: 80px;
  }

  .pg01-menu-toggle {
    display: block;
  }

  .pg01-header-buttons .pg01-btn {
    display: none;
  }

  .pg01-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
  }

  .pg01-game-icon {
    width: 60px;
    height: 60px;
  }

  .pg01-game-name {
    font-size: 1rem;
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.7rem; }
}

@media (min-width: 769px) {
  .pg01-bottom-nav {
    display: none;
  }

  .pg01-main {
    padding-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .pg01-footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Animation */
@keyframes pg01-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pg01-fade-in {
  animation: pg01-fadeIn 0.5s ease forwards;
}

/* Page Load State */
.pg01-page-loaded .pg01-fade-in {
  animation-play-state: running;
}
