/* ===========================================================
   cm8888 layout stylesheet (cm8888.sbs) - vi-VN
   All custom classes use prefix `g243-`.
   Palette: #2E4057 | #D8BFD8 | #9932CC | #E8F5E8 | #DDA0DD
   =========================================================== */

:root {
  --g243-bg: #2E4057;          /* deep slate background */
  --g243-bg-2: #243345;        /* darker shade */
  --g243-text: #E8F5E8;        /* light text */
  --g243-text-soft: #c9d6c9;
  --g243-primary: #9932CC;     /* accent purple */
  --g243-accent: #DDA0DD;      /* soft plum */
  --g243-accent-2: #D8BFD8;    /* thistle */
  --g243-gold: #FFD56B;
  --g243-card: #324457;
  --g243-border: rgba(216, 191, 216, 0.22);
  --g243-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  --g243-radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: linear-gradient(160deg, var(--g243-bg) 0%, var(--g243-bg-2) 60%, #1d2a39 100%);
  color: var(--g243-text);
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--g243-accent); text-decoration: none; }

.g243-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

.g243-container {
  width: 100%;
  padding: 0 1.2rem;
}

/* ===================== HEADER ===================== */
.g243-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, var(--g243-bg-2), var(--g243-bg));
  border-bottom: 1px solid var(--g243-border);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.g243-header-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.g243-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.g243-logo img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.g243-logo-text {
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--g243-text);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.g243-logo-text span { color: var(--g243-gold); }

.g243-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.3rem;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
  color: #fff;
}

.g243-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.g243-btn:active { transform: scale(.96); }

.g243-btn-register {
  background: linear-gradient(135deg, var(--g243-primary), #6a21a3);
  box-shadow: 0 4px 12px rgba(153, 50, 204, 0.45);
}

.g243-btn-login {
  background: linear-gradient(135deg, var(--g243-gold), #e0a93a);
  color: #2E4057;
}

.g243-menu-btn {
  background: transparent;
  border: 1px solid var(--g243-border);
  color: var(--g243-text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.g243-menu-btn .material-symbols-outlined { font-size: 22px; }

/* Expandable menu */
.g243-mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .32s ease;
  background: var(--g243-bg-2);
  border-top: 1px solid var(--g243-border);
}

.g243-mobile-menu.g243-open { max-height: 460px; }

.g243-mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: .4rem 1.2rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}

.g243-mobile-menu a {
  display: block;
  padding: .7rem .8rem;
  background: var(--g243-card);
  border-radius: 10px;
  color: var(--g243-text);
  font-size: 1.3rem;
  font-weight: 600;
  border: 1px solid var(--g243-border);
}

.g243-mobile-menu a:hover { color: var(--g243-gold); }

/* ===================== BANNER ===================== */
.g243-banner {
  position: relative;
  margin: 1rem 0;
  border-radius: var(--g243-radius);
  overflow: hidden;
  box-shadow: var(--g243-shadow);
}

.g243-banner-track {
  position: relative;
  aspect-ratio: 16 / 9;
}

.g243-banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  cursor: pointer;
}

.g243-banner-slide.g243-active { opacity: 1; }
.g243-banner-slide img { width: 100%; height: 100%; object-fit: cover; }

.g243-banner-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.g243-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(232, 245, 232, 0.45);
  cursor: pointer;
  border: none;
  padding: 0;
}

.g243-banner-dot.g243-active { background: var(--g243-gold); }

/* ===================== SECTIONS ===================== */
.g243-section {
  margin: 1.4rem 0;
  padding: 1.4rem 1.2rem;
  background: rgba(50, 68, 87, 0.6);
  border: 1px solid var(--g243-border);
  border-radius: var(--g243-radius);
  backdrop-filter: blur(4px);
}

.g243-section-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--g243-text);
}

.g243-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: linear-gradient(var(--g243-primary), var(--g243-accent));
  border-radius: 3px;
}

.g243-h1 {
  font-size: 2.2rem;
  line-height: 1.35;
  margin: 1rem 0;
  color: var(--g243-gold);
  font-weight: 800;
}

.g243-lead { font-size: 1.45rem; color: var(--g243-text-soft); margin: 0 0 1rem; }

.g243-text p { margin: 0 0 .8rem; }

.g243-text strong { color: var(--g243-accent); }

/* ===================== GAME GRID ===================== */
.g243-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0 .6rem;
}

.g243-cat-head h2 {
  font-size: 1.6rem;
  margin: 0;
  color: var(--g243-accent);
  font-weight: 700;
}

.g243-cat-head .g243-cat-tag {
  font-size: 1.1rem;
  color: var(--g243-text-soft);
  background: rgba(153, 50, 204, 0.22);
  padding: .2rem .7rem;
  border-radius: 999px;
}

.g243-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}

.g243-game-card {
  background: var(--g243-card);
  border: 1px solid var(--g243-border);
  border-radius: 12px;
  padding: .6rem;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.g243-game-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--g243-shadow);
  border-color: var(--g243-primary);
}

.g243-game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
}

.g243-game-name {
  font-size: 1.15rem;
  color: var(--g243-text);
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}

/* ===================== FEATURES ===================== */
.g243-feature-list {
  display: grid;
  gap: .8rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.g243-feature-item {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--g243-card);
  border-radius: 10px;
  border-left: 3px solid var(--g243-primary);
}

.g243-feature-item .g243-ico {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(221, 160, 221, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g243-accent);
}

.g243-feature-item h3 { margin: 0 0 .3rem; font-size: 1.4rem; color: var(--g243-text); }
.g243-feature-item p { margin: 0; font-size: 1.25rem; color: var(--g243-text-soft); }

/* ===================== CTA ===================== */
.g243-cta {
  margin: 1.4rem 0;
  padding: 1.6rem 1.2rem;
  text-align: center;
  border-radius: var(--g243-radius);
  background: linear-gradient(135deg, rgba(153,50,204,.25), rgba(221,160,221,.15));
  border: 1px solid var(--g243-border);
}

.g243-cta h2 { margin: 0 0 .6rem; font-size: 1.7rem; color: var(--g243-gold); }
.g243-cta p { margin: 0 0 1rem; color: var(--g243-text-soft); font-size: 1.3rem; }

.g243-cta .g243-btn { font-size: 1.5rem; padding: 0 1.6rem; min-height: 42px; }

/* ===================== TESTIMONIALS ===================== */
.g243-testi {
  display: grid;
  gap: .8rem;
}

.g243-testi-item {
  padding: 1rem;
  background: var(--g243-card);
  border-radius: 10px;
  border: 1px solid var(--g243-border);
}

.g243-testi-item .g243-stars { color: var(--g243-gold); margin-bottom: .3rem; font-size: 1.3rem; }
.g243-testi-item p { margin: 0 0 .4rem; font-size: 1.3rem; color: var(--g243-text); }
.g243-testi-item cite { color: var(--g243-accent); font-style: normal; font-size: 1.2rem; }

/* ===================== WINNERS ===================== */
.g243-winners {
  display: grid;
  gap: .5rem;
}

.g243-winner-row {
  display: flex;
  justify-content: space-between;
  padding: .6rem .8rem;
  background: var(--g243-card);
  border-radius: 8px;
  font-size: 1.25rem;
}

.g243-winner-row .g243-amt { color: var(--g243-gold); font-weight: 700; }

/* ===================== PAY ===================== */
.g243-pay-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}

.g243-pay-item {
  background: var(--g243-card);
  border: 1px solid var(--g243-border);
  border-radius: 8px;
  padding: .6rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--g243-text-soft);
}

.g243-pay-item i { font-size: 22px; color: var(--g243-accent); display: block; margin-bottom: .2rem; }

/* ===================== FAQ ===================== */
.g243-faq details {
  background: var(--g243-card);
  border: 1px solid var(--g243-border);
  border-radius: 10px;
  padding: .8rem 1rem;
  margin-bottom: .6rem;
}

.g243-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--g243-text);
  font-size: 1.35rem;
  list-style: none;
}

.g243-faq summary::-webkit-details-marker { display: none; }
.g243-faq details[open] summary { color: var(--g243-gold); }
.g243-faq details p { margin: .6rem 0 0; font-size: 1.25rem; color: var(--g243-text-soft); }

/* ===================== REVEAL ===================== */
.g243-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.g243-reveal.g243-visible { opacity: 1; transform: none; }

/* ===================== FOOTER ===================== */
.g243-footer {
  margin-top: 2rem;
  padding: 1.6rem 1.2rem 2.4rem;
  background: var(--g243-bg-2);
  border-top: 1px solid var(--g243-border);
}

.g243-footer p { font-size: 1.25rem; color: var(--g243-text-soft); margin: 0 0 1rem; }

.g243-footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-bottom: 1rem;
}

.g243-footer-links a {
  font-size: 1.2rem;
  color: var(--g243-accent-2);
  padding: .2rem 0;
}

.g243-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0 1.2rem;
}

.g243-footer-promo .g243-btn { flex: 1 1 auto; min-height: 34px; font-size: 1.2rem; }

.g243-copyright {
  font-size: 1.1rem;
  color: var(--g243-text-soft);
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--g243-border);
}

/* ===================== BOTTOM NAV ===================== */
.g243-bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
  background: linear-gradient(180deg, var(--g243-bg), var(--g243-bg-2));
  border-top: 1px solid var(--g243-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 .2rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

.g243-bottomnav-item {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--g243-text-soft);
  font-size: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
  text-decoration: none;
  position: relative;
}

.g243-bottomnav-item i,
.g243-bottomnav-item .material-symbols-outlined,
.g243-bottomnav-item ion-icon {
  font-size: 22px;
}

.g243-bottomnav-item ion-icon { font-size: 24px; }

.g243-bottomnav-item:hover { color: var(--g243-accent); transform: translateY(-1px); }
.g243-bottomnav-item.g243-current { color: var(--g243-gold); }

.g243-bottomnav-item.g243-current::after {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--g243-gold);
}

.g243-bottomnav-badge {
  position: absolute;
  top: 8px;
  right: 18px;
  background: #ff4d6d;
  color: #fff;
  font-size: .9rem;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ===================== DESKTOP & RESPONSIVE ===================== */
main { padding-bottom: 80px; }

@media (min-width: 769px) {
  .g243-bottomnav { display: none; }
  main { padding-bottom: 24px; }
  .g243-wrapper { max-width: 430px; }
}

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

@media (max-width: 360px) {
  .g243-grid { grid-template-columns: repeat(2, 1fr); }
  .g243-pay-grid { grid-template-columns: repeat(3, 1fr); }
  .g243-h1 { font-size: 1.9rem; }
}

/* Utility */
.g243-text-link { color: var(--g243-gold); font-weight: 700; }
.g243-text-link:hover { text-decoration: underline; }
.g243-mt { margin-top: 1rem; }
.g243-center { text-align: center; }
