/**
 * JLPG PH Layout Styles
 * All classes use pg50- prefix for namespace isolation
 * @version 1.0.0
 */

/* CSS Variables - Color Palette */
:root {
  --pg50-primary: #FFD700;
  --pg50-secondary: #8A2BE2;
  --pg50-tertiary: #4B0082;
  --pg50-dark: #0A0A0A;
  --pg50-purple: #9400D3;
  --pg50-text: #FFFFFF;
  --pg50-text-muted: #B8B8B8;
  --pg50-bg: #0A0A0A;
  --pg50-card-bg: #1A1A1A;
  --pg50-border: #2A2A2A;
  --pg50-success: #00C851;
  --pg50-warning: #FFD700;
  --pg50-danger: #FF4444;
}

/* 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(--pg50-text);
  background-color: var(--pg50-bg);
  overflow-x: hidden;
  padding-bottom: 70px;
}

@media (min-width: 769px) {
  body {
    padding-bottom: 0;
  }
}

/* Container */
.pg50-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 769px) {
  .pg50-container {
    max-width: 1200px;
  }
}

/* Header */
.pg50-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--pg50-tertiary) 0%, var(--pg50-dark) 100%);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(255, 215, 0, 0.1);
  transition: all 0.3s ease;
}

.pg50-header-scrolled {
  box-shadow: 0 4px 30px rgba(138, 43, 226, 0.3);
}

.pg50-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

@media (min-width: 769px) {
  .pg50-header-inner {
    max-width: 1200px;
  }
}

/* Logo */
.pg50-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.pg50-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.pg50-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg50-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Header Buttons */
.pg50-header-buttons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.pg50-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pg50-btn-primary {
  background: linear-gradient(135deg, var(--pg50-primary) 0%, #FFA500 100%);
  color: var(--pg50-dark);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.pg50-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.pg50-btn-secondary {
  background: transparent;
  color: var(--pg50-primary);
  border: 2px solid var(--pg50-primary);
}

.pg50-btn-secondary:hover {
  background: var(--pg50-primary);
  color: var(--pg50-dark);
}

/* Menu Toggle */
.pg50-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 769px) {
  .pg50-menu-toggle {
    display: none;
  }
}

.pg50-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--pg50-primary);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.pg50-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pg50-overlay-active {
  opacity: 1;
  visibility: visible;
}

.pg50-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100%;
  background: linear-gradient(180deg, var(--pg50-tertiary) 0%, var(--pg50-dark) 100%);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.pg50-menu-open {
  right: 0;
}

.pg50-mobile-menu a {
  display: block;
  padding: 1rem;
  color: var(--pg50-text);
  text-decoration: none;
  font-size: 1.4rem;
  border-bottom: 1px solid var(--pg50-border);
  transition: all 0.3s ease;
}

.pg50-mobile-menu a:hover {
  background: var(--pg50-purple);
  padding-left: 1.5rem;
  color: var(--pg50-primary);
}

/* Main Content */
.pg50-main {
  margin-top: 70px;
  padding: 1rem 0;
}

/* Carousel */
.pg50-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.pg50-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg50-slide-active {
  opacity: 1;
}

.pg50-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg50-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
}

.pg50-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg50-dot-active {
  background: var(--pg50-primary);
  transform: scale(1.3);
}

/* Page Title */
.pg50-page-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--pg50-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

/* Section */
.pg50-section {
  margin-bottom: 2.5rem;
}

.pg50-section-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--pg50-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pg50-section-title i {
  color: var(--pg50-primary);
}

/* Card */
.pg50-card {
  background: var(--pg50-card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--pg50-border);
  transition: all 0.3s ease;
}

.pg50-card:hover {
  border-color: var(--pg50-purple);
  box-shadow: 0 8px 25px rgba(138, 43, 226, 0.2);
}

/* Game Grid */
.pg50-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.pg50-game-item {
  position: relative;
  background: var(--pg50-card-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--pg50-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg50-game-item:hover {
  transform: translateY(-4px);
  border-color: var(--pg50-primary);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.pg50-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.pg50-game-name {
  padding: 0.5rem;
  font-size: 1rem;
  text-align: center;
  color: var(--pg50-text);
  background: var(--pg50-dark);
  border-top: 1px solid var(--pg50-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Links */
.pg50-link {
  color: var(--pg50-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pg50-link:hover {
  color: var(--pg50-secondary);
  text-decoration: underline;
}

/* List */
.pg50-list {
  list-style: none;
  padding-left: 0;
}

.pg50-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--pg50-border);
  position: relative;
  padding-left: 2rem;
}

.pg50-list li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--pg50-primary);
  font-weight: bold;
}

/* Bottom Navigation */
.pg50-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--pg50-tertiary) 0%, var(--pg50-dark) 100%);
  border-top: 2px solid var(--pg50-primary);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  box-shadow: 0 -2px 20px rgba(255, 215, 0, 0.2);
}

@media (min-width: 769px) {
  .pg50-bottom-nav {
    display: none;
  }
}

.pg50-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(--pg50-text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 0.5rem;
}

.pg50-nav-item:hover {
  color: var(--pg50-primary);
  transform: scale(1.1);
}

.pg50-nav-item.pg50-nav-active {
  color: var(--pg50-primary);
}

.pg50-nav-icon {
  font-size: 24px;
}

.pg50-nav-text {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Footer */
.pg50-footer {
  background: var(--pg50-card-bg);
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--pg50-border);
}

.pg50-footer-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--pg50-primary);
  margin-bottom: 1rem;
}

.pg50-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pg50-footer-link {
  color: var(--pg50-text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.pg50-footer-link:hover {
  color: var(--pg50-primary);
}

.pg50-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.pg50-partner-logo {
  height: 30px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.pg50-partner-logo:hover {
  opacity: 1;
}

.pg50-copyright {
  text-align: center;
  color: var(--pg50-text-muted);
  font-size: 1.1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pg50-border);
}

/* Utility Classes */
.pg50-text-center {
  text-align: center;
}

.pg50-text-gradient {
  background: linear-gradient(135deg, var(--pg50-primary) 0%, var(--pg50-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pg50-mb-1 {
  margin-bottom: 1rem;
}

.pg50-mb-2 {
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .pg50-page-title {
    font-size: 1.8rem;
  }

  .pg50-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }

  .pg50-section-title {
    font-size: 1.5rem;
  }
}
