/* ============================================================
   xx98.homes - Core Stylesheet (prefix: g889-)
   Mobile-first HTML5 gaming site for Vietnam market
   Color palette: #3A3A3A (bg) | #FFCCCB / #808080 (text) |
                  #BF360C / #FFAA00 (accents)
   ============================================================ */

:root {
  --g889-primary: #BF360C;
  --g889-secondary: #FFAA00;
  --g889-bg-dark: #3A3A3A;
  --g889-bg-darker: #2a2a2a;
  --g889-bg-card: #4a4a4a;
  --g889-text-light: #FFCCCB;
  --g889-text-muted: #808080;
  --g889-text-white: #ffffff;
  --g889-border: rgba(255, 204, 203, 0.18);
  --g889-gradient: linear-gradient(135deg, #BF360C 0%, #FFAA00 100%);
  --g889-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --g889-radius: 1.2rem;
  --g889-radius-sm: 0.8rem;
  --g889-transition: all 0.25s ease;
}

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

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

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

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

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

.g889-wrapper { width: 100%; }

/* ---------- Header ---------- */
.g889-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--g889-bg-darker);
  border-bottom: 2px solid var(--g889-primary);
  z-index: 1000;
  box-shadow: var(--g889-shadow);
}

.g889-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  height: 5.4rem;
}

.g889-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.g889-logo-img {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.g889-logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--g889-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

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

.g889-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  cursor: pointer;
  font-weight: 700;
  border-radius: var(--g889-radius-sm);
  transition: var(--g889-transition);
  min-height: 3.6rem;
  padding: 0 1.2rem;
  font-size: 1.3rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.g889-btn-login {
  background: transparent;
  color: var(--g889-text-light);
  border: 1.5px solid var(--g889-secondary);
}

.g889-btn-login:hover { background: rgba(255, 170, 0, 0.12); }

.g889-btn-register {
  background: var(--g889-gradient);
  color: var(--g889-text-white);
  box-shadow: 0 2px 8px rgba(191, 54, 12, 0.4);
}

.g889-btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 170, 0, 0.5);
}

.g889-btn-block {
  display: flex;
  width: 100%;
  padding: 1.4rem;
  font-size: 1.5rem;
  margin: 1rem 0;
}

.g889-menu-toggle {
  background: transparent;
  border: none;
  color: var(--g889-text-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Mobile menu ---------- */
.g889-mobile-menu {
  position: fixed;
  top: 5.4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--g889-bg-darker);
  border-bottom: 1px solid var(--g889-border);
  z-index: 9999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.g889-mobile-menu.g889-open { max-height: 60rem; }

.g889-mobile-menu ul {
  list-style: none;
  padding: 0.5rem 0;
}

.g889-mobile-menu li {
  border-bottom: 1px solid rgba(255, 204, 203, 0.08);
}

.g889-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 1.4rem;
  color: var(--g889-text-light);
  font-size: 1.4rem;
  transition: var(--g889-transition);
}

.g889-mobile-menu a:hover,
.g889-mobile-menu a:focus {
  background: rgba(255, 170, 0, 0.1);
  color: var(--g889-secondary);
  padding-left: 1.8rem;
}

.g889-mobile-menu a i { width: 2rem; text-align: center; }

/* ---------- Main ---------- */
.g889-main {
  padding-top: 5.4rem;
  min-height: 100vh;
}

.g889-section {
  padding: 2rem 1.2rem;
}

.g889-section-alt {
  background: var(--g889-bg-darker);
  border-top: 1px solid var(--g889-border);
  border-bottom: 1px solid var(--g889-border);
}

.g889-section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--g889-text-light);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.2rem;
}

.g889-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 0.4rem;
  background: var(--g889-gradient);
  border-radius: 0.2rem;
}

.g889-h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--g889-text-white);
  margin: 1.2rem 0;
  line-height: 1.35;
}

.g889-h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--g889-secondary);
  margin: 1.4rem 0 0.8rem;
}

.g889-h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--g889-text-light);
  margin: 1rem 0 0.6rem;
}

.g889-text-muted { color: var(--g889-text-muted); }
.g889-text-bold { font-weight: 700; }
.g889-text-accent { color: var(--g889-secondary); font-weight: 700; }

.g889-p {
  color: var(--g889-text-light);
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

/* ---------- Carousel ---------- */
.g889-carousel {
  position: relative;
  width: 100%;
  border-radius: var(--g889-radius);
  overflow: hidden;
  margin: 1rem 0;
  box-shadow: var(--g889-shadow);
}

.g889-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.g889-carousel-slide {
  min-width: 100%;
  position: relative;
}

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

.g889-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  padding: 1.4rem 1rem 1rem;
  color: var(--g889-text-white);
  font-weight: 700;
  font-size: 1.4rem;
}

.g889-carousel-caption span {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.3rem 0.8rem;
  background: var(--g889-gradient);
  border-radius: 1rem;
  font-size: 1.1rem;
}

.g889-carousel-dots {
  position: absolute;
  bottom: 0.6rem;
  right: 0.8rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}

.g889-carousel-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--g889-transition);
}

.g889-carousel-dot.g889-active { background: var(--g889-secondary); }

/* ---------- Promo banner ---------- */
.g889-promo-banner {
  background: var(--g889-gradient);
  border-radius: var(--g889-radius);
  padding: 1.4rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--g889-shadow);
}

.g889-promo-banner-text {
  color: var(--g889-text-white);
  font-weight: 700;
  font-size: 1.4rem;
  flex: 1;
}

.g889-promo-banner-btn {
  background: var(--g889-text-white);
  color: var(--g889-primary);
  padding: 0.7rem 1.4rem;
  border-radius: 2rem;
  font-weight: 800;
  font-size: 1.2rem;
  white-space: nowrap;
}

/* ---------- Game grid ---------- */
.g889-game-cat {
  margin: 1.5rem 0;
}

.g889-game-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.g889-game-cat-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--g889-secondary);
}

.g889-game-cat-title i { font-size: 1.6rem; }

.g889-game-cat-more {
  font-size: 1.2rem;
  color: var(--g889-text-muted);
}

.g889-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.g889-game-card {
  background: var(--g889-bg-card);
  border-radius: var(--g889-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--g889-transition);
  border: 1px solid var(--g889-border);
}

.g889-game-card:hover,
.g889-game-card:focus {
  transform: translateY(-3px);
  border-color: var(--g889-secondary);
  box-shadow: 0 4px 12px rgba(255, 170, 0, 0.25);
}

.g889-game-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--g889-bg-darker);
}

.g889-game-card-name {
  padding: 0.5rem 0.4rem;
  font-size: 1.1rem;
  color: var(--g889-text-light);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.g889-game-card-badge {
  position: relative;
}

.g889-game-card-badge::after {
  content: "HOT";
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  background: var(--g889-primary);
  color: var(--g889-text-white);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 0.4rem;
}

/* ---------- Features list ---------- */
.g889-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}

.g889-feature-item {
  background: var(--g889-bg-card);
  border-radius: var(--g889-radius-sm);
  padding: 1.2rem 0.8rem;
  text-align: center;
  border: 1px solid var(--g889-border);
}

.g889-feature-item i {
  font-size: 2.4rem;
  color: var(--g889-secondary);
  margin-bottom: 0.5rem;
}

.g889-feature-item h3 {
  font-size: 1.3rem;
  color: var(--g889-text-light);
  margin-bottom: 0.3rem;
}

.g889-feature-item p {
  font-size: 1.1rem;
  color: var(--g889-text-muted);
  line-height: 1.4;
}

/* ---------- FAQ ---------- */
.g889-faq-item {
  background: var(--g889-bg-card);
  border-radius: var(--g889-radius-sm);
  margin-bottom: 0.7rem;
  overflow: hidden;
  border: 1px solid var(--g889-border);
}

.g889-faq-q {
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: var(--g889-text-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3rem;
}

.g889-faq-q i { color: var(--g889-secondary); transition: transform 0.25s; }

.g889-faq-item.g889-open .g889-faq-q i { transform: rotate(180deg); }

.g889-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.2rem;
  color: var(--g889-text-muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

.g889-faq-item.g889-open .g889-faq-a {
  max-height: 30rem;
  padding: 0 1.2rem 1rem;
}

/* ---------- Testimonials ---------- */
.g889-testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin: 1rem 0;
}

.g889-testimonial {
  background: var(--g889-bg-card);
  border-radius: var(--g889-radius-sm);
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--g889-secondary);
}

.g889-testimonial-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.g889-testimonial-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--g889-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g889-text-white);
  font-weight: 800;
  font-size: 1.3rem;
}

.g889-testimonial-name {
  font-weight: 700;
  color: var(--g889-text-light);
  font-size: 1.3rem;
}

.g889-testimonial-stars {
  color: var(--g889-secondary);
  font-size: 1rem;
  margin-left: auto;
}

.g889-testimonial p {
  color: var(--g889-text-muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

/* ---------- Payment methods ---------- */
.g889-payment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.g889-payment-item {
  background: var(--g889-bg-card);
  border-radius: 0.6rem;
  padding: 0.7rem 0.3rem;
  text-align: center;
  font-size: 1rem;
  color: var(--g889-text-light);
  border: 1px solid var(--g889-border);
  font-weight: 600;
}

.g889-payment-item i {
  display: block;
  font-size: 1.8rem;
  color: var(--g889-secondary);
  margin-bottom: 0.2rem;
}

/* ---------- Winners ---------- */
.g889-winner-list {
  background: var(--g889-bg-card);
  border-radius: var(--g889-radius-sm);
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid var(--g889-border);
}

.g889-winner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 204, 203, 0.06);
  font-size: 1.2rem;
}

.g889-winner-row:last-child { border-bottom: none; }

.g889-winner-name { color: var(--g889-text-light); font-weight: 600; }

.g889-winner-amount {
  color: var(--g889-secondary);
  font-weight: 800;
}

.g889-winner-game {
  color: var(--g889-text-muted);
  font-size: 1rem;
}

/* ---------- App download CTA ---------- */
.g889-app-cta {
  background: linear-gradient(135deg, var(--g889-bg-card) 0%, var(--g889-primary) 200%);
  border: 1px solid var(--g889-border);
  border-radius: var(--g889-radius);
  padding: 1.4rem;
  margin: 1rem 0;
  text-align: center;
}

.g889-app-cta h3 {
  color: var(--g889-secondary);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.g889-app-cta p {
  color: var(--g889-text-light);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.g889-app-cta-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.g889-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--g889-text-white);
  color: var(--g889-bg-dark);
  padding: 0.7rem 1.2rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1.2rem;
}

/* ---------- Tricks / Achievements ---------- */
.g889-trick-list {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
}

.g889-trick-item {
  display: flex;
  gap: 0.8rem;
  background: var(--g889-bg-card);
  padding: 0.9rem 1rem;
  border-radius: var(--g889-radius-sm);
  border: 1px solid var(--g889-border);
}

.g889-trick-num {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--g889-gradient);
  color: var(--g889-text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.g889-trick-text { color: var(--g889-text-light); font-size: 1.2rem; line-height: 1.5; }
.g889-trick-text strong { color: var(--g889-secondary); }

/* ---------- Security ---------- */
.g889-security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
  text-align: center;
}

.g889-security-item {
  background: var(--g889-bg-card);
  border-radius: var(--g889-radius-sm);
  padding: 1rem 0.5rem;
  border: 1px solid var(--g889-border);
}

.g889-security-item i {
  font-size: 2rem;
  color: var(--g889-secondary);
  margin-bottom: 0.3rem;
}

.g889-security-item span {
  display: block;
  font-size: 1rem;
  color: var(--g889-text-light);
  font-weight: 600;
}

/* ---------- CTA play now ---------- */
.g889-cta-play {
  background: var(--g889-gradient);
  border-radius: var(--g889-radius);
  padding: 1.6rem;
  text-align: center;
  margin: 1.4rem 0;
  box-shadow: var(--g889-shadow);
}

.g889-cta-play h3 {
  color: var(--g889-text-white);
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.g889-cta-play p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.g889-cta-play-btn {
  display: inline-block;
  background: var(--g889-text-white);
  color: var(--g889-primary);
  padding: 1rem 2.4rem;
  border-radius: 2rem;
  font-weight: 800;
  font-size: 1.4rem;
}

/* ---------- Footer ---------- */
.g889-footer {
  background: var(--g889-bg-darker);
  border-top: 2px solid var(--g889-primary);
  padding: 1.8rem 1.2rem 8rem;
  margin-top: 1.5rem;
}

.g889-footer-brand {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--g889-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.g889-footer-desc {
  color: var(--g889-text-muted);
  font-size: 1.2rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.g889-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.g889-footer-links a {
  color: var(--g889-text-light);
  font-size: 1.2rem;
  padding: 0.3rem 0;
}

.g889-footer-links a:hover { color: var(--g889-secondary); }

.g889-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.g889-footer-promo button,
.g889-footer-promo a {
  flex: 1 1 auto;
  background: var(--g889-bg-card);
  color: var(--g889-text-light);
  border: 1px solid var(--g889-border);
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  min-width: 8rem;
}

.g889-footer-promo button:hover { background: var(--g889-primary); color: var(--g889-text-white); }

.g889-footer-copy {
  text-align: center;
  color: var(--g889-text-muted);
  font-size: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--g889-border);
}

/* ---------- Mobile bottom nav ---------- */
.g889-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 6.2rem;
  background: var(--g889-bg-darker);
  border-top: 2px solid var(--g889-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
}

.g889-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--g889-text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--g889-transition);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.g889-bottom-nav-item i,
.g889-bottom-nav-item .material-icons,
.g889-bottom-nav-item .ion-icon {
  font-size: 2.2rem;
  transition: var(--g889-transition);
}

.g889-bottom-nav-item .ion-icon { font-size: 2.4rem; }

.g889-bottom-nav-item:hover,
.g889-bottom-nav-item.active {
  color: var(--g889-secondary);
}

.g889-bottom-nav-item:hover i,
.g889-bottom-nav-item.active i {
  transform: scale(1.15);
}

.g889-bottom-nav-item.active::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.4rem;
  height: 0.3rem;
  background: var(--g889-gradient);
  border-radius: 0 0 0.3rem 0.3rem;
}

.g889-bottom-nav-badge {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: var(--g889-primary);
  color: var(--g889-text-white);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 0.4rem;
  border-radius: 0.8rem;
  min-width: 1.4rem;
  height: 1.4rem;
  line-height: 1.4rem;
  text-align: center;
}

/* ---------- Mobile content padding ---------- */
@media (max-width: 768px) {
  main.g889-main { padding-bottom: 8rem; }
}

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .g889-bottom-nav { display: none; }
  .g889-footer { padding-bottom: 1.8rem; }
  body { max-width: 430px; }
}

/* ---------- Utility ---------- */
.g889-hidden { display: none !important; }
.g889-text-center { text-align: center; }
.g889-mt-1 { margin-top: 0.5rem; }
.g889-mt-2 { margin-top: 1rem; }
.g889-mb-1 { margin-bottom: 0.5rem; }
.g889-mb-2 { margin-bottom: 1rem; }
.g889-promo-link {
  color: var(--g889-secondary);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.g889-divider {
  height: 1px;
  background: var(--g889-border);
  margin: 1.2rem 0;
}

.g889-tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: rgba(255, 170, 0, 0.15);
  color: var(--g889-secondary);
  border-radius: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 0.2rem 0.2rem 0.2rem 0;
}
