/* ============================================================
   d9d9 game - Core Layout Stylesheet (css/layout.css)
   Mobile-first HTML5 casino design (max-width 430px)
   All custom classes use the s4d0- prefix
   Code comments in English only
   ============================================================ */

/* ---------- Brand palette + semantic tokens ---------- */
:root {
  --s4d0-salmon: #FA8072;
  --s4d0-plum: #DDA0DD;
  --s4d0-deep: #2E4057;
  --s4d0-silver: #ADB5BD;
  --s4d0-indigo: #4B0082;
  --s4d0-magenta: #AD1457;

  --s4d0-bg: #161f2c;
  --s4d0-bg-soft: #1f2c3d;
  --s4d0-bg-card: #233349;
  --s4d0-bg-elev: #2c3e57;
  --s4d0-primary: #FA8072;
  --s4d0-secondary: #DDA0DD;
  --s4d0-accent: #AD1457;
  --s4d0-gold: #ffcf6b;
  --s4d0-text: #f4f7fb;
  --s4d0-text-muted: #ADB5BD;
  --s4d0-text-dim: #8a97a8;
  --s4d0-border: rgba(250, 128, 114, 0.22);
  --s4d0-border-soft: rgba(173, 181, 189, 0.18);

  --s4d0-radius: 14px;
  --s4d0-radius-sm: 9px;
  --s4d0-radius-lg: 20px;
  --s4d0-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  --s4d0-shadow-glow: 0 6px 22px rgba(250, 128, 114, 0.35);
  --s4d0-gradient: linear-gradient(135deg, #FA8072 0%, #AD1457 100%);
  --s4d0-gradient-2: linear-gradient(135deg, #4B0082 0%, #2E4057 100%);
  --s4d0-gradient-3: linear-gradient(135deg, #DDA0DD 0%, #4B0082 100%);
  --s4d0-header-h: 5.6rem;
  --s4d0-bottomnav-h: 6.4rem;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', 'Helvetica Neue', 'PingFang SC', Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--s4d0-text);
  background: radial-gradient(circle at top, #1f2c3d 0%, #161f2c 55%);
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--s4d0-secondary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--s4d0-primary); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

/* ---------- Layout primitives ---------- */
.s4d0-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.4rem; }
.s4d0-wrapper { padding: 2rem 1.4rem; }
.s4d0-section { margin: 2.4rem 0; }
.s4d0-section-title {
  font-size: 2rem; font-weight: 800; margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .8rem;
  color: var(--s4d0-text);
}
.s4d0-section-title::before {
  content: ""; width: 5px; height: 2rem; border-radius: 3px;
  background: var(--s4d0-gradient);
}
.s4d0-eyebrow {
  display: inline-block; font-size: 1.15rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--s4d0-primary); margin-bottom: .6rem;
}

/* ---------- Header / Top navigation ---------- */
.s4d0-header {
  position: sticky; top: 0; z-index: 1000;
  background: linear-gradient(135deg, rgba(34, 51, 73, .96), rgba(22, 31, 44, .96));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--s4d0-border);
}
.s4d0-header-row {
  height: var(--s4d0-header-h);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.2rem;
}
.s4d0-brand { display: flex; align-items: center; gap: .8rem; flex: 1; min-width: 0; }
.s4d0-brand-logo {
  width: 3.4rem; height: 3.4rem; border-radius: 9px;
  background: var(--s4d0-gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 1.7rem;
  box-shadow: var(--s4d0-shadow-glow);
  flex-shrink: 0;
}
.s4d0-brand-name { font-size: 1.7rem; font-weight: 800; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s4d0-brand-name span { color: var(--s4d0-primary); }

.s4d0-header-actions { display: flex; align-items: center; gap: .6rem; }
.s4d0-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: 1.3rem; font-weight: 700; border-radius: 999px;
  padding: .85rem 1.4rem; min-height: 3.6rem; transition: transform .15s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.s4d0-btn:hover { transform: translateY(-1px); }
.s4d0-btn:active { transform: scale(.96); }
.s4d0-btn-register { background: var(--s4d0-gradient); color: #fff; box-shadow: var(--s4d0-shadow-glow); }
.s4d0-btn-login { background: transparent; color: var(--s4d0-secondary); border: 1.5px solid var(--s4d0-secondary); }
.s4d0-btn-ghost { background: rgba(255,255,255,.06); color: var(--s4d0-text); border: 1px solid var(--s4d0-border-soft); }
.s4d0-menu-btn {
  width: 3.6rem; height: 3.6rem; border-radius: 9px;
  background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center;
  color: var(--s4d0-text); font-size: 1.8rem;
}

/* ---------- Expandable nav drawer ---------- */
.s4d0-nav-drawer {
  position: fixed; top: 0; right: -100%; width: 82%; max-width: 340px;
  height: 100vh; z-index: 9999;
  background: linear-gradient(160deg, #1f2c3d, #161f2c);
  box-shadow: -10px 0 40px rgba(0,0,0,.5);
  padding: 2rem 1.6rem; overflow-y: auto;
  transition: right .3s cubic-bezier(.4,0,.2,1);
}
.s4d0-nav-drawer.s4d0-open { right: 0; }
.s4d0-nav-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9998;
  opacity: 0; visibility: hidden; transition: opacity .3s ease;
}
.s4d0-nav-backdrop.s4d0-open { opacity: 1; visibility: visible; }
.s4d0-nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.8rem; }
.s4d0-nav-head h3 { font-size: 1.6rem; color: var(--s4d0-primary); }
.s4d0-nav-close { font-size: 2rem; color: var(--s4d0-text-muted); width: 3.2rem; height: 3.2rem; }
.s4d0-nav-section-label {
  font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--s4d0-text-dim); margin: 1.4rem 0 .8rem;
}
.s4d0-nav-link {
  display: flex; align-items: center; gap: .9rem;
  padding: 1.1rem 1rem; border-radius: 10px; font-size: 1.45rem; font-weight: 600;
  color: var(--s4d0-text); margin-bottom: .4rem; transition: background .2s ease, color .2s ease;
}
.s4d0-nav-link i { font-size: 1.6rem; color: var(--s4d0-primary); width: 2rem; text-align: center; }
.s4d0-nav-link:hover { background: rgba(250,128,114,.12); color: var(--s4d0-primary); }
.s4d0-nav-cta { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .8rem; }

/* ---------- Hero / Carousel ---------- */
.s4d0-hero { position: relative; margin: 1.4rem 0; }
.s4d0-carousel {
  position: relative; border-radius: var(--s4d0-radius-lg); overflow: hidden;
  box-shadow: var(--s4d0-shadow); border: 1px solid var(--s4d0-border);
}
.s4d0-carousel-track { display: flex; transition: transform .5s ease; }
.s4d0-carousel-slide { min-width: 100%; position: relative; cursor: pointer; }
.s4d0-carousel-slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.s4d0-carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1.4rem 1.4rem;
  background: linear-gradient(transparent, rgba(22,31,44,.92));
}
.s4d0-carousel-caption h2 { font-size: 1.8rem; font-weight: 800; color: #fff; margin-bottom: .3rem; }
.s4d0-carousel-caption p { font-size: 1.25rem; color: var(--s4d0-text-muted); }
.s4d0-carousel-dots {
  position: absolute; bottom: 1rem; right: 1.2rem; display: flex; gap: .5rem; z-index: 2;
}
.s4d0-carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); transition: all .2s ease; }
.s4d0-carousel-dot.s4d0-active { background: var(--s4d0-primary); width: 22px; border-radius: 4px; }

/* ---------- Hero banner CTA strip ---------- */
.s4d0-hero-cta {
  display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem;
}
.s4d0-hero-cta .s4d0-btn { width: 100%; padding: 1.1rem; }

/* ---------- Game grid ---------- */
.s4d0-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem;
}
.s4d0-card {
  background: var(--s4d0-bg-card); border-radius: var(--s4d0-radius);
  border: 1px solid var(--s4d0-border-soft); overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: pointer; position: relative;
}
.s4d0-card:hover { transform: translateY(-3px); border-color: var(--s4d0-primary); box-shadow: var(--s4d0-shadow-glow); }
.s4d0-card:active { transform: scale(.97); }
.s4d0-card-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #0f1620; }
.s4d0-card-body { padding: .6rem .7rem .8rem; }
.s4d0-card-name {
  font-size: 1.15rem; font-weight: 600; color: var(--s4d0-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.s4d0-card-tag {
  position: absolute; top: .5rem; left: .5rem; z-index: 2;
  background: var(--s4d0-gradient); color: #fff; font-size: .95rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: 6px;
}
.s4d0-card-hot .s4d0-card-tag { background: linear-gradient(135deg, #ffcf6b, #AD1457); }

.s4d0-filter-row {
  display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .6rem;
  margin-bottom: 1rem; scrollbar-width: none;
}
.s4d0-filter-row::-webkit-scrollbar { display: none; }
.s4d0-chip {
  flex-shrink: 0; padding: .7rem 1.3rem; border-radius: 999px;
  background: var(--s4d0-bg-card); border: 1px solid var(--s4d0-border-soft);
  font-size: 1.2rem; font-weight: 600; color: var(--s4d0-text-muted);
}
.s4d0-chip.s4d0-active { background: var(--s4d0-gradient); color: #fff; border-color: transparent; }

/* ---------- Info / content blocks ---------- */
.s4d0-panel {
  background: var(--s4d0-bg-card); border-radius: var(--s4d0-radius);
  border: 1px solid var(--s4d0-border-soft); padding: 1.8rem 1.6rem;
  box-shadow: var(--s4d0-shadow);
}
.s4d0-panel h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: 1rem; color: #fff; }
.s4d0-panel h3 { font-size: 1.55rem; font-weight: 700; margin: 1.2rem 0 .6rem; color: var(--s4d0-secondary); }
.s4d0-panel p { margin-bottom: 1rem; color: var(--s4d0-text); line-height: 1.65; }
.s4d0-panel strong { color: var(--s4d0-primary); }
.s4d0-prose { line-height: 1.7; color: var(--s4d0-text); }
.s4d0-prose p { margin-bottom: 1rem; }
.s4d0-prose a { color: var(--s4d0-primary); font-weight: 600; border-bottom: 1px dashed rgba(250,128,114,.5); }

.s4d0-step-list { counter-reset: step; margin-top: 1rem; }
.s4d0-step-list li {
  position: relative; padding: 1rem 1rem 1rem 3.6rem; margin-bottom: .8rem;
  background: rgba(255,255,255,.04); border-radius: 10px; border-left: 3px solid var(--s4d0-primary);
  counter-increment: step;
}
.s4d0-step-list li::before {
  content: counter(step); position: absolute; left: .8rem; top: 1rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--s4d0-gradient);
  color: #fff; font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- FAQ ---------- */
.s4d0-faq-item {
  border-bottom: 1px solid var(--s4d0-border-soft); padding: 1rem 0;
}
.s4d0-faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: 1.4rem; font-weight: 700; color: var(--s4d0-text); cursor: pointer; padding: .4rem 0;
}
.s4d0-faq-q i { color: var(--s4d0-primary); transition: transform .25s ease; font-size: 1.4rem; }
.s4d0-faq-a { font-size: 1.3rem; color: var(--s4d0-text-muted); line-height: 1.6; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.s4d0-faq-item.s4d0-open .s4d0-faq-a { max-height: 320px; padding-top: .8rem; }
.s4d0-faq-item.s4d0-open .s4d0-faq-q i { transform: rotate(45deg); }

/* ---------- Feature / highlight tiles ---------- */
.s4d0-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
.s4d0-feature {
  background: var(--s4d0-bg-card); border: 1px solid var(--s4d0-border-soft);
  border-radius: var(--s4d0-radius); padding: 1.4rem 1.2rem; text-align: center;
}
.s4d0-feature-ico {
  width: 4.4rem; height: 4.4rem; margin: 0 auto .8rem; border-radius: 12px;
  background: var(--s4d0-gradient-2); display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--s4d0-primary);
}
.s4d0-feature h3 { font-size: 1.35rem; margin-bottom: .4rem; color: #fff; }
.s4d0-feature p { font-size: 1.15rem; color: var(--s4d0-text-muted); line-height: 1.5; }

/* ---------- Testimonials ---------- */
.s4d0-review-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
.s4d0-review {
  background: var(--s4d0-bg-card); border-radius: var(--s4d0-radius);
  border: 1px solid var(--s4d0-border-soft); padding: 1.4rem;
}
.s4d0-review-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.s4d0-review-avatar {
  width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--s4d0-gradient-3);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
}
.s4d0-review-name { font-size: 1.3rem; font-weight: 700; color: #fff; }
.s4d0-review-stars { color: var(--s4d0-gold); font-size: 1.1rem; }
.s4d0-review-text { font-size: 1.25rem; color: var(--s4d0-text-muted); line-height: 1.6; }

/* ---------- Winners ticker ---------- */
.s4d0-ticker {
  background: var(--s4d0-gradient-2); border-radius: var(--s4d0-radius);
  padding: 1rem 1.2rem; margin: 1.4rem 0; border: 1px solid var(--s4d0-border);
}
.s4d0-ticker-title { font-size: 1.25rem; font-weight: 800; color: var(--s4d0-gold); margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.s4d0-ticker-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px dashed rgba(255,255,255,.1); font-size: 1.2rem; }
.s4d0-ticker-row:last-child { border-bottom: none; }
.s4d0-ticker-row .s4d0-amount { color: var(--s4d0-primary); font-weight: 700; }

/* ---------- Payment / app CTA ---------- */
.s4d0-pay-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.s4d0-pay-badge {
  background: rgba(255,255,255,.06); border: 1px solid var(--s4d0-border-soft);
  border-radius: 10px; padding: .8rem 1rem; font-size: 1.2rem; font-weight: 600; color: var(--s4d0-text);
  display: flex; align-items: center; gap: .5rem;
}
.s4d0-app-card {
  background: var(--s4d0-gradient-2); border-radius: var(--s4d0-radius-lg);
  padding: 1.8rem 1.6rem; text-align: center; border: 1px solid var(--s4d0-border);
  margin: 1.4rem 0;
}
.s4d0-app-card h3 { font-size: 1.7rem; color: #fff; margin-bottom: .5rem; }
.s4d0-app-card p { font-size: 1.25rem; color: var(--s4d0-text-muted); margin-bottom: 1.2rem; }
.s4d0-app-card .s4d0-btn { width: 100%; }

/* ---------- Inline SEO link cluster ---------- */
.s4d0-seo-links {
  background: rgba(255,255,255,.03); border-radius: var(--s4d0-radius);
  padding: 1.4rem 1.6rem; border: 1px solid var(--s4d0-border-soft);
  font-size: 1.3rem; line-height: 1.9;
}
.s4d0-seo-links strong { color: var(--s4d0-secondary); display: block; margin-bottom: .5rem; }

/* ---------- Footer ---------- */
.s4d0-footer {
  background: linear-gradient(180deg, #1a2533, #121a26);
  border-top: 1px solid var(--s4d0-border);
  padding: 2.4rem 1.4rem 9rem; margin-top: 2rem;
}
.s4d0-footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.s4d0-footer-brand .s4d0-brand-logo { width: 3rem; height: 3rem; font-size: 1.5rem; }
.s4d0-footer-desc { font-size: 1.2rem; color: var(--s4d0-text-muted); line-height: 1.6; margin-bottom: 1.4rem; }
.s4d0-footer-cta { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 1rem 0 1.6rem; }
.s4d0-footer-title { font-size: 1.35rem; font-weight: 800; color: #fff; margin: 1.4rem 0 .8rem; }
.s4d0-footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; }
.s4d0-footer-links a { font-size: 1.2rem; color: var(--s4d0-text-muted); display: flex; align-items: center; gap: .5rem; }
.s4d0-footer-links a i { color: var(--s4d0-primary); font-size: 1.1rem; }
.s4d0-footer-bottom { text-align: center; font-size: 1.1rem; color: var(--s4d0-text-dim); margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--s4d0-border-soft); }
.s4d0-responsible { font-size: 1.1rem; color: var(--s4d0-text-dim); line-height: 1.6; margin-top: 1rem; padding: 1rem; background: rgba(173,181,189,.06); border-radius: 8px; }

/* ---------- Mobile bottom navigation ---------- */
.s4d0-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  max-width: 430px; margin: 0 auto;
  height: var(--s4d0-bottomnav-h);
  background: linear-gradient(180deg, rgba(31, 44, 61, .98), rgba(18, 26, 38, .99));
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--s4d0-border);
  display: flex; justify-content: space-around; align-items: stretch;
  padding: .4rem .2rem; box-shadow: 0 -4px 20px rgba(0,0,0,.3);
}
.s4d0-bottomnav-btn {
  flex: 1; min-width: 60px; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem; color: var(--s4d0-text-muted); position: relative; transition: color .2s ease;
}
.s4d0-bottomnav-btn i { font-size: 2.2rem; transition: transform .2s ease; }
.s4d0-bottomnav-btn .material-icons,
.s4d0-bottomnav-btn .bi { font-size: 2.1rem; }
.s4d0-bottomnav-btn span { font-size: 1.02rem; font-weight: 600; }
.s4d0-bottomnav-btn:active { transform: scale(.92); }
.s4d0-bottomnav-btn:hover { color: var(--s4d0-secondary); }
.s4d0-bottomnav-btn.s4d0-active { color: var(--s4d0-primary); }
.s4d0-bottomnav-btn.s4d0-active i { transform: translateY(-2px); }
.s4d0-bottomnav-btn.s4d0-active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 30px; height: 3px; border-radius: 0 0 4px 4px; background: var(--s4d0-gradient);
}
.s4d0-bottomnav-btn.s4d0-promo i {
  background: var(--s4d0-gradient); color: #fff;
  width: 3.6rem; height: 3.6rem; border-radius: 50%; padding: .7rem;
  box-shadow: var(--s4d0-shadow-glow); margin-top: -1.4rem;
}

/* ---------- Utilities ---------- */
.s4d0-text-center { text-align: center; }
.s4d0-mt-1 { margin-top: .6rem; } .s4d0-mt-2 { margin-top: 1.2rem; } .s4d0-mt-3 { margin-top: 2rem; }
.s4d0-hidden { display: none !important; }
.s4d0-divider { height: 1px; background: var(--s4d0-border-soft); margin: 1.6rem 0; }

/* ---------- Responsive: desktop ---------- */
@media (min-width: 769px) {
  body { max-width: 430px; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .s4d0-bottomnav { display: none; }
  .s4d0-footer { padding-bottom: 2.4rem; }
}
@media (max-width: 768px) {
  .s4d0-main { padding-bottom: 8rem; }
}
