/**
 * Lucky Taya - Core Stylesheet
 * Prefix: pg57-
 * Colors: #98FB98 (primary), #2D2D2D (bg), #DEE2E6 (text), #FF69B4 (accent)
 * Mobile-first, max-width 430px, root font 62.5%
 */

:root {
  --pg57-primary: #98FB98;
  --pg57-bg: #2D2D2D;
  --pg57-bg-dark: #1a1a2e;
  --pg57-text: #DEE2E6;
  --pg57-accent: #FF69B4;
  --pg57-accent2: #ffd700;
  --pg57-card-bg: #3a3a4a;
  --pg57-card-border: #4a4a5a;
  --pg57-gradient: linear-gradient(135deg, #1a1a2e 0%, #2D2D2D 50%, #16213e 100%);
  --pg57-radius: 1.2rem;
  --pg57-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

*, *::before, *::after {
  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;
  background: var(--pg57-bg-dark);
  color: var(--pg57-text);
  line-height: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========== Header ========== */
.pg57-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 5.6rem;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  z-index: 1000;
  border-bottom: 1px solid var(--pg57-accent);
  box-shadow: 0 2px 10px rgba(255,105,180,0.2);
}

.pg57-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.pg57-logo-wrap img {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.6rem;
}

.pg57-logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--pg57-primary), var(--pg57-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pg57-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pg57-btn-register, .pg57-btn-login {
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.pg57-btn-register {
  background: linear-gradient(135deg, var(--pg57-accent), #ff8dc7);
  color: #fff;
}

.pg57-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(255,105,180,0.5);
}

.pg57-btn-login {
  background: transparent;
  color: var(--pg57-primary);
  border: 2px solid var(--pg57-primary);
}

.pg57-btn-login:hover {
  background: var(--pg57-primary);
  color: var(--pg57-bg-dark);
}

.pg57-menu-toggle {
  background: none;
  border: none;
  color: var(--pg57-text);
  font-size: 2.4rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

/* ========== Mobile Menu ========== */
.pg57-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
}

.pg57-mobile-menu {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateX(-100%);
  visibility: hidden;
  width: 100%;
  max-width: 430px;
  height: 100%;
  background: linear-gradient(180deg, #1a1a2e, #16213e);
  z-index: 9999;
  transition: transform 0.35s ease, visibility 0.35s ease;
  padding: 6rem 1.6rem 2rem;
  overflow-y: auto;
}

.pg57-mobile-menu.pg57-open {
  transform: translateX(-50%) translateX(0);
  visibility: visible;
}

.pg57-menu-close {
  position: absolute;
  top: 1.2rem;
  right: 1.6rem;
  background: none;
  border: none;
  color: var(--pg57-text);
  font-size: 2.8rem;
  cursor: pointer;
}

.pg57-mobile-menu nav a {
  display: block;
  padding: 1.2rem 0;
  color: var(--pg57-text);
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s;
}

.pg57-mobile-menu nav a:hover {
  color: var(--pg57-accent);
}

/* ========== Main Content ========== */
.pg57-main {
  padding-top: 5.6rem;
}

@media (max-width: 768px) {
  .pg57-main {
    padding-bottom: 8rem;
  }
}

/* ========== Carousel ========== */
.pg57-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 430/200;
}

.pg57-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
}

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

.pg57-carousel-slide.pg57-active {
  opacity: 1;
  position: relative;
}

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

.pg57-carousel-dots {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
}

.pg57-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s;
}

.pg57-carousel-dot.pg57-active {
  background: var(--pg57-accent);
}

/* ========== Section ========== */
.pg57-section {
  padding: 2rem 1.2rem;
}

.pg57-section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--pg57-accent);
  line-height: 2.4rem;
}

/* ========== Game Grid ========== */
.pg57-category-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 1.6rem 0 1rem;
  color: var(--pg57-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pg57-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.pg57-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

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

.pg57-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1rem;
  object-fit: cover;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.pg57-game-item:hover img {
  border-color: var(--pg57-accent);
}

.pg57-game-name {
  font-size: 1.1rem;
  margin-top: 0.4rem;
  color: var(--pg57-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== Modules ========== */
.pg57-card {
  background: var(--pg57-card-bg);
  border-radius: var(--pg57-radius);
  padding: 1.6rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--pg57-card-border);
}

.pg57-card h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--pg57-primary);
}

.pg57-card p {
  font-size: 1.3rem;
  line-height: 2rem;
  color: var(--pg57-text);
  margin-bottom: 0.8rem;
}

.pg57-promo-btn {
  display: inline-block;
  padding: 1rem 2.4rem;
  background: linear-gradient(135deg, var(--pg57-accent), #ff8dc7);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  border: none;
  border-radius: 3rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  margin: 0.8rem 0;
}

.pg57-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255,105,180,0.5);
}

.pg57-promo-link {
  color: var(--pg57-accent);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dashed var(--pg57-accent);
  transition: color 0.2s;
}

.pg57-promo-link:hover {
  color: var(--pg57-primary);
}

/* ========== Testimonials ========== */
.pg57-testimonial {
  background: linear-gradient(135deg, #2a2a3e, #1e1e32);
  border-radius: var(--pg57-radius);
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--pg57-accent);
}

.pg57-testimonial-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pg57-accent);
}

.pg57-testimonial-text {
  font-size: 1.2rem;
  color: var(--pg57-text);
  margin-top: 0.4rem;
  line-height: 1.8rem;
}

/* ========== Winners ========== */
.pg57-winner-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  background: rgba(255,215,0,0.05);
  border-radius: 0.8rem;
  margin-bottom: 0.6rem;
}

.pg57-winner-amount {
  color: var(--pg57-accent2);
  font-weight: 800;
  font-size: 1.4rem;
}

/* ========== Payment ========== */
.pg57-payment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.pg57-payment-item {
  background: var(--pg57-card-bg);
  padding: 0.8rem 1.2rem;
  border-radius: 0.8rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--pg57-primary);
  border: 1px solid var(--pg57-card-border);
}

/* ========== App CTA ========== */
.pg57-app-cta {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid var(--pg57-accent);
  border-radius: var(--pg57-radius);
  padding: 2rem 1.6rem;
  text-align: center;
}

.pg57-app-cta h3 {
  font-size: 1.8rem;
  color: var(--pg57-accent);
  margin-bottom: 0.8rem;
}

/* ========== Footer ========== */
.pg57-footer {
  background: linear-gradient(180deg, #1a1a2e, #111122);
  padding: 2rem 1.2rem 1.6rem;
  border-top: 2px solid var(--pg57-accent);
}

.pg57-footer-desc {
  font-size: 1.2rem;
  color: var(--pg57-text);
  line-height: 1.8rem;
  margin-bottom: 1.2rem;
}

.pg57-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.pg57-footer-links a {
  color: var(--pg57-primary);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.4rem 0.8rem;
  background: rgba(152,251,152,0.08);
  border-radius: 0.6rem;
  transition: background 0.2s;
}

.pg57-footer-links a:hover {
  background: rgba(152,251,152,0.2);
}

.pg57-footer-promos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.pg57-footer-copy {
  font-size: 1.1rem;
  color: rgba(222,226,230,0.5);
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ========== Bottom Nav ========== */
.pg57-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 6rem;
  background: linear-gradient(180deg, #1a1a2e, #0d0d1a);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 1px solid var(--pg57-accent);
  box-shadow: 0 -2px 12px rgba(255,105,180,0.15);
}

.pg57-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  min-height: 5.6rem;
  background: none;
  border: none;
  color: var(--pg57-text);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.8rem;
  padding: 0.4rem;
}

.pg57-bottom-nav-btn:hover {
  color: var(--pg57-accent);
  background: rgba(255,105,180,0.08);
}

.pg57-bottom-nav-btn.pg57-current {
  color: var(--pg57-accent);
}

.pg57-bottom-nav-btn.pg57-current::after {
  content: '';
  display: block;
  width: 2rem;
  height: 0.3rem;
  background: var(--pg57-accent);
  border-radius: 0.2rem;
  margin-top: 0.2rem;
}

.pg57-bottom-nav-btn span {
  font-size: 1rem;
  margin-top: 0.2rem;
  font-weight: 500;
}

.pg57-bottom-nav-btn i,
.pg57-bottom-nav-btn .material-icons-outlined,
.pg57-bottom-nav-btn ion-icon {
  font-size: 2.4rem;
}

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

/* ========== Utilities ========== */
.pg57-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.pg57-wrapper {
  padding: 1.6rem 1.2rem;
}

.pg57-text-center {
  text-align: center;
}

.pg57-mb-1 {
  margin-bottom: 0.8rem;
}

.pg57-mb-2 {
  margin-bottom: 1.6rem;
}

.pg57-hidden {
  display: none;
}

/* ========== FAQ ========== */
.pg57-faq-item {
  background: var(--pg57-card-bg);
  border-radius: var(--pg57-radius);
  margin-bottom: 0.8rem;
  padding: 1.2rem 1.6rem;
  border: 1px solid var(--pg57-card-border);
}

.pg57-faq-q {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--pg57-primary);
  margin-bottom: 0.6rem;
}

.pg57-faq-a {
  font-size: 1.3rem;
  color: var(--pg57-text);
  line-height: 2rem;
}

/* ========== Internal Links ========== */
.pg57-internal-link {
  color: var(--pg57-primary);
  text-decoration: underline;
  text-decoration-style: dotted;
  transition: color 0.2s;
}

.pg57-internal-link:hover {
  color: var(--pg57-accent);
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 320px) {
  .pg57-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pg57-header {
    padding: 0 0.8rem;
  }
}
