/**
 * PH444 Main Stylesheet
 * All classes use pg69 prefix for namespace isolation
 * Color Palette: #E0E0E0 | #DDA0DD | #1E1E1E | #7B68EE
 */

/* CSS Variables */
:root {
  --pg69-primary: #7B68EE;
  --pg69-primary-light: #9B8FEE;
  --pg69-secondary: #DDA0DD;
  --pg69-bg-dark: #1E1E1E;
  --pg69-bg-darker: #0F0F0F;
  --pg69-text: #E0E0E0;
  --pg69-text-muted: #B0B0B0;
  --pg69-border: #333333;
  --pg69-success: #4CAF50;
  --pg69-warning: #FF9800;
  --pg69-error: #F44336;
  --pg69-gradient: linear-gradient(135deg, #7B68EE 0%, #DDA0DD 100%);
  --pg69-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --pg69-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--pg69-text);
  background-color: var(--pg69-bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.pg69-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.pg69-wrapper {
  padding-top: 70px;
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  .pg69-wrapper {
    padding-bottom: 2rem;
  }
}

/* Header Styles */
.pg69-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--pg69-bg-darker) 0%, var(--pg69-bg-dark) 100%);
  border-bottom: 1px solid var(--pg69-border);
  backdrop-filter: blur(10px);
}

.pg69-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.pg69-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg69-text);
}

.pg69-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.pg69-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--pg69-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header Buttons */
.pg69-header-buttons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.pg69-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.pg69-btn-primary {
  background: var(--pg69-gradient);
  color: white;
  box-shadow: var(--pg69-shadow);
}

.pg69-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--pg69-shadow-lg);
}

.pg69-btn-secondary {
  background: transparent;
  color: var(--pg69-text);
  border: 2px solid var(--pg69-primary);
}

.pg69-btn-secondary:hover {
  background: var(--pg69-primary);
  color: white;
}

.pg69-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--pg69-text);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.pg69-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 769px) {
  .pg69-menu-toggle {
    display: none;
  }
}

/* Mobile Menu */
.pg69-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--pg69-bg-darker);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  border-left: 1px solid var(--pg69-border);
}

.pg69-mobile-menu.pg69-menu-open {
  right: 0;
}

.pg69-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--pg69-border);
}

.pg69-menu-close {
  background: transparent;
  border: none;
  color: var(--pg69-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.pg69-menu-nav {
  padding: 1rem 0;
}

.pg69-menu-nav a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--pg69-text);
  text-decoration: none;
  font-size: 1.4rem;
  transition: background 0.2s ease;
}

.pg69-menu-nav a:hover {
  background: rgba(123, 104, 238, 0.1);
  color: var(--pg69-primary);
}

.pg69-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pg69-menu-overlay.pg69-overlay-active {
  opacity: 1;
  visibility: visible;
}

/* Desktop Navigation */
@media (min-width: 769px) {
  .pg69-desktop-nav {
    display: flex;
    gap: 2rem;
  }

  .pg69-desktop-nav a {
    color: var(--pg69-text);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    transition: color 0.2s ease;
  }

  .pg69-desktop-nav a:hover {
    color: var(--pg69-primary);
  }
}

@media (max-width: 768px) {
  .pg69-desktop-nav {
    display: none;
  }
}

/* Carousel */
.pg69-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: var(--pg69-shadow);
}

.pg69-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.pg69-carousel-slide {
  min-width: 100%;
  height: 100%;
}

.pg69-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg69-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.pg69-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg69-carousel-dot.pg69-active {
  background: var(--pg69-primary);
  width: 24px;
  border-radius: 4px;
}

/* Headings */
.pg69-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--pg69-text);
  line-height: 1.3;
}

.pg69-section-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--pg69-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Game Grid */
.pg69-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.pg69-game-card {
  background: var(--pg69-bg-darker);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--pg69-border);
}

.pg69-game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pg69-shadow-lg);
  border-color: var(--pg69-primary);
}

.pg69-game-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.pg69-game-name {
  padding: 0.6rem 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  color: var(--pg69-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(123, 104, 238, 0.1);
}

.pg69-game-card a {
  display: block;
  text-decoration: none;
}

/* Content Sections */
.pg69-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--pg69-bg-darker);
  border-radius: 12px;
  border: 1px solid var(--pg69-border);
}

.pg69-section p {
  margin-bottom: 1rem;
  color: var(--pg69-text-muted);
  line-height: 1.6;
}

.pg69-section ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.pg69-section li {
  margin-bottom: 0.5rem;
  color: var(--pg69-text-muted);
}

/* Links */
.pg69-link {
  color: var(--pg69-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.pg69-link:hover {
  color: var(--pg69-secondary);
  text-decoration: underline;
}

/* Bottom Navigation */
.pg69-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--pg69-bg-darker) 0%, var(--pg69-bg-dark) 100%);
  border-top: 1px solid var(--pg69-border);
  backdrop-filter: blur(10px);
  height: 60px;
}

@media (min-width: 769px) {
  .pg69-bottom-nav {
    display: none;
  }
}

.pg69-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
  max-width: 430px;
  margin: 0 auto;
}

.pg69-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--pg69-text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
}

.pg69-nav-item:hover {
  color: var(--pg69-primary);
  transform: scale(1.05);
}

.pg69-nav-item.pg69-active {
  color: var(--pg69-primary);
}

.pg69-nav-icon {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg69-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.pg69-footer {
  background: var(--pg69-bg-darker);
  padding: 2rem 1rem 7rem;
  border-top: 1px solid var(--pg69-border);
  text-align: center;
}

@media (min-width: 769px) {
  .pg69-footer {
    padding-bottom: 2rem;
  }
}

.pg69-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg69-footer-links a {
  color: var(--pg69-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.pg69-footer-links a:hover {
  background: rgba(123, 104, 238, 0.1);
  color: var(--pg69-primary);
}

.pg69-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg69-partners img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.pg69-partners img:hover {
  opacity: 1;
}

.pg69-copyright {
  color: var(--pg69-text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Animations */
.pg69-animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.pg69-animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Utility Classes */
.pg69-text-center {
  text-align: center;
}

.pg69-mb-1 {
  margin-bottom: 1rem;
}

.pg69-mb-2 {
  margin-bottom: 2rem;
}

.pg69-mt-1 {
  margin-top: 1rem;
}

.pg69-mt-2 {
  margin-top: 2rem;
}

/* Icon Styles */
.pg69-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Responsive */
@media (max-width: 380px) {
  .pg69-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pg69-title {
    font-size: 1.6rem;
  }
}
