/* ============================================================
 * fun88 vietnam - Core base styles
 * Prefix: g622-  (all custom classes)
 * Palette: #FFD700 (gold/primary) | #3A3A3A (dark base)
 * Dark background, light text. Mobile-first, max 430px wide.
 * ============================================================ */

:root {
  --g622-primary: #FFD700;
  --g622-primary-dark: #d4af00;
  --g622-bg: #1c1c1c;
  --g622-bg-2: #3A3A3A;
  --g622-bg-3: #2a2a2a;
  --g622-text: #f5f5f5;
  --g622-text-muted: #c9c9c9;
  --g622-accent: #ff4d4d;
  --g622-success: #2ecc71;
  --g622-border: rgba(255, 215, 0, 0.25);
  --g622-radius: 12px;
  --g622-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

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

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

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

img { max-width: 100%; display: block; }
a { color: var(--g622-primary); text-decoration: none; }
a:hover { color: var(--g622-primary-dark); }

.g622-container { width: 100%; padding: 0 12px; }
.g622-wrapper { max-width: 430px; margin: 0 auto; }

/* ---------------- Header ---------------- */
.g622-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #2a2a2a, #1c1c1c);
  border-bottom: 2px solid var(--g622-primary);
  max-width: 430px;
  margin: 0 auto;
}
.g622-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  gap: 8px;
}
.g622-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--g622-primary);
  letter-spacing: 0.3px;
}
.g622-logo img { width: 30px; height: 30px; border-radius: 6px; }
.g622-logo small { display: block; font-size: 1rem; color: var(--g622-text-muted); font-weight: 400; }

.g622-header-actions { display: flex; align-items: center; gap: 6px; }
.g622-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  min-height: 36px;
}
.g622-btn:active { transform: scale(0.96); }
.g622-btn-login {
  background: transparent;
  color: var(--g622-text);
  border: 1.5px solid var(--g622-primary);
}
.g622-btn-register {
  background: linear-gradient(135deg, var(--g622-primary), #ffea66);
  color: #2a2a2a;
}
.g622-menu-btn {
  background: transparent;
  border: none;
  color: var(--g622-primary);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px 6px;
  min-width: 36px;
}

/* ---------------- Mobile dropdown menu ---------------- */
.g622-mobile-menu {
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: #232323;
  border-bottom: 2px solid var(--g622-primary);
  z-index: 9999;
  max-width: 430px;
  margin: 0 auto;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
.g622-mobile-menu.g622-menu-open { max-height: 460px; }
.g622-mobile-menu a {
  display: block;
  padding: 12px 16px;
  color: var(--g622-text);
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
  font-size: 1.4rem;
}
.g622-mobile-menu a:hover { background: rgba(255, 215, 0, 0.08); color: var(--g622-primary); }
.g622-mobile-menu a i { color: var(--g622-primary); margin-right: 8px; }

/* ---------------- Main ---------------- */
main { padding-top: 60px; padding-bottom: 20px; }
@media (max-width: 768px) {
  main { padding-bottom: 86px; }
}

.g622-section { padding: 18px 12px; }
.g622-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g622-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.g622-section-title i { font-size: 2rem; }

/* ---------------- Banner / carousel ---------------- */
.g622-banner {
  position: relative;
  width: 100%;
  border-radius: var(--g622-radius);
  overflow: hidden;
  box-shadow: var(--g622-shadow);
}
.g622-banner-track { position: relative; width: 100%; aspect-ratio: 16/9; }
.g622-banner-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  cursor: pointer;
}
.g622-banner-slide.g622-active { opacity: 1; }
.g622-banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.g622-banner-dots {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.g622-banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.g622-banner-dot.g622-active { background: var(--g622-primary); }

/* ---------------- H1 / hero ---------------- */
.g622-hero { padding: 14px 12px 4px; }
.g622-hero h1 {
  font-size: 2rem; line-height: 1.35;
  color: var(--g622-text);
  margin-bottom: 6px;
}
.g622-hero h1 span { color: var(--g622-primary); }
.g622-hero p { color: var(--g622-text-muted); font-size: 1.3rem; }
.g622-cta-row { display: flex; gap: 8px; margin-top: 12px; }
.g622-cta-row .g622-btn { flex: 1; }

/* ---------------- Game grid ---------------- */
.g622-game-block { margin-bottom: 8px; }
.g622-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.g622-card {
  background: var(--g622-bg-3);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.g622-card:hover, .g622-card:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 215, 0, 0.18);
  border-color: var(--g622-primary);
}
.g622-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: #000;
}
.g622-card-img img { width: 100%; height: 100%; object-fit: cover; }
.g622-card-name {
  padding: 6px 4px;
  font-size: 1.1rem;
  text-align: center;
  color: var(--g622-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g622-cat-tag {
  display: inline-block;
  font-size: 1rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--g622-primary);
  margin-left: 6px;
}

/* ---------------- Info / article modules ---------------- */
.g622-panel {
  background: var(--g622-bg-3);
  border-radius: var(--g622-radius);
  padding: 14px;
  border-left: 3px solid var(--g622-primary);
}
.g622-panel h2 { color: var(--g622-primary); font-size: 1.6rem; margin-bottom: 8px; }
.g622-panel h3 { color: var(--g622-primary); font-size: 1.4rem; margin: 10px 0 4px; }
.g622-panel p { margin-bottom: 8px; color: var(--g622-text); }
.g622-panel ul { padding-left: 18px; margin-bottom: 8px; }
.g622-panel li { margin-bottom: 4px; color: var(--g622-text-muted); }

/* ---------------- FAQ ---------------- */
.g622-faq-item {
  background: var(--g622-bg-3);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.1);
}
.g622-faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--g622-text);
  padding: 12px 14px;
  font-size: 1.35rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.g622-faq-q i { color: var(--g622-primary); }
.g622-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 14px;
  color: var(--g622-text-muted);
}
.g622-faq-item.g622-open .g622-faq-a { max-height: 320px; padding-bottom: 12px; }

/* ---------------- Testimonials ---------------- */
.g622-testimonial-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.g622-testimonial {
  background: var(--g622-bg-3);
  border-radius: 10px;
  padding: 12px;
  border-left: 3px solid var(--g622-primary);
}
.g622-testimonial .g622-stars { color: var(--g622-primary); margin-bottom: 4px; }
.g622-testimonial p { font-size: 1.3rem; color: var(--g622-text); }
.g622-testimonial .g622-author { font-size: 1.15rem; color: var(--g622-text-muted); margin-top: 6px; }

/* ---------------- Payment / winners compact ---------------- */
.g622-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.g622-chip {
  background: var(--g622-bg-3);
  border: 1px solid var(--g622-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 1.15rem;
  color: var(--g622-text);
}
.g622-chip i { color: var(--g622-primary); margin-right: 4px; }

.g622-winners { display: grid; grid-template-columns: 1fr; gap: 6px; }
.g622-winner {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--g622-bg-3); border-radius: 8px; padding: 8px 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
}
.g622-winner span { font-size: 1.2rem; color: var(--g622-text-muted); }
.g622-winner b { color: var(--g622-success); font-size: 1.3rem; }

/* ---------------- Promo / download CTA ---------------- */
.g622-promo-banner {
  background: linear-gradient(135deg, #3A3A3A, #1c1c1c);
  border: 1px solid var(--g622-primary);
  border-radius: var(--g622-radius);
  padding: 16px;
  text-align: center;
  margin: 12px 0;
}
.g622-promo-banner h3 { color: var(--g622-primary); font-size: 1.6rem; margin-bottom: 6px; }
.g622-promo-banner p { color: var(--g622-text-muted); font-size: 1.25rem; margin-bottom: 10px; }
.g622-text-link {
  color: var(--g622-primary);
  font-weight: 600;
  border-bottom: 1px dashed var(--g622-primary);
}
.g622-text-link:hover { color: var(--g622-primary-dark); }

/* ---------------- Footer ---------------- */
.g622-footer {
  background: #161616;
  border-top: 2px solid var(--g622-primary);
  padding: 18px 12px 24px;
  margin-top: 16px;
}
.g622-footer-brand { font-size: 1.3rem; color: var(--g622-text-muted); margin-bottom: 10px; }
.g622-footer-links {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.g622-footer-links a {
  flex: 1 1 44%;
  background: var(--g622-bg-3);
  border: 1px solid rgba(255, 215, 0, 0.15);
  color: var(--g622-text);
  text-align: center;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 1.2rem;
}
.g622-footer-links a:hover { background: rgba(255, 215, 0, 0.1); color: var(--g622-primary); }
.g622-copyright { text-align: center; font-size: 1.1rem; color: var(--g622-text-muted); margin-top: 10px; }

/* ---------------- Mobile bottom nav ---------------- */
.g622-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: 62px;
  background: linear-gradient(180deg, #2a2a2a, #161616);
  border-top: 2px solid var(--g622-primary);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  max-width: 430px;
  margin: 0 auto;
}
.g622-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--g622-text-muted);
  font-size: 1.05rem;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  gap: 2px;
  padding: 4px 2px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.g622-nav-btn i, .g622-nav-btn .material-icons {
  font-size: 22px;
}
.g622-nav-btn:active { transform: scale(0.92); }
.g622-nav-btn:hover { color: var(--g622-primary); }
.g622-nav-active { color: var(--g622-primary); }
.g622-nav-active i, .g622-nav-active .material-icons { color: var(--g622-primary); }

@media (min-width: 769px) {
  .g622-bottom-nav { display: none; }
  body, .g622-header, .g622-mobile-menu, .g622-bottom-nav { max-width: 430px; }
}
