/**
 * JL44 Theme Stylesheet
 * Mobile-first design with unique color palette
 * Color Palette: #FF5722 | #495057 | #262626 | #FA8072 | #CD853F | #FFCCCB
 */

/* CSS Variables */
:root {
  --pg5c-primary: #FF5722;
  --pg5c-secondary: #FA8072;
  --pg5c-accent: #CD853F;
  --pg5c-dark: #262626;
  --pg5c-gray: #495057;
  --pg5c-light: #FFCCCB;
  --pg5c-white: #ffffff;
  --pg5c-shadow: rgba(38, 38, 38, 0.15);
  --pg5c-gradient: linear-gradient(135deg, #FF5722 0%, #FA8072 100%);
  --pg5c-font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--pg5c-font-main);
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--pg5c-gray);
  background-color: #f8f9fa;
  overflow-x: hidden;
}

/* Container and Layout */
.pg5c-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

.pg5c-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
.pg5c-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--pg5c-white);
  box-shadow: 0 2px 10px var(--pg5c-shadow);
  z-index: 1000;
  height: 60px;
}

.pg5c-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 100%;
}

.pg5c-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg5c-primary);
  font-weight: 700;
  font-size: 1.8rem;
}

.pg5c-logo-icon {
  width: 28px;
  height: 28px;
}

.pg5c-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.pg5c-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.pg5c-btn-primary {
  background: var(--pg5c-primary);
  color: var(--pg5c-white);
}

.pg5c-btn-primary:hover {
  background: #e64a19;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.pg5c-btn-secondary {
  background: var(--pg5c-light);
  color: var(--pg5c-primary);
}

.pg5c-btn-secondary:hover {
  background: #ffb3ba;
  transform: translateY(-2px);
}

.pg5c-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 2rem;
  color: var(--pg5c-dark);
}

/* Mobile Menu */
.pg5c-mobile-menu {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 100%;
  height: calc(100vh - 60px);
  background: var(--pg5c-white);
  transition: left 0.3s ease;
  z-index: 999;
  overflow-y: auto;
  padding: 2rem 0;
}

.pg5c-mobile-menu.pg5c-menu-open {
  left: 0;
}

.pg5c-menu-list {
  list-style: none;
}

.pg5c-menu-item {
  border-bottom: 1px solid #eee;
}

.pg5c-menu-link {
  display: block;
  padding: 1.2rem 2rem;
  color: var(--pg5c-dark);
  text-decoration: none;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.pg5c-menu-link:hover {
  background: var(--pg5c-light);
  color: var(--pg5c-primary);
  padding-left: 2.5rem;
}

.pg5c-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--pg5c-light);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.8rem;
  color: var(--pg5c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Content */
.pg5c-main {
  margin-top: 70px;
  padding-bottom: 80px;
}

.pg5c-section {
  margin-bottom: 3rem;
}

.pg5c-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pg5c-dark);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Carousel */
.pg5c-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 2rem;
  aspect-ratio: 16 / 9;
}

.pg5c-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg5c-carousel-slide.pg5c-active {
  opacity: 1;
}

.pg5c-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Game Grid */
.pg5c-game-section {
  margin-bottom: 3rem;
}

.pg5c-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.pg5c-category-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg5c-primary);
}

.pg5c-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.pg5c-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.pg5c-game-item:hover {
  transform: scale(1.05);
}

.pg5c-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--pg5c-light);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg5c-game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg5c-game-name {
  font-size: 1rem;
  color: var(--pg5c-dark);
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Cards and Boxes */
.pg5c-card {
  background: var(--pg5c-white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px var(--pg5c-shadow);
}

.pg5c-card-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pg5c-primary);
  margin-bottom: 1rem;
}

.pg5c-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--pg5c-gray);
}

/* Links */
.pg5c-link {
  color: var(--pg5c-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.pg5c-link:hover {
  color: var(--pg5c-accent);
  text-decoration: underline;
}

/* Bottom Navigation */
.pg5c-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pg5c-white);
  border-top: 2px solid var(--pg5c-light);
  box-shadow: 0 -2px 10px var(--pg5c-shadow);
  z-index: 1000;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.pg5c-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--pg5c-gray);
  min-width: 60px;
  min-height: 60px;
  padding: 0.5rem;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.pg5c-nav-item:hover {
  background: var(--pg5c-light);
  color: var(--pg5c-primary);
}

.pg5c-nav-item.pg5c-active {
  color: var(--pg5c-primary);
}

.pg5c-nav-icon {
  font-size: 2.2rem;
  margin-bottom: 0.2rem;
  line-height: 1;
}

.pg5c-nav-label {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* Footer */
.pg5c-footer {
  background: var(--pg5c-dark);
  color: var(--pg5c-white);
  padding: 3rem 0 8rem;
  margin-top: 3rem;
}

.pg5c-footer-content {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.pg5c-footer-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--pg5c-primary);
}

.pg5c-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg5c-footer-link {
  color: var(--pg5c-light);
  text-decoration: none;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.pg5c-footer-link:hover {
  color: var(--pg5c-primary);
}

.pg5c-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.pg5c-partner-logo {
  width: 60px;
  height: 40px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.pg5c-partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.pg5c-copyright {
  text-align: center;
  font-size: 1.2rem;
  color: var(--pg5c-gray);
  padding-top: 2rem;
  border-top: 1px solid var(--pg5c-gray);
}

/* Responsive Utilities */
@media (min-width: 769px) {
  .pg5c-bottom-nav {
    display: none;
  }

  .pg5c-main {
    padding-bottom: 2rem;
  }

  .pg5c-menu-toggle {
    display: none;
  }
}

@media (max-width: 768px) {
  .pg5c-header-buttons .pg5c-btn {
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
  }
}

/* Animation Classes */
.pg5c-animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.pg5c-animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Utility Classes */
.pg5c-text-center {
  text-align: center;
}

.pg5c-mb-1 {
  margin-bottom: 1rem;
}

.pg5c-mb-2 {
  margin-bottom: 2rem;
}

.pg5c-mb-3 {
  margin-bottom: 3rem;
}

.pg5c-highlight {
  color: var(--pg5c-primary);
  font-weight: 700;
}
