/* Legend Link PH CSS Styles */
/* Prefix: pgbd- for all classes to avoid conflicts */

/* CSS Variables */
:root {
  --pgbd-primary: #A0522D;
  --pgbd-secondary: #006400;
  --pgbd-accent: #3CB371;
  --pgbd-success: #FA8072;
  --pgbd-dark: #1E1E1E;
  --pgbd-light: #EEEEEE;
  --pgbd-bg: #1E1E1E;
  --pgbd-text: #EEEEEE;
  --pgbd-text-muted: #B0B0B0;
  --pgbd-border: #333333;
  --pgbd-shadow: rgba(0, 0, 0, 0.3);
  --pgbd-gradient: linear-gradient(135deg, var(--pgbd-primary), var(--pgbd-secondary));
}

/* Base Styles */
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--pgbd-text);
  background-color: var(--pgbd-bg);
  overflow-x: hidden;
}

/* Container and Layout */
.pgbd-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.pgbd-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pgbd-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.pgbd-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Styles */
.pgbd-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--pgbd-gradient);
  box-shadow: 0 2px 10px var(--pgbd-shadow);
  padding: 1rem 0;
}

.pgbd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.pgbd-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pgbd-light);
  font-weight: bold;
  font-size: 1.6rem;
}

.pgbd-logo img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.pgbd-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pgbd-hamburger {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  gap: 0.3rem;
  border: none;
  background: none;
}

.pgbd-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pgbd-light);
  transition: all 0.3s ease;
}

.pgbd-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.pgbd-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.pgbd-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.pgbd-mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: var(--pgbd-dark);
  z-index: 1001;
  transition: right 0.3s ease;
  padding: 6rem 2rem 2rem;
  overflow-y: auto;
}

.pgbd-mobile-menu.active {
  right: 0;
}

.pgbd-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pgbd-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.pgbd-menu-list {
  list-style: none;
  margin-bottom: 2rem;
}

.pgbd-menu-list li {
  margin-bottom: 1rem;
}

.pgbd-nav-link {
  display: block;
  color: var(--pgbd-text);
  text-decoration: none;
  padding: 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 1.4rem;
}

.pgbd-nav-link:hover,
.pgbd-nav-link.active {
  background: var(--pgbd-primary);
  color: var(--pgbd-light);
}

/* Button Styles */
.pgbd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  min-width: 44px;
  text-align: center;
}

.pgbd-btn-primary {
  background: var(--pgbd-gradient);
  color: var(--pgbd-light);
  box-shadow: 0 4px 12px rgba(160, 82, 45, 0.3);
}

.pgbd-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(160, 82, 45, 0.4);
}

.pgbd-btn-secondary {
  background: var(--pgbd-accent);
  color: var(--pgbd-dark);
}

.pgbd-btn-secondary:hover {
  background: #2E8B57;
}

.pgbd-btn-outline {
  border: 2px solid var(--pgbd-primary);
  color: var(--pgbd-primary);
  background: transparent;
}

.pgbd-btn-outline:hover {
  background: var(--pgbd-primary);
  color: var(--pgbd-light);
}

.pgbd-btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
}

.pgbd-promo-btn {
  background: var(--pgbd-gradient);
  color: var(--pgbd-light);
  border: none;
  padding: 1.2rem 2.4rem;
  border-radius: 0.8rem;
  font-weight: bold;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(250, 128, 114, 0.3);
}

.pgbd-promo-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(250, 128, 114, 0.4);
}

/* Main Content */
.pgbd-main {
  flex: 1;
  padding-top: 7rem;
  padding-bottom: 8rem;
}

.pgbd-section {
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.pgbd-section-title {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--pgbd-light);
  text-align: center;
}

.pgbd-section-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--pgbd-accent);
}

/* Card Styles */
.pgbd-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pgbd-card-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--pgbd-light);
}

.pgbd-card-text {
  color: var(--pgbd-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Carousel Styles */
.pgbd-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  margin-bottom: 2rem;
  border-radius: 1rem;
  overflow: hidden;
}

.pgbd-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pgbd-slide.active {
  opacity: 1;
}

.pgbd-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pgbd-carousel-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.pgbd-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pgbd-indicator.active {
  background: var(--pgbd-light);
}

/* Game Grid */
.pgbd-games-section {
  margin: 2rem 0;
}

.pgbd-games-category {
  margin-bottom: 3rem;
}

.pgbd-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.pgbd-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pgbd-game-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px var(--pgbd-shadow);
}

.pgbd-game-item img {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.pgbd-game-name {
  font-size: 1rem;
  text-align: center;
  color: var(--pgbd-text);
  font-weight: 500;
  line-height: 1.2;
}

/* Bottom Navigation */
.pgbd-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pgbd-dark);
  border-top: 1px solid var(--pgbd-border);
  z-index: 999;
  height: 60px;
}

.pgbd-bottom-nav-container {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  height: 100%;
}

.pgbd-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--pgbd-text-muted);
  transition: all 0.3s ease;
  min-height: 44px;
  gap: 0.2rem;
}

.pgbd-bottom-nav a:hover,
.pgbd-bottom-nav a.active {
  color: var(--pgbd-accent);
  transform: scale(1.05);
}

.pgbd-bottom-nav i {
  font-size: 2rem;
}

.pgbd-bottom-nav span {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.pgbd-footer {
  background: var(--pgbd-dark);
  border-top: 1px solid var(--pgbd-border);
  padding: 3rem 1rem 8rem;
  margin-top: auto;
}

.pgbd-footer-content {
  max-width: 430px;
  margin: 0 auto;
  text-align: center;
}

.pgbd-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.pgbd-footer-link {
  color: var(--pgbd-text-muted);
  text-decoration: none;
  padding: 0.8rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.pgbd-footer-link:hover {
  color: var(--pgbd-accent);
  background: rgba(255, 255, 255, 0.05);
}

.pgbd-partners {
  margin: 2rem 0;
}

.pgbd-partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.pgbd-partner-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.pgbd-partner-logo:hover {
  opacity: 1;
}

.pgbd-copyright {
  color: var(--pgbd-text-muted);
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* Utility Classes */
.pgbd-text-center { text-align: center; }
.pgbd-text-left { text-align: left; }
.pgbd-text-right { text-align: right; }

.pgbd-mt-1 { margin-top: 1rem; }
.pgbd-mt-2 { margin-top: 2rem; }
.pgbd-mt-3 { margin-top: 3rem; }

.pgbd-mb-1 { margin-bottom: 1rem; }
.pgbd-mb-2 { margin-bottom: 2rem; }
.pgbd-mb-3 { margin-bottom: 3rem; }

.pgbd-p-1 { padding: 1rem; }
.pgbd-p-2 { padding: 2rem; }

.pgbd-hidden { display: none; }
.pgbd-visible { display: block; }

/* Loading Animation */
.pgbd-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--pgbd-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.pgbd-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--pgbd-border);
  border-top: 4px solid var(--pgbd-primary);
  border-radius: 50%;
  animation: pgbd-spin 1s linear infinite;
}

@keyframes pgbd-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
  .pgbd-container {
    padding: 0 0.8rem;
  }
  
  .pgbd-games-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .pgbd-card {
    padding: 1.5rem;
  }
  
  .pgbd-section-title {
    font-size: 2rem;
  }
}

/* Animations */
@keyframes pgbd-fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pgbd-slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.pgbd-animate-fade {
  animation: pgbd-fadeIn 0.5s ease-out;
}

.pgbd-animate-slide {
  animation: pgbd-slideIn 0.3s ease-out;
}

/* Focus and accessibility */
.pgbd-btn:focus,
.pgbd-nav-link:focus,
.pgbd-game-item:focus {
  outline: 2px solid var(--pgbd-accent);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --pgbd-bg: #000000;
    --pgbd-text: #FFFFFF;
    --pgbd-border: #FFFFFF;
  }
}