/* 789h layout CSS - pg43 prefix */
/* English comments only. Mobile-first design. */

:root {
  --pg43-bg: #2C2C2C;
  --pg43-bg2: #1f1f1f;
  --pg43-primary: #48D1CC;
  --pg43-secondary: #20B2AA;
  --pg43-accent: #9370DB;
  --pg43-cyan: #00E5FF;
  --pg43-text: #CED4DA;
  --pg43-text-light: #ffffff;
  --pg43-border: rgba(72, 209, 204, 0.25);
  --pg43-radius: 1.2rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 62.5%; }

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--pg43-bg);
  color: var(--pg43-text);
  line-height: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--pg43-cyan); text-decoration: none; }

/* ============ Header ============ */
.pg43-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1f1f1f, #2C2C2C);
  border-bottom: 1px solid var(--pg43-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}
.pg43-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--pg43-text-light);
  font-weight: 700;
  font-size: 1.4rem;
}
.pg43-logo img { width: 2.6rem; height: 2.6rem; border-radius: 0.6rem; }
.pg43-logo span b { color: var(--pg43-primary); }

.pg43-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.pg43-btn {
  border: none;
  border-radius: 2rem;
  padding: 0.7rem 1.3rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  min-height: 3.6rem;
}
.pg43-btn:active { transform: scale(0.96); }
.pg43-btn-register {
  background: linear-gradient(135deg, var(--pg43-primary), var(--pg43-cyan));
  color: #0c2a2a;
  box-shadow: 0 0 0.8rem rgba(0,229,255,.4);
}
.pg43-btn-login {
  background: transparent;
  color: var(--pg43-text-light);
  border: 1px solid var(--pg43-primary);
}

.pg43-menu-toggle {
  background: transparent;
  border: 1px solid var(--pg43-border);
  border-radius: 0.8rem;
  color: var(--pg43-text-light);
  width: 3.4rem; height: 3.4rem;
  font-size: 1.6rem;
  cursor: pointer;
}

/* Expandable menu */
.pg43-mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--pg43-bg2);
  border-bottom: 1px solid var(--pg43-border);
  z-index: 9999;
  padding: 5rem 1rem 1rem;
  transform: translateY(-110%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.pg43-mobile-menu.pg43-menu-open { transform: translateY(0); }
.pg43-mobile-menu a {
  color: var(--pg43-text);
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  background: rgba(72,209,204,.08);
  font-size: 1.2rem;
}
.pg43-mobile-menu a:active { background: rgba(72,209,204,.2); }

/* ============ Layout ============ */
.pg43-main { padding-top: 5.5rem; }
.pg43-container { padding: 1rem; }
.pg43-section { padding: 1.6rem 1rem; }
.pg43-section h2 {
  color: var(--pg43-text-light);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--pg43-primary);
  padding-left: 0.8rem;
}
.pg43-section h3 {
  color: var(--pg43-primary);
  font-size: 1.25rem;
  margin: 1rem 0 0.5rem;
}
.pg43-section p {
  font-size: 1.15rem;
  color: var(--pg43-text);
  margin-bottom: 0.8rem;
}

/* ============ Carousel ============ */
.pg43-carousel {
  position: relative;
  border-radius: var(--pg43-radius);
  overflow: hidden;
  margin: 1rem;
  aspect-ratio: 16/8;
}
.pg43-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s;
  cursor: pointer;
}
.pg43-slide img { width: 100%; height: 100%; object-fit: cover; }
.pg43-slide-active { opacity: 1; }
.pg43-slide-caption {
  position: absolute;
  left: 1rem; bottom: 1rem;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.pg43-dots {
  position: absolute;
  bottom: 0.6rem; right: 1rem;
  display: flex; gap: 0.4rem;
}
.pg43-dot {
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
}
.pg43-dot-active { background: var(--pg43-cyan); }

/* ============ Hero / H1 ============ */
.pg43-hero { padding: 1.2rem 1rem; text-align: center; }
.pg43-hero h1 {
  color: var(--pg43-text-light);
  font-size: 1.8rem;
  line-height: 2.4rem;
  margin-bottom: 0.8rem;
}
.pg43-hero h1 b { color: var(--pg43-cyan); }
.pg43-hero p { color: var(--pg43-text); font-size: 1.15rem; }
.pg43-cta-row {
  display: flex; gap: 0.8rem; justify-content: center;
  margin: 1.2rem 0;
}
.pg43-text-link {
  color: var(--pg43-cyan);
  font-weight: 700;
  cursor: pointer;
}

/* ============ Game Grid ============ */
.pg43-game-group { margin-bottom: 1.6rem; }
.pg43-game-group h2 { display: flex; align-items: center; gap: 0.5rem; }
.pg43-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.pg43-game-card {
  background: var(--pg43-bg2);
  border: 1px solid var(--pg43-border);
  border-radius: 0.8rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  text-align: center;
}
.pg43-game-card:active { transform: scale(0.95); border-color: var(--pg43-cyan); }
.pg43-game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #111;
}
.pg43-game-card span {
  display: block;
  font-size: 1rem;
  color: var(--pg43-text);
  padding: 0.4rem 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Filter buttons */
.pg43-filter-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.6rem 1rem;
  flex-wrap: nowrap;
}
.pg43-filter-btn {
  flex: 0 0 auto;
  border: 1px solid var(--pg43-border);
  background: transparent;
  color: var(--pg43-text);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 1.05rem;
  cursor: pointer;
}
.pg43-filter-active {
  background: var(--pg43-primary);
  color: #0c2a2a;
  border-color: var(--pg43-primary);
}

/* ============ Info modules ============ */
.pg43-card {
  background: var(--pg43-bg2);
  border: 1px solid var(--pg43-border);
  border-radius: var(--pg43-radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
}
.pg43-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.pg43-stat {
  background: rgba(72,209,204,.08);
  border-radius: 0.8rem;
  padding: 0.8rem;
  text-align: center;
}
.pg43-stat b { display: block; color: var(--pg43-cyan); font-size: 1.6rem; }
.pg43-stat span { color: var(--pg43-text); font-size: 1rem; }

.pg43-feature-list { list-style: none; }
.pg43-feature-list li {
  display: flex; gap: 0.8rem; align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--pg43-border);
  font-size: 1.12rem;
}
.pg43-feature-list i { color: var(--pg43-primary); font-size: 1.4rem; margin-top: 0.2rem; }

.pg43-testimonial {
  background: rgba(147,112,219,.1);
  border-left: 3px solid var(--pg43-accent);
  border-radius: 0.6rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
}
.pg43-testimonial b { color: var(--pg43-text-light); }
.pg43-testimonial small { color: var(--pg43-primary); }

.pg43-pay-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.pg43-pay-grid div {
  background: var(--pg43-bg2);
  border-radius: 0.6rem;
  padding: 0.8rem 0.2rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--pg43-text);
  border: 1px solid var(--pg43-border);
}

.pg43-winner {
  display: flex; justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--pg43-border);
  font-size: 1.1rem;
}
.pg43-winner b { color: var(--pg43-cyan); }

/* ============ Footer ============ */
.pg43-footer {
  background: var(--pg43-bg2);
  border-top: 1px solid var(--pg43-border);
  padding: 1.4rem 1rem 8rem;
  margin-top: 1.4rem;
}
.pg43-footer p { font-size: 1.1rem; color: var(--pg43-text); margin-bottom: 0.6rem; }
.pg43-footer-links {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem;
  margin: 0.8rem 0;
}
.pg43-footer-links a {
  color: var(--pg43-text);
  font-size: 1.05rem;
  text-decoration: underline;
}
.pg43-footer-promo {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 0.8rem 0;
}
.pg43-footer-copy {
  font-size: 1rem; color: var(--pg43-text); opacity: 0.8;
  margin-top: 0.8rem;
}

/* ============ Bottom Nav ============ */
.pg43-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: 6rem;
  background: linear-gradient(180deg, #1f1f1f, #181818);
  border-top: 1px solid var(--pg43-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}
.pg43-bottomnav-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--pg43-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 6rem;
  min-height: 6rem;
  cursor: pointer;
  font-size: 1rem;
  transition: color .15s, transform .15s;
}
.pg43-bottomnav-btn:active { transform: scale(0.92); }
.pg43-bottomnav-btn i { font-size: 2.2rem; }
.pg43-bottomnav-btn .material-icons-outlined,
.pg43-bottomnav-btn .material-icons { font-size: 2.4rem; }
.pg43-bottomnav-active { color: var(--pg43-cyan); }
.pg43-bottomnav-active i { color: var(--pg43-cyan); }

/* Desktop: hide bottom nav, show desktop nav */
@media (min-width: 769px) {
  .pg43-bottomnav { display: none; }
  body { max-width: 768px; }
}

/* Mobile bottom padding for content clearance */
@media (max-width: 768px) {
  .pg43-main { padding-bottom: 7rem; }
}
