/* ============================================================
 * SC 88 - Layout CSS (css/layout.css)
 * All custom classes use the "pge2-" prefix.
 * Mobile-first design (max-width: 430px), root font 62.5%.
 * Palette: #FF7F50 coral | #EEE8AA light | #FFB6C1 pink-light
 *          #FF1493 deep-pink | #2D2D2D dark
 * Comments are in English per project convention.
 * ============================================================ */

/* CSS variables (prefixed). */
:root {
  --pge2-primary: #FF7F50;      /* coral */
  --pge2-accent: #FF1493;       /* deep pink */
  --pge2-soft: #FFB6C1;         /* light pink */
  --pge2-cream: #EEE8AA;        /* light cream */
  --pge2-bg: #2D2D2D;           /* dark background */
  --pge2-bg-2: #1f1f1f;         /* darker surface */
  --pge2-text: #EEE8AA;         /* light text on dark */
  --pge2-text-dim: #c9c4a8;
  --pge2-white: #ffffff;
  --pge2-radius: 12px;
  --pge2-radius-sm: 8px;
  --pge2-shadow: 0 4px 16px rgba(0,0,0,.35);
  --pge2-header-h: 56px;
  --pge2-bottomnav-h: 62px;
  --pge2-transition: .25s ease;
}

/* Reset & base. */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 62.5%; }      /* 1rem = 10px */

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--pge2-bg);
  color: var(--pge2-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--pge2-primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ---------- Layout containers ---------- */
.pge2-wrapper { max-width: 430px; margin: 0 auto; position: relative; }
.pge2-container { width: 100%; padding: 0 1.2rem; }
.pge2-main { padding-top: var(--pge2-header-h); padding-bottom: calc(var(--pge2-bottomnav-h) + 2rem); }

/* ---------- Header ---------- */
.pge2-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--pge2-header-h);
  background: linear-gradient(90deg, var(--pge2-bg-2), #3a2222);
  border-bottom: 2px solid var(--pge2-accent);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
}
.pge2-header-brand { display: flex; align-items: center; gap: .6rem; }
.pge2-header-logo { width: 30px; height: 30px; border-radius: 6px; }
.pge2-header-name {
  font-size: 1.8rem; font-weight: 800; color: var(--pge2-cream);
  letter-spacing: .5px;
}
.pge2-header-name span { color: var(--pge2-primary); }
.pge2-header-actions { display: flex; align-items: center; gap: .5rem; }
.pge2-menu-btn {
  background: transparent; color: var(--pge2-cream);
  font-size: 2rem; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Buttons ---------- */
.pge2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.2rem; border-radius: var(--pge2-radius-sm);
  font-size: 1.3rem; font-weight: 700; min-height: 36px;
  transition: transform var(--pge2-transition), opacity var(--pge2-transition);
}
.pge2-btn:active { transform: scale(.95); }
.pge2-btn-login { background: var(--pge2-cream); color: var(--pge2-bg); }
.pge2-btn-register {
  background: linear-gradient(90deg, var(--pge2-primary), var(--pge2-accent));
  color: var(--pge2-white);
  box-shadow: 0 3px 10px rgba(255,20,147,.4);
}
.pge2-btn-hero {
  background: linear-gradient(90deg, var(--pge2-primary), var(--pge2-accent));
  color: var(--pge2-white); padding: 1rem 2rem; font-size: 1.6rem;
  border-radius: 30px; box-shadow: 0 4px 14px rgba(255,127,80,.5);
}
.pge2-btn-text { background: transparent; color: var(--pge2-primary); font-weight: 700; text-decoration: underline; }

/* ---------- Mobile menu ---------- */
.pge2-mobile-menu {
  position: fixed; top: var(--pge2-header-h); left: 0; right: 0;
  background: var(--pge2-bg-2); border-bottom: 2px solid var(--pge2-accent);
  z-index: 9999; max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
.pge2-mobile-menu.pge2-menu-open { max-height: 460px; }
.pge2-mobile-menu ul { list-style: none; padding: .6rem 1rem; }
.pge2-mobile-menu li a {
  display: block; padding: 1rem .6rem; color: var(--pge2-cream);
  border-bottom: 1px solid rgba(255,20,147,.15); font-size: 1.4rem;
}
.pge2-mobile-menu li a:active { background: rgba(255,127,80,.12); }

/* ---------- Hero carousel ---------- */
.pge2-carousel {
  position: relative; width: 100%; height: 200px; overflow: hidden;
  border-radius: 0 0 var(--pge2-radius) var(--pge2-radius);
}
.pge2-carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
}
.pge2-carousel-slide.pge2-slide-active { opacity: 1; }
.pge2-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.pge2-carousel-overlay {
  position: absolute; left: 1rem; bottom: 2.4rem; z-index: 2;
  color: var(--pge2-white); text-shadow: 0 2px 6px rgba(0,0,0,.7);
}
.pge2-carousel-overlay h2 { font-size: 2rem; margin-bottom: .4rem; }
.pge2-carousel-dots {
  position: absolute; bottom: .8rem; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: center; gap: .5rem;
}
.pge2-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5);
  border: none; padding: 0;
}
.pge2-carousel-dot.pge2-dot-active { background: var(--pge2-primary); width: 20px; border-radius: 4px; }

/* ---------- Sections ---------- */
.pge2-section { padding: 1.6rem 1.2rem; }
.pge2-section-title {
  font-size: 1.8rem; font-weight: 800; color: var(--pge2-cream);
  margin-bottom: .8rem; padding-left: .8rem;
  border-left: 4px solid var(--pge2-primary);
}
.pge2-section-title span { color: var(--pge2-primary); }
.pge2-section-intro { color: var(--pge2-text-dim); font-size: 1.35rem; margin-bottom: 1rem; line-height: 1.7rem; }

/* ---------- Game grid ---------- */
.pge2-game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem;
}
.pge2-game-card {
  background: var(--pge2-bg-2); border-radius: var(--pge2-radius-sm);
  overflow: hidden; border: 1px solid rgba(255,20,147,.18);
  transition: transform var(--pge2-transition);
}
.pge2-game-card:active { transform: scale(.96); }
.pge2-game-card img { width: 100%; height: 86px; object-fit: cover; }
.pge2-game-card .pge2-game-name {
  display: block; padding: .5rem .4rem; font-size: 1.05rem; color: var(--pge2-cream);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pge2-cat-tag {
  display: inline-block; font-size: 1.1rem; font-weight: 700; color: var(--pge2-bg);
  background: var(--pge2-cream); padding: .2rem .8rem; border-radius: 20px; margin-bottom: .6rem;
}

/* ---------- Info / feature cards ---------- */
.pge2-card {
  background: var(--pge2-bg-2); border-radius: var(--pge2-radius);
  padding: 1.2rem; margin-bottom: 1rem; border: 1px solid rgba(255,127,80,.2);
  box-shadow: var(--pge2-shadow);
}
.pge2-card h3 { color: var(--pge2-primary); font-size: 1.5rem; margin-bottom: .5rem; }
.pge2-card p { color: var(--pge2-text-dim); font-size: 1.3rem; line-height: 1.7rem; }

.pge2-feature-row { display: flex; gap: .8rem; margin-bottom: .8rem; }
.pge2-feature-icon {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,127,80,.15); color: var(--pge2-primary);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.pge2-feature-text h3 { font-size: 1.4rem; color: var(--pge2-cream); margin-bottom: .2rem; }
.pge2-feature-text p { font-size: 1.25rem; color: var(--pge2-text-dim); }

/* ---------- RTP / stats compact ---------- */
.pge2-stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .6rem; }
.pge2-stat-box {
  background: var(--pge2-bg-2); border-radius: var(--pge2-radius-sm); padding: .8rem;
  text-align: center; border: 1px solid rgba(255,20,147,.15);
}
.pge2-stat-box .pge2-stat-num { font-size: 2rem; font-weight: 800; color: var(--pge2-primary); }
.pge2-stat-box .pge2-stat-label { font-size: 1.1rem; color: var(--pge2-text-dim); }

/* ---------- Testimonials ---------- */
.pge2-testimonial {
  background: var(--pge2-bg-2); border-radius: var(--pge2-radius); padding: 1rem;
  margin-bottom: .8rem; border-left: 3px solid var(--pge2-accent);
}
.pge2-testimonial .pge2-testi-stars { color: #FFD700; font-size: 1.2rem; margin-bottom: .3rem; }
.pge2-testimonial p { font-size: 1.25rem; color: var(--pge2-text-dim); font-style: italic; }
.pge2-testimonial .pge2-testi-author { font-size: 1.15rem; color: var(--pge2-primary); margin-top: .3rem; font-weight: 700; }

/* ---------- Winners ---------- */
.pge2-winner-row {
  display: flex; align-items: center; gap: .8rem; padding: .7rem;
  background: var(--pge2-bg-2); border-radius: var(--pge2-radius-sm); margin-bottom: .5rem;
}
.pge2-winner-row .pge2-winner-name { flex: 1; color: var(--pge2-cream); font-size: 1.25rem; }
.pge2-winner-row .pge2-winner-amount { color: var(--pge2-primary); font-weight: 800; font-size: 1.3rem; }

/* ---------- Payment / app CTA ---------- */
.pge2-pay-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.pge2-pay-chip {
  background: var(--pge2-bg-2); border: 1px solid rgba(255,127,80,.25);
  border-radius: 20px; padding: .5rem 1rem; font-size: 1.2rem; color: var(--pge2-cream);
  display: inline-flex; align-items: center; gap: .4rem;
}
.pge2-cta-box {
  background: linear-gradient(120deg, rgba(255,20,147,.15), rgba(255,127,80,.15));
  border: 1px solid var(--pge2-accent); border-radius: var(--pge2-radius);
  padding: 1.4rem; text-align: center;
}
.pge2-cta-box h3 { color: var(--pge2-cream); font-size: 1.7rem; margin-bottom: .5rem; }
.pge2-cta-box p { color: var(--pge2-text-dim); font-size: 1.25rem; margin-bottom: 1rem; }

/* ---------- FAQ ---------- */
.pge2-faq-item {
  background: var(--pge2-bg-2); border-radius: var(--pge2-radius-sm); padding: 1rem;
  margin-bottom: .6rem; border-left: 3px solid var(--pge2-primary);
}
.pge2-faq-item h3 { font-size: 1.35rem; color: var(--pge2-cream); margin-bottom: .3rem; }
.pge2-faq-item p { font-size: 1.25rem; color: var(--pge2-text-dim); line-height: 1.6rem; }

/* ---------- Footer ---------- */
.pge2-footer {
  background: var(--pge2-bg-2); border-top: 2px solid var(--pge2-accent);
  padding: 1.6rem 1.2rem; margin-top: 1rem;
}
.pge2-footer-brand { color: var(--pge2-cream); font-size: 1.25rem; line-height: 1.7rem; margin-bottom: 1rem; }
.pge2-footer-brand strong { color: var(--pge2-primary); }
.pge2-footer-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.pge2-footer-links a {
  font-size: 1.2rem; color: var(--pge2-cream); padding: .4rem .8rem;
  background: rgba(255,127,80,.12); border-radius: 6px;
}
.pge2-footer-copy { font-size: 1.1rem; color: var(--pge2-text-dim); text-align: center; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.06); }

/* ---------- Mobile bottom navigation ---------- */
.pge2-bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  height: var(--pge2-bottomnav-h);
  background: var(--pge2-bg-2); border-top: 2px solid var(--pge2-accent);
  display: flex; justify-content: space-around; align-items: center;
}
.pge2-bottomnav-btn {
  flex: 1; min-width: 60px; min-height: 60px;
  background: transparent; color: var(--pge2-cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  font-size: 1.05rem; transition: color var(--pge2-transition), transform var(--pge2-transition);
}
.pge2-bottomnav-btn i, .pge2-bottomnav-btn .material-icons-outlined,
.pge2-bottomnav-btn .ion-icon { font-size: 24px; }
.pge2-bottomnav-btn:active { transform: scale(.9); color: var(--pge2-primary); }
.pge2-bottomnav-btn.pge2-bottomnav-active { color: var(--pge2-primary); }
.pge2-bottomnav-btn.pge2-bottomnav-active i { color: var(--pge2-accent); }
.pge2-bottomnav-badge {
  position: absolute; top: 6px; right: 18px; background: var(--pge2-accent);
  color: #fff; font-size: .9rem; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}

/* ---------- Desktop rules ---------- */
@media (min-width: 769px) {
  .pge2-bottomnav { display: none; }
  .pge2-main { padding-bottom: 2rem; }
  .pge2-wrapper { max-width: 760px; }
  .pge2-game-grid { grid-template-columns: repeat(5, 1fr); }
  .pge2-menu-btn { display: none; }
}

/* ---------- Mobile clearance ---------- */
@media (max-width: 768px) {
  .pge2-main { padding-bottom: calc(var(--pge2-bottomnav-h) + 2rem); }
  .pge2-stat-grid { grid-template-columns: repeat(2,1fr); }
}
