/* ============================================================
   RR8866 Base Stylesheet - css/design-506e.css
   Mobile-first HTML5 gaming website (Vietnamese / vi-VN)
   All custom classes use the s506- prefix for namespace isolation
   ============================================================ */

/* Brand palette and shared design tokens */
:root {
  --s506-bg: #0A0A0A;
  --s506-bg-alt: #14101a;
  --s506-bg-card: #1a1322;
  --s506-primary: #9370DB;
  --s506-primary-dark: #6e4fb0;
  --s506-accent: #00FF7F;
  --s506-accent-dark: #00cc66;
  --s506-pink: #FFB3FF;
  --s506-pink-soft: #FFB6C1;
  --s506-text: #D3D3D3;
  --s506-text-bright: #ffffff;
  --s506-text-muted: #8a8493;
  --s506-border: rgba(147, 112, 219, 0.28);
  --s506-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.55);
  --s506-shadow-glow: 0 0 1.2rem rgba(0, 255, 127, 0.25);
  --s506-radius: 1rem;
  --s506-radius-sm: 0.6rem;
}

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

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

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: radial-gradient(circle at top, #15101f 0%, var(--s506-bg) 60%);
  color: var(--s506-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* Layout helpers */
.s506-container { width: 100%; padding: 0 1.2rem; }
.s506-wrapper { max-width: 430px; margin: 0 auto; position: relative; }
.s506-grid { display: grid; gap: 1rem; }
.s506-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ============ HEADER ============ */
.s506-header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, rgba(10,10,10,0.98) 0%, rgba(20,16,25,0.95) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--s506-border);
  z-index: 1000;
  padding: 0.7rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
}
.s506-brand { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.s506-brand img { width: 30px; height: 30px; border-radius: 0.6rem; box-shadow: 0 0 8px rgba(147,112,219,0.5); }
.s506-brand-name { font-size: 1.8rem; font-weight: 800; color: var(--s506-text-bright); letter-spacing: 0.5px; }
.s506-brand-name span { color: var(--s506-accent); }
.s506-actions { display: flex; align-items: center; gap: 0.4rem; }

.s506-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1rem; font-size: 1.25rem; font-weight: 700;
  border-radius: 2rem; border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  min-height: 36px; line-height: 1; white-space: nowrap;
}
.s506-btn:active { transform: scale(0.95); }
.s506-btn i { font-size: 1.1rem; }
.s506-btn-primary { background: linear-gradient(135deg, var(--s506-accent), var(--s506-accent-dark)); color: #062a14; box-shadow: var(--s506-shadow-glow); }
.s506-btn-ghost { background: rgba(147,112,219,0.18); color: var(--s506-pink); border: 1px solid var(--s506-border); }
.s506-btn-purple { background: linear-gradient(135deg, var(--s506-primary), var(--s506-primary-dark)); color: #fff; }
.s506-btn-pink { background: linear-gradient(135deg, var(--s506-pink), var(--s506-pink-soft)); color: #2a0a1f; }

.s506-menu-btn {
  background: rgba(147,112,219,0.15); border: 1px solid var(--s506-border);
  color: var(--s506-text-bright); width: 36px; height: 36px; border-radius: 0.8rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.5rem;
}

/* ============ MOBILE DRAWER ============ */
.s506-drawer {
  position: fixed; top: 0; right: -100%; height: 100vh; width: 82%; max-width: 320px;
  background: linear-gradient(180deg, #1a1322 0%, #0A0A0A 100%);
  z-index: 9999; padding: 6rem 1.4rem 2rem; transition: right .3s ease;
  box-shadow: -0.5rem 0 2rem rgba(0,0,0,0.7); overflow-y: auto;
}
.s506-drawer.open { right: 0; }
.s506-drawer-title { font-size: 1.3rem; color: var(--s506-pink); margin-bottom: 1rem; letter-spacing: 1.5px; font-weight: 700; }
.s506-drawer a, .s506-drawer .s506-drawer-link {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 1rem 1.2rem; margin-bottom: 0.5rem;
  background: rgba(147,112,219,0.1); border-radius: 0.8rem;
  color: var(--s506-text); font-size: 1.3rem; font-weight: 600;
  border-left: 3px solid transparent; transition: all .2s ease;
}
.s506-drawer a i, .s506-drawer .s506-drawer-link i { color: var(--s506-accent); width: 18px; text-align: center; }
.s506-drawer a:hover, .s506-drawer a:focus { background: rgba(0,255,127,0.1); border-left-color: var(--s506-accent); color: var(--s506-text-bright); }
.s506-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 9998; display: none; }
.s506-overlay.show { display: block; }

/* ============ MAIN ============ */
main { padding-top: 6rem; padding-bottom: 80px; }

/* ============ HERO CAROUSEL ============ */
.s506-hero-wrap { padding: 1rem 1.2rem 0; }
.s506-carousel { position: relative; border-radius: var(--s506-radius); overflow: hidden; box-shadow: var(--s506-shadow); }
.s506-slides { display: flex; transition: transform .45s ease; }
.s506-slide { min-width: 100%; position: relative; cursor: pointer; }
.s506-slide img { width: 100%; height: 190px; object-fit: cover; }
.s506-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,10,10,0.85) 100%); }
.s506-slide-caption { position: absolute; left: 1.2rem; bottom: 1.2rem; right: 1.2rem; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.8); z-index: 2; }
.s506-slide-caption h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: 0.3rem; }
.s506-slide-caption p { font-size: 1.2rem; color: var(--s506-pink); margin-bottom: 0.6rem; }
.s506-slide-caption .s506-btn { padding: 0.5rem 1.1rem; font-size: 1.15rem; }
.s506-dots { display: flex; justify-content: center; gap: 0.5rem; padding: 0.7rem 0; }
.s506-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(147,112,219,0.35); cursor: pointer; border: none; transition: all .2s ease; }
.s506-dot.active { background: var(--s506-accent); width: 22px; border-radius: 5px; }

/* ============ SECTION ============ */
.s506-section { padding: 1.4rem 1.2rem; }
.s506-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.s506-section-title { font-size: 1.7rem; font-weight: 800; color: var(--s506-text-bright); display: flex; align-items: center; gap: 0.6rem; }
.s506-section-title::before { content: ''; width: 4px; height: 1.7rem; background: linear-gradient(180deg, var(--s506-accent), var(--s506-primary)); border-radius: 3px; }
.s506-section-more { color: var(--s506-pink); font-size: 1.15rem; font-weight: 600; }

/* ============ QUICK STATS STRIP ============ */
.s506-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; padding: 0 1.2rem 0.4rem; }
.s506-stat { background: linear-gradient(135deg, rgba(147,112,219,0.15), rgba(0,255,127,0.05)); border: 1px solid var(--s506-border); border-radius: var(--s506-radius-sm); padding: 0.8rem 0.4rem; text-align: center; }
.s506-stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: var(--s506-accent); }
.s506-stat-label { display: block; font-size: 1rem; color: var(--s506-text-muted); margin-top: 0.2rem; }

/* ============ CATEGORY HEADER ============ */
.s506-cat-head { display: flex; align-items: center; gap: 0.7rem; margin: 1.8rem 0 1rem; padding: 0 1.2rem; }
.s506-cat-icon { width: 34px; height: 34px; border-radius: 0.8rem; background: linear-gradient(135deg, var(--s506-primary), var(--s506-pink)); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff; flex-shrink: 0; }
.s506-cat-title { font-size: 1.6rem; font-weight: 800; color: var(--s506-text-bright); flex: 1; }
.s506-cat-tag { font-size: 1rem; color: var(--s506-pink); background: rgba(255,179,255,0.12); padding: 0.25rem 0.6rem; border-radius: 1rem; }

/* ============ GAME GRID ============ */
.s506-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; padding: 0 1.2rem; }
.s506-game {
  background: linear-gradient(180deg, rgba(147,112,219,0.14), rgba(255,179,255,0.04));
  border: 1px solid var(--s506-border); border-radius: var(--s506-radius-sm);
  padding: 0.5rem; text-align: center; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.s506-game:active { transform: scale(0.94); box-shadow: var(--s506-shadow-glow); }
.s506-game-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 0.5rem; margin-bottom: 0.4rem; background: #0a0a0a; }
.s506-game-name { font-size: 1.05rem; color: var(--s506-text); line-height: 1.25rem; min-height: 2.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }

/* ============ INFO CARD / MODULE ============ */
.s506-card {
  background: linear-gradient(180deg, rgba(147,112,219,0.08), rgba(255,179,255,0.03));
  border: 1px solid var(--s506-border); border-radius: var(--s506-radius);
  padding: 1.4rem; margin: 0 1.2rem 1.2rem; box-shadow: var(--s506-shadow);
}
.s506-card h2 { color: var(--s506-text-bright); margin-bottom: 0.8rem; font-weight: 800; font-size: 1.65rem; }
.s506-card h3 { color: var(--s506-accent); margin: 0.8rem 0 0.5rem; font-weight: 700; font-size: 1.35rem; }
.s506-card p { margin-bottom: 0.7rem; line-height: 1.65rem; color: var(--s506-text); }
.s506-card ul { list-style: none; padding-left: 0; }
.s506-card ul li { padding: 0.35rem 0 0.35rem 1.6rem; position: relative; line-height: 1.55rem; }
.s506-card ul li::before { content: '▸'; position: absolute; left: 0.4rem; color: var(--s506-accent); font-weight: 700; }

.s506-text-link { color: var(--s506-accent); font-weight: 700; border-bottom: 1px dashed var(--s506-accent); }
.s506-text-link:hover { color: var(--s506-pink); border-bottom-color: var(--s506-pink); }
.s506-kw-link { color: var(--s506-pink); font-weight: 600; border-bottom: 1px dotted var(--s506-pink); }
.s506-kw-link:hover { color: var(--s506-accent); }

/* ============ FAQ ============ */
.s506-faq-item { border-bottom: 1px solid var(--s506-border); padding: 0.9rem 0; }
.s506-faq-item:last-child { border-bottom: none; }
.s506-faq-q { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 700; color: var(--s506-text-bright); font-size: 1.3rem; }
.s506-faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; color: var(--s506-text); font-size: 1.22rem; line-height: 1.6rem; }
.s506-faq-item.open .s506-faq-a { max-height: 500px; padding-top: 0.7rem; }
.s506-faq-icon { color: var(--s506-accent); transition: transform .25s ease; flex-shrink: 0; font-size: 1.3rem; }
.s506-faq-item.open .s506-faq-icon { transform: rotate(45deg); }

/* ============ RTP ANALYSIS ============ */
.s506-rtp-row { display: flex; align-items: center; padding: 0.55rem 0; border-bottom: 1px dashed var(--s506-border); gap: 0.8rem; }
.s506-rtp-row:last-child { border-bottom: none; }
.s506-rtp-name { flex: 1.1; font-size: 1.2rem; color: var(--s506-text); }
.s506-rtp-bar { flex: 1.4; height: 8px; background: rgba(147,112,219,0.2); border-radius: 5px; overflow: hidden; }
.s506-rtp-fill { height: 100%; background: linear-gradient(90deg, var(--s506-accent), var(--s506-pink)); border-radius: 5px; }
.s506-rtp-val { font-weight: 800; color: var(--s506-accent); font-size: 1.2rem; min-width: 4rem; text-align: right; }

/* ============ CTA STRIP ============ */
.s506-cta { background: linear-gradient(135deg, var(--s506-primary), var(--s506-pink-soft)); border-radius: var(--s506-radius); padding: 1.4rem; text-align: center; margin: 0 1.2rem 1.4rem; box-shadow: var(--s506-shadow); }
.s506-cta h3 { color: #1a0a2a; font-size: 1.6rem; margin-bottom: 0.4rem; font-weight: 800; }
.s506-cta p { color: #2a1438; font-size: 1.2rem; margin-bottom: 0.9rem; }
.s506-cta .s506-btn { background: #0A0A0A; color: var(--s506-accent); }

/* ============ HIGHLIGHT GRID ============ */
.s506-highlight { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.s506-highlight-card { background: linear-gradient(135deg, rgba(147,112,219,0.18), rgba(0,255,127,0.05)); border: 1px solid var(--s506-border); border-radius: 0.8rem; padding: 1rem; }
.s506-highlight-card .s506-hl-icon { color: var(--s506-accent); font-size: 1.7rem; margin-bottom: 0.4rem; display: block; }
.s506-highlight-card h4 { color: var(--s506-text-bright); font-size: 1.25rem; margin-bottom: 0.3rem; }
.s506-highlight-card p { font-size: 1.1rem; line-height: 1.4rem; color: var(--s506-text); }

/* ============ TESTIMONIALS ============ */
.s506-testimonials { display: grid; gap: 0.7rem; }
.s506-testimonial { background: rgba(147,112,219,0.08); border-left: 3px solid var(--s506-accent); border-radius: 0.6rem; padding: 0.9rem 1.1rem; }
.s506-testimonial .s506-stars { color: #FFD700; font-size: 1.05rem; margin-bottom: 0.3rem; letter-spacing: 1px; }
.s506-testimonial p { font-style: italic; color: var(--s506-text); font-size: 1.2rem; margin-bottom: 0.4rem; line-height: 1.55rem; }
.s506-testimonial strong { color: var(--s506-pink); }

/* ============ PAYMENT METHODS ============ */
.s506-pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem; }
.s506-pay { background: rgba(255,255,255,0.05); border: 1px solid var(--s506-border); border-radius: 0.6rem; padding: 0.7rem 0.3rem; text-align: center; font-size: 0.98rem; color: var(--s506-text); font-weight: 600; }
.s506-pay .s506-pay-icon { font-size: 1.7rem; color: var(--s506-accent); display: block; margin-bottom: 0.3rem; }

/* ============ WINNERS ============ */
.s506-winner { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.8rem; background: rgba(0,255,127,0.06); border: 1px solid rgba(0,255,127,0.15); border-radius: 0.6rem; margin-bottom: 0.5rem; }
.s506-winner-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--s506-primary), var(--s506-pink)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; }
.s506-winner-info { flex: 1; font-size: 1.15rem; line-height: 1.35rem; }
.s506-winner-name { color: var(--s506-text-bright); font-weight: 700; }
.s506-winner-game { color: var(--s506-text-muted); font-size: 1rem; }
.s506-winner-amount { color: var(--s506-accent); font-weight: 800; font-size: 1.25rem; }

/* ============ SECURITY BADGES ============ */
.s506-badge-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }
.s506-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem; background: rgba(0,255,127,0.08); border: 1px solid rgba(0,255,127,0.25); border-radius: 1.2rem; font-size: 1.1rem; color: var(--s506-accent); font-weight: 600; }
.s506-badge i { font-size: 1.2rem; }

/* ============ APP DOWNLOAD ============ */
.s506-app-card { display: flex; align-items: center; gap: 1rem; }
.s506-app-img { width: 110px; height: 110px; object-fit: cover; border-radius: var(--s506-radius-sm); flex-shrink: 0; box-shadow: var(--s506-shadow); }
.s506-app-body { flex: 1; }
.s506-app-body h3 { color: var(--s506-text-bright); font-size: 1.45rem; margin-bottom: 0.4rem; }
.s506-app-body p { font-size: 1.15rem; line-height: 1.5rem; margin-bottom: 0.7rem; color: var(--s506-text); }
.s506-app-btns { display: flex; flex-direction: column; gap: 0.5rem; }

/* ============ FOOTER ============ */
.s506-footer { background: linear-gradient(180deg, #0A0A0A, #14101a); border-top: 1px solid var(--s506-border); padding: 1.8rem 1.2rem 2rem; margin-top: 1.5rem; }
.s506-footer-brand { color: var(--s506-text); font-size: 1.2rem; line-height: 1.6rem; margin-bottom: 1.2rem; }
.s506-footer-brand strong { color: var(--s506-accent); }
.s506-footer-btns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 1.4rem; }
.s506-footer-btns .s506-btn { width: 100%; padding: 0.7rem 0.5rem; }
.s506-footer-links-title { color: var(--s506-pink); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.6rem; letter-spacing: 0.5px; }
.s506-footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin-bottom: 1.4rem; }
.s506-footer-links a { font-size: 1.12rem; color: var(--s506-text); padding: 0.15rem 0; }
.s506-footer-links a:hover { color: var(--s506-accent); }
.s506-footer-copy { text-align: center; font-size: 1.05rem; color: var(--s506-text-muted); border-top: 1px solid var(--s506-border); padding-top: 1rem; line-height: 1.5rem; }

/* ============ MOBILE BOTTOM NAV ============ */
.s506-bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: 64px;
  background: linear-gradient(180deg, #1a1322, #0A0A0A);
  border-top: 1px solid var(--s506-border);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000; box-shadow: 0 -0.4rem 1rem rgba(0,0,0,0.55);
}
.s506-nav-item { position: relative; flex: 1; min-width: 60px; min-height: 60px; background: transparent; border: none; color: var(--s506-text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; cursor: pointer; font-size: 0.98rem; font-weight: 600; transition: color .2s ease, transform .15s ease; text-decoration: none; padding: 0; }
.s506-nav-item:active { transform: scale(0.9); }
.s506-nav-item .s506-nav-icon { font-size: 22px; line-height: 1; }
.s506-nav-item.active { color: var(--s506-accent); }
.s506-nav-item.active .s506-nav-icon { filter: drop-shadow(0 0 6px rgba(0,255,127,0.6)); }
.s506-nav-badge { position: absolute; top: 6px; right: calc(50% - 22px); background: #FF3B6B; color: #fff; font-size: 0.85rem; font-weight: 700; padding: 0 5px; border-radius: 8px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; }

/* ============ DESKTOP ============ */
@media (min-width: 769px) {
  .s506-bottom-nav { display: none; }
  main { padding-bottom: 2rem; }
}

/* ============ SMALL SCREENS ============ */
@media (max-width: 360px) {
  .s506-games { grid-template-columns: repeat(2, 1fr); }
  .s506-brand-name { font-size: 1.55rem; }
  .s506-btn { padding: 0.55rem 0.8rem; font-size: 1.15rem; }
  .s506-slide-caption h2 { font-size: 1.6rem; }
}
