/* MH88 Core Stylesheet - mobile-first gaming entertainment platform
 * All custom classes use the g98e- prefix; CSS variables use --g98e-*.
 * Color palette: #141414 (bg) | #FF5722 (primary) | #FF7F50 (coral) | #228B22 (green) | #FFBF00 (gold)
 * Root font 62.5% => 1rem = 10px for rem-based spacing.
 * Code comments in English; content localized to Vietnamese in HTML.
 */

:root {
  --g98e-bg: #141414;
  --g98e-bg-alt: #1d1d1d;
  --g98e-bg-card: #232323;
  --g98e-primary: #FF5722;
  --g98e-coral: #FF7F50;
  --g98e-green: #228B22;
  --g98e-gold: #FFBF00;
  --g98e-text: #f5f5f5;
  --g98e-text-muted: #b8b8b8;
  --g98e-border: #2e2e2e;
  --g98e-radius: 10px;
  --g98e-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  --g98e-header-h: 56px;
  --g98e-nav-h: 60px;
}

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

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

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

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

a { color: var(--g98e-coral); text-decoration: none; }
a:hover { color: var(--g98e-gold); }

/* Layout primitives */
.g98e-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.g98e-wrapper { padding-top: var(--g98e-header-h); padding-bottom: var(--g98e-nav-h); min-height: 100vh; }
.g98e-grid { display: grid; gap: 1rem; }

/* Header */
.g98e-header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: var(--g98e-header-h);
  background: linear-gradient(90deg, #0f0f0f 0%, #1d1d1d 100%);
  border-bottom: 2px solid var(--g98e-primary);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem; z-index: 1000; box-shadow: var(--g98e-shadow);
}
.g98e-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--g98e-text); }
.g98e-brand img { width: 28px; height: 28px; border-radius: 6px; }
.g98e-brand-name { font-size: 1.8rem; font-weight: 800; letter-spacing: 0.5px; color: var(--g98e-gold); }
.g98e-brand-name span { color: var(--g98e-primary); }

.g98e-header-actions { display: flex; align-items: center; gap: 0.5rem; }

.g98e-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-size: 1.3rem; font-weight: 700; padding: 0.7rem 1.2rem;
  border-radius: 8px; border: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 40px; text-decoration: none;
}
.g98e-btn:active { transform: scale(0.94); }
.g98e-btn-login { background: transparent; color: var(--g98e-text); border: 1.5px solid var(--g98e-coral); }
.g98e-btn-login:hover { background: var(--g98e-coral); color: #141414; }
.g98e-btn-register { background: linear-gradient(90deg, var(--g98e-primary), var(--g98e-gold)); color: #141414; }
.g98e-btn-register:hover { box-shadow: 0 0 14px rgba(255, 87, 34, 0.6); }
.g98e-btn-cta { background: var(--g98e-green); color: #fff; padding: 1rem 1.6rem; font-size: 1.5rem; width: 100%; }
.g98e-btn-cta:hover { background: #2aa82a; }
.g98e-btn-gold { background: var(--g98e-gold); color: #141414; }
.g98e-btn-gold:hover { background: #ffcc33; }

.g98e-menu-btn {
  background: transparent; border: none; color: var(--g98e-text);
  font-size: 2.2rem; cursor: pointer; padding: 0.4rem; min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.g98e-menu-btn.g98e-active { color: var(--g98e-primary); }

/* Mobile expandable menu */
.g98e-mobile-menu {
  position: fixed; top: var(--g98e-header-h); left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; background: var(--g98e-bg-alt);
  border-bottom: 2px solid var(--g98e-border);
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease; z-index: 9999;
}
.g98e-mobile-menu.g98e-active { max-height: 620px; }
.g98e-mobile-menu ul { list-style: none; padding: 0.6rem 1rem; }
.g98e-mobile-menu li { border-bottom: 1px solid var(--g98e-border); }
.g98e-mobile-menu li:last-child { border-bottom: none; }
.g98e-mobile-menu a {
  display: flex; align-items: center; gap: 0.8rem; padding: 1rem 0.4rem;
  color: var(--g98e-text); font-size: 1.4rem; font-weight: 600;
}
.g98e-mobile-menu a i { color: var(--g98e-gold); width: 24px; text-align: center; }

/* Hero carousel */
.g98e-carousel {
  position: relative; width: 100%; border-radius: var(--g98e-radius);
  overflow: hidden; margin: 1rem 0; box-shadow: var(--g98e-shadow);
}
.g98e-carousel-track { position: relative; width: 100%; aspect-ratio: 16/9; }
.g98e-carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease;
  cursor: pointer;
}
.g98e-carousel-slide.g98e-active { opacity: 1; }
.g98e-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.g98e-carousel-caption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 1.3rem; font-weight: 700; color: var(--g98e-gold);
}
.g98e-carousel-dots {
  position: absolute; bottom: 0.8rem; right: 1rem; display: flex; gap: 0.5rem; z-index: 2;
}
.g98e-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4);
  cursor: pointer; border: none; padding: 0;
}
.g98e-carousel-dot.g98e-active { background: var(--g98e-gold); width: 20px; border-radius: 4px; }

/* Section headings */
.g98e-section { padding: 1.4rem 0; }
.g98e-section-title {
  font-size: 1.8rem; font-weight: 800; color: var(--g98e-gold);
  margin-bottom: 0.8rem; padding-left: 0.8rem;
  border-left: 4px solid var(--g98e-primary);
  display: flex; align-items: center; gap: 0.6rem;
}
.g98e-section-title i { color: var(--g98e-primary); }
.g98e-section-sub { font-size: 1.35rem; color: var(--g98e-text-muted); margin-bottom: 1rem; }

.g98e-h1 {
  font-size: 2rem; font-weight: 900; color: var(--g98e-text);
  margin: 1rem 0; line-height: 1.3;
}
.g98e-h1 span { color: var(--g98e-primary); }
.g98e-h2 { font-size: 1.7rem; font-weight: 800; color: var(--g98e-gold); margin: 1.4rem 0 0.8rem; }
.g98e-h3 { font-size: 1.5rem; font-weight: 700; color: var(--g98e-coral); margin: 1rem 0 0.5rem; }
.g98e-lead { font-size: 1.4rem; color: var(--g98e-text-muted); margin-bottom: 1rem; }

/* Game grid (compact icon + name layout) */
.g98e-game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.g98e-game-card {
  background: var(--g98e-bg-card); border-radius: var(--g98e-radius);
  padding: 0.6rem; text-align: center; cursor: pointer; border: 1px solid var(--g98e-border);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.g98e-game-card:hover, .g98e-game-card:active {
  transform: translateY(-3px); border-color: var(--g98e-primary);
  box-shadow: 0 6px 14px rgba(255, 87, 34, 0.25);
}
.g98e-game-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: 0.4rem; }
.g98e-game-card .g98e-game-name {
  font-size: 1.1rem; color: var(--g98e-text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3;
}
.g98e-game-card .g98e-game-tag {
  display: inline-block; font-size: 0.95rem; color: var(--g98e-gold);
  background: rgba(255, 191, 0, 0.12); padding: 0.1rem 0.5rem; border-radius: 4px; margin-top: 0.3rem;
}

/* Category badge row */
.g98e-cat-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.g98e-cat-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: 20px; font-size: 1.2rem; font-weight: 700;
  background: var(--g98e-bg-card); color: var(--g98e-text); border: 1px solid var(--g98e-border);
}
.g98e-cat-badge i { color: var(--g98e-primary); }
.g98e-cat-badge.g98e-hot { border-color: var(--g98e-primary); color: var(--g98e-primary); }

/* Info / feature cards */
.g98e-card {
  background: var(--g98e-bg-card); border-radius: var(--g98e-radius);
  padding: 1.2rem; border: 1px solid var(--g98e-border); margin-bottom: 1rem;
}
.g98e-card-title { font-size: 1.5rem; font-weight: 700; color: var(--g98e-gold); margin-bottom: 0.6rem; }
.g98e-card p { color: var(--g98e-text-muted); margin-bottom: 0.6rem; }

.g98e-feature-list { list-style: none; display: grid; gap: 0.8rem; }
.g98e-feature-list li {
  display: flex; gap: 0.8rem; align-items: flex-start;
  background: var(--g98e-bg-card); padding: 1rem; border-radius: 8px; border-left: 3px solid var(--g98e-green);
}
.g98e-feature-list i { color: var(--g98e-green); font-size: 2rem; flex-shrink: 0; }
.g98e-feature-list b { color: var(--g98e-text); }

/* RTP compact table */
.g98e-rtp-table { width: 100%; border-collapse: collapse; font-size: 1.2rem; margin-top: 0.6rem; }
.g98e-rtp-table th, .g98e-rtp-table td { padding: 0.7rem; text-align: left; border-bottom: 1px solid var(--g98e-border); }
.g98e-rtp-table th { color: var(--g98e-gold); font-weight: 700; }
.g98e-rtp-table td.g98e-rtp-val { color: var(--g98e-green); font-weight: 700; text-align: right; }

/* Testimonials */
.g98e-testimonial { background: var(--g98e-bg-card); border-radius: 8px; padding: 1rem; margin-bottom: 0.8rem; border-left: 3px solid var(--g98e-gold); }
.g98e-testimonial p { font-style: italic; color: var(--g98e-text); margin-bottom: 0.5rem; }
.g98e-testimonial .g98e-testimonial-author { font-size: 1.1rem; color: var(--g98e-coral); font-weight: 700; }

/* Winners showcase */
.g98e-winner {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--g98e-bg-card); padding: 0.8rem; border-radius: 8px; margin-bottom: 0.6rem;
}
.g98e-winner .g98e-winner-amount { margin-left: auto; color: var(--g98e-green); font-weight: 800; font-size: 1.3rem; }

/* Payment methods */
.g98e-pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.g98e-pay-item { background: var(--g98e-bg-card); border-radius: 8px; padding: 0.8rem; text-align: center; font-size: 1rem; color: var(--g98e-text-muted); border: 1px solid var(--g98e-border); }
.g98e-pay-item i { font-size: 2.2rem; color: var(--g98e-coral); margin-bottom: 0.3rem; display: block; }

/* App download CTA */
.g98e-app-cta { background: linear-gradient(135deg, #1d1d1d, #2a2a2a); border-radius: var(--g98e-radius); padding: 1.4rem; text-align: center; border: 1px solid var(--g98e-primary); }
.g98e-app-cta h3 { color: var(--g98e-gold); margin-bottom: 0.5rem; }
.g98e-app-cta p { color: var(--g98e-text-muted); margin-bottom: 1rem; }
.g98e-app-cta .g98e-app-buttons { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

/* Promo inline link */
.g98e-link-text { color: var(--g98e-gold); font-weight: 700; cursor: pointer; text-decoration: underline; }
.g98e-link-text:hover { color: var(--g98e-primary); }

/* CTA banner */
.g98e-cta-banner {
  background: linear-gradient(90deg, var(--g98e-primary), var(--g98e-gold));
  border-radius: var(--g98e-radius); padding: 1.4rem; text-align: center; margin: 1.2rem 0;
  color: #141414; box-shadow: var(--g98e-shadow);
}
.g98e-cta-banner h3 { color: #141414; margin-bottom: 0.4rem; font-size: 1.7rem; }
.g98e-cta-banner p { color: #2a2a2a; margin-bottom: 1rem; font-weight: 600; }
.g98e-cta-banner .g98e-btn { background: #141414; color: var(--g98e-gold); }

/* Footer */
.g98e-footer { background: #0f0f0f; padding: 2rem 1.2rem 1.5rem; border-top: 2px solid var(--g98e-primary); margin-top: 1.5rem; }
.g98e-footer-brand { color: var(--g98e-text-muted); font-size: 1.25rem; margin-bottom: 1rem; line-height: 1.6; }
.g98e-footer-brand b { color: var(--g98e-gold); }
.g98e-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.g98e-footer-links a {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--g98e-bg-card); color: var(--g98e-text); padding: 0.5rem 0.9rem;
  border-radius: 6px; font-size: 1.15rem; border: 1px solid var(--g98e-border);
}
.g98e-footer-links a:hover { border-color: var(--g98e-primary); color: var(--g98e-gold); }
.g98e-footer-links a i { color: var(--g98e-primary); }
.g98e-footer-copy { color: #888; font-size: 1.1rem; border-top: 1px solid var(--g98e-border); padding-top: 1rem; text-align: center; }

/* Mobile bottom navigation (fixed, 5 buttons) */
.g98e-bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: var(--g98e-nav-h);
  background: linear-gradient(180deg, #1d1d1d, #0f0f0f);
  border-top: 2px solid var(--g98e-primary);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000; box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.5);
}
.g98e-bottom-nav-btn {
  flex: 1; min-width: 60px; min-height: 60px; background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  color: var(--g98e-text-muted); font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease; padding: 0;
}
.g98e-bottom-nav-btn i { font-size: 22px; }
.g98e-bottom-nav-btn .material-icons, .g98e-bottom-nav-btn .ion-icon { font-size: 22px; }
.g98e-bottom-nav-btn:active { transform: scale(0.9); }
.g98e-bottom-nav-btn:hover { color: var(--g98e-coral); }
.g98e-bottom-nav-btn.g98e-current { color: var(--g98e-gold); }
.g98e-bottom-nav-btn.g98e-current i { color: var(--g98e-primary); }
.g98e-bottom-nav-btn.g98e-promo { color: var(--g98e-coral); }

/* Back to top */
.g98e-back-top {
  position: fixed; bottom: calc(var(--g98e-nav-h) + 1rem); right: 1.2rem;
  width: 40px; height: 40px; border-radius: 50%; background: var(--g98e-primary);
  color: #fff; border: none; cursor: pointer; z-index: 999; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--g98e-shadow);
}

/* Desktop: hide bottom nav + center wider layout */
@media (min-width: 769px) {
  body { max-width: 768px; font-size: 1.5rem; }
  .g98e-header, .g98e-mobile-menu, .g98e-bottom-nav, .g98e-footer { max-width: 768px; }
  .g98e-bottom-nav { display: none; }
  .g98e-back-top { bottom: 2rem; }
  .g98e-wrapper { padding-bottom: 2rem; }
  .g98e-game-grid { grid-template-columns: repeat(6, 1fr); }
  .g98e-pay-grid { grid-template-columns: repeat(8, 1fr); }
}

/* Mobile: ensure content clears the fixed bottom nav */
@media (max-width: 768px) {
  .g98e-wrapper { padding-bottom: 80px; }
  .g98e-game-grid { grid-template-columns: repeat(3, 1fr); }
}
