/* ============================================================
 * bongdanet.cyou - core stylesheet (mobile-first)
 * All custom classes use the "ui38-" prefix per project rule.
 * Palette: #9400D3 (violet) | #8B008B (magenta)
 *          #0A0A0A (ink)   | #CD853F (gold) | #D2691E (amber)
 * ============================================================ */

:root {
  --ui38-primary: #9400D3;
  --ui38-secondary: #8B008B;
  --ui38-bg: #0A0A0A;
  --ui38-text: #FFFFFF;
  --ui38-muted: #C9B8D9;
  --ui38-gold: #CD853F;
  --ui38-amber: #D2691E;
  --ui38-card: #161016;
  --ui38-card-2: #1E1422;
  --ui38-border: rgba(205, 133, 63, 0.28);
  --ui38-radius: 14px;
  --ui38-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

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

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

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

/* -----------------------------------------------------------
 * Layout primitives
 * --------------------------------------------------------- */
.ui38-wrapper {
  width: 100%;
  max-width: 430px;            /* viewport cap per spec         */
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.ui38-container {
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.4rem;
}

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

main { padding-bottom: 90px; }   /* clearance for fixed bottom nav */

/* -----------------------------------------------------------
 * Header
 * --------------------------------------------------------- */
.ui38-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #0A0A0A 0%, #1a0a22 100%);
  border-bottom: 1px solid var(--ui38-border);
}

.ui38-header-inner {
  max-width: 430px;
  margin: 0 auto;
  height: 5.6rem;
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.ui38-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ui38-text);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

.ui38-brand img {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 8px;
}

.ui38-brand small {
  display: block;
  font-size: 1.0rem;
  font-weight: 600;
  color: var(--ui38-gold);
  letter-spacing: 0.02em;
}

.ui38-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ui38-icon-btn {
  background: transparent;
  border: 1px solid var(--ui38-border);
  color: var(--ui38-text);
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.8rem;
}

/* -----------------------------------------------------------
 * Buttons (call to action / promo)
 * --------------------------------------------------------- */
.ui38-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.8rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s;
  text-decoration: none;
}

.ui38-btn:active { transform: scale(0.96); }

.ui38-btn-primary {
  background: linear-gradient(135deg, var(--ui38-gold) 0%, var(--ui38-amber) 100%);
  color: #0A0A0A;
  box-shadow: 0 6px 16px rgba(210, 105, 30, 0.35);
}

.ui38-btn-secondary {
  background: linear-gradient(135deg, var(--ui38-primary) 0%, var(--ui38-secondary) 100%);
  color: var(--ui38-text);
  box-shadow: 0 6px 16px rgba(148, 0, 211, 0.35);
}

.ui38-btn-ghost {
  background: rgba(205, 133, 63, 0.10);
  color: var(--ui38-gold);
  border: 1px solid var(--ui38-border);
}

.ui38-link {
  color: var(--ui38-gold);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* -----------------------------------------------------------
 * Mobile drawer menu (off-canvas, above page)
 * --------------------------------------------------------- */
.ui38-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #0A0A0A 0%, #1c0a24 100%);
  border-bottom: 1px solid var(--ui38-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.ui38-mobile-menu.ui38-open { max-height: 80vh; overflow-y: auto; }

.ui38-mobile-menu nav {
  max-width: 430px;
  margin: 0 auto;
  padding: 1.6rem 1.4rem 2rem;
  display: grid;
  gap: 0.6rem;
}

.ui38-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.0rem 1.2rem;
  background: rgba(148, 0, 211, 0.12);
  border: 1px solid var(--ui38-border);
  border-radius: 10px;
  color: var(--ui38-text);
  font-size: 1.4rem;
  font-weight: 600;
}

.ui38-mobile-menu a i { color: var(--ui38-gold); font-size: 1.6rem; }

.ui38-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.4rem 1rem;
  color: var(--ui38-gold);
  font-weight: 800;
  font-size: 1.5rem;
}

/* -----------------------------------------------------------
 * Hero carousel
 * --------------------------------------------------------- */
.ui38-carousel {
  position: relative;
  width: 100%;
  border-radius: var(--ui38-radius);
  overflow: hidden;
  margin-top: 1.2rem;
  box-shadow: var(--ui38-shadow);
}

.ui38-track { position: relative; width: 100%; aspect-ratio: 16 / 9; }

.ui38-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ui38-slide.ui38-active { opacity: 1; }

.ui38-slide img { width: 100%; height: 100%; object-fit: cover; }

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

.ui38-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
}

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

/* -----------------------------------------------------------
 * Section / heading components
 * --------------------------------------------------------- */
.ui38-section { padding: 1.8rem 0; }

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

.ui38-section-title i { color: var(--ui38-gold); }

.ui38-lead {
  color: var(--ui38-muted);
  font-size: 1.4rem;
  line-height: 2.2rem;
}

.ui38-h1 {
  font-size: 2.0rem;
  font-weight: 800;
  line-height: 2.6rem;
  margin: 1.4rem 0 0.6rem;
  background: linear-gradient(90deg, #fff 0%, var(--ui38-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* -----------------------------------------------------------
 * Cards
 * --------------------------------------------------------- */
.ui38-card {
  background: var(--ui38-card);
  border: 1px solid var(--ui38-border);
  border-radius: var(--ui38-radius);
  padding: 1.4rem;
  box-shadow: var(--ui38-shadow);
}

.ui38-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.5rem;
  color: var(--ui38-gold);
}

.ui38-card p {
  margin: 0;
  color: var(--ui38-muted);
  font-size: 1.3rem;
  line-height: 2.1rem;
}

.ui38-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* -----------------------------------------------------------
 * Game list (compact icon grid)
 * --------------------------------------------------------- */
.ui38-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.ui38-game-item {
  text-align: center;
  cursor: pointer;
  background: var(--ui38-card-2);
  border: 1px solid var(--ui38-border);
  border-radius: 12px;
  padding: 0.6rem 0.4rem;
  transition: transform 0.18s ease, border-color 0.18s;
}

.ui38-game-item:active { transform: scale(0.94); border-color: var(--ui38-gold); }

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

.ui38-game-item span {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.1rem;
  color: var(--ui38-text);
  line-height: 1.4rem;
  min-height: 2.8rem;
  overflow: hidden;
}

.ui38-cat-label {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ui38-gold);
  background: rgba(205, 133, 63, 0.10);
  border: 1px solid var(--ui38-border);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* -----------------------------------------------------------
 * RTP / stats bars
 * --------------------------------------------------------- */
.ui38-rtp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--ui38-border);
}

.ui38-rtp-row:last-child { border-bottom: none; }

.ui38-rtp-row span { font-size: 1.3rem; color: var(--ui38-text); }

.ui38-rtp-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
  margin: 0 0.8rem;
}

.ui38-rtp-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ui38-gold), var(--ui38-amber));
}

/* -----------------------------------------------------------
 * Testimonials / winners / achievements
 * --------------------------------------------------------- */
.ui38-review {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--ui38-card-2);
  border-radius: 12px;
  border: 1px solid var(--ui38-border);
  margin-bottom: 0.8rem;
}

.ui38-avatar {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ui38-primary), var(--ui38-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.ui38-review p { margin: 0.2rem 0 0; font-size: 1.25rem; color: var(--ui38-muted); line-height: 1.9rem; }
.ui38-review b { color: var(--ui38-gold); }

.ui38-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ui38-steps li {
  position: relative;
  padding: 0.8rem 0 0.8rem 3.4rem;
  font-size: 1.3rem;
  color: var(--ui38-muted);
  line-height: 2.0rem;
}

.ui38-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ui38-gold), var(--ui38-amber));
  color: #0A0A0A;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* -----------------------------------------------------------
 * Payment / partners strip
 * --------------------------------------------------------- */
.ui38-pay-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.ui38-pay-strip div {
  background: var(--ui38-card-2);
  border: 1px solid var(--ui38-border);
  border-radius: 8px;
  padding: 0.6rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--ui38-muted);
}

/* -----------------------------------------------------------
 * Footer
 * --------------------------------------------------------- */
.ui38-footer {
  background: #060306;
  border-top: 1px solid var(--ui38-border);
  padding: 2rem 0 8rem;
  margin-top: 1.6rem;
}

.ui38-footer-brand { color: var(--ui38-muted); font-size: 1.25rem; line-height: 2.0rem; margin-bottom: 1rem; }

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

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

.ui38-footer-promos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.ui38-copy {
  font-size: 1.1rem;
  color: #6a5a72;
  text-align: center;
  margin-top: 1rem;
}

/* -----------------------------------------------------------
 * Mobile bottom navigation (fixed)
 * --------------------------------------------------------- */
.ui38-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 6.2rem;
  background: linear-gradient(180deg, #14081a 0%, #0A0A0A 100%);
  border-top: 1px solid var(--ui38-border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.55);
}

.ui38-bottom-nav button,
.ui38-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--ui38-muted);
  font-size: 1.05rem;
  text-decoration: none;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  position: relative;
  transition: color 0.18s, transform 0.18s;
}

.ui38-bottom-nav button:active,
.ui38-bottom-nav a:active { transform: scale(0.92); }

.ui38-bottom-nav .ui38-nav-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.ui38-bottom-nav .ui38-active-nav { color: var(--ui38-gold); }

.ui38-bottom-nav .ui38-badge {
  position: absolute;
  top: 0.5rem;
  right: calc(50% - 1.6rem);
  background: var(--ui38-amber);
  color: #0A0A0A;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0 0.4rem;
  min-width: 1.4rem;
  text-align: center;
}

/* Desktop hides the bottom nav; show simple desktop bar instead. */
@media (min-width: 769px) {
  .ui38-bottom-nav { display: none; }
  main { padding-bottom: 2rem; }
  .ui38-wrapper, .ui38-container { max-width: 430px; }
}

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

/* -----------------------------------------------------------
 * Reveal-on-scroll animation
 * --------------------------------------------------------- */
.ui38-reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.45s ease, transform 0.45s ease; }
.ui38-reveal.ui38-visible { opacity: 1; transform: translateY(0); }

/* Utility helpers */
.ui38-text-center { text-align: center; }
.ui38-mt { margin-top: 1.2rem; }
.ui38-mb { margin-bottom: 1.2rem; }
.ui38-row { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }
.ui38-pill {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 1.15rem;
  background: rgba(148, 0, 211, 0.18);
  color: var(--ui38-text);
  border: 1px solid var(--ui38-border);
}
