/* SA9 theme - theme-8d66.css - Vietnamese mobile-first iGaming */
/* All classes use prefix v638- */

:root {
  --v638-bg: #0E1621;
  --v638-bg-2: #16243a;
  --v638-bg-3: #1d2f4d;
  --v638-primary: #4169E1;
  --v638-accent: #87CEFA;
  --v638-accent-2: #7CFC00;
  --v638-warm: #CD853F;
  --v638-text: #F5F5F5;
  --v638-text-dim: #b9c6db;
  --v638-border: rgba(135, 206, 250, 0.18);
  --v638-radius: 1.2rem;
  --v638-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  --v638-max: 430px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--v638-bg);
  color: var(--v638-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== Layout ===== */
.v638-wrapper {
  max-width: var(--v638-max);
  margin: 0 auto;
  padding: 0;
  position: relative;
}

main.v638-main {
  padding-top: 6rem;
  padding-bottom: 8.5rem;
}

/* ===== Header ===== */
.v638-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0b1320 0%, #0E1621 100%);
  border-bottom: 1px solid var(--v638-border);
  box-shadow: var(--v638-shadow);
}
.v638-header-inner {
  max-width: var(--v638-max);
  margin: 0 auto;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  gap: 0.8rem;
}
.v638-header-scrolled { box-shadow: 0 6px 22px rgba(0,0,0,0.55); }
.v638-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
}
.v638-brand img { width: 3rem; height: 3rem; border-radius: 0.6rem; }
.v638-brand b { color: var(--v638-text); font-size: 1.7rem; letter-spacing: 0.04em; }
.v638-brand span { color: var(--v638-accent-2); font-size: 1.1rem; display: block; line-height: 1.2rem; }

.v638-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.v638-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 0.8rem;
  padding: 0.7rem 1.1rem;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 4.4rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.v638-btn:active { transform: scale(0.96); }
.v638-btn-register {
  background: linear-gradient(135deg, var(--v638-accent-2), #4dd904);
  color: #0E1621;
  box-shadow: 0 4px 14px rgba(124,252,0,0.35);
}
.v638-btn-login {
  background: linear-gradient(135deg, var(--v638-primary), #2b4fb8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(65,105,225,0.35);
}
.v638-menu-btn {
  background: transparent;
  border: 1px solid var(--v638-border);
  color: var(--v638-text);
  border-radius: 0.7rem;
  width: 4.4rem; height: 4.4rem;
  font-size: 1.8rem;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ===== Mobile menu ===== */
.v638-mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: 80%; max-width: 320px;
  height: 100vh;
  background: var(--v638-bg-2);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform .28s ease;
  padding: 7rem 1.5rem 2rem;
  overflow-y: auto;
  box-shadow: -8px 0 30px rgba(0,0,0,0.5);
}
.v638-menu-open { transform: translateX(0); }
.v638-mobile-menu h3 {
  font-size: 1.3rem;
  color: var(--v638-accent);
  margin: 1.5rem 0 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.v638-mobile-menu a {
  display: block;
  padding: 1rem 1.2rem;
  margin: 0.4rem 0;
  border-radius: 0.7rem;
  background: var(--v638-bg-3);
  color: var(--v638-text);
  font-size: 1.35rem;
  border: 1px solid transparent;
}
.v638-mobile-menu a:active { border-color: var(--v638-accent); }
.v638-menu-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  background: transparent;
  border: none;
  color: var(--v638-text);
  font-size: 2rem;
  cursor: pointer;
  width: 4rem; height: 4rem;
}
.v638-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: none;
}
.v638-overlay.v638-show { display: block; }

/* ===== Hero / Carousel ===== */
.v638-carousel {
  position: relative;
  width: 100%;
  border-radius: 1.2rem;
  overflow: hidden;
  margin: 1.2rem 0;
}
.v638-carousel-track { position: relative; }
.v638-carousel-slide {
  display: none;
  position: relative;
  cursor: pointer;
}
.v638-carousel-slide img { width: 100%; height: 200px; object-fit: cover; }
.v638-slide-active { display: block; }
.v638-slide-cap {
  position: absolute;
  left: 1rem; bottom: 1rem;
  background: rgba(14,22,33,0.7);
  padding: 0.6rem 1rem;
  border-radius: 0.7rem;
  font-size: 1.3rem;
  font-weight: 600;
}
.v638-carousel-dots {
  position: absolute;
  bottom: 0.8rem; right: 1rem;
  display: flex; gap: 0.4rem;
}
.v638-carousel-dot {
  width: 0.8rem; height: 0.8rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none; cursor: pointer; padding: 0;
}
.v638-dot-active { background: var(--v638-accent-2); }

/* ===== Sections ===== */
.v638-section {
  padding: 1.5rem 1.2rem;
  margin: 0;
}
.v638-section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--v638-text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.v638-section-title i { color: var(--v638-accent-2); }
.v638-section-sub {
  color: var(--v638-text-dim);
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

/* H1 hero */
.v638-hero {
  padding: 1.2rem 1.2rem 0.5rem;
  text-align: center;
}
.v638-hero h1 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 2.6rem;
  margin: 0 0 0.6rem;
  background: linear-gradient(90deg, var(--v638-accent-2), var(--v638-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.v638-hero p { color: var(--v638-text-dim); font-size: 1.3rem; margin: 0 0 1rem; }
.v638-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--v638-warm), #b36b1f);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 2rem;
  font-weight: 800;
  font-size: 1.35rem;
  box-shadow: 0 6px 18px rgba(205,133,63,0.4);
  cursor: pointer;
  border: none;
}

/* ===== Game grid ===== */
.v638-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 1.2rem 0.8rem;
}
.v638-cat-head h2 {
  font-size: 1.6rem; font-weight: 800; margin: 0;
  color: var(--v638-accent-2);
}
.v638-cat-head a { font-size: 1.2rem; color: var(--v638-accent); }

.v638-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  padding: 0 1.2rem 1rem;
}
.v638-game {
  background: var(--v638-bg-2);
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--v638-border);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
  text-align: center;
}
.v638-game:active { transform: scale(0.95); border-color: var(--v638-accent); }
.v638-game img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #0a1320;
}
.v638-game span {
  display: block;
  font-size: 1.05rem;
  padding: 0.5rem 0.3rem;
  color: var(--v638-text);
  line-height: 1.3rem;
  height: 3.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== Content blocks ===== */
.v638-card {
  background: var(--v638-bg-2);
  border: 1px solid var(--v638-border);
  border-radius: var(--v638-radius);
  padding: 1.3rem;
  margin: 1rem 1.2rem;
}
.v638-card h2, .v638-card h3 { margin-top: 0; }
.v638-card h2 { font-size: 1.6rem; color: var(--v638-accent-2); }
.v638-card h3 { font-size: 1.4rem; color: var(--v638-accent); }
.v638-card p { color: var(--v638-text-dim); font-size: 1.28rem; line-height: 1.7rem; }
.v638-card a { color: var(--v638-accent); font-weight: 600; }
.v638-card ul { padding-left: 1.4rem; color: var(--v638-text-dim); }
.v638-card li { margin: 0.4rem 0; font-size: 1.25rem; line-height: 1.6rem; }

.v638-promo-link {
  color: var(--v638-accent-2);
  font-weight: 800;
  cursor: pointer;
}
.v638-promo-link:hover { text-decoration: underline; }

/* ===== Features strip ===== */
.v638-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  padding: 1rem 1.2rem;
}
.v638-feature {
  background: var(--v638-bg-2);
  border: 1px solid var(--v638-border);
  border-radius: 1rem;
  padding: 1.1rem;
  text-align: center;
}
.v638-feature i { font-size: 2.4rem; color: var(--v638-accent); margin-bottom: 0.5rem; }
.v638-feature b { display: block; font-size: 1.25rem; color: var(--v638-text); }
.v638-feature span { font-size: 1.1rem; color: var(--v638-text-dim); }

/* ===== Testimonials ===== */
.v638-testi {
  background: var(--v638-bg-2);
  border-left: 3px solid var(--v638-accent-2);
  border-radius: 0.8rem;
  padding: 1rem 1.2rem;
  margin: 0.8rem 1.2rem;
}
.v638-testi p { margin: 0 0 0.5rem; font-size: 1.25rem; color: var(--v638-text); }
.v638-testi cite { color: var(--v638-accent); font-style: normal; font-size: 1.15rem; }

/* ===== Payment ===== */
.v638-pay {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  padding: 0.8rem 1.2rem;
}
.v638-pay span {
  background: var(--v638-bg-3);
  border: 1px solid var(--v638-border);
  border-radius: 0.6rem;
  padding: 0.5rem 0.9rem;
  font-size: 1.15rem;
  color: var(--v638-text);
}

/* ===== Winners ===== */
.v638-winner {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--v638-bg-2);
  padding: 0.7rem 1rem;
  border-radius: 0.7rem;
  margin: 0.5rem 1.2rem;
  font-size: 1.2rem;
}
.v638-winner b { color: var(--v638-accent-2); }
.v638-winner span { color: var(--v638-text-dim); }

/* ===== Footer ===== */
.v638-footer {
  background: #0a1018;
  border-top: 1px solid var(--v638-border);
  padding: 2rem 1.2rem 7.5rem;
  margin-top: 1.5rem;
}
.v638-footer-brand { color: var(--v638-text-dim); font-size: 1.2rem; line-height: 1.6rem; margin-bottom: 1rem; }
.v638-footer h4 { color: var(--v638-accent); font-size: 1.3rem; margin: 1.2rem 0 0.5rem; }
.v638-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.v638-footer-links a {
  background: var(--v638-bg-3);
  color: var(--v638-text);
  padding: 0.5rem 0.9rem;
  border-radius: 0.6rem;
  font-size: 1.15rem;
  border: 1px solid var(--v638-border);
}
.v638-footer-promo {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0;
}
.v638-footer-promo button {
  flex: 1 1 45%;
  background: linear-gradient(135deg, var(--v638-primary), #2b4fb8);
  color: #fff; border: none;
  padding: 0.8rem; border-radius: 0.7rem;
  font-weight: 700; font-size: 1.2rem; cursor: pointer;
}
.v638-footer-promo .v638-promo-green {
  background: linear-gradient(135deg, var(--v638-accent-2), #4dd904);
  color: #0E1621;
}
.v638-copyright {
  color: #6b7a92; font-size: 1.1rem; text-align: center; margin-top: 1rem;
}

/* ===== Bottom nav ===== */
.v638-bnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 6.2rem;
  background: linear-gradient(180deg, #111c2e 0%, #0a1018 100%);
  border-top: 1px solid var(--v638-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.4);
}
.v638-bnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--v638-text-dim);
  cursor: pointer;
  min-width: 60px;
  min-height: 60px;
  padding: 0.3rem;
  transition: color .15s ease, transform .15s ease;
}
.v638-bnav-btn i { font-size: 2.2rem; }
.v638-bnav-btn span { font-size: 1.05rem; }
.v638-bnav-btn:active { transform: scale(0.9); }
.v638-bnav-active { color: var(--v638-accent-2); }
.v638-bnav-active i { text-shadow: 0 0 8px rgba(124,252,0,0.5); }

/* ===== Back to top ===== */
.v638-back-top {
  position: fixed;
  right: 1.2rem; bottom: 7.2rem;
  width: 4.2rem; height: 4.2rem;
  border-radius: 50%;
  background: var(--v638-primary);
  color: #fff;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 999;
}
.v638-show { opacity: 1; pointer-events: auto; }

/* ===== Desktop ===== */
@media (min-width: 769px) {
  .v638-bnav { display: none; }
  main.v638-main { padding-bottom: 2rem; }
  .v638-footer { padding-bottom: 2rem; }
  .v638-wrapper { max-width: 760px; }
  .v638-header-inner { max-width: 760px; }
}

@media (max-width: 768px) {
  main.v638-main { padding-bottom: 8.5rem; }
}

/* small screens tighter grid */
@media (max-width: 360px) {
  .v638-grid { grid-template-columns: repeat(3, 1fr); }
  .v638-features { grid-template-columns: 1fr; }
}
