/**
 * AH88 PH - Main CSS File
 * All classes use prefix: pg38-
 * Mobile-first responsive design
 * Color scheme: #F08080 (Light Coral), #FF6347 (Tomato), #1C2833 (Dark Blue-Gray)
 */

/* ===== CSS Variables ===== */
:root {
  --pg38-primary: #FF6347;
  --pg38-secondary: #F08080;
  --pg38-dark: #1C2833;
  --pg38-darker: #0F1419;
  --pg38-light: #FFFFFF;
  --pg38-gray: #7F8C8D;
  --pg38-gray-light: #BDC3C7;
  --pg38-gradient: linear-gradient(135deg, #FF6347 0%, #F08080 100%);
  --pg38-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  --pg38-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.2);
  font-size: 62.5%; /* 1rem = 10px */
}

/* ===== Global Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--pg38-light);
  background-color: var(--pg38-darker);
  overflow-x: hidden;
}

/* ===== Container & Layout ===== */
.pg38-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.pg38-wrapper {
  min-height: 100vh;
  padding-top: 6rem;
  padding-bottom: 8rem;
}

.pg38-section {
  padding: 2rem 0;
}

/* ===== Header ===== */
.pg38-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--pg38-dark) 0%, rgba(28, 40, 51, 0.95) 100%);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  z-index: 1000;
  box-shadow: var(--pg38-shadow);
}

.pg38-header-content {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pg38-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg38-light);
}

.pg38-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.6rem;
}

.pg38-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--pg38-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pg38-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pg38-btn {
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 2rem;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.pg38-btn-primary {
  background: var(--pg38-gradient);
  color: var(--pg38-light);
  box-shadow: var(--pg38-shadow);
}

.pg38-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--pg38-shadow-lg);
}

.pg38-btn-outline {
  background: transparent;
  color: var(--pg38-primary);
  border: 2px solid var(--pg38-primary);
}

.pg38-btn-outline:hover {
  background: var(--pg38-primary);
  color: var(--pg38-light);
}

.pg38-menu-toggle {
  background: none;
  border: none;
  color: var(--pg38-light);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
}

/* ===== Mobile Menu ===== */
.pg38-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;
}

.pg38-menu-overlay.pg38-overlay-active {
  opacity: 1;
  visibility: visible;
}

.pg38-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--pg38-dark);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
}

.pg38-mobile-menu.pg38-menu-open {
  right: 0;
}

.pg38-menu-header {
  padding: 2rem 1.5rem;
  background: var(--pg38-gradient);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pg38-menu-close {
  background: none;
  border: none;
  color: var(--pg38-light);
  font-size: 2.4rem;
  cursor: pointer;
}

.pg38-nav-list {
  list-style: none;
  padding: 1rem 0;
}

.pg38-nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pg38-nav-link {
  display: block;
  padding: 1.5rem 2rem;
  color: var(--pg38-light);
  text-decoration: none;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.pg38-nav-link:hover,
.pg38-nav-link.pg38-nav-active {
  background: rgba(255, 99, 71, 0.1);
  color: var(--pg38-primary);
  padding-left: 2.5rem;
}

/* ===== Carousel ===== */
.pg38-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 1.2rem;
  margin: 2rem 0;
  box-shadow: var(--pg38-shadow-lg);
}

.pg38-carousel-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.pg38-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.pg38-carousel-slide.pg38-slide-active {
  opacity: 1;
  z-index: 1;
}

.pg38-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg38-carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.8rem;
  z-index: 2;
}

.pg38-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg38-carousel-dot.pg38-dot-active {
  background: var(--pg38-primary);
  width: 2.4rem;
  border-radius: 0.4rem;
}

/* ===== Game Grid ===== */
.pg38-game-section {
  margin: 3rem 0;
}

.pg38-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--pg38-light);
  padding-left: 1rem;
  border-left: 4px solid var(--pg38-primary);
}

.pg38-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.pg38-game-card {
  background: var(--pg38-dark);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--pg38-shadow);
}

.pg38-game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pg38-shadow-lg);
  background: linear-gradient(135deg, rgba(255, 99, 71, 0.1) 0%, rgba(240, 128, 128, 0.1) 100%);
}

.pg38-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.8rem;
  margin-bottom: 0.8rem;
  object-fit: cover;
}

.pg38-game-name {
  font-size: 1.1rem;
  color: var(--pg38-light);
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== Content Sections ===== */
.pg38-content-box {
  background: var(--pg38-dark);
  border-radius: 1.2rem;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--pg38-shadow);
}

.pg38-heading {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--pg38-light);
}

.pg38-subheading {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--pg38-secondary);
}

.pg38-text {
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--pg38-gray-light);
  margin-bottom: 1.5rem;
}

.pg38-list {
  list-style: none;
  padding-left: 0;
}

.pg38-list-item {
  padding: 1rem;
  margin-bottom: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.8rem;
  border-left: 3px solid var(--pg38-primary);
  font-size: 1.4rem;
  line-height: 1.6;
}

/* ===== Footer ===== */
.pg38-footer {
  background: var(--pg38-dark);
  padding: 3rem 1.5rem 10rem;
  margin-top: 4rem;
  border-top: 2px solid rgba(255, 99, 71, 0.2);
}

.pg38-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.pg38-footer-link {
  color: var(--pg38-gray-light);
  text-decoration: none;
  font-size: 1.3rem;
  transition: color 0.3s ease;
}

.pg38-footer-link:hover {
  color: var(--pg38-primary);
}

.pg38-partners {
  margin: 3rem 0;
}

.pg38-partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.pg38-partner-img {
  width: 100%;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.pg38-partner-img:hover {
  opacity: 1;
}

.pg38-copyright {
  text-align: center;
  color: var(--pg38-gray);
  font-size: 1.2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Bottom Navigation ===== */
.pg38-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(28, 40, 51, 0.98) 0%, var(--pg38-dark) 100%);
  backdrop-filter: blur(10px);
  padding: 0.8rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
  border-top: 2px solid rgba(255, 99, 71, 0.3);
}

.pg38-bottom-nav-container {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.pg38-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--pg38-gray-light);
  cursor: pointer;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  min-width: 6rem;
  min-height: 6rem;
}

.pg38-bottom-nav-btn:hover,
.pg38-bottom-nav-btn.pg38-nav-active {
  color: var(--pg38-primary);
  transform: translateY(-2px);
}

.pg38-bottom-nav-icon {
  font-size: 2.4rem;
  transition: transform 0.3s ease;
}

.pg38-bottom-nav-btn:active .pg38-bottom-nav-icon {
  transform: scale(0.9);
}

.pg38-bottom-nav-label {
  font-size: 1.1rem;
  font-weight: 500;
}

/* ===== Responsive ===== */
@media (min-width: 769px) {
  .pg38-bottom-nav {
    display: none;
  }

  .pg38-wrapper {
    padding-bottom: 3rem;
  }

  .pg38-footer {
    padding-bottom: 3rem;
  }
}

@media (max-width: 768px) {
  .pg38-wrapper {
    padding-bottom: 8rem;
  }

  main {
    padding-bottom: 8rem;
  }
}

/* ===== Utility Classes ===== */
.pg38-text-center {
  text-align: center;
}

.pg38-text-primary {
  color: var(--pg38-primary);
}

.pg38-text-bold {
  font-weight: 700;
}

.pg38-mt-2 {
  margin-top: 2rem;
}

.pg38-mb-2 {
  margin-bottom: 2rem;
}

.pg38-hidden {
  display: none;
}
