/**
 * 9apiso.lat - Main Stylesheet
 * Prefix: pgd2-
 * All classes must use pgd2- prefix for consistency
 * Color Palette: #FFF8DC, #FFA500, #0C0C0C, #DDA0DD, #FAFAFA, #F0E68C
 */

/* CSS Variables with prefix */
:root {
  --pgd2-primary: #FFA500;
  --pgd2-primary-dark: #E09400;
  --pgd2-primary-light: #FFB733;
  --pgd2-bg-dark: #0C0C0C;
  --pgd2-bg-light: #1A1A1A;
  --pgd2-text-light: #FFF8DC;
  --pgd2-text-muted: #FAFAFA;
  --pgd2-accent: #DDA0DD;
  --pgd2-accent-light: #F0E68C;
  --pgd2-border: #333333;
  --pgd2-success: #4CAF50;
  --pgd2-danger: #FF4444;
  --pgd2-warning: #FFC107;

  --pgd2-spacing-xs: 0.25rem;
  --pgd2-spacing-sm: 0.5rem;
  --pgd2-spacing-md: 1rem;
  --pgd2-spacing-lg: 1.5rem;
  --pgd2-spacing-xl: 2rem;
  --pgd2-spacing-2xl: 3rem;

  --pgd2-font-size-sm: 0.75rem;
  --pgd2-font-size-base: 1rem;
  --pgd2-font-size-lg: 1.125rem;
  --pgd2-font-size-xl: 1.5rem;
  --pgd2-font-size-2xl: 2rem;

  --pgd2-border-radius: 0.5rem;
  --pgd2-border-radius-lg: 1rem;
  --pgd2-transition: all 0.3s ease;

  --pgd2-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --pgd2-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --pgd2-shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5rem;
  background-color: var(--pgd2-bg-dark);
  color: var(--pgd2-text-light);
  overflow-x: hidden;
  padding-bottom: 0;
}

body.pgd2-mobile {
  padding-bottom: 8rem;
}

main {
  width: 100%;
  max-width: 43rem;
  margin: 0 auto;
  padding: 7.5rem 1rem 2rem;
}

@media (max-width: 768px) {
  main {
    padding: 6rem 0.75rem 8rem;
  }
}

section {
  margin-bottom: 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--pgd2-text-light);
  line-height: 1.3;
}

h1 {
  font-size: var(--pgd2-font-size-2xl);
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--pgd2-accent);
}

h2 {
  font-size: 1.75rem;
  border-bottom: 2px solid var(--pgd2-primary);
  padding-bottom: 0.75rem;
  margin: 1.5rem 0 1rem;
}

h3 {
  font-size: 1.25rem;
  color: var(--pgd2-primary);
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

a {
  color: var(--pgd2-primary);
  text-decoration: none;
  transition: var(--pgd2-transition);
}

a:hover {
  color: var(--pgd2-primary-light);
  text-decoration: underline;
}

strong {
  font-weight: 700;
  color: var(--pgd2-accent);
}

em {
  font-style: italic;
  color: var(--pgd2-primary-light);
}

/* Header Navigation */
.pgd2-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background-color: var(--pgd2-bg-dark);
  border-bottom: 2px solid var(--pgd2-primary);
  z-index: 1000;
  transition: var(--pgd2-transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pgd2-header.pgd2-header-scrolled {
  box-shadow: var(--pgd2-shadow);
}

.pgd2-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  max-width: 43rem;
  margin: 0 auto;
  width: 100%;
}

.pgd2-header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--pgd2-text-light);
  cursor: pointer;
}

.pgd2-header-logo-icon {
  width: 2.8rem;
  height: 2.8rem;
  background: linear-gradient(135deg, var(--pgd2-primary), var(--pgd2-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.pgd2-header-logo-text {
  line-height: 1.2;
}

.pgd2-header-logo-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--pgd2-primary);
  font-weight: 500;
}

.pgd2-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 768px) {
  .pgd2-header-nav {
    display: none;
  }

  .pgd2-header-actions {
    gap: 0.75rem;
  }
}

@media (min-width: 769px) {
  .pgd2-menu-toggle {
    display: none !important;
  }

  .pgd2-header-nav {
    display: flex;
    gap: 1.5rem;
    margin: 0 1.5rem;
    flex: 1;
  }

  .pgd2-header-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
  }

  .pgd2-header-nav a:hover {
    border-bottom-color: var(--pgd2-primary);
  }
}

/* Menu Toggle Button */
.pgd2-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--pgd2-primary);
  border: none;
  border-radius: var(--pgd2-border-radius);
  cursor: pointer;
  gap: 0.35rem;
  padding: 0.4rem;
  transition: var(--pgd2-transition);
}

.pgd2-menu-toggle:hover {
  background-color: var(--pgd2-primary-dark);
  transform: scale(1.05);
}

.pgd2-menu-toggle span {
  display: block;
  width: 100%;
  height: 0.2rem;
  background-color: white;
  border-radius: 0.1rem;
  transition: var(--pgd2-transition);
}

.pgd2-menu-toggle.pgd2-active span:nth-child(1) {
  transform: rotate(45deg) translateY(0.65rem);
}

.pgd2-menu-toggle.pgd2-active span:nth-child(2) {
  opacity: 0;
}

.pgd2-menu-toggle.pgd2-active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-0.65rem);
}

/* Mobile Menu */
.pgd2-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  animation: pgd2-fade-in 0.3s ease;
}

.pgd2-menu-overlay.pgd2-menu-open {
  display: block;
}

@keyframes pgd2-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.pgd2-mobile-menu {
  position: fixed;
  top: 5.5rem;
  left: -100%;
  width: 100%;
  max-width: 85vw;
  height: calc(100vh - 5.5rem);
  background-color: var(--pgd2-bg-light);
  border-right: 2px solid var(--pgd2-primary);
  z-index: 9998;
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 1rem 0;
}

.pgd2-mobile-menu.pgd2-menu-open {
  left: 0;
}

.pgd2-mobile-menu a,
.pgd2-mobile-menu button {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--pgd2-border);
  color: var(--pgd2-text-light);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--pgd2-transition);
  font-weight: 500;
}

.pgd2-mobile-menu a:hover,
.pgd2-mobile-menu button:hover {
  background-color: var(--pgd2-bg-dark);
  color: var(--pgd2-primary);
  padding-left: 2rem;
}

/* Buttons */
.pgd2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--pgd2-border-radius);
  cursor: pointer;
  transition: var(--pgd2-transition);
  gap: 0.5rem;
  min-height: 2.4rem;
  text-decoration: none;
  white-space: nowrap;
}

.pgd2-btn-primary {
  background: linear-gradient(135deg, var(--pgd2-primary), var(--pgd2-primary-light));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.pgd2-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 165, 0, 0.5);
  background: linear-gradient(135deg, var(--pgd2-primary-dark), var(--pgd2-primary));
}

.pgd2-btn-secondary {
  background-color: var(--pgd2-accent);
  color: var(--pgd2-bg-dark);
  box-shadow: 0 4px 12px rgba(221, 160, 221, 0.3);
}

.pgd2-btn-secondary:hover {
  background-color: #E8B5E8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(221, 160, 221, 0.4);
}

.pgd2-btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  min-height: 2rem;
}

.pgd2-btn-wide {
  width: 100%;
}

/* Game Grid */
.pgd2-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

@media (max-width: 480px) {
  .pgd2-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    gap: 0.5rem;
  }
}

.pgd2-game-item {
  text-align: center;
  cursor: pointer;
  transition: var(--pgd2-transition);
}

.pgd2-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--pgd2-border-radius-lg);
  background-color: var(--pgd2-bg-light);
  border: 2px solid var(--pgd2-border);
  overflow: hidden;
  margin-bottom: 0.5rem;
  transition: var(--pgd2-transition);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pgd2-game-item:hover .pgd2-game-icon {
  border-color: var(--pgd2-primary);
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(255, 165, 0, 0.4);
}

.pgd2-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pgd2-game-name {
  font-size: 0.75rem;
  color: var(--pgd2-text-light);
  line-height: 1.2;
  font-weight: 500;
  word-break: break-word;
  transition: color 0.2s ease;
}

.pgd2-game-item:hover .pgd2-game-name {
  color: var(--pgd2-primary);
}

/* Category Sections */
.pgd2-category {
  margin: 2rem 0;
}

.pgd2-category-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pgd2-primary);
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pgd2-category-icon {
  width: 2rem;
  height: 2rem;
  background: var(--pgd2-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

/* Carousel */
.pgd2-carousel {
  position: relative;
  margin: 1.5rem 0;
  border-radius: var(--pgd2-border-radius-lg);
  overflow: hidden;
  box-shadow: var(--pgd2-shadow);
}

.pgd2-carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.pgd2-carousel-item {
  flex: 0 0 100%;
  aspect-ratio: 16/9;
  scroll-snap-align: start;
  position: relative;
  cursor: pointer;
  transition: var(--pgd2-transition);
}

.pgd2-carousel-item:hover {
  transform: scale(1.02);
}

.pgd2-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pgd2-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.pgd2-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: rgba(255, 248, 220, 0.5);
  cursor: pointer;
  transition: var(--pgd2-transition);
}

.pgd2-dot.pgd2-active {
  background-color: var(--pgd2-primary);
  width: 1.5rem;
  border-radius: 0.4rem;
}

/* Content Sections */
.pgd2-content-section {
  background-color: var(--pgd2-bg-light);
  border: 1px solid var(--pgd2-border);
  border-radius: var(--pgd2-border-radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  transition: var(--pgd2-transition);
}

.pgd2-content-section:hover {
  box-shadow: var(--pgd2-shadow);
  border-color: var(--pgd2-primary);
}

.pgd2-content-section h3 {
  margin-top: 0;
}

.pgd2-content-section p {
  color: var(--pgd2-text-muted);
}

.pgd2-content-list {
  list-style: none;
  margin: 1rem 0;
}

.pgd2-content-list li {
  padding: 0.5rem 0;
  color: var(--pgd2-text-muted);
  border-bottom: 1px solid var(--pgd2-border);
}

.pgd2-content-list li:last-child {
  border-bottom: none;
}

.pgd2-content-list li:before {
  content: "▸ ";
  color: var(--pgd2-primary);
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Footer */
.pgd2-footer {
  background-color: var(--pgd2-bg-light);
  border-top: 2px solid var(--pgd2-primary);
  padding: 2rem 1rem;
  margin-top: 2rem;
  text-align: center;
}

.pgd2-footer-content {
  max-width: 43rem;
  margin: 0 auto;
}

.pgd2-footer-text {
  color: var(--pgd2-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.pgd2-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.pgd2-footer-links a {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--pgd2-border-radius);
  transition: var(--pgd2-transition);
}

.pgd2-footer-links a:hover {
  background-color: var(--pgd2-bg-dark);
  color: var(--pgd2-primary);
}

.pgd2-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.pgd2-partner-icon {
  width: 3rem;
  height: 3rem;
  background-color: var(--pgd2-bg-dark);
  border-radius: var(--pgd2-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: var(--pgd2-transition);
}

.pgd2-partner-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(255, 165, 0, 0.3);
}

.pgd2-partner-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pgd2-copyright {
  font-size: 0.8rem;
  color: var(--pgd2-text-muted);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pgd2-border);
}

/* Bottom Navigation Bar - Mobile Only */
.pgd2-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: 6rem;
  background: linear-gradient(180deg, var(--pgd2-bg-dark), var(--pgd2-bg-light));
  border-top: 2px solid var(--pgd2-primary);
  z-index: 1000;
  justify-content: space-around;
  align-items: flex-end;
  padding-bottom: 0.5rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.5);
}

@media (min-width: 769px) {
  .pgd2-bottom-nav {
    display: none;
  }
}

.pgd2-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem;
  min-width: 5rem;
  min-height: 5.5rem;
  color: var(--pgd2-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--pgd2-transition);
  border-radius: var(--pgd2-border-radius) var(--pgd2-border-radius) 0 0;
}

.pgd2-bottom-nav a:hover,
.pgd2-bottom-nav a.pgd2-nav-active {
  color: var(--pgd2-primary);
  background-color: rgba(255, 165, 0, 0.1);
  transform: scale(1.05);
}

.pgd2-bottom-nav i,
.pgd2-bottom-nav svg {
  font-size: 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
}

/* Container and Wrapper */
.pgd2-container {
  width: 100%;
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.pgd2-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.pgd2-grid {
  display: grid;
  gap: 1rem;
}

.pgd2-flex {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.pgd2-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Badge and Label */
.pgd2-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--pgd2-primary);
  color: white;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pgd2-badge-secondary {
  background-color: var(--pgd2-accent);
  color: var(--pgd2-bg-dark);
}

/* Alerts and Messages */
.pgd2-alert {
  padding: 1rem;
  border-radius: var(--pgd2-border-radius);
  border-left: 4px solid;
  margin: 1rem 0;
}

.pgd2-alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  border-left-color: var(--pgd2-success);
  color: #81C784;
}

.pgd2-alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border-left-color: var(--pgd2-warning);
  color: #FFD54F;
}

.pgd2-alert-danger {
  background-color: rgba(255, 68, 68, 0.1);
  border-left-color: var(--pgd2-danger);
  color: #EF5350;
}

/* Utility Classes */
.pgd2-text-center {
  text-align: center;
}

.pgd2-text-muted {
  color: var(--pgd2-text-muted);
}

.pgd2-text-primary {
  color: var(--pgd2-primary);
}

.pgd2-text-accent {
  color: var(--pgd2-accent);
}

.pgd2-mt-1 { margin-top: 0.5rem; }
.pgd2-mt-2 { margin-top: 1rem; }
.pgd2-mt-3 { margin-top: 1.5rem; }
.pgd2-mt-4 { margin-top: 2rem; }

.pgd2-mb-1 { margin-bottom: 0.5rem; }
.pgd2-mb-2 { margin-bottom: 1rem; }
.pgd2-mb-3 { margin-bottom: 1.5rem; }
.pgd2-mb-4 { margin-bottom: 2rem; }

.pgd2-px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.pgd2-px-2 { padding-left: 1rem; padding-right: 1rem; }
.pgd2-py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.pgd2-py-2 { padding-top: 1rem; padding-bottom: 1rem; }

.pgd2-hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 480px) {
  html {
    font-size: 60%;
  }

  body {
    font-size: 0.95rem;
  }

  main {
    padding: 5.5rem 0.5rem 8rem;
  }

  .pgd2-header-content {
    padding: 0.5rem 0.75rem;
  }

  .pgd2-header-logo-text {
    font-size: 0.9rem;
  }

  .pgd2-content-section {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }
}

/* Print Styles */
@media print {
  .pgd2-header,
  .pgd2-bottom-nav,
  .pgd2-menu-toggle,
  .pgd2-btn {
    display: none !important;
  }

  body {
    background-color: white;
    color: black;
  }
}
