/* ============================================================
 * nh188 layout stylesheet (prefix: s521-)
 * Mobile-first casino portal. Root font 62.5% => 1rem = 10px.
 * Palette: #FF5722 / #A0522D / #C71585 / #FFCCCB / #2C2C2C.
 * ============================================================ */

:root {
  --s521-primary: #FF5722;
  --s521-secondary: #A0522D;
  --s521-accent: #C71585;
  --s521-soft: #FFCCCB;
  --s521-bg: #2C2C2C;
  --s521-bg-2: #1c1c1c;
  --s521-bg-3: #3a3a3a;
  --s521-text: #fff5f0;
  --s521-muted: #d8c4b8;
  --s521-gold: #ffd24a;
  --s521-line: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { font-size: 62.5%; scroll-behavior: smooth; }

body {
  font-family: "Be Vietnam Pro", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  background: radial-gradient(circle at top, #3a1f1a 0%, var(--s521-bg) 55%, var(--s521-bg-2) 100%);
  color: var(--s521-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  min-height: 100vh;
  overflow-x: hidden;
}

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

.s521-skip { position: absolute; left: -9999px; }
.s521-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }

/* ---------- Header ---------- */
.s521-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(90deg, #1c1c1c 0%, #3a1f1a 100%);
  border-bottom: 2px solid var(--s521-primary);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.s521-header-row {
  max-width: 430px; margin: 0 auto; padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.s521-logo { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }
.s521-logo img { width: 2.8rem; height: 2.8rem; border-radius: 0.6rem; }
.s521-logo-text { font-weight: 800; font-size: 1.7rem; color: var(--s521-primary); letter-spacing: 0.5px; }
.s521-logo-text span { color: var(--s521-gold); }

.s521-header-actions { display: flex; gap: 0.5rem; align-items: center; }
.s521-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 3.4rem; padding: 0 1.2rem; border-radius: 1.8rem;
  font-weight: 700; font-size: 1.3rem; border: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.s521-btn:active { transform: scale(0.96); }
.s521-btn-login { background: transparent; color: var(--s521-text); border: 1.5px solid var(--s521-soft); }
.s521-btn-register {
  background: linear-gradient(90deg, var(--s521-primary), var(--s521-accent));
  color: #fff; box-shadow: 0 4px 10px rgba(255, 87, 34, 0.4);
}
.s521-menu-btn {
  background: transparent; border: none; color: var(--s521-text);
  font-size: 2rem; width: 3rem; height: 3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Expandable mobile menu ---------- */
.s521-mobile-menu {
  max-height: 0; overflow: hidden;
  background: var(--s521-bg-2);
  border-bottom: 1px solid var(--s521-line);
  transition: max-height 0.3s ease;
}
.s521-mobile-menu.s521-menu-open { max-height: 520px; }
.s521-mobile-menu-inner {
  max-width: 430px; margin: 0 auto; padding: 0.6rem 1rem 1rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
}
.s521-mobile-menu-inner a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 0.9rem; border-radius: 0.7rem;
  background: var(--s521-bg-3); color: var(--s521-text);
  font-size: 1.25rem; font-weight: 600;
}
.s521-mobile-menu-inner a i { color: var(--s521-primary); }

/* ---------- Main layout ---------- */
.s521-main { padding-top: 6rem; padding-bottom: 80px; }

/* ---------- Hero carousel ---------- */
.s521-hero { position: relative; margin: 1rem 0; border-radius: 1.2rem; overflow: hidden; }
.s521-slides { position: relative; aspect-ratio: 16/9; }
.s521-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease;
  cursor: pointer;
}
.s521-slide img { width: 100%; height: 100%; object-fit: cover; }
.s521-slide-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem; background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.s521-slide-overlay h2 { font-size: 1.6rem; color: var(--s521-gold); }
.s521-slide-overlay p { font-size: 1.15rem; color: var(--s521-soft); }
.s521-slide.s521-slide-active { opacity: 1; }
.s521-dots {
  position: absolute; bottom: 0.6rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.4rem;
}
.s521-dot {
  width: 0.7rem; height: 0.7rem; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer; border: none;
}
.s521-dot.s521-dot-active { background: var(--s521-primary); }

/* ---------- Section heading ---------- */
.s521-section { margin: 2rem 0; }
.s521-section-title {
  font-size: 1.7rem; font-weight: 800; color: var(--s521-text);
  margin-bottom: 0.8rem; padding-left: 0.8rem;
  border-left: 4px solid var(--s521-primary);
  display: flex; align-items: center; gap: 0.5rem;
}
.s521-section-title i { color: var(--s521-primary); }
.s521-section-sub { color: var(--s521-muted); font-size: 1.25rem; margin-bottom: 1rem; }

/* ---------- Promo CTA bar ---------- */
.s521-cta {
  background: linear-gradient(90deg, var(--s521-primary), var(--s521-accent));
  border-radius: 1rem; padding: 1rem 1.2rem; margin: 1rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  box-shadow: 0 6px 14px rgba(193, 21, 133, 0.35);
}
.s521-cta-text { font-weight: 800; font-size: 1.35rem; color: #fff; }
.s521-cta-btn {
  background: #fff; color: var(--s521-accent); font-weight: 800;
  padding: 0.7rem 1.2rem; border-radius: 1.5rem; border: none; cursor: pointer;
}

/* ---------- Game grid ---------- */
.s521-game-section { margin-bottom: 2rem; }
.s521-game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem;
}
.s521-game-card {
  background: var(--s521-bg-3); border-radius: 0.8rem; overflow: hidden;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid var(--s521-line); display: block; text-align: center;
}
.s521-game-card:active { transform: scale(0.95); }
.s521-game-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-bottom: 1px solid var(--s521-line);
}
.s521-game-card-name {
  font-size: 1.05rem; padding: 0.4rem 0.3rem; color: var(--s521-text);
  font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Filter chips ---------- */
.s521-filter-row { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.5rem 0 1rem; }
.s521-filter-row::-webkit-scrollbar { display: none; }
.s521-filter-btn {
  flex: 0 0 auto; padding: 0.5rem 1rem; border-radius: 1.5rem;
  background: var(--s521-bg-3); color: var(--s521-text);
  border: 1px solid var(--s521-line); font-size: 1.15rem; cursor: pointer;
}
.s521-filter-btn.s521-filter-active {
  background: var(--s521-primary); border-color: var(--s521-primary); color: #fff;
}

/* ---------- Cards / info blocks ---------- */
.s521-card {
  background: var(--s521-bg-3); border-radius: 1rem; padding: 1.2rem;
  border: 1px solid var(--s521-line); margin-bottom: 1rem;
}
.s521-card h3 { color: var(--s521-gold); font-size: 1.4rem; margin-bottom: 0.6rem; }
.s521-card p { color: var(--s521-muted); font-size: 1.2rem; line-height: 1.7rem; }
.s521-card ul { list-style: none; }
.s521-card ul li {
  padding-left: 1.5rem; position: relative; margin-bottom: 0.4rem;
  color: var(--s521-muted); font-size: 1.2rem;
}
.s521-card ul li::before {
  content: "▸"; position: absolute; left: 0; color: var(--s521-primary);
}

/* ---------- Feature list ---------- */
.s521-features { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.s521-feature {
  background: var(--s521-bg-3); border-radius: 0.8rem; padding: 1rem;
  text-align: center; border: 1px solid var(--s521-line);
}
.s521-feature i { font-size: 2.2rem; color: var(--s521-primary); }
.s521-feature h4 { color: var(--s521-text); font-size: 1.2rem; margin-top: 0.4rem; }
.s521-feature p { color: var(--s521-muted); font-size: 1.05rem; margin-top: 0.3rem; }

/* ---------- Testimonials ---------- */
.s521-testimonials { display: grid; gap: 0.7rem; }
.s521-testimonial {
  background: var(--s521-bg-3); border-radius: 0.8rem; padding: 1rem;
  border-left: 3px solid var(--s521-accent);
}
.s521-testimonial p { color: var(--s521-text); font-size: 1.2rem; font-style: italic; }
.s521-testimonial cite { display: block; margin-top: 0.4rem; color: var(--s521-gold); font-size: 1.1rem; }

/* ---------- Payment grid ---------- */
.s521-pay-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.s521-pay {
  flex: 1 1 30%; text-align: center; background: var(--s521-bg-3);
  padding: 0.7rem; border-radius: 0.6rem; border: 1px solid var(--s521-line);
  color: var(--s521-text); font-size: 1.05rem;
}
.s521-pay i { color: var(--s521-primary); font-size: 1.6rem; }

/* ---------- Winners ticker ---------- */
.s521-winners {
  background: var(--s521-bg-2); border-radius: 0.8rem; padding: 0.6rem 0.8rem;
  border: 1px solid var(--s521-line);
}
.s521-winner {
  display: flex; justify-content: space-between;
  padding: 0.3rem 0; border-bottom: 1px dashed var(--s521-line);
  font-size: 1.15rem;
}
.s521-winner:last-child { border-bottom: none; }
.s521-winner b { color: var(--s521-gold); }

/* ---------- FAQ ---------- */
.s521-faq-item {
  background: var(--s521-bg-3); border-radius: 0.7rem; margin-bottom: 0.6rem;
  border: 1px solid var(--s521-line); overflow: hidden;
}
.s521-faq-item summary {
  padding: 0.9rem 1rem; cursor: pointer; font-weight: 700; color: var(--s521-text);
  font-size: 1.25rem; list-style: none;
}
.s521-faq-item summary::-webkit-details-marker { display: none; }
.s521-faq-item p { padding: 0 1rem 0.9rem; color: var(--s521-muted); font-size: 1.15rem; }

/* ---------- App download CTA ---------- */
.s521-app-cta {
  background: linear-gradient(135deg, var(--s521-secondary), var(--s521-accent));
  border-radius: 1.2rem; padding: 1.2rem; text-align: center; margin: 1rem 0;
}
.s521-app-cta h3 { color: #fff; font-size: 1.6rem; margin-bottom: 0.4rem; }
.s521-app-cta p { color: var(--s521-soft); font-size: 1.15rem; margin-bottom: 0.8rem; }
.s521-app-cta button {
  background: var(--s521-gold); color: var(--s521-bg);
  border: none; padding: 0.8rem 1.6rem; border-radius: 1.6rem;
  font-weight: 800; font-size: 1.3rem; cursor: pointer;
}

/* ---------- Footer ---------- */
.s521-footer {
  background: var(--s521-bg-2); padding: 2rem 0 6rem;
  border-top: 2px solid var(--s521-primary); margin-top: 2rem;
}
.s521-footer-brand { color: var(--s521-muted); font-size: 1.15rem; line-height: 1.7rem; margin-bottom: 1rem; }
.s521-footer-brand b { color: var(--s521-primary); }
.s521-footer-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 0.8rem;
  margin-bottom: 1rem;
}
.s521-footer-links a { color: var(--s521-soft); font-size: 1.1rem; }
.s521-footer-promos {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem;
}
.s521-footer-promos button {
  background: var(--s521-primary); color: #fff; border: none;
  padding: 0.5rem 0.9rem; border-radius: 1.4rem; font-size: 1.1rem; font-weight: 700; cursor: pointer;
}
.s521-footer-copy { color: var(--s521-muted); font-size: 1.05rem; border-top: 1px solid var(--s521-line); padding-top: 0.8rem; text-align: center; }

/* ---------- Bottom nav ---------- */
.s521-bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: linear-gradient(180deg, #1c1c1c 0%, #0d0d0d 100%);
  border-top: 2px solid var(--s521-primary);
  display: flex; justify-content: space-around; align-items: stretch;
  height: 6.2rem;
}
.s521-bottom-nav a, .s521-bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--s521-muted);
  font-size: 1rem; gap: 0.2rem; cursor: pointer; min-width: 60px; min-height: 60px;
  transition: color 0.15s ease, transform 0.15s ease;
  position: relative;
}
.s521-bottom-nav a i, .s521-bottom-nav button i { font-size: 2.2rem; }
.s521-bottom-nav a:active, .s521-bottom-nav button:active { transform: scale(0.92); color: var(--s521-primary); }
.s521-bottom-nav .s521-nav-current { color: var(--s521-primary); }
.s521-bottom-nav .s521-nav-current::after {
  content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px;
  background: var(--s521-primary); border-radius: 0 0 3px 3px;
}

/* ---------- Reveal animation ---------- */
.s521-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.s521-reveal.s521-visible { opacity: 1; transform: translateY(0); }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .s521-bottom-nav { display: none; }
  .s521-container { max-width: 760px; }
  .s521-main { padding-bottom: 2rem; }
  .s521-game-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 768px) {
  .s521-main { padding-bottom: 80px; }
}
