/**
 * JLQQ Layout Stylesheet
 * All classes prefixed with pg9d- for namespace isolation
 * Color Palette: #DA70D6 | #4B0082 | #34495E | #DC143C | #C71585
 * Mobile-first responsive design
 */

/* CSS Variables for easy theming */
:root {
  --pg9d-primary: #DA70D6;
  --pg9d-secondary: #4B0082;
  --pg9d-dark: #34495E;
  --pg9d-accent: #DC143C;
  --pg9d-pink: #C71585;
  --pg9d-bg: #1a1a2e;
  --pg9d-bg-light: #16213e;
  --pg9d-bg-card: #0f3460;
  --pg9d-text: #ffffff;
  --pg9d-text-muted: #b8b8b8;
  --pg9d-border: #2d2d44;
  --pg9d-shadow: 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;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--pg9d-text);
  background-color: var(--pg9d-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.pg9d-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.pg9d-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--pg9d-secondary) 0%, var(--pg9d-dark) 100%);
  box-shadow: 0 2px 10px var(--pg9d-shadow);
  z-index: 1000;
  padding: 0.8rem 0;
}

.pg9d-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.pg9d-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg9d-primary);
}

.pg9d-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.pg9d-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.pg9d-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pg9d-btn-register {
  background: linear-gradient(135deg, var(--pg9d-primary) 0%, var(--pg9d-pink) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(218, 112, 214, 0.4);
}

.pg9d-btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(218, 112, 214, 0.6);
}

.pg9d-btn-login {
  background: transparent;
  color: var(--pg9d-primary);
  border: 2px solid var(--pg9d-primary);
}

.pg9d-btn-login:hover {
  background: var(--pg9d-primary);
  color: white;
}

/* Mobile Menu Toggle */
.pg9d-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.pg9d-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--pg9d-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu */
.pg9d-mobile-menu {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 100%;
  max-width: 300px;
  height: calc(100vh - 60px);
  background: var(--pg9d-bg-light);
  box-shadow: 2px 0 10px var(--pg9d-shadow);
  transition: left 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 1rem 0;
}

.pg9d-mobile-menu.x9ddd-active {
  left: 0;
}

.pg9d-mobile-menu a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--pg9d-text);
  border-bottom: 1px solid var(--pg9d-border);
  font-size: 1.5rem;
}

.pg9d-mobile-menu a:hover {
  background: var(--pg9d-bg-card);
  color: var(--pg9d-primary);
}

/* Main Content */
.pg9d-main {
  padding-top: 70px;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* Carousel */
.pg9d-carousel {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 12px;
}

.pg9d-carousel-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.pg9d-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg9d-carousel-slide.pg9d-active {
  opacity: 1;
}

.pg9d-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg9d-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.pg9d-carousel-btn:hover {
  background: var(--pg9d-primary);
}

.pg9d-carousel-prev {
  left: 10px;
}

.pg9d-carousel-next {
  right: 10px;
}

.pg9d-carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.pg9d-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg9d-carousel-dot.pg9d-active {
  background: var(--pg9d-primary);
  width: 25px;
  border-radius: 5px;
}

/* Section Styles */
.pg9d-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: var(--pg9d-bg-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--pg9d-shadow);
}

.pg9d-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pg9d-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pg9d-section-title i {
  font-size: 2.2rem;
}

/* Game Grid */
.pg9d-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.pg9d-game-item {
  background: var(--pg9d-bg-card);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--pg9d-shadow);
}

.pg9d-game-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(218, 112, 214, 0.3);
}

.pg9d-game-item.pg9d-touch {
  transform: scale(0.95);
}

.pg9d-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.pg9d-game-name {
  padding: 0.8rem 0.5rem;
  font-size: 1.2rem;
  text-align: center;
  color: var(--pg9d-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Game Category Tabs */
.pg9d-category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}

.pg9d-category-tabs::-webkit-scrollbar {
  display: none;
}

.pg9d-category-tab {
  padding: 0.8rem 1.5rem;
  background: var(--pg9d-bg-card);
  border-radius: 20px;
  font-size: 1.3rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.pg9d-category-tab:hover {
  border-color: var(--pg9d-primary);
  color: var(--pg9d-primary);
}

.pg9d-category-tab.pg9d-active {
  background: linear-gradient(135deg, var(--pg9d-primary) 0%, var(--pg9d-pink) 100%);
  color: white;
}

/* Card Styles */
.pg9d-card {
  background: var(--pg9d-bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px var(--pg9d-shadow);
}

.pg9d-card-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--pg9d-primary);
  margin-bottom: 1rem;
}

.pg9d-card-content {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--pg9d-text-muted);
}

/* Link Styles */
.pg9d-link {
  color: var(--pg9d-primary);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.pg9d-link:hover {
  color: var(--pg9d-pink);
}

/* Footer */
.pg9d-footer {
  background: var(--pg9d-dark);
  padding: 2rem 0 3rem 0;
  margin-top: 3rem;
  border-top: 3px solid var(--pg9d-primary);
}

.pg9d-footer-content {
  margin-bottom: 2rem;
}

.pg9d-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg9d-footer-link {
  padding: 0.6rem 1.2rem;
  background: var(--pg9d-bg-card);
  border-radius: 6px;
  font-size: 1.3rem;
  color: var(--pg9d-text);
  transition: all 0.3s ease;
}

.pg9d-footer-link:hover {
  background: var(--pg9d-primary);
  color: white;
  transform: translateY(-2px);
}

.pg9d-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg9d-partner-logo {
  width: 50px;
  height: 30px;
  object-fit: contain;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.pg9d-partner-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.pg9d-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--pg9d-text-muted);
  padding: 1rem;
  border-top: 1px solid var(--pg9d-border);
}

/* Bottom Navigation (Mobile) */
.pg9d-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--pg9d-secondary) 0%, var(--pg9d-dark) 100%);
  box-shadow: 0 -2px 10px var(--pg9d-shadow);
  z-index: 1000;
  padding: 0.5rem 0;
}

.pg9d-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 430px;
  margin: 0 auto;
}

.pg9d-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  min-height: 60px;
  justify-content: center;
  color: var(--pg9d-text-muted);
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pg9d-nav-item:hover {
  color: var(--pg9d-primary);
  transform: scale(1.1);
}

.pg9d-nav-item.pg9d-active {
  color: var(--pg9d-primary);
}

.pg9d-nav-item i {
  font-size: 24px;
}

.pg9d-nav-item span {
  font-size: 10px;
  font-weight: 500;
}

/* Desktop Styles */
@media (min-width: 769px) {
  .pg9d-bottom-nav {
    display: none;
  }

  .pg9d-main {
    padding-bottom: 2rem;
  }

  .pg9d-menu-toggle {
    display: none;
  }

  .pg9d-mobile-menu {
    position: static;
    width: auto;
    height: auto;
    max-width: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    display: flex;
  }

  .pg9d-mobile-menu a {
    border-bottom: none;
    padding: 0 1rem;
  }

  .pg9d-mobile-menu a:hover {
    background: transparent;
  }
}

/* Utility Classes */
.pg9d-text-center {
  text-align: center;
}

.pg9d-mt-1 {
  margin-top: 1rem;
}

.pg9d-mb-1 {
  margin-bottom: 1rem;
}

.pg9d-p-1 {
  padding: 1rem;
}

.pg9d-hidden {
  display: none;
}

/* Animations */
@keyframes pg9d-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pg9d-fade-in {
  animation: pg9d-fadeIn 0.5s ease;
}

/* Highlight Text */
.pg9d-highlight {
  background: linear-gradient(135deg, var(--pg9d-primary) 0%, var(--pg9d-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Promo Badge */
.pg9d-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: linear-gradient(135deg, var(--pg9d-accent) 0%, var(--pg9d-pink) 100%);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 20px;
  margin-left: 0.5rem;
}

/* Responsive Text */
@media (max-width: 380px) {
  .pg9d-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pg9d-section-title {
    font-size: 1.6rem;
  }
}
