/*!
 * www5699.click - design-4a2d.css
 * Mobile-first styling for the Vietnamese gaming portal.
 * Palette: #0A0A0A (background) | #4B0082 (indigo accent) | #FFF8DC (cornsilk text).
 * All custom classes use the `w4a2d-` prefix for namespace isolation.
 */

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 62.5%; scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Be Vietnam Pro", "Roboto", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: #0A0A0A;
  color: #FFF8DC;
  line-height: 1.55;
  font-size: 1.5rem;
  overflow-x: hidden;
}
a { color: #FFF8DC; text-decoration: none; transition: color .2s ease; }
a:hover { color: #B69AE0; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Layout containers ---------- */
.w4a2d-wrap { width: 100%; max-width: 430px; margin: 0 auto; position: relative; }
.w4a2d-container { width: 100%; padding: 0 1.4rem; }
.w4a2d-section { padding: 2.6rem 0; }
.w4a2d-section-alt { background: linear-gradient(180deg, #120A24 0%, #0A0A0A 100%); }

.w4a2d-eyebrow {
  display: inline-block;
  font-size: 1.25rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #FFF8DC;
  background: #4B0082;
  padding: .35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  font-weight: 600;
}
.w4a2d-section-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #FFF8DC;
  margin-bottom: .6rem;
  line-height: 1.25;
}
.w4a2d-section-title span { color: #B69AE0; }
.w4a2d-section-sub {
  font-size: 1.35rem;
  color: #D8C9A8;
  opacity: .85;
  margin-bottom: 1.8rem;
}

/* ---------- Header ---------- */
.w4a2d-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(75, 0, 130, .55);
}
.w4a2d-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1.4rem;
  gap: 1rem;
}
.w4a2d-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 800;
  font-size: 1.7rem;
  color: #FFF8DC;
  letter-spacing: .02em;
}
.w4a2d-brand-logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4B0082, #8A2BE2);
  display: flex; align-items: center; justify-content: center;
  color: #FFF8DC; font-weight: 800;
  box-shadow: 0 2px 8px rgba(75, 0, 130, .6);
}
.w4a2d-brand small { display: block; font-size: 1rem; font-weight: 500; color: #B69AE0; letter-spacing: .12em; }

.w4a2d-header-actions { display: flex; align-items: center; gap: .6rem; }
.w4a2d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.35rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.w4a2d-btn-login {
  background: transparent;
  color: #FFF8DC;
  border: 1.5px solid #4B0082;
}
.w4a2d-btn-login:hover { background: rgba(75, 0, 130, .25); color: #FFF8DC; }
.w4a2d-btn-register {
  background: linear-gradient(135deg, #4B0082, #8A2BE2);
  color: #FFF8DC;
  box-shadow: 0 4px 14px rgba(75, 0, 130, .55);
}
.w4a2d-btn-register:hover { transform: translateY(-1px); color: #FFF8DC; }
.w4a2d-btn:active { transform: scale(.97); }

.w4a2d-menu-toggle {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(75, 0, 130, .25);
  color: #FFF8DC;
  font-size: 2rem;
}

/* ---------- Mobile slide-in menu ---------- */
.w4a2d-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease;
  z-index: 9998;
}
.w4a2d-overlay-active { opacity: 1; visibility: visible; }
.w4a2d-mobile-menu {
  position: fixed;
  top: 0; right: -85%;
  width: 82%; max-width: 340px;
  height: 100%;
  background: #120A24;
  z-index: 9999;
  padding: 2rem 1.6rem;
  overflow-y: auto;
  transition: right .3s ease;
  border-left: 1px solid rgba(75,0,130,.6);
}
.w4a2d-menu-open { right: 0; }
.w4a2d-mobile-menu h3 {
  font-size: 1.4rem;
  color: #B69AE0;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 1.6rem 0 .8rem;
}
.w4a2d-mobile-menu a {
  display: block;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(255,248,220,.08);
  font-size: 1.4rem;
  color: #FFF8DC;
}
.w4a2d-mobile-menu a:hover { color: #B69AE0; padding-left: .4rem; }
.w4a2d-menu-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(75,0,130,.4);
  color: #FFF8DC; font-size: 1.6rem;
}
.w4a2d-menu-cta {
  display: flex; gap: .6rem; margin-top: 1.4rem;
}
.w4a2d-menu-cta .w4a2d-btn { flex: 1; padding: .9rem; font-size: 1.3rem; }

/* ---------- Hero carousel ---------- */
.w4a2d-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 22px 22px;
}
.w4a2d-hero-viewport { overflow: hidden; }
.w4a2d-hero-track {
  display: flex;
  transition: transform .55s ease;
}
.w4a2d-hero-slide {
  min-width: 100%;
  position: relative;
  padding: 2.6rem 1.6rem 3rem;
  background: radial-gradient(circle at 20% 20%, #4B0082 0%, #1A0A2E 55%, #0A0A0A 100%);
  overflow: hidden;
}
.w4a2d-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .26;
  z-index: 0;
}
.w4a2d-hero-slide > :not(.w4a2d-hero-image) { position: relative; z-index: 1; }
.w4a2d-hero-slide::after {
  content: "";
  position: absolute; right: -40px; bottom: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(138,43,226,.45), transparent 70%);
}
.w4a2d-hero-tag {
  display: inline-block;
  background: rgba(255,248,220,.12);
  color: #FFF8DC;
  padding: .3rem .9rem;
  border-radius: 999px;
  font-size: 1.15rem;
  margin-bottom: .8rem;
  border: 1px solid rgba(255,248,220,.25);
}
.w4a2d-hero-title {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.15;
  color: #FFF8DC;
  margin-bottom: .8rem;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.w4a2d-hero-title em { color: #FFD773; font-style: normal; }
.w4a2d-hero-desc {
  font-size: 1.35rem;
  color: #EDE0BD;
  margin-bottom: 1.6rem;
  max-width: 32rem;
}
.w4a2d-hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; position: relative; z-index: 2; }
.w4a2d-hero-actions .w4a2d-btn { padding: 1rem 1.6rem; font-size: 1.35rem; }
.w4a2d-btn-ghost {
  background: rgba(255,248,220,.1);
  color: #FFF8DC;
  border: 1px solid rgba(255,248,220,.3);
}
.w4a2d-hero-dots {
  display: flex; gap: .5rem; justify-content: center;
  margin-top: 1.2rem;
}
.w4a2d-hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,248,220,.35);
  transition: background .2s ease, width .2s ease;
}
.w4a2d-dot-active { background: #FFD773; width: 22px; border-radius: 999px; }

/* ---------- Stats strip ---------- */
.w4a2d-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  padding: 1.6rem 1.4rem;
}
.w4a2d-stat {
  text-align: center;
  background: rgba(75,0,130,.18);
  border: 1px solid rgba(75,0,130,.4);
  border-radius: 14px;
  padding: 1rem .6rem;
}
.w4a2d-stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: #FFD773;
  line-height: 1.1;
}
.w4a2d-stat-label { font-size: 1.1rem; color: #D8C9A8; margin-top: .2rem; }

/* ---------- Category filter ---------- */
.w4a2d-filter {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding: .6rem 1.4rem 1rem;
  scrollbar-width: none;
}
.w4a2d-filter::-webkit-scrollbar { display: none; }
.w4a2d-filter-btn {
  flex: 0 0 auto;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  background: rgba(255,248,220,.08);
  color: #FFF8DC;
  font-size: 1.25rem;
  font-weight: 600;
  border: 1px solid rgba(255,248,220,.18);
  white-space: nowrap;
}
.w4a2d-filter-active {
  background: linear-gradient(135deg, #4B0082, #8A2BE2);
  border-color: transparent;
  color: #FFF8DC;
  box-shadow: 0 3px 10px rgba(75,0,130,.5);
}

/* ---------- Game grid ---------- */
.w4a2d-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
  padding: 0 1.4rem;
}
.w4a2d-game-card {
  background: linear-gradient(180deg, #1A0A2E 0%, #0A0A0A 100%);
  border: 1px solid rgba(75,0,130,.45);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.w4a2d-game-card:hover {
  transform: translateY(-3px);
  border-color: #8A2BE2;
  box-shadow: 0 8px 20px rgba(75,0,130,.4);
}
.w4a2d-game-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #120A24;
}
.w4a2d-game-thumb img { width: 100%; height: 100%; object-fit: cover; }
.w4a2d-game-badge {
  position: absolute; top: 6px; left: 6px;
  background: rgba(255,90,90,.92);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 6px;
}
.w4a2d-game-badge.w4a2d-badge-new { background: rgba(255,215,115,.95); color: #4B0082; }
.w4a2d-game-name {
  font-size: 1.18rem;
  font-weight: 600;
  color: #FFF8DC;
  padding: .55rem .5rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w4a2d-game-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,.55);
  opacity: 0; transition: opacity .2s ease;
}
.w4a2d-game-card:hover .w4a2d-game-play { opacity: 1; }
.w4a2d-game-play span {
  background: linear-gradient(135deg, #4B0082, #8A2BE2);
  color: #FFF8DC;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 700;
}

/* ---------- Featured block ---------- */
.w4a2d-featured {
  display: grid;
  gap: 1rem;
  padding: 0 1.4rem;
}
.w4a2d-feature-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(75,0,130,.4), rgba(10,10,10,.4));
  border: 1px solid rgba(75,0,130,.55);
  border-radius: 16px;
  padding: 1rem;
}
.w4a2d-feature-card img {
  width: 92px; height: 92px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
}
.w4a2d-feature-body h4 {
  font-size: 1.5rem;
  color: #FFF8DC;
  margin-bottom: .3rem;
}
.w4a2d-feature-body p { font-size: 1.25rem; color: #D8C9A8; margin-bottom: .5rem; }
.w4a2d-feature-link {
  color: #FFD773;
  font-weight: 700;
  font-size: 1.25rem;
}

/* ---------- Promo banner ---------- */
.w4a2d-promo-banner {
  margin: 0 1.4rem;
  border-radius: 18px;
  padding: 1.8rem 1.4rem;
  background: linear-gradient(120deg, #4B0082 0%, #2A0A4E 60%, #0A0A0A 100%);
  border: 1px solid rgba(255,215,115,.35);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.w4a2d-promo-banner::before {
  content: "";
  position: absolute; top: -30px; right: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(255,215,115,.35), transparent 70%);
}
.w4a2d-promo-banner h3 { font-size: 1.9rem; color: #FFF8DC; margin-bottom: .5rem; }
.w4a2d-promo-banner p { font-size: 1.3rem; color: #EDE0BD; margin-bottom: 1.2rem; }

/* ---------- SEO content ---------- */
.w4a2d-seo-content {
  padding: 0 1.4rem;
  color: #E8D9B8;
  font-size: 1.35rem;
  line-height: 1.7;
}
.w4a2d-seo-content h2 {
  font-size: 1.85rem;
  color: #FFF8DC;
  margin: 1.8rem 0 .6rem;
  font-weight: 800;
}
.w4a2d-seo-content h3 {
  font-size: 1.55rem;
  color: #FFD773;
  margin: 1.4rem 0 .5rem;
  font-weight: 700;
}
.w4a2d-seo-content p { margin-bottom: .9rem; }
.w4a2d-seo-content strong { color: #FFF8DC; }
.w4a2d-seo-content ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.w4a2d-seo-content ul li { list-style: disc; margin-bottom: .4rem; }

/* ---------- FAQ ---------- */
.w4a2d-faq-list { padding: 0 1.4rem; }
.w4a2d-faq-item {
  background: rgba(75,0,130,.15);
  border: 1px solid rgba(75,0,130,.4);
  border-radius: 12px;
  margin-bottom: .8rem;
  overflow: hidden;
}
.w4a2d-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: #FFF8DC;
  cursor: pointer;
}
.w4a2d-faq-q .w4a2d-faq-icon { transition: transform .2s ease; color: #FFD773; }
.w4a2d-faq-open .w4a2d-faq-icon { transform: rotate(45deg); }
.w4a2d-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease, padding .25s ease;
  padding: 0 1.2rem;
  color: #D8C9A8;
  font-size: 1.28rem;
}
.w4a2d-faq-open .w4a2d-faq-a {
  max-height: 600px;
  padding: 0 1.2rem 1rem;
}

/* ---------- Footer ---------- */
.w4a2d-footer {
  background: #060606;
  border-top: 1px solid rgba(75,0,130,.5);
  padding: 2.4rem 1.4rem 7rem;
  margin-top: 2rem;
}
.w4a2d-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}
.w4a2d-footer-col h4 {
  font-size: 1.3rem;
  color: #FFD773;
  margin-bottom: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.w4a2d-footer-col a {
  display: block;
  font-size: 1.25rem;
  color: #D8C9A8;
  padding: .35rem 0;
}
.w4a2d-footer-col a:hover { color: #FFF8DC; }
.w4a2d-footer-about p { font-size: 1.25rem; color: #D8C9A8; margin-top: .6rem; }
.w4a2d-footer-bottom {
  text-align: center;
  font-size: 1.15rem;
  color: #8A7C5C;
  border-top: 1px solid rgba(255,248,220,.08);
  padding-top: 1.2rem;
}
.w4a2d-responsible {
  background: rgba(255,90,90,.1);
  border: 1px solid rgba(255,90,90,.3);
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.2rem;
  color: #E8D9B8;
  margin: 1.2rem 0;
  text-align: center;
}

/* ---------- Mobile bottom nav ---------- */
.w4a2d-bnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,10,10,.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(75,0,130,.6);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: 62px;
  padding-bottom: env(safe-area-inset-bottom);
}
.w4a2d-bnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #D8C9A8;
  font-size: 1.05rem;
  font-weight: 600;
  min-width: 60px;
  min-height: 60px;
  transition: color .2s ease;
  position: relative;
}
.w4a2d-bnav-btn .w4a2d-bnav-icon { font-size: 22px; line-height: 1; }
.w4a2d-bnav-btn.w4a2d-bnav-promo {
  color: #FFD773;
}
.w4a2d-bnav-btn.w4a2d-bnav-promo .w4a2d-bnav-icon {
  background: linear-gradient(135deg, #4B0082, #8A2BE2);
  color: #FFF8DC;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: -22px;
  box-shadow: 0 4px 12px rgba(75,0,130,.7);
  border: 3px solid rgba(10,10,10,.97);
  font-size: 24px;
}
.w4a2d-bnav-btn:active { color: #FFF8DC; }
.w4a2d-bnav-active { color: #FFD773; }
.w4a2d-bnav-active::after {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: #FFD773;
  border-radius: 0 0 4px 4px;
}

/* ---------- Back to top ---------- */
.w4a2d-to-top {
  position: fixed;
  right: 14px; bottom: 78px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4B0082, #8A2BE2);
  color: #FFF8DC;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  z-index: 999;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .2s ease;
  box-shadow: 0 4px 14px rgba(75,0,130,.6);
}
.w4a2d-to-top-show { opacity: 1; visibility: visible; }

/* ---------- Desktop hide of bottom nav, add main bottom padding ---------- */
@media (min-width: 769px) {
  .w4a2d-bnav { display: none; }
  .w4a2d-to-top { bottom: 24px; }
}
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
  .w4a2d-footer { padding-bottom: 7rem; }
}

/* ---------- Desktop wider viewport tuning ---------- */
@media (min-width: 431px) and (max-width: 768px) {
  .w4a2d-wrap { max-width: 100%; }
}
