/**
 * JL55 Layout Styles
 * All classes use pg2b- prefix for namespace isolation
 * Mobile-first responsive design with 430px max-width
 */

/* CSS Variables for color palette */
:root {
  --pg2b-primary: #B03060;
  --pg2b-secondary: #0000CD;
  --pg2b-accent: #E0FFFF;
  --pg2b-highlight: #E9967A;
  --pg2b-dark: #0A0A0A;
  --pg2b-bg: #0A0A0A;
  --pg2b-text: #E0FFFF;
  --pg2b-text-muted: #E9967A;
  --pg2b-border: #1a1a1a;
  --pg2b-success: #4CAF50;
  --pg2b-warning: #FF9800;
  --pg2b-error: #F44336;
}

/* 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(--pg2b-text);
  background-color: var(--pg2b-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

ul, ol {
  list-style: none;
}

/* Container */
.pg2b-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.pg2b-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--pg2b-dark) 0%, #1a1a1a 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--pg2b-primary);
}

.pg2b-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  max-width: 430px;
  margin: 0 auto;
}

.pg2b-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pg2b-primary);
}

.pg2b-logo img {
  width: 32px;
  height: 32px;
}

.pg2b-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--pg2b-text);
  font-size: 1.8rem;
}

/* Desktop navigation */
.pg2b-desktop-nav {
  display: none;
}

@media (min-width: 769px) {
  .pg2b-menu-toggle {
    display: none;
  }

  .pg2b-desktop-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .pg2b-desktop-nav a {
    padding: 0.5rem 1rem;
    font-size: 1.4rem;
    color: var(--pg2b-text);
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }

  .pg2b-desktop-nav a:hover {
    background-color: var(--pg2b-primary);
  }
}

/* Header buttons */
.pg2b-header-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pg2b-btn {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.pg2b-btn-primary {
  background: linear-gradient(135deg, var(--pg2b-primary) 0%, #8B2252 100%);
  color: var(--pg2b-accent);
  box-shadow: 0 2px 8px rgba(176, 48, 96, 0.4);
}

.pg2b-btn-secondary {
  background: transparent;
  color: var(--pg2b-primary);
  border: 2px solid var(--pg2b-primary);
}

.pg2b-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(176, 48, 96, 0.6);
}

.pg2b-btn-clicked {
  transform: scale(0.95);
}

/* Mobile menu */
.pg2b-mobile-menu {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: calc(100vh - 60px);
  background: linear-gradient(180deg, var(--pg2b-dark) 0%, #1a1a1a 100%);
  transition: left 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 1rem 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.pg2b-menu-open {
  left: 0;
}

.pg2b-menu-overlay {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.pg2b-overlay-active {
  opacity: 1;
  visibility: visible;
}

.pg2b-menu-item {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1.4rem;
  color: var(--pg2b-text);
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.pg2b-menu-item:hover {
  background: var(--pg2b-primary);
  border-left-color: var(--pg2b-accent);
}

/* Main content */
main {
  margin-top: 60px;
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  main {
    padding-bottom: 2rem;
  }
}

/* Carousel */
.pg2b-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.pg2b-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg2b-slide-active {
  opacity: 1;
}

.pg2b-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg2b-carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.pg2b-carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg2b-indicator-active {
  background: var(--pg2b-primary);
  transform: scale(1.2);
}

/* Page title */
.pg2b-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pg2b-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.3;
}

/* Section */
.pg2b-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border-radius: 12px;
  border: 1px solid var(--pg2b-border);
}

.pg2b-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg2b-highlight);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pg2b-section-title::before {
  content: '';
  width: 4px;
  height: 1.5rem;
  background: var(--pg2b-primary);
  border-radius: 2px;
}

/* Game grid */
.pg2b-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.pg2b-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.pg2b-game-item:hover {
  transform: scale(1.05);
}

.pg2b-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pg2b-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg2b-game-name {
  font-size: 1rem;
  color: var(--pg2b-text);
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* Card */
.pg2b-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--pg2b-border);
}

.pg2b-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--pg2b-primary);
  margin-bottom: 1rem;
}

.pg2b-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--pg2b-text);
}

.pg2b-card-content p {
  margin-bottom: 1rem;
}

.pg2b-card-content p:last-child {
  margin-bottom: 0;
}

/* Feature list */
.pg2b-feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pg2b-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem;
  background: rgba(176, 48, 96, 0.1);
  border-radius: 8px;
  border-left: 3px solid var(--pg2b-primary);
}

.pg2b-feature-icon {
  font-size: 1.8rem;
  color: var(--pg2b-highlight);
  flex-shrink: 0;
}

.pg2b-feature-text {
  font-size: 1.3rem;
  line-height: 1.5;
}

.pg2b-feature-text strong {
  color: var(--pg2b-highlight);
  font-weight: 600;
}

/* Link highlight */
.pg2b-link-highlight {
  color: var(--pg2b-primary);
  font-weight: 600;
  text-decoration: underline;
}

.pg2b-link-highlight:hover {
  color: var(--pg2b-highlight);
}

/* Footer */
.pg2b-footer {
  background: linear-gradient(180deg, var(--pg2b-dark) 0%, #000 100%);
  padding: 2rem 0;
  border-top: 2px solid var(--pg2b-primary);
}

.pg2b-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.pg2b-footer-link {
  font-size: 1.2rem;
  color: var(--pg2b-text);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background: rgba(176, 48, 96, 0.2);
  transition: all 0.3s ease;
}

.pg2b-footer-link:hover {
  background: var(--pg2b-primary);
}

.pg2b-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.pg2b-partner-logo {
  width: 50px;
  height: 30px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.pg2b-partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.pg2b-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--pg2b-text-muted);
  padding: 0 1rem;
}

/* Bottom navigation (mobile) */
.pg2b-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(180deg, #1a1a1a 0%, var(--pg2b-dark) 100%);
  border-top: 2px solid var(--pg2b-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

@media (min-width: 769px) {
  .pg2b-bottom-nav {
    display: none;
  }
}

.pg2b-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--pg2b-text);
}

.pg2b-nav-item:hover {
  color: var(--pg2b-primary);
  transform: scale(1.1);
}

.pg2b-nav-item.pg2b-nav-active {
  color: var(--pg2b-primary);
}

.pg2b-nav-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.pg2b-nav-text {
  font-size: 10px;
  font-weight: 500;
}

/* Responsive utilities */
@media (max-width: 380px) {
  .pg2b-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pg2b-btn {
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pg2b-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Utility classes */
.pg2b-text-center {
  text-align: center;
}

.pg2b-mt-1 {
  margin-top: 1rem;
}

.pg2b-mb-1 {
  margin-bottom: 1rem;
}

.pg2b-mt-2 {
  margin-top: 2rem;
}

.pg2b-mb-2 {
  margin-bottom: 2rem;
}
