/**
 * PHJoin - Main CSS Stylesheet
 * CSS class prefix: pg91-
 * Mobile-first responsive design (max-width: 430px)
 * Color palette: #006400 | #2C3E50 | #90EE90
 */

/* ==================== CSS Variables ==================== */
:root {
  --pg91-primary: #006400;
  --pg91-secondary: #2C3E50;
  --pg91-accent: #90EE90;
  --pg91-dark: #1a1a1a;
  --pg91-darker: #0d0d0d;
  --pg91-light: #f5f5f5;
  --pg91-text: #ffffff;
  --pg91-text-muted: #b0b0b0;
  --pg91-border: #3a3a3a;
  --pg91-success: #28a745;
  --pg91-warning: #ffc107;
  --pg91-danger: #dc3545;
}

/* ==================== Reset & 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(--pg91-text);
  background-color: var(--pg91-darker);
  overflow-x: hidden;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--pg91-accent);
}

h1 { font-size: 2.4rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.6rem; }
h5 { font-size: 1.4rem; }
h6 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
  color: var(--pg91-text-muted);
}

a {
  color: var(--pg91-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--pg91-primary);
}

/* ==================== Header & Navigation ==================== */
.pg91-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--pg91-secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.pg91-header-scrolled {
  background-color: rgba(44, 62, 80, 0.95);
  backdrop-filter: blur(10px);
}

.pg91-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 430px;
  margin: 0 auto;
}

.pg91-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg91-accent);
}

.pg91-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.pg91-nav-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.pg91-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pg91-btn-primary {
  background-color: var(--pg91-primary);
  color: var(--pg91-accent);
}

.pg91-btn-primary:hover {
  background-color: var(--pg91-accent);
  color: var(--pg91-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 100, 0, 0.3);
}

.pg91-btn-secondary {
  background-color: transparent;
  color: var(--pg91-accent);
  border: 2px solid var(--pg91-accent);
}

.pg91-btn-secondary:hover {
  background-color: var(--pg91-accent);
  color: var(--pg91-primary);
}

.pg91-mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.pg91-mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--pg91-accent);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.pg91-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: var(--pg91-secondary);
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 6rem 2rem 2rem;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.pg91-mobile-menu.pg91-menu-open {
  right: 0;
}

.pg91-mobile-menu-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--pg91-accent);
  font-size: 2.4rem;
  cursor: pointer;
}

.pg91-menu-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pg91-menu-link {
  display: block;
  padding: 1rem;
  color: var(--pg91-text);
  font-size: 1.6rem;
  border-bottom: 1px solid var(--pg91-border);
  transition: all 0.3s ease;
}

.pg91-menu-link:hover {
  color: var(--pg91-accent);
  padding-left: 1.5rem;
  background-color: rgba(0, 100, 0, 0.1);
}

/* ==================== Main Content ==================== */
.pg91-main {
  padding-top: 7rem;
  padding-bottom: 8rem;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ==================== Carousel ==================== */
.pg91-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.pg91-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg91-carousel-slide.pg91-slide-active {
  opacity: 1;
}

.pg91-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== Sections ==================== */
.pg91-section {
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  background-color: var(--pg91-dark);
  border-radius: 12px;
}

.pg91-section-title {
  font-size: 2rem;
  color: var(--pg91-accent);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.pg91-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--pg91-primary);
}

/* ==================== Game Grid ==================== */
.pg91-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.pg91-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.pg91-game-item:hover {
  transform: scale(1.05);
}

.pg91-game-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--pg91-secondary);
}

.pg91-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg91-game-name {
  font-size: 1rem;
  text-align: center;
  color: var(--pg91-text);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== Cards ==================== */
.pg91-card {
  background-color: var(--pg91-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--pg91-primary);
}

.pg91-card-title {
  font-size: 1.6rem;
  color: var(--pg91-accent);
  margin-bottom: 1rem;
}

/* ==================== Lists ==================== */
.pg91-list {
  list-style: none;
  padding: 0;
}

.pg91-list-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--pg91-border);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.pg91-list-item:last-child {
  border-bottom: none;
}

.pg91-list-icon {
  color: var(--pg91-accent);
  font-size: 1.8rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* ==================== Footer ==================== */
.pg91-footer {
  background-color: var(--pg91-secondary);
  padding: 3rem 1.5rem 8rem;
  margin-top: 3rem;
}

.pg91-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg91-footer-link {
  padding: 0.5rem 1rem;
  color: var(--pg91-text);
  font-size: 1.4rem;
  background-color: var(--pg91-dark);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.pg91-footer-link:hover {
  background-color: var(--pg91-primary);
  color: var(--pg91-accent);
}

.pg91-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg91-partner-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.pg91-partner-logo:hover {
  opacity: 1;
}

.pg91-copyright {
  text-align: center;
  color: var(--pg91-text-muted);
  font-size: 1.2rem;
}

/* ==================== Bottom Navigation ==================== */
.pg91-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--pg91-secondary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  max-width: 430px;
  margin: 0 auto;
}

.pg91-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--pg91-text-muted);
  background: none;
  border: none;
  padding: 0;
}

.pg91-nav-item:hover {
  color: var(--pg91-accent);
  transform: scale(1.1);
}

.pg91-nav-item.pg91-active {
  color: var(--pg91-accent);
}

.pg91-nav-icon {
  font-size: 2rem;
}

.pg91-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* ==================== Utility Classes ==================== */
.pg91-text-center {
  text-align: center;
}

.pg91-mb-1 { margin-bottom: 1rem; }
.pg91-mb-2 { margin-bottom: 2rem; }
.pg91-mb-3 { margin-bottom: 3rem; }

.pg91-mt-1 { margin-top: 1rem; }
.pg91-mt-2 { margin-top: 2rem; }
.pg91-mt-3 { margin-top: 3rem; }

/* ==================== Desktop Styles ==================== */
@media (min-width: 769px) {
  .pg91-bottom-nav {
    display: none;
  }

  .pg91-main {
    padding-bottom: 2rem;
  }

  .pg91-footer {
    padding-bottom: 2rem;
  }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  .pg91-game-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 360px) {
  .pg91-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
