/**
 * jili 56 - Main Stylesheet
 * Mobile-first responsive design
 * All classes use pg80- prefix for namespace isolation
 */

/* CSS Variables */
:root {
  --pg80-primary: #DC143C;
  --pg80-secondary: #48D1CC;
  --pg80-dark: #2E4057;
  --pg80-light: #FFC0CB;
  --pg80-accent: #26A69A;
  --pg80-bg: #1a1a2e;
  --pg80-bg-light: #16213e;
  --pg80-text: #ffffff;
  --pg80-text-muted: #b0b0b0;
  --pg80-border: #2a2a4a;
  --pg80-shadow: rgba(0, 0, 0, 0.3);
  --pg80-gradient: linear-gradient(135deg, var(--pg80-primary), var(--pg80-secondary));
}

/* 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, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--pg80-text);
  background-color: var(--pg80-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

body.pg80-menu-open {
  overflow: hidden;
}

/* Container */
.pg80-container {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1rem;
}

.pg80-wrapper {
  padding-top: 70px;
  padding-bottom: 80px;
}

/* Header */
.pg80-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--pg80-dark);
  box-shadow: 0 2px 10px var(--pg80-shadow);
  z-index: 1000;
  height: 60px;
}

.pg80-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  height: 100%;
}

.pg80-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--pg80-text);
  font-size: 1.8rem;
  font-weight: 700;
}

.pg80-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.pg80-header-buttons {
  display: flex;
  gap: 0.8rem;
}

.pg80-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.pg80-btn-primary {
  background: var(--pg80-primary);
  color: var(--pg80-text);
}

.pg80-btn-secondary {
  background: var(--pg80-secondary);
  color: var(--pg80-dark);
}

.pg80-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.4);
}

.pg80-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.pg80-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--pg80-text);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.pg80-mobile-menu {
  position: fixed;
  top: 60px;
  left: -100%;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--pg80-dark);
  height: calc(100vh - 60px);
  transition: left 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
  padding: 1rem 0;
}

.pg80-mobile-menu.pg80-menu-open {
  left: 0;
}

.pg80-menu-item {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--pg80-text);
  text-decoration: none;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--pg80-border);
  transition: all 0.3s ease;
}

.pg80-menu-item:hover {
  background: var(--pg80-bg-light);
  padding-left: 2rem;
}

/* Slider */
.pg80-slider {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.pg80-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.pg80-slide.pg80-slide-active {
  opacity: 1;
}

.pg80-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg80-slider-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.pg80-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pg80-indicator.pg80-indicator-active {
  background: var(--pg80-primary);
  width: 20px;
  border-radius: 4px;
}

/* Hero Section */
.pg80-hero {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.pg80-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  background: var(--pg80-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Game Grid */
.pg80-section {
  margin-bottom: 3rem;
}

.pg80-section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--pg80-secondary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pg80-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.pg80-game-card {
  background: var(--pg80-bg-light);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--pg80-text);
  display: block;
}

.pg80-game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px var(--pg80-shadow);
}

.pg80-game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.pg80-game-name {
  padding: 0.5rem;
  font-size: 1.1rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content Sections */
.pg80-content {
  background: var(--pg80-bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.pg80-content h2 {
  font-size: 1.8rem;
  color: var(--pg80-secondary);
  margin-bottom: 1rem;
}

.pg80-content h3 {
  font-size: 1.5rem;
  color: var(--pg80-light);
  margin-bottom: 0.8rem;
  margin-top: 1.5rem;
}

.pg80-content p {
  margin-bottom: 1rem;
  color: var(--pg80-text-muted);
}

.pg80-content ul, .pg80-content ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.pg80-content li {
  margin-bottom: 0.5rem;
  color: var(--pg80-text-muted);
}

.pg80-content a {
  color: var(--pg80-secondary);
  text-decoration: none;
  font-weight: 600;
}

.pg80-content a:hover {
  text-decoration: underline;
}

/* Promo Link */
.pg80-promo-link {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--pg80-gradient);
  color: var(--pg80-text);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  margin: 1rem 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pg80-promo-link:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(220, 20, 60, 0.5);
}

/* Bottom Navigation */
.pg80-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pg80-dark);
  box-shadow: 0 -2px 10px var(--pg80-shadow);
  z-index: 1000;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.pg80-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  color: var(--pg80-text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 8px;
}

.pg80-bottom-nav-item:hover,
.pg80-bottom-nav-item.pg80-active {
  color: var(--pg80-primary);
  transform: scale(1.1);
}

.pg80-bottom-nav-item i {
  font-size: 24px;
}

.pg80-bottom-nav-item span {
  font-size: 10px;
  font-weight: 500;
}

.pg80-touch-active {
  transform: scale(0.95) !important;
}

/* Footer */
.pg80-footer {
  background: var(--pg80-dark);
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.pg80-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.pg80-footer-link {
  color: var(--pg80-secondary);
  text-decoration: none;
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--pg80-bg-light);
  transition: all 0.3s ease;
}

.pg80-footer-link:hover {
  background: var(--pg80-primary);
  color: var(--pg80-text);
}

.pg80-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.pg80-partners img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.pg80-partners img:hover {
  opacity: 1;
  transform: scale(1.1);
}

.pg80-copyright {
  text-align: center;
  color: var(--pg80-text-muted);
  font-size: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pg80-border);
}

/* Responsive */
@media (min-width: 769px) {
  .pg80-bottom-nav {
    display: none;
  }

  .pg80-wrapper {
    padding-bottom: 2rem;
  }

  .pg80-game-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 768px) {
  .pg80-game-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Utility Classes */
.pg80-text-center {
  text-align: center;
}

.pg80-mb-1 {
  margin-bottom: 1rem;
}

.pg80-mb-2 {
  margin-bottom: 2rem;
}

.pg80-mt-1 {
  margin-top: 1rem;
}

.pg80-mt-2 {
  margin-top: 2rem;
}

/* Animation */
@keyframes pg80-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pg80-fade-in {
  animation: pg80-fadeIn 0.5s ease;
}

/* Loading State */
body:not(.pg80-loaded) {
  visibility: hidden;
}

body.pg80-loaded {
  visibility: visible;
}
