/* ============================================================
 * 88p.homes - 88p Casino Vietnam
 * Shared stylesheet (basefiles)
 * All custom classes use prefix: w53d5-
 * Color palette: #1A1A2E (dark bg) | #87CEEB (light accent)
 * ============================================================ */

:root {
  --w53d5-primary: #1A1A2E;
  --w53d5-bg: #1A1A2E;
  --w53d5-bg-2: #222245;
  --w53d5-bg-3: #2c2c54;
  --w53d5-card: #262648;
  --w53d5-text: #87CEEB;
  --w53d5-text-light: #ECECF7;
  --w53d5-text-muted: #9b9bc4;
  --w53d5-accent: #87CEEB;
  --w53d5-accent-2: #5fb8e6;
  --w53d5-gold: #FFD24A;
  --w53d5-gold-2: #F5A623;
  --w53d5-success: #4ADE80;
  --w53d5-danger: #FF6B6B;
  --w53d5-border: rgba(135, 206, 235, 0.18);
  --w53d5-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --w53d5-radius: 14px;
  --w53d5-header-h: 60px;
  --w53d5-bottomnav-h: 64px;
}

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

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

body {
  font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #23235a 0%, var(--w53d5-bg) 60%);
  background-attachment: fixed;
  color: var(--w53d5-text-light);
  line-height: 1.5rem;
  font-size: 1.5rem;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--w53d5-accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.35; }

.w53d5-no-scroll { overflow: hidden; }

/* ---------- Layout containers ---------- */
.w53d5-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.4rem; }
.w53d5-wrapper { width: 100%; }

/* ---------- Header ---------- */
.w53d5-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.98), rgba(26, 26, 46, 0.9));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--w53d5-border);
  height: var(--w53d5-header-h);
}
.w53d5-header-inner {
  max-width: 430px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.2rem;
}
.w53d5-brand { display: flex; align-items: center; gap: 0.8rem; cursor: pointer; }
.w53d5-brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--w53d5-gold), var(--w53d5-gold-2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.5rem; color: #1A1A2E;
  box-shadow: 0 3px 10px rgba(255, 210, 74, 0.4);
}
.w53d5-brand-name { font-size: 2rem; font-weight: 800; color: var(--w53d5-text-light); letter-spacing: 0.5px; }
.w53d5-brand-name span { color: var(--w53d5-gold); }

.w53d5-header-actions { display: flex; align-items: center; gap: 0.6rem; }
.w53d5-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.8rem 1.4rem; border-radius: 999px;
  font-size: 1.35rem; font-weight: 700; border: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  min-height: 38px; white-space: nowrap; font-family: inherit;
}
.w53d5-btn:active { transform: scale(0.95); }
.w53d5-btn-login {
  background: transparent; color: var(--w53d5-text-light);
  border: 1px solid var(--w53d5-border);
}
.w53d5-btn-register {
  background: linear-gradient(135deg, var(--w53d5-gold), var(--w53d5-gold-2));
  color: #1A1A2E; box-shadow: 0 4px 14px rgba(255, 210, 74, 0.35);
}
.w53d5-menu-btn {
  background: transparent; border: 1px solid var(--w53d5-border);
  color: var(--w53d5-text-light);
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.9rem;
}
.w53d5-menu-btn.w53d5-menu-btn-active { background: var(--w53d5-bg-3); color: var(--w53d5-gold); }

/* ---------- Mobile expandable menu ---------- */
.w53d5-mobile-menu {
  position: fixed; top: var(--w53d5-header-h); left: 0; right: 0;
  background: var(--w53d5-bg-2); border-bottom: 1px solid var(--w53d5-border);
  z-index: 9999; max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease; box-shadow: var(--w53d5-shadow);
}
.w53d5-mobile-menu.w53d5-menu-open { max-height: 85vh; overflow-y: auto; }
.w53d5-mobile-menu-inner { padding: 1rem 1.4rem 1.6rem; display: grid; gap: 0.4rem; }
.w53d5-mobile-menu a {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.2rem 1rem; color: var(--w53d5-text-light);
  border-radius: 10px; font-weight: 600; font-size: 1.5rem;
  border: 1px solid transparent;
}
.w53d5-mobile-menu a:hover, .w53d5-mobile-menu a:active {
  background: var(--w53d5-bg-3); border-color: var(--w53d5-border);
}
.w53d5-mobile-menu a i { color: var(--w53d5-accent); width: 24px; text-align: center; font-size: 1.7rem; }

/* ---------- Main ---------- */
.w53d5-main { padding-top: var(--w53d5-header-h); }
@media (max-width: 768px) {
  .w53d5-main { padding-bottom: calc(var(--w53d5-bottomnav-h) + 16px); }
}

/* ---------- Section titles ---------- */
.w53d5-section-title {
  font-size: 2rem; font-weight: 800; color: var(--w53d5-text-light);
  margin: 2.2rem 0 1.2rem; display: flex; align-items: center; gap: 0.8rem;
}
.w53d5-section-title i { color: var(--w53d5-gold); font-size: 1.9rem; }
.w53d5-section-title small { font-size: 1.2rem; color: var(--w53d5-text-muted); font-weight: 500; margin-left: auto; }

/* ---------- Carousel ---------- */
.w53d5-carousel {
  position: relative; border-radius: var(--w53d5-radius); overflow: hidden;
  margin-top: 1.2rem; box-shadow: var(--w53d5-shadow); aspect-ratio: 16 / 9;
}
.w53d5-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; cursor: pointer; }
.w53d5-slide.w53d5-slide-active { opacity: 1; }
.w53d5-slide img { width: 100%; height: 100%; object-fit: cover; }
.w53d5-slide-overlay {
  position: absolute; inset: 0; padding: 1.4rem;
  background: linear-gradient(180deg, transparent 35%, rgba(26, 26, 46, 0.88));
  display: flex; flex-direction: column; justify-content: flex-end;
}
.w53d5-slide-title { color: #fff; font-size: 1.9rem; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,0.6); }
.w53d5-slide-desc { color: var(--w53d5-gold); font-size: 1.3rem; margin-top: 0.3rem; font-weight: 600; }
.w53d5-slide-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.w53d5-slide-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; transition: all 0.2s; border: none; padding: 0; }
.w53d5-slide-dot.w53d5-dot-active { background: var(--w53d5-gold); width: 22px; border-radius: 4px; }

/* ---------- Game grid ---------- */
.w53d5-game-section {
  background: var(--w53d5-card); border-radius: var(--w53d5-radius);
  padding: 1.4rem; margin: 1.4rem 0; border: 1px solid var(--w53d5-border);
}
.w53d5-cat-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.w53d5-cat-head h2 { font-size: 1.7rem; color: var(--w53d5-text-light); }
.w53d5-cat-badge {
  font-size: 1.1rem; font-weight: 700; padding: 0.35rem 1rem;
  border-radius: 999px; background: rgba(135, 206, 235, 0.16); color: var(--w53d5-accent);
  border: 1px solid var(--w53d5-border); white-space: nowrap;
}
.w53d5-game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.w53d5-game-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  cursor: pointer; transition: transform 0.15s, border-color 0.15s;
  background: var(--w53d5-bg-2); border-radius: 12px; padding: 0.7rem;
  border: 1px solid transparent;
}
.w53d5-game-card:active { transform: scale(0.94); }
.w53d5-game-card:hover { border-color: var(--w53d5-border); }
.w53d5-game-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.w53d5-game-card span {
  font-size: 1.15rem; color: var(--w53d5-text-light); text-align: center;
  line-height: 1.3; font-weight: 600; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Generic content card ---------- */
.w53d5-card-box {
  background: var(--w53d5-card); border-radius: var(--w53d5-radius);
  padding: 1.6rem; margin: 1.4rem 0; border: 1px solid var(--w53d5-border);
}
.w53d5-card-box h2 { font-size: 1.85rem; color: var(--w53d5-text-light); margin-bottom: 1rem; }
.w53d5-card-box h3 { font-size: 1.5rem; color: var(--w53d5-accent); margin: 1rem 0 0.5rem; }
.w53d5-card-box p { color: var(--w53d5-text-light); margin-bottom: 0.9rem; font-size: 1.38rem; }
.w53d5-card-box ul { list-style: none; padding-left: 0; }
.w53d5-card-box li { padding: 0.5rem 0 0.5rem 1.8rem; position: relative; color: var(--w53d5-text-light); font-size: 1.38rem; }
.w53d5-card-box li::before { content: '▸'; position: absolute; left: 0.4rem; color: var(--w53d5-gold); }

/* ---------- Inline promo text link ---------- */
.w53d5-link-text { color: var(--w53d5-gold); font-weight: 700; cursor: pointer; border-bottom: 1px dashed var(--w53d5-gold); }

/* ---------- CTA banner ---------- */
.w53d5-cta {
  background: linear-gradient(135deg, var(--w53d5-bg-3), var(--w53d5-bg-2));
  border-radius: var(--w53d5-radius); padding: 1.8rem; text-align: center;
  margin: 1.6rem 0; border: 1px solid var(--w53d5-border);
  position: relative; overflow: hidden;
}
.w53d5-cta::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,74,0.25), transparent 70%);
}
.w53d5-cta h2 { font-size: 2rem; color: var(--w53d5-gold); margin-bottom: 0.8rem; position: relative; }
.w53d5-cta p { color: var(--w53d5-text-light); margin-bottom: 1.2rem; position: relative; }
.w53d5-cta .w53d5-btn { padding: 1.2rem 2.6rem; font-size: 1.55rem; position: relative; }

/* ---------- Feature grid ---------- */
.w53d5-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.w53d5-feature {
  background: var(--w53d5-bg-2); border-radius: 12px; padding: 1.3rem; text-align: center;
  border: 1px solid var(--w53d5-border);
}
.w53d5-feature i { font-size: 2.6rem; color: var(--w53d5-gold); margin-bottom: 0.6rem; }
.w53d5-feature h3 { font-size: 1.4rem; color: var(--w53d5-text-light); margin-bottom: 0.3rem; }
.w53d5-feature p { font-size: 1.2rem; color: var(--w53d5-text-muted); }

/* ---------- RTP table ---------- */
.w53d5-rtp-table { width: 100%; border-collapse: collapse; font-size: 1.3rem; }
.w53d5-rtp-table th, .w53d5-rtp-table td { padding: 0.9rem 0.8rem; text-align: left; border-bottom: 1px solid var(--w53d5-border); }
.w53d5-rtp-table th { color: var(--w53d5-accent); font-weight: 700; }
.w53d5-rtp-table td { color: var(--w53d5-text-light); }
.w53d5-rtp-table td.w53d5-rtp-val { color: var(--w53d5-success); font-weight: 800; text-align: right; }

/* ---------- Winner rows ---------- */
.w53d5-winner-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.9rem 1rem; border-radius: 10px; background: var(--w53d5-bg-2);
  margin-bottom: 0.6rem; border: 1px solid var(--w53d5-border);
}
.w53d5-winner-row .w53d5-wname { font-weight: 700; color: var(--w53d5-text-light); font-size: 1.3rem; }
.w53d5-winner-row .w53d5-wgame { font-size: 1.15rem; color: var(--w53d5-text-muted); }
.w53d5-winner-row .w53d5-wamt { color: var(--w53d5-success); font-weight: 800; font-size: 1.4rem; white-space: nowrap; }

/* ---------- Payment grid ---------- */
.w53d5-pay-grid { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.w53d5-pay-item {
  flex: 1 1 calc(50% - 0.8rem); background: var(--w53d5-bg-2);
  border-radius: 10px; padding: 1rem; display: flex; align-items: center; gap: 0.8rem;
  border: 1px solid var(--w53d5-border); font-size: 1.25rem; color: var(--w53d5-text-light); font-weight: 600;
}
.w53d5-pay-item i { color: var(--w53d5-accent); font-size: 1.9rem; }

/* ---------- Testimonials ---------- */
.w53d5-testi {
  background: var(--w53d5-bg-2); border-radius: 12px; padding: 1.3rem;
  margin-bottom: 0.9rem; border: 1px solid var(--w53d5-border);
}
.w53d5-testi-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.6rem; }
.w53d5-testi-ava {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--w53d5-accent), var(--w53d5-accent-2));
  color: #1A1A2E; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.4rem;
}
.w53d5-testi-name { font-weight: 700; color: var(--w53d5-text-light); font-size: 1.35rem; }
.w53d5-testi-stars { color: var(--w53d5-gold); font-size: 1.2rem; }
.w53d5-testi p { font-size: 1.3rem; color: var(--w53d5-text-muted); }

/* ---------- FAQ ---------- */
.w53d5-faq-item {
  background: var(--w53d5-bg-2); border-radius: 10px; padding: 1.2rem 1.3rem;
  margin-bottom: 0.8rem; border: 1px solid var(--w53d5-border);
}
.w53d5-faq-item h3 { font-size: 1.45rem; color: var(--w53d5-accent); margin-bottom: 0.4rem; }
.w53d5-faq-item p { font-size: 1.32rem; color: var(--w53d5-text-light); }

/* ---------- Reveal animation ---------- */
.w53d5-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.w53d5-reveal.w53d5-revealed { opacity: 1; transform: translateY(0); }

/* ---------- Footer ---------- */
.w53d5-footer { background: var(--w53d5-bg-2); border-top: 1px solid var(--w53d5-border); padding: 2rem 0 1.5rem; margin-top: 2rem; }
.w53d5-footer-inner { max-width: 430px; margin: 0 auto; padding: 0 1.4rem; }
.w53d5-footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.w53d5-footer-about { color: var(--w53d5-text-muted); font-size: 1.3rem; margin-bottom: 1.2rem; line-height: 1.65; }
.w53d5-footer-promos { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.4rem; }
.w53d5-footer-promos .w53d5-btn { padding: 0.75rem 1.2rem; font-size: 1.25rem; }
.w53d5-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem 0.8rem; margin-bottom: 1.2rem; }
.w53d5-footer-links a { font-size: 1.22rem; color: var(--w53d5-text-muted); padding: 0.35rem 0; }
.w53d5-footer-links a:hover { color: var(--w53d5-accent); }
.w53d5-footer-copy { text-align: center; font-size: 1.15rem; color: var(--w53d5-text-muted); border-top: 1px solid var(--w53d5-border); padding-top: 1rem; }

/* ---------- Bottom nav ---------- */
.w53d5-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  height: var(--w53d5-bottomnav-h);
  background: linear-gradient(180deg, rgba(34, 34, 69, 0.98), rgba(26, 26, 46, 0.98));
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--w53d5-border);
  display: flex; justify-content: space-around; align-items: stretch;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.45);
}
.w53d5-bottom-nav a, .w53d5-bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: transparent; border: none; color: var(--w53d5-text-muted);
  font-size: 1.05rem; font-weight: 600; cursor: pointer; min-height: var(--w53d5-bottomnav-h);
  transition: color 0.15s; position: relative; font-family: inherit; padding: 0;
}
.w53d5-bottom-nav a i, .w53d5-bottom-nav button i { font-size: 2.2rem; transition: transform 0.15s; }
.w53d5-bottom-nav a:active, .w53d5-bottom-nav button:active { color: var(--w53d5-gold); }
.w53d5-bottom-nav a:active i, .w53d5-bottom-nav button:active i { transform: scale(1.18); }
.w53d5-bottom-nav .w53d5-nav-active { color: var(--w53d5-gold); }
.w53d5-bottom-nav .w53d5-nav-active i { color: var(--w53d5-gold); }
.w53d5-bottom-nav .w53d5-nav-badge {
  position: absolute; top: 6px; right: 24%; min-width: 16px; height: 16px;
  background: var(--w53d5-danger); color: #fff; border-radius: 999px;
  font-size: 1rem; display: flex; align-items: center; justify-content: center; padding: 0 4px; font-weight: 700;
}

/* ---------- Desktop: hide bottom nav, keep header ---------- */
@media (min-width: 769px) {
  .w53d5-bottom-nav { display: none; }
  .w53d5-main { padding-bottom: 0; }
}

/* ---------- Headings / utils ---------- */
h1 { font-size: 2.2rem; color: var(--w53d5-text-light); margin: 1.6rem 0 0.8rem; line-height: 1.3; }
.w53d5-text-accent { color: var(--w53d5-accent); }
.w53d5-text-gold { color: var(--w53d5-gold); font-weight: 700; }
.w53d5-text-muted { color: var(--w53d5-text-muted); }
.w53d5-center { text-align: center; }
.w53d5-mt { margin-top: 1.4rem; }
.w53d5-mb { margin-bottom: 1.4rem; }
