/* Aron Play Theme CSS - All classes use pg59- prefix */

/* CSS Variables */
:root {
  /* Brand Colors */
  --pg59-primary: #006400;
  --pg59-secondary: #1A1A2E;
  --pg59-accent: #FF6347;
  --pg59-light: #8FBC8F;
  --pg59-background: #FAFAFA;
  --pg59-dark: #0F0F1A;
  --pg59-text: #333333;
  --pg59-text-light: #666666;
  --pg59-border: #E0E0E0;
  --pg59-shadow: rgba(0, 0, 0, 0.1);
  --pg59-success: #28A745;
  --pg59-warning: #FFC107;
  --pg59-error: #DC3545;

  /* Typography */
  --pg59-font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --pg59-font-size-xs: 0.75rem;   /* 12px */
  --pg59-font-size-sm: 0.875rem;  /* 14px */
  --pg59-font-size-base: 1rem;    /* 16px */
  --pg59-font-size-lg: 1.125rem;  /* 18px */
  --pg59-font-size-xl: 1.25rem;   /* 20px */
  --pg59-font-size-2xl: 1.5rem;   /* 24px */
  --pg59-font-size-3xl: 2rem;     /* 32px */

  /* Spacing */
  --pg59-spacing-xs: 0.25rem;     /* 4px */
  --pg59-spacing-sm: 0.5rem;      /* 8px */
  --pg59-spacing-base: 1rem;      /* 16px */
  --pg59-spacing-lg: 1.5rem;      /* 24px */
  --pg59-spacing-xl: 2rem;        /* 32px */
  --pg59-spacing-2xl: 3rem;       /* 48px */

  /* Layout */
  --pg59-max-width: 430px;
  --pg59-header-height: 60px;
  --pg59-bottom-nav-height: 64px;
  --pg59-border-radius: 0.5rem;
  --pg59-border-radius-lg: 1rem;

  /* Transitions */
  --pg59-transition: all 0.3s ease;
  --pg59-transition-fast: all 0.15s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: var(--pg59-font-primary);
  font-size: var(--pg59-font-size-base);
  line-height: 1.5;
  color: var(--pg59-text);
  background: linear-gradient(135deg, var(--pg59-secondary) 0%, var(--pg59-dark) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
.pg59-h1 {
  font-size: var(--pg59-font-size-2xl);
  font-weight: 700;
  color: var(--pg59-background);
  margin-bottom: var(--pg59-spacing-lg);
  text-align: center;
}

.pg59-h2 {
  font-size: var(--pg59-font-size-xl);
  font-weight: 600;
  color: var(--pg59-light);
  margin-bottom: var(--pg59-spacing-base);
}

.pg59-h3 {
  font-size: var(--pg59-font-size-lg);
  font-weight: 600;
  color: var(--pg59-accent);
  margin-bottom: var(--pg59-spacing-sm);
}

.pg59-text {
  color: var(--pg59-text-light);
  line-height: 1.6;
  margin-bottom: var(--pg59-spacing-base);
}

.pg59-text-sm {
  font-size: var(--pg59-font-size-sm);
  color: var(--pg59-text-light);
}

/* Container and Layout */
.pg59-container {
  max-width: var(--pg59-max-width);
  margin: 0 auto;
  padding: 0 var(--pg59-spacing-base);
}

.pg59-wrapper {
  min-height: 100vh;
  padding-top: var(--pg59-header-height);
  padding-bottom: var(--pg59-bottom-nav-height);
}

.pg59-grid {
  display: grid;
  gap: var(--pg59-spacing-base);
}

.pg59-flex {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg59-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg59-flex-col {
  display: flex;
  flex-direction: column;
}

/* Header */
.pg59-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--pg59-header-height);
  background: linear-gradient(90deg, var(--pg59-primary) 0%, var(--pg59-secondary) 100%);
  border-bottom: 2px solid var(--pg59-accent);
  z-index: 1000;
  box-shadow: 0 2px 10px var(--pg59-shadow);
}

.pg59-header-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pg59-spacing-base);
}

.pg59-logo {
  display: flex;
  align-items: center;
  gap: var(--pg59-spacing-sm);
  text-decoration: none;
  color: var(--pg59-background);
}

.pg59-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--pg59-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--pg59-font-size-sm);
  font-weight: bold;
}

.pg59-logo-text {
  font-size: var(--pg59-font-size-lg);
  font-weight: 700;
  color: var(--pg59-background);
}

.pg59-header-actions {
  display: flex;
  align-items: center;
  gap: var(--pg59-spacing-sm);
}

.pg59-btn {
  padding: var(--pg59-spacing-sm) var(--pg59-spacing-base);
  border: none;
  border-radius: var(--pg59-border-radius);
  font-size: var(--pg59-font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--pg59-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px; /* Touch target size */
  white-space: nowrap;
}

.pg59-btn-primary {
  background: var(--pg59-accent);
  color: white;
}

.pg59-btn-primary:hover {
  background: #E55A3C;
  transform: translateY(-1px);
}

.pg59-btn-secondary {
  background: var(--pg59-secondary);
  color: var(--pg59-background);
  border: 1px solid var(--pg59-accent);
}

.pg59-btn-secondary:hover {
  background: var(--pg59-primary);
  color: white;
}

.pg59-menu-toggle {
  background: none;
  border: none;
  color: var(--pg59-background);
  font-size: var(--pg59-font-size-xl);
  cursor: pointer;
  padding: var(--pg59-spacing-sm);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.pg59-mobile-menu {
  position: fixed;
  top: var(--pg59-header-height);
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: calc(100vh - var(--pg59-header-height));
  background: var(--pg59-secondary);
  border-left: 2px solid var(--pg59-accent);
  transition: var(--pg59-transition);
  z-index: 9999;
  overflow-y: auto;
}

.pg59-mobile-menu.active {
  right: 0;
}

.pg59-menu-overlay {
  position: fixed;
  top: var(--pg59-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--pg59-transition);
  z-index: 9998;
}

.pg59-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pg59-menu-list {
  list-style: none;
  padding: var(--pg59-spacing-base);
}

.pg59-menu-item {
  margin-bottom: var(--pg59-spacing-sm);
}

.pg59-menu-link {
  display: block;
  padding: var(--pg59-spacing-base);
  color: var(--pg59-background);
  text-decoration: none;
  border-radius: var(--pg59-border-radius);
  transition: var(--pg59-transition-fast);
}

.pg59-menu-link:hover {
  background: var(--pg59-primary);
  color: white;
}

/* Carousel */
.pg59-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--pg59-border-radius-lg);
  margin-bottom: var(--pg59-spacing-xl);
  cursor: pointer;
}

.pg59-carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.pg59-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg59-carousel-slide.active {
  opacity: 1;
}

.pg59-carousel-content {
  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: var(--pg59-spacing-lg);
  border-radius: var(--pg59-border-radius);
}

.pg59-carousel-title {
  font-size: var(--pg59-font-size-xl);
  font-weight: 700;
  margin-bottom: var(--pg59-spacing-sm);
}

.pg59-carousel-text {
  font-size: var(--pg59-font-size-sm);
  margin-bottom: var(--pg59-spacing-base);
}

.pg59-carousel-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--pg59-spacing-base);
}

.pg59-carousel-btn {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--pg59-transition-fast);
}

.pg59-carousel-btn:hover {
  background: var(--pg59-accent);
}

.pg59-carousel-indicators {
  position: absolute;
  bottom: var(--pg59-spacing-base);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--pg59-spacing-xs);
}

.pg59-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--pg59-transition-fast);
}

.pg59-carousel-indicator.active {
  background: var(--pg59-accent);
  width: 24px;
  border-radius: 4px;
}

/* Game Grid */
.pg59-game-section {
  margin-bottom: var(--pg59-spacing-2xl);
}

.pg59-game-category {
  margin-bottom: var(--pg59-spacing-xl);
}

.pg59-game-title {
  font-size: var(--pg59-font-size-xl);
  color: var(--pg59-light);
  margin-bottom: var(--pg59-spacing-base);
  text-align: center;
}

.pg59-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: var(--pg59-spacing-sm);
}

.pg59-game-item {
  text-align: center;
  cursor: pointer;
  transition: var(--pg59-transition);
}

.pg59-game-item:hover {
  transform: translateY(-2px);
}

.pg59-game-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--pg59-spacing-xs);
  border-radius: var(--pg59-border-radius);
  overflow: hidden;
  background: var(--pg59-secondary);
  border: 2px solid var(--pg59-accent);
  transition: var(--pg59-transition);
}

.pg59-game-item:hover .pg59-game-icon {
  border-color: var(--pg59-light);
  box-shadow: 0 4px 12px rgba(255, 99, 71, 0.3);
}

.pg59-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg59-game-name {
  font-size: var(--pg59-font-size-xs);
  color: var(--pg59-background);
  line-height: 1.2;
  max-width: 80px;
  margin: 0 auto;
}

/* Content Sections */
.pg59-content-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--pg59-border-radius-lg);
  padding: var(--pg59-spacing-xl);
  margin-bottom: var(--pg59-spacing-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pg59-content-section h2 {
  color: var(--pg59-accent);
  margin-bottom: var(--pg59-spacing-base);
}

.pg59-content-section p {
  margin-bottom: var(--pg59-spacing-base);
}

/* Buttons */
.pg59-cta-button {
  background: linear-gradient(135deg, var(--pg59-accent) 0%, #E55A3C 100%);
  color: white;
  padding: var(--pg59-spacing-base) var(--pg59-spacing-xl);
  border: none;
  border-radius: var(--pg59-border-radius-lg);
  font-size: var(--pg59-font-size-lg);
  font-weight: 700;
  cursor: pointer;
  transition: var(--pg59-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  box-shadow: 0 4px 15px rgba(255, 99, 71, 0.3);
}

.pg59-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 99, 71, 0.4);
}

/* Footer */
.pg59-footer {
  background: var(--pg59-secondary);
  border-top: 2px solid var(--pg59-accent);
  padding: var(--pg59-spacing-2xl) 0 var(--pg59-spacing-base);
  margin-top: var(--pg59-spacing-2xl);
}

.pg59-footer-content {
  margin-bottom: var(--pg59-spacing-xl);
}

.pg59-footer-section {
  margin-bottom: var(--pg59-spacing-lg);
}

.pg59-footer-title {
  font-size: var(--pg59-font-size-lg);
  color: var(--pg59-light);
  margin-bottom: var(--pg59-spacing-base);
}

.pg59-footer-links {
  list-style: none;
}

.pg59-footer-links li {
  margin-bottom: var(--pg59-spacing-xs);
}

.pg59-footer-links a {
  color: var(--pg59-text-light);
  text-decoration: none;
  transition: var(--pg59-transition-fast);
}

.pg59-footer-links a:hover {
  color: var(--pg59-accent);
}

.pg59-partners {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pg59-spacing-base);
  justify-content: center;
  margin: var(--pg59-spacing-xl) 0;
}

.pg59-partner-icon {
  width: 32px;
  height: 32px;
  background: var(--pg59-background);
  border-radius: var(--pg59-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--pg59-font-size-xs);
  color: var(--pg59-text);
}

.pg59-footer-bottom {
  text-align: center;
  padding-top: var(--pg59-spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--pg59-text-light);
  font-size: var(--pg59-font-size-sm);
}

/* Bottom Navigation */
.pg59-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--pg59-bottom-nav-height);
  background: linear-gradient(90deg, var(--pg59-primary) 0%, var(--pg59-secondary) 100%);
  border-top: 2px solid var(--pg59-accent);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: var(--pg59-spacing-sm) 0;
}

.pg59-bottom-nav-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
  transition: var(--pg59-transition-fast);
}

.pg59-bottom-nav-item:hover {
  transform: scale(1.05);
}

.pg59-bottom-nav-item.active .pg59-nav-icon {
  color: var(--pg59-accent);
}

.pg59-bottom-nav-item.active .pg59-nav-text {
  color: var(--pg59-accent);
}

.pg59-nav-icon {
  font-size: 24px;
  color: var(--pg59-background);
  display: block;
  margin-bottom: var(--pg59-spacing-xs);
  transition: var(--pg59-transition-fast);
}

.pg59-nav-text {
  font-size: var(--pg59-font-size-xs);
  color: var(--pg59-background);
  line-height: 1;
  transition: var(--pg59-transition-fast);
}

/* Responsive Design */
@media (max-width: 768px) {
  .pg59-wrapper {
    padding-bottom: var(--pg59-bottom-nav-height);
  }

  .pg59-header-actions .pg59-btn {
    padding: var(--pg59-spacing-xs) var(--pg59-spacing-sm);
    font-size: var(--pg59-font-size-xs);
    min-height: 36px;
  }

  .pg59-carousel {
    height: 160px;
  }

  .pg59-carousel-title {
    font-size: var(--pg59-font-size-lg);
  }

  .pg59-game-grid {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  }

  .pg59-game-icon {
    width: 50px;
    height: 50px;
  }

  .pg59-content-section {
    padding: var(--pg59-spacing-lg);
  }

  .pg59-footer {
    padding-bottom: calc(var(--pg59-bottom-nav-height) + var(--pg59-spacing-base));
  }
}

@media (min-width: 769px) {
  .pg59-bottom-nav {
    display: none;
  }

  .pg59-wrapper {
    padding-bottom: 0;
  }
}

/* Utility Classes */
.pg59-text-center { text-align: center; }
.pg59-text-left { text-align: left; }
.pg59-text-right { text-align: right; }

.pg59-mb-sm { margin-bottom: var(--pg59-spacing-sm); }
.pg59-mb-base { margin-bottom: var(--pg59-spacing-base); }
.pg59-mb-lg { margin-bottom: var(--pg59-spacing-lg); }
.pg59-mb-xl { margin-bottom: var(--pg59-spacing-xl); }

.pg59-mt-sm { margin-top: var(--pg59-spacing-sm); }
.pg59-mt-base { margin-top: var(--pg59-spacing-base); }
.pg59-mt-lg { margin-top: var(--pg59-spacing-lg); }
.pg59-mt-xl { margin-top: var(--pg59-spacing-xl); }

.pg59-hidden { display: none; }
.pg59-visible { display: block; }

/* Loading State */
.pg59-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--pg59-border);
  border-top: 2px solid var(--pg59-accent);
  border-radius: 50%;
  animation: pg59-spin 1s linear infinite;
}

@keyframes pg59-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.pg59-btn:focus,
.pg59-menu-toggle:focus,
.pg59-carousel-btn:focus,
.pg59-bottom-nav-item:focus {
  outline: 2px solid var(--pg59-accent);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --pg59-shadow: rgba(0, 0, 0, 0.3);
    --pg59-border: #999999;
  }
}