/**
 * jilly Stylesheet
 * All classes use pg9f prefix for namespace isolation
 */

/* CSS Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CSS Variables */
:root {
  --pg9f-primary: #0000CD;
  --pg9f-secondary: #1E90FF;
  --pg9f-accent: #00FF7F;
  --pg9f-dark: #0F0F23;
  --pg9f-green: #2E8B57;
  --pg9f-light: #FFFFFF;
  --pg9f-gray: #6B7280;
  --pg9f-border: #E5E7EB;
  --pg9f-shadow: rgba(0, 0, 0, 0.1);
}

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.4rem;
  line-height: 1.5;
  color: var(--pg9f-light);
  background-color: var(--pg9f-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container */
.pg9f-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.pg9f-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--pg9f-dark) 0%, var(--pg9f-primary) 100%);
  box-shadow: 0 2px 10px var(--pg9f-shadow);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.pg9f-header.pg9f-hidden {
  transform: translateY(-100%);
}

.pg9f-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.pg9f-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg9f-light);
  font-size: 1.8rem;
  font-weight: 700;
}

.pg9f-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.pg9f-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.pg9f-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pg9f-btn-primary {
  background: linear-gradient(135deg, var(--pg9f-accent) 0%, var(--pg9f-green) 100%);
  color: var(--pg9f-light);
  box-shadow: 0 2px 8px rgba(0, 255, 127, 0.3);
}

.pg9f-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 127, 0.4);
}

.pg9f-btn-secondary {
  background: linear-gradient(135deg, var(--pg9f-secondary) 0%, var(--pg9f-primary) 100%);
  color: var(--pg9f-light);
  box-shadow: 0 2px 8px rgba(30, 144, 255, 0.3);
}

.pg9f-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 144, 255, 0.4);
}

.pg9f-menu-toggle {
  background: none;
  border: none;
  color: var(--pg9f-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.pg9f-mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pg9f-dark);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 2rem 0;
}

.pg9f-mobile-menu.pg9f-active {
  transform: translateX(0);
}

.pg9f-mobile-nav-list {
  list-style: none;
  padding: 0 1rem;
}

.pg9f-mobile-nav-item {
  display: block;
  padding: 1.2rem 1.5rem;
  color: var(--pg9f-light);
  text-decoration: none;
  font-size: 1.6rem;
  border-bottom: 1px solid var(--pg9f-border);
  transition: background 0.3s ease;
}

.pg9f-mobile-nav-item:hover {
  background: rgba(30, 144, 255, 0.1);
}

.pg9f-mobile-nav-item.pg9f-touched {
  background: rgba(30, 144, 255, 0.15);
}

/* Main Content */
main {
  margin-top: 70px;
  padding-bottom: 80px;
}

@media (min-width: 769px) {
  main {
    padding-bottom: 2rem;
  }
}

/* Carousel */
.pg9f-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: 12px;
}

.pg9f-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pg9f-carousel-slide.pg9f-active {
  opacity: 1;
}

.pg9f-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
}

/* Headings */
.pg9f-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--pg9f-accent);
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.3;
}

.pg9f-section-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--pg9f-secondary);
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pg9f-section-title::before {
  content: '';
  width: 4px;
  height: 1.8rem;
  background: linear-gradient(180deg, var(--pg9f-accent) 0%, var(--pg9f-green) 100%);
  border-radius: 2px;
}

/* Game Grid */
.pg9f-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.pg9f-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.pg9f-game-item:hover {
  transform: scale(1.05);
}

.pg9f-game-icon {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px var(--pg9f-shadow);
  background: var(--pg9f-dark);
}

.pg9f-game-name {
  font-size: 1.1rem;
  color: var(--pg9f-light);
  text-align: center;
  line-height: 1.3;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Card Component */
.pg9f-card {
  background: linear-gradient(135deg, rgba(15, 15, 35, 0.8) 0%, rgba(0, 0, 205, 0.3) 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px var(--pg9f-shadow);
  border: 1px solid rgba(30, 144, 255, 0.2);
}

.pg9f-card-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--pg9f-accent);
  margin-bottom: 1rem;
}

.pg9f-card-content {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--pg9f-light);
}

.pg9f-card-content p {
  margin-bottom: 1rem;
}

/* Link Styles */
.pg9f-link {
  color: var(--pg9f-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  cursor: pointer;
}

.pg9f-link:hover {
  color: var(--pg9f-accent);
  text-decoration: underline;
}

/* Footer */
.pg9f-footer {
  background: linear-gradient(135deg, var(--pg9f-dark) 0%, var(--pg9f-primary) 100%);
  padding: 2rem 0 8rem;
  margin-top: 3rem;
}

.pg9f-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg9f-footer-link {
  color: var(--pg9f-light);
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: rgba(30, 144, 255, 0.1);
  transition: all 0.3s ease;
}

.pg9f-footer-link:hover {
  background: rgba(30, 144, 255, 0.2);
  transform: translateY(-2px);
}

.pg9f-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg9f-partner-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--pg9f-light);
  padding: 5px;
}

.pg9f-copyright {
  text-align: center;
  color: var(--pg9f-gray);
  font-size: 1.2rem;
  padding: 0 1rem;
}

/* Bottom Navigation */
.pg9f-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, var(--pg9f-dark) 0%, #1a1a3e 100%);
  border-top: 2px solid var(--pg9f-primary);
  box-shadow: 0 -2px 10px var(--pg9f-shadow);
  z-index: 1000;
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
}

@media (min-width: 769px) {
  .pg9f-bottom-nav {
    display: none;
  }
}

.pg9f-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--pg9f-light);
  min-width: 60px;
  min-height: 60px;
  padding: 0.3rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pg9f-bottom-nav-item:hover {
  background: rgba(30, 144, 255, 0.15);
  transform: scale(1.05);
}

.pg9f-bottom-nav-item.pg9f-active {
  color: var(--pg9f-accent);
}

.pg9f-bottom-nav-icon {
  font-size: 24px;
  margin-bottom: 0.2rem;
}

.pg9f-bottom-nav-label {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

/* Utility Classes */
.pg9f-text-center {
  text-align: center;
}

.pg9f-mt-1 { margin-top: 1rem; }
.pg9f-mt-2 { margin-top: 2rem; }
.pg9f-mb-1 { margin-bottom: 1rem; }
.pg9f-mb-2 { margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .pg9f-container {
    padding: 0 1rem;
  }

  .pg9f-title {
    font-size: 2rem;
  }

  .pg9f-section-title {
    font-size: 1.6rem;
  }
}
