/* design-474d.css - Jilivs Platform Stylesheet */
/* All classes prefixed with pg47- for namespace isolation */

:root {
  --pg47-primary: #EE82EE;
  --pg47-bg: #333333;
  --pg47-bg-light: #3d3d3d;
  --pg47-bg-dark: #2a2a2a;
  --pg47-text: #FAFAFA;
  --pg47-text-muted: #b0b0b0;
  --pg47-accent: #6495ED;
  --pg47-highlight: #8470FF;
  --pg47-secondary: #9966CC;
  --pg47-success: #4CAF50;
  --pg47-warning: #FF9800;
  --pg47-border: #4a4a4a;
  --pg47-radius: 8px;
  --pg47-radius-lg: 12px;
  --pg47-shadow: 0 4px 15px rgba(0,0,0,0.3);
  --pg47-transition: all 0.3s ease;
}

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--pg47-text);
  background-color: var(--pg47-bg);
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--pg47-primary);
  text-decoration: none;
  transition: var(--pg47-transition);
}

a:hover {
  color: var(--pg47-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* Header */
.pg47-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 56px;
  background: linear-gradient(135deg, var(--pg47-bg-dark) 0%, #1a1a2e 100%);
  border-bottom: 1px solid var(--pg47-highlight);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.pg47-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg47-header-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.pg47-header-logo span {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg47-primary);
  letter-spacing: 0.5px;
}

.pg47-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg47-btn-register {
  background: linear-gradient(135deg, var(--pg47-primary), var(--pg47-highlight));
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--pg47-transition);
  white-space: nowrap;
}

.pg47-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(238,130,238,0.5);
}

.pg47-btn-login {
  background: transparent;
  color: var(--pg47-accent);
  border: 1px solid var(--pg47-accent);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--pg47-transition);
  white-space: nowrap;
}

.pg47-btn-login:hover {
  background: var(--pg47-accent);
  color: #fff;
}

.pg47-hamburger {
  background: none;
  border: none;
  color: var(--pg47-text);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main content */
.pg47-main {
  margin-top: 56px;
  padding-bottom: 20px;
}

@media (max-width: 768px) {
  .pg47-main {
    padding-bottom: 80px;
  }
}

/* Carousel */
.pg47-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 var(--pg47-radius-lg) var(--pg47-radius-lg);
}

.pg47-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.pg47-carousel-slide {
  min-width: 100%;
  position: relative;
}

.pg47-carousel-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.pg47-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.pg47-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--pg47-transition);
  border: none;
}

.pg47-carousel-dot.pg47-active {
  background: var(--pg47-primary);
  width: 20px;
  border-radius: 4px;
}

/* Section containers */
.pg47-section {
  padding: 16px 12px;
}

.pg47-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg47-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg47-section-title i {
  color: var(--pg47-highlight);
  font-size: 2rem;
}

/* Promo banner */
.pg47-promo-banner {
  background: linear-gradient(135deg, var(--pg47-secondary), var(--pg47-highlight));
  border-radius: var(--pg47-radius-lg);
  padding: 16px;
  margin: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--pg47-transition);
}

.pg47-promo-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--pg47-shadow);
}

.pg47-promo-banner h3 {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 6px;
}

.pg47-promo-banner p {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
}

/* Game grid */
.pg47-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pg47-game-card {
  background: var(--pg47-bg-light);
  border-radius: var(--pg47-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--pg47-transition);
  border: 1px solid transparent;
}

.pg47-game-card:hover {
  transform: translateY(-3px);
  border-color: var(--pg47-primary);
  box-shadow: 0 0 10px rgba(238,130,238,0.2);
}

.pg47-game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.pg47-game-card .pg47-game-name {
  padding: 6px 4px;
  font-size: 1.1rem;
  text-align: center;
  color: var(--pg47-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.pg47-game-card .pg47-game-type {
  display: none;
}

/* Category tabs */
.pg47-category-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 0 12px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pg47-category-tabs::-webkit-scrollbar {
  display: none;
}

.pg47-cat-tab {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--pg47-transition);
  background: var(--pg47-bg-light);
  color: var(--pg47-text-muted);
  border: 1px solid var(--pg47-border);
  white-space: nowrap;
}

.pg47-cat-tab.pg47-active,
.pg47-cat-tab:hover {
  background: linear-gradient(135deg, var(--pg47-primary), var(--pg47-highlight));
  color: #fff;
  border-color: transparent;
}

/* Hot badge */
.pg47-hot-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ff4444;
  color: #fff;
  font-size: 0.9rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  z-index: 2;
}

/* Mobile bottom navigation */
.pg47-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: linear-gradient(180deg, var(--pg47-bg-dark), #1a1a2e);
  border-top: 1px solid var(--pg47-highlight);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 4px;
}

.pg47-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  color: var(--pg47-text-muted);
  cursor: pointer;
  transition: var(--pg47-transition);
  text-decoration: none;
  position: relative;
  background: none;
  border: none;
  font-family: inherit;
}

.pg47-bottom-nav-item i,
.pg47-bottom-nav-item .material-symbols-outlined {
  font-size: 24px;
  margin-bottom: 2px;
  transition: var(--pg47-transition);
}

.pg47-bottom-nav-item span.pg47-nav-label {
  font-size: 1rem;
  font-weight: 500;
}

.pg47-bottom-nav-item:hover,
.pg47-bottom-nav-item.pg47-active {
  color: var(--pg47-primary);
}

.pg47-bottom-nav-item:hover i,
.pg47-bottom-nav-item.pg47-active i,
.pg47-bottom-nav-item:hover .material-symbols-outlined,
.pg47-bottom-nav-item.pg47-active .material-symbols-outlined {
  transform: scale(1.15);
  color: var(--pg47-primary);
}

.pg47-bottom-nav-item.pg47-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--pg47-primary);
  border-radius: 0 0 3px 3px;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .pg47-bottom-nav {
    display: none;
  }
}

/* Mobile menu overlay */
.pg47-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pg47-menu-overlay.pg47-overlay-visible {
  opacity: 1;
  pointer-events: all;
}

/* Mobile menu */
.pg47-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: linear-gradient(180deg, #1a1a2e, var(--pg47-bg-dark));
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 20px 16px;
}

.pg47-mobile-menu.pg47-menu-open {
  right: 0;
}

.pg47-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pg47-border);
}

.pg47-menu-header span {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg47-primary);
}

.pg47-menu-close {
  background: none;
  border: none;
  color: var(--pg47-text);
  font-size: 2rem;
  cursor: pointer;
}

.pg47-menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pg47-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--pg47-radius);
  color: var(--pg47-text);
  font-size: 1.4rem;
  font-weight: 500;
  transition: var(--pg47-transition);
  cursor: pointer;
}

.pg47-menu-link:hover {
  background: rgba(238,130,238,0.15);
  color: var(--pg47-primary);
}

.pg47-menu-link i {
  width: 20px;
  text-align: center;
  color: var(--pg47-accent);
}

/* Footer */
.pg47-footer {
  background: var(--pg47-bg-dark);
  padding: 24px 16px 16px;
  border-top: 1px solid var(--pg47-border);
}

.pg47-footer-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.pg47-footer-partners span {
  background: var(--pg47-bg-light);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 1.1rem;
  color: var(--pg47-text-muted);
}

.pg47-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pg47-footer-links a {
  font-size: 1.2rem;
  color: var(--pg47-text-muted);
}

.pg47-footer-links a:hover {
  color: var(--pg47-primary);
}

.pg47-footer-copy {
  text-align: center;
  font-size: 1.1rem;
  color: var(--pg47-text-muted);
  margin-top: 12px;
}

/* Utility classes */
.pg47-text-center { text-align: center; }
.pg47-text-primary { color: var(--pg47-primary); }
.pg47-text-accent { color: var(--pg47-accent); }
.pg47-text-highlight { color: var(--pg47-highlight); }
.pg47-mt-8 { margin-top: 8px; }
.pg47-mt-16 { margin-top: 16px; }
.pg47-mb-8 { margin-bottom: 8px; }
.pg47-mb-16 { margin-bottom: 16px; }
.pg47-p-12 { padding: 12px; }
.pg47-hidden { display: none; }

/* Content article styles */
.pg47-content-article {
  padding: 16px 12px;
  line-height: 1.8;
}

.pg47-content-article h2 {
  font-size: 1.8rem;
  color: var(--pg47-primary);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--pg47-highlight);
}

.pg47-content-article h3 {
  font-size: 1.6rem;
  color: var(--pg47-accent);
  margin: 16px 0 8px;
}

.pg47-content-article p {
  margin-bottom: 12px;
  color: var(--pg47-text);
  font-size: 1.4rem;
}

.pg47-content-article ul,
.pg47-content-article ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.pg47-content-article li {
  margin-bottom: 6px;
  font-size: 1.4rem;
  color: var(--pg47-text);
}

.pg47-content-article li::before {
  content: '';
}

/* FAQ styles */
.pg47-faq-item {
  background: var(--pg47-bg-light);
  border-radius: var(--pg47-radius);
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--pg47-border);
}

.pg47-faq-question {
  padding: 12px 14px;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--pg47-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg47-faq-question i {
  color: var(--pg47-highlight);
  flex-shrink: 0;
}

.pg47-faq-answer {
  padding: 0 14px 12px;
  font-size: 1.3rem;
  color: var(--pg47-text-muted);
  line-height: 1.7;
}

/* CTA section */
.pg47-cta-box {
  background: linear-gradient(135deg, var(--pg47-secondary), var(--pg47-highlight));
  border-radius: var(--pg47-radius-lg);
  padding: 20px 16px;
  text-align: center;
  margin: 16px 12px;
}

.pg47-cta-box h3 {
  font-size: 1.7rem;
  color: #fff;
  margin-bottom: 8px;
}

.pg47-cta-box p {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 12px;
}

.pg47-cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--pg47-highlight);
  padding: 10px 28px;
  border-radius: 25px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--pg47-transition);
  border: none;
}

.pg47-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* Step card */
.pg47-step-card {
  background: var(--pg47-bg-light);
  border-radius: var(--pg47-radius);
  padding: 14px;
  margin-bottom: 12px;
  border-left: 3px solid var(--pg47-primary);
}

.pg47-step-card h4 {
  font-size: 1.5rem;
  color: var(--pg47-primary);
  margin-bottom: 6px;
}

.pg47-step-card p {
  font-size: 1.3rem;
  color: var(--pg47-text-muted);
  line-height: 1.6;
}

/* Breadcrumb */
.pg47-breadcrumb {
  padding: 10px 12px;
  font-size: 1.2rem;
  color: var(--pg47-text-muted);
}

.pg47-breadcrumb a {
  color: var(--pg47-accent);
}

/* Lazy image placeholder */
.pg47-lazy-img {
  background: var(--pg47-bg-light);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.pg47-loaded {
  opacity: 1;
}

/* Responsive fine-tuning */
@media (max-width: 320px) {
  .pg47-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pg47-header-logo span {
    font-size: 1.5rem;
  }
}

@media (min-width: 431px) {
  body {
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
  }
}
