/* PH778 CSS - Gaming Platform Excellence
   Class prefix: pg62-
   Color scheme: #1A1A1A (dark), #FFAA00 (orange accent) */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --pg62-primary: #1A1A1A;
  --pg62-accent: #FFAA00;
  --pg62-bg: #1A1A1A;
  --pg62-text: #FFFFFF;
  --pg62-text-light: #CCCCCC;
  --pg62-border: #333333;
  --pg62-shadow: rgba(255, 170, 0, 0.2);
}

.pg62-wrapper {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--pg62-text);
  background: var(--pg62-bg);
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  min-height: 100vh;
}

.pg62-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--pg62-text-light);
}

/* Header styles */
.pg62-header {
  background: linear-gradient(135deg, var(--pg62-primary) 0%, #2A2A2A 100%);
  padding: 0.75rem 0;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--pg62-shadow);
  border-bottom: 2px solid var(--pg62-accent);
}

.pg62-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pg62-logo {
  display: flex;
  align-items: center;
  color: var(--pg62-accent);
  font-weight: bold;
  font-size: 1.1rem;
}

.pg62-logo-img {
  width: 32px;
  height: 32px;
  margin-right: 0.5rem;
  border-radius: 50%;
}

.pg62-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Button styles */
.pg62-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  gap: 0.375rem;
  touch-action: manipulation;
}

.pg62-btn-primary {
  background: linear-gradient(135deg, var(--pg62-accent) 0%, #FF8800 100%);
  color: var(--pg62-primary);
  box-shadow: 0 4px 15px var(--pg62-shadow);
}

.pg62-btn-primary:hover, .pg62-btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--pg62-shadow);
}

.pg62-btn-secondary {
  background: linear-gradient(135deg, #333333 0%, #555555 100%);
  color: var(--pg62-text);
  border: 1px solid var(--pg62-accent);
}

.pg62-btn-outline {
  background: transparent;
  color: var(--pg62-accent);
  border: 1px solid var(--pg62-accent);
}

.pg62-btn-accent {
  background: linear-gradient(135deg, var(--pg62-accent) 0%, #CC8800 100%);
  color: var(--pg62-primary);
}

.pg62-btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.pg62-btn-large {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* Hamburger menu */
.pg62-hamburger {
  display: flex;
  flex-direction: column;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
}

.pg62-hamburger span {
  width: 100%;
  height: 2px;
  background: var(--pg62-accent);
  margin: 2px 0;
  transition: 0.3s;
  border-radius: 1px;
}

.pg62-hamburger-active span:nth-child(1) {
  transform: rotate(-45deg) translate(-4px, 4px);
}

.pg62-hamburger-active span:nth-child(2) {
  opacity: 0;
}

.pg62-hamburger-active span:nth-child(3) {
  transform: rotate(45deg) translate(-4px, -4px);
}

/* Mobile navigation */
.pg62-mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, var(--pg62-primary) 0%, #2A2A2A 100%);
  z-index: 1001;
  transition: right 0.3s ease;
  padding-top: 4rem;
  border-left: 2px solid var(--pg62-accent);
}

.pg62-nav-open {
  right: 0;
}

.pg62-nav-menu {
  list-style: none;
  padding: 1rem;
}

.pg62-nav-item {
  margin-bottom: 0.5rem;
}

.pg62-nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  color: var(--pg62-text);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease;
  gap: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.pg62-nav-link:hover {
  background: rgba(255, 170, 0, 0.1);
  color: var(--pg62-accent);
  border-color: var(--pg62-accent);
}

.pg62-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(26, 26, 26, 0.8);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pg62-overlay-active {
  opacity: 1;
  visibility: visible;
}

.pg62-nav-locked {
  overflow: hidden;
}

/* Main content */
.pg62-main {
  margin-top: 4rem;
  padding-bottom: 5rem;
}

.pg62-section {
  padding: 2rem 0;
}

.pg62-section-title {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--pg62-text);
  position: relative;
}

.pg62-section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, var(--pg62-accent), #FF8800);
}

.pg62-bg-surface {
  background: linear-gradient(135deg, #222222 0%, var(--pg62-primary) 100%);
}

/* Hero section */
.pg62-hero {
  background: linear-gradient(135deg, var(--pg62-primary) 0%, #333333 50%, var(--pg62-accent) 100%);
  color: var(--pg62-text);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pg62-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,170,0,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.pg62-hero-content {
  position: relative;
  z-index: 2;
}

.pg62-hero h1 {
  color: var(--pg62-text);
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pg62-hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* Game grid */
.pg62-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 2rem 0;
}

.pg62-game-item {
  background: #2A2A2A;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #333333;
}

.pg62-game-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--pg62-shadow);
  border-color: var(--pg62-accent);
}

.pg62-game-img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.pg62-game-info {
  padding: 0.75rem;
}

.pg62-game-name {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--pg62-text);
  text-align: center;
}

.pg62-game-type {
  font-size: 0.7rem;
  color: var(--pg62-accent);
  background: rgba(255, 170, 0, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  display: inline-block;
  text-align: center;
  width: 100%;
}

/* Carousel */
.pg62-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  margin: 2rem 0;
}

.pg62-carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}

.pg62-carousel-slide {
  flex: 0 0 100%;
}

.pg62-carousel-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 0.75rem;
}

.pg62-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pg62-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 170, 0, 0.3);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.pg62-dot-active {
  background: var(--pg62-accent);
}

/* Feature sections */
.pg62-features {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.pg62-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: #2A2A2A;
  border-radius: 0.75rem;
  border-left: 4px solid var(--pg62-accent);
  box-shadow: 0 2px 10px rgba(255, 170, 0, 0.1);
}

.pg62-feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--pg62-accent), #FF8800);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pg62-primary);
  font-size: 1.25rem;
}

.pg62-feature-content h4 {
  margin-bottom: 0.5rem;
  color: var(--pg62-text);
}

.pg62-feature-content p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--pg62-text-light);
}

/* Stats display */
.pg62-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.pg62-stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #2A2A2A, #333333);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 170, 0, 0.2);
}

.pg62-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--pg62-accent);
  margin-bottom: 0.5rem;
}

.pg62-stat-label {
  font-size: 0.875rem;
  color: var(--pg62-text-light);
}

/* Promotional sections */
.pg62-promo-section {
  background: linear-gradient(135deg, #2A2A2A, var(--pg62-primary));
  color: var(--pg62-text);
  padding: 2.5rem 0;
  text-align: center;
  border-radius: 1rem;
  margin: 2rem 0;
  border: 2px solid var(--pg62-accent);
}

.pg62-promo-content h3 {
  color: var(--pg62-accent);
  margin-bottom: 1rem;
}

.pg62-promo-highlight {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--pg62-accent);
  margin: 1rem 0;
}

/* Search and filter */
.pg62-search-box {
  margin-bottom: 1.5rem;
}

.pg62-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--pg62-accent);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: #2A2A2A;
  color: var(--pg62-text);
}

.pg62-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 170, 0, 0.3);
}

.pg62-filter-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.pg62-filter-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--pg62-accent);
  background: transparent;
  color: var(--pg62-accent);
  border-radius: 1.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg62-filter-active,
.pg62-filter-btn:hover {
  background: var(--pg62-accent);
  color: var(--pg62-primary);
}

/* Modal styles */
.pg62-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 26, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pg62-modal-active {
  opacity: 1;
  visibility: visible;
}

.pg62-modal-content {
  background: #2A2A2A;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 350px;
  width: 90%;
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  border: 2px solid var(--pg62-accent);
}

.pg62-modal-active .pg62-modal-content {
  transform: scale(1);
}

.pg62-modal-open {
  overflow: hidden;
}

/* Notification styles */
.pg62-notification {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--pg62-accent), #FF8800);
  color: var(--pg62-primary);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px var(--pg62-shadow);
  z-index: 3000;
  max-width: 350px;
  width: 90%;
  text-align: center;
  font-weight: 500;
}

.pg62-notification-success {
  background: linear-gradient(135deg, #4CAF50, #45a049);
}

.pg62-notification-error {
  background: linear-gradient(135deg, #f44336, #da190b);
}

.pg62-notification-warning {
  background: linear-gradient(135deg, #ff9800, #f57000);
}

/* Footer */
.pg62-footer {
  background: var(--pg62-primary);
  color: var(--pg62-text);
  padding: 2rem 0 6rem;
  border-top: 2px solid var(--pg62-accent);
}

.pg62-footer-content {
  text-align: center;
}

.pg62-footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pg62-footer-link {
  color: var(--pg62-text-light);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
  padding: 0.25rem 0.5rem;
}

.pg62-footer-link:hover {
  color: var(--pg62-accent);
}

.pg62-partner-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.pg62-partner-icon {
  width: 40px;
  height: 40px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.pg62-partner-icon:hover {
  opacity: 1;
}

.pg62-copyright {
  font-size: 0.8125rem;
  opacity: 0.8;
  margin: 0;
  color: var(--pg62-text-light);
}

/* Bottom navigation */
.pg62-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(135deg, var(--pg62-primary) 0%, #2A2A2A 100%);
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 0;
  box-shadow: 0 -2px 10px var(--pg62-shadow);
  z-index: 1000;
  border-top: 2px solid var(--pg62-accent);
}

.pg62-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--pg62-text-light);
  transition: all 0.3s ease;
  padding: 0.25rem;
  min-width: 60px;
  border-radius: 0.5rem;
}

.pg62-bottom-nav-item:hover,
.pg62-bottom-nav-item.pg62-active {
  color: var(--pg62-accent);
  transform: translateY(-1px);
  background: rgba(255, 170, 0, 0.1);
}

.pg62-bottom-nav-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.pg62-bottom-nav-text {
  font-size: 0.6875rem;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 380px) {
  .pg62-container {
    padding: 0 0.75rem;
  }
  
  .pg62-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .pg62-stats {
    grid-template-columns: 1fr;
  }
  
  .pg62-btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}

/* Loading animation */
.pg62-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 170, 0, 0.3);
  border-radius: 50%;
  border-top-color: var(--pg62-accent);
  animation: pg62-spin 1s ease-in-out infinite;
}

@keyframes pg62-spin {
  to { transform: rotate(360deg); }
}

/* Utility classes */
.pg62-text-center { text-align: center; }
.pg62-text-left { text-align: left; }
.pg62-text-right { text-align: right; }

.pg62-mb-0 { margin-bottom: 0; }
.pg62-mb-1 { margin-bottom: 0.5rem; }
.pg62-mb-2 { margin-bottom: 1rem; }
.pg62-mb-3 { margin-bottom: 1.5rem; }

.pg62-mt-0 { margin-top: 0; }
.pg62-mt-1 { margin-top: 0.5rem; }
.pg62-mt-2 { margin-top: 1rem; }
.pg62-mt-3 { margin-top: 1.5rem; }

.pg62-hidden { display: none; }
.pg62-visible { display: block; }

/* Touch optimizations */
.pg62-btn, .pg62-game-item, .pg62-nav-link, .pg62-bottom-nav-item {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.pg62-btn:focus,
.pg62-nav-link:focus,
.pg62-bottom-nav-item:focus {
  outline: 2px solid var(--pg62-accent);
  outline-offset: 2px;
}