/**
 * JIPH Main Stylesheet
 * All classes use g52e prefix for namespace isolation
 */

/* CSS Variables */
:root {
  --g52e-primary: #F5F5F5;
  --g52e-secondary: #4A4A4A;
  --g52e-accent1: #2F2F2F;
  --g52e-accent2: #AFEEEE;
  --g52e-accent3: #495057;
  --g52e-accent4: #3A3A3A;
  --g52e-text: #F5F5F5;
  --g52e-text-dark: #4A4A4A;
  --g52e-bg: #2F2F2F;
  --g52e-bg-light: #3A3A3A;
  --g52e-border: #495057;
  --g52e-success: #AFEEEE;
  --g52e-warning: #FFC107;
  --g52e-danger: #DC3545;
}

/* 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(--g52e-text);
  background-color: var(--g52e-bg);
  min-height: 100vh;
}

/* Container */
.g52e-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.g52e-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--g52e-accent1);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.g52e-header-content {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

.g52e-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--g52e-text);
}

.g52e-logo img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.g52e-logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g52e-accent2);
}

.g52e-header-buttons {
  display: flex;
  gap: 0.5rem;
}

.g52e-btn {
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.g52e-btn-primary {
  background-color: var(--g52e-accent2);
  color: var(--g52e-accent1);
}

.g52e-btn-primary:hover {
  background-color: #9DDDD5;
  transform: translateY(-1px);
}

.g52e-btn-secondary {
  background-color: var(--g52e-secondary);
  color: var(--g52e-primary);
}

.g52e-btn-secondary:hover {
  background-color: #5A5A5A;
  transform: translateY(-1px);
}

.g52e-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--g52e-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Menu */
.g52e-mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background-color: var(--g52e-accent1);
  z-index: 9999;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.g52e-mobile-menu.g52e-menu-open {
  display: block;
}

.g52e-menu-item {
  display: block;
  padding: 1rem;
  color: var(--g52e-text);
  text-decoration: none;
  border-bottom: 1px solid var(--g52e-accent4);
  transition: background-color 0.3s ease;
}

.g52e-menu-item:hover {
  background-color: var(--g52e-accent4);
}

.g52e-menu-item:last-child {
  border-bottom: none;
}

/* Main Content */
.g52e-main {
  margin-top: 70px;
  padding-bottom: 80px;
}

/* Carousel */
.g52e-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-bottom: 2rem;
}

.g52e-carousel-slide {
  width: 100%;
}

.g52e-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.g52e-carousel-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.g52e-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.g52e-carousel-dot.active {
  background-color: var(--g52e-accent2);
}

/* Section */
.g52e-section {
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}

.g52e-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--g52e-accent2);
}

/* Game Grid */
.g52e-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.g52e-game-item {
  background-color: var(--g52e-bg-light);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.g52e-game-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(175, 238, 238, 0.3);
}

.g52e-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.g52e-game-name {
  padding: 0.5rem;
  font-size: 1rem;
  text-align: center;
  color: var(--g52e-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card */
.g52e-card {
  background-color: var(--g52e-bg-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.g52e-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--g52e-accent2);
}

.g52e-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--g52e-primary);
}

/* Link */
.g52e-link {
  color: var(--g52e-accent2);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.g52e-link:hover {
  color: #9DDDD5;
  text-decoration: underline;
}

/* List */
.g52e-list {
  list-style: none;
  padding: 0;
}

.g52e-list-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--g52e-border);
  color: var(--g52e-primary);
}

.g52e-list-item:last-child {
  border-bottom: none;
}

/* Footer */
.g52e-footer {
  background-color: var(--g52e-accent1);
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.g52e-footer-content {
  max-width: 430px;
  margin: 0 auto;
}

.g52e-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.g52e-footer-link {
  color: var(--g52e-accent2);
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.g52e-footer-link:hover {
  color: #9DDDD5;
}

.g52e-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.g52e-partner-img {
  height: 30px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.g52e-partner-img:hover {
  opacity: 1;
}

.g52e-copyright {
  text-align: center;
  color: var(--g52e-secondary);
  font-size: 1.2rem;
}

/* Bottom Navigation */
.g52e-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--g52e-accent1);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.g52e-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--g52e-secondary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.g52e-nav-item:hover {
  color: var(--g52e-accent2);
  transform: scale(1.05);
}

.g52e-nav-item.g52e-nav-active {
  color: var(--g52e-accent2);
}

.g52e-nav-icon {
  font-size: 24px;
  margin-bottom: 0.3rem;
}

.g52e-nav-text {
  font-size: 10px;
  font-weight: 500;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .g52e-bottom-nav {
    display: none;
  }

  .g52e-main {
    padding-bottom: 2rem;
  }

  .g52e-menu-toggle {
    display: block;
  }
}

/* Show menu toggle on mobile */
@media (max-width: 768px) {
  .g52e-menu-toggle {
    display: block;
  }
}

/* Utility Classes */
.g52e-text-center {
  text-align: center;
}

.g52e-mb-1 {
  margin-bottom: 1rem;
}

.g52e-mb-2 {
  margin-bottom: 2rem;
}

.g52e-mt-1 {
  margin-top: 1rem;
}

.g52e-mt-2 {
  margin-top: 2rem;
}

.g52e-p-1 {
  padding: 1rem;
}

.g52e-py-2 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 380px) {
  .g52e-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
