/*!
 * Nustar Casino - theme-b640.css
 * Mobile-first (max-width: 430px) base styles.
 * All custom classes use the sb64- prefix.
 * Palette: #333333 (dark bg) | #E65100 (primary) | #F5F5F5 (light) | #708090 (slate)
 */

:root {
  --sb64-bg: #333333;
  --sb64-bg-2: #2a2a2a;
  --sb64-bg-3: #1f1f1f;
  --sb64-primary: #E65100;
  --sb64-primary-2: #ff7a1a;
  --sb64-light: #F5F5F5;
  --sb64-slate: #708090;
  --sb64-text: #f3f3f3;
  --sb64-muted: #b8b8b8;
  --sb64-border: rgba(245,245,245,0.10);
  --sb64-gold: #ffc24b;
  --sb64-shadow: 0 6px 20px rgba(0,0,0,0.35);
  --sb64-radius: 14px;
  --sb64-header-h: 60px;
  --sb64-bottomnav-h: 62px;
}

/* Root font: rem units */
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5rem;
  color: var(--sb64-text);
  background: var(--sb64-bg);
  background-image: linear-gradient(180deg, #2c2c2c 0%, #333333 40%, #2a2a2a 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--sb64-primary-2); text-decoration: none; }
a:hover { color: var(--sb64-gold); }

/* Mobile-first main container (hard cap 430px) */
.sb64-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 12px;
  position: relative;
}
.sb64-wrapper { padding-top: calc(var(--sb64-header-h) + 6px); padding-bottom: 16px; }

/* ============ HEADER ============ */
.sb64-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--sb64-header-h);
  background: linear-gradient(90deg, #1f1f1f 0%, #333333 60%, #2a2a2a 100%);
  border-bottom: 2px solid var(--sb64-primary);
  box-shadow: 0 3px 12px rgba(0,0,0,0.45);
}
.sb64-header-inner {
  max-width: 430px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}
.sb64-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--sb64-light);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.3px;
}
.sb64-brand img { width: 28px; height: 28px; border-radius: 6px; }
.sb64-brand .sb64-brand-accent { color: var(--sb64-primary-2); }

.sb64-header-actions { display: flex; align-items: center; gap: 6px; }
.sb64-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  min-height: 36px;
  text-decoration: none;
}
.sb64-btn:active { transform: scale(0.96); }
.sb64-btn-primary {
  background: linear-gradient(90deg, var(--sb64-primary) 0%, var(--sb64-primary-2) 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(230,81,0,0.45);
}
.sb64-btn-ghost {
  background: transparent;
  color: var(--sb64-light);
  border: 1px solid var(--sb64-border);
}
.sb64-btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 1.55rem; }

.sb64-menu-btn {
  background: transparent;
  border: none;
  color: var(--sb64-light);
  font-size: 1.9rem;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-radius: 8px;
}
.sb64-menu-btn:hover { background: rgba(255,255,255,0.08); }

/* ============ MOBILE MENU ============ */
.sb64-mobilemenu {
  position: fixed;
  top: var(--sb64-header-h);
  left: 0; right: 0;
  z-index: 9999;
  background: #262626;
  border-bottom: 1px solid var(--sb64-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
  box-shadow: var(--sb64-shadow);
}
.sb64-mobilemenu.sb64-open { max-height: 480px; }
.sb64-mobilemenu ul { list-style: none; margin: 0; padding: 8px 14px; }
.sb64-mobilemenu li { border-bottom: 1px solid var(--sb64-border); }
.sb64-mobilemenu li:last-child { border-bottom: none; }
.sb64-mobilemenu a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 4px;
  color: var(--sb64-light);
  font-size: 1.45rem;
  font-weight: 600;
}
.sb64-mobilemenu a i { color: var(--sb64-primary-2); width: 22px; text-align: center; }

/* ============ HERO / CAROUSEL ============ */
.sb64-carousel {
  position: relative;
  margin: 10px 0 4px;
  border-radius: var(--sb64-radius);
  overflow: hidden;
  box-shadow: var(--sb64-shadow);
  aspect-ratio: 16/8;
  background: #111;
}
.sb64-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  cursor: pointer;
}
.sb64-slide.sb64-active { opacity: 1; }
.sb64-slide img { width: 100%; height: 100%; object-fit: cover; }
.sb64-slide .sb64-slide-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
}
.sb64-slide h2 { margin: 0 0 4px; color: #fff; font-size: 1.7rem; font-weight: 800; }
.sb64-slide p { margin: 0; color: var(--sb64-light); font-size: 1.25rem; }
.sb64-dots {
  position: absolute; bottom: 8px; right: 12px;
  display: flex; gap: 5px;
}
.sb64-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
}
.sb64-dot.sb64-active { background: var(--sb64-primary-2); width: 18px; border-radius: 4px; }

/* ============ SECTIONS ============ */
.sb64-section { margin: 18px 0; }
.sb64-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.sb64-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.7rem; font-weight: 800; color: var(--sb64-light);
}
.sb64-section-title i { color: var(--sb64-primary-2); }
.sb64-section-more { color: var(--sb64-primary-2); font-size: 1.25rem; font-weight: 600; }

.sb64-card {
  background: var(--sb64-bg-2);
  border: 1px solid var(--sb64-border);
  border-radius: var(--sb64-radius);
  padding: 14px;
  box-shadow: var(--sb64-shadow);
}

/* ============ GAME GRID ============ */
.sb64-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sb64-game {
  display: block;
  background: var(--sb64-bg-2);
  border: 1px solid var(--sb64-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
}
.sb64-game:hover, .sb64-game:active {
  transform: translateY(-2px);
  border-color: var(--sb64-primary);
  box-shadow: 0 6px 14px rgba(230,81,0,0.30);
}
.sb64-game img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #111;
}
.sb64-game .sb64-game-name {
  padding: 6px 4px;
  font-size: 1.1rem;
  color: var(--sb64-light);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.sb64-game .sb64-game-tag {
  position: absolute; top: 4px; left: 4px;
  background: var(--sb64-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.sb64-game .sb64-game-hot {
  position: absolute; top: 4px; right: 4px;
  background: var(--sb64-gold);
  color: #333;
  font-size: 1rem;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 800;
}

/* ============ INFO / CONTENT BLOCKS ============ */
.sb64-prose { color: var(--sb64-muted); font-size: 1.35rem; line-height: 2.2rem; }
.sb64-prose p { margin: 0 0 10px; }
.sb64-prose h2, .sb64-prose h3 { color: var(--sb64-light); }
.sb64-prose h2 { font-size: 1.7rem; margin: 14px 0 6px; }
.sb64-prose h3 { font-size: 1.45rem; margin: 12px 0 4px; }
.sb64-prose ul { padding-left: 18px; margin: 6px 0 10px; }
.sb64-prose li { margin-bottom: 4px; }

.sb64-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.sb64-feature {
  background: var(--sb64-bg-2);
  border: 1px solid var(--sb64-border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.sb64-feature i { font-size: 2.2rem; color: var(--sb64-primary-2); }
.sb64-feature h4 { margin: 6px 0 2px; font-size: 1.3rem; color: var(--sb64-light); }
.sb64-feature p { margin: 0; font-size: 1.15rem; color: var(--sb64-muted); line-height: 1.6rem; }

/* RTP table */
.sb64-rpt {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.2rem;
  margin-top: 8px;
}
.sb64-rpt th, .sb64-rpt td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--sb64-border);
}
.sb64-rpt th { color: var(--sb64-primary-2); font-weight: 700; }
.sb64-rpt td { color: var(--sb64-light); }
.sb64-rpt td.sb64-rtp-high { color: #6dd97a; font-weight: 700; }

/* Testimonials */
.sb64-testimonial {
  background: var(--sb64-bg-2);
  border-left: 3px solid var(--sb64-primary);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.sb64-testimonial p { margin: 0 0 6px; color: var(--sb64-light); font-size: 1.25rem; font-style: italic; }
.sb64-testimonial .sb64-author { color: var(--sb64-primary-2); font-size: 1.15rem; font-weight: 700; }
.sb64-stars { color: var(--sb64-gold); font-size: 1.1rem; letter-spacing: 1px; }

/* Payment chips */
.sb64-payrow { display: flex; flex-wrap: wrap; gap: 6px; }
.sb64-pay {
  background: var(--sb64-bg-3);
  border: 1px solid var(--sb64-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.15rem;
  color: var(--sb64-light);
  display: inline-flex; align-items: center; gap: 5px;
}

/* Winners list */
.sb64-winner {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--sb64-bg-2);
  border: 1px solid var(--sb64-border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
}
.sb64-winner .sb64-wname { color: var(--sb64-light); font-weight: 700; font-size: 1.2rem; }
.sb64-winner .sb64-wgame { color: var(--sb64-muted); font-size: 1.05rem; }
.sb64-winner .sb64-wamount { color: var(--sb64-gold); font-weight: 800; font-size: 1.3rem; }

/* Steps list (how to play) */
.sb64-steps { counter-reset: step; padding: 0; list-style: none; }
.sb64-steps li {
  position: relative;
  padding: 10px 10px 10px 42px;
  margin-bottom: 6px;
  background: var(--sb64-bg-2);
  border: 1px solid var(--sb64-border);
  border-radius: 10px;
  color: var(--sb64-light);
  font-size: 1.25rem;
  line-height: 1.9rem;
}
.sb64-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px;
  background: var(--sb64-primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.2rem;
  display: inline-flex; align-items: center; justify-content: center;
}

/* FAQ */
.sb64-faq { margin-bottom: 8px; }
.sb64-faq summary {
  cursor: pointer;
  padding: 10px;
  background: var(--sb64-bg-2);
  border: 1px solid var(--sb64-border);
  border-radius: 8px;
  color: var(--sb64-light);
  font-weight: 700;
  font-size: 1.3rem;
  list-style: none;
}
.sb64-faq summary::-webkit-details-marker { display: none; }
.sb64-faq[open] summary { border-color: var(--sb64-primary); }
.sb64-faq-body { padding: 10px; color: var(--sb64-muted); font-size: 1.2rem; line-height: 1.9rem; }

/* Inline promo CTA */
.sb64-cta {
  display: block;
  margin: 14px 0;
  padding: 14px;
  background: linear-gradient(90deg, var(--sb64-primary) 0%, var(--sb64-primary-2) 100%);
  color: #fff;
  border-radius: var(--sb64-radius);
  font-weight: 800;
  text-align: center;
  font-size: 1.45rem;
  box-shadow: 0 6px 14px rgba(230,81,0,0.4);
}
.sb64-cta:hover { color: #fff; filter: brightness(1.05); }
.sb64-cta-text a { color: var(--sb64-primary-2); font-weight: 700; }

/* ============ FOOTER ============ */
.sb64-footer {
  margin-top: 20px;
  padding: 18px 0 calc(var(--sb64-bottomnav-h) + 20px);
  background: #1f1f1f;
  border-top: 2px solid var(--sb64-primary);
}
.sb64-footer .sb64-container { padding: 0 12px; }
.sb64-footer p { color: var(--sb64-muted); font-size: 1.2rem; line-height: 1.8rem; margin: 0 0 10px; }
.sb64-footer h4 { color: var(--sb64-light); font-size: 1.35rem; margin: 12px 0 6px; }
.sb64-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 10px 0;
}
.sb64-footer-links a {
  color: var(--sb64-light);
  font-size: 1.15rem;
  padding: 4px 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.sb64-footer-links a i { color: var(--sb64-primary-2); font-size: 1rem; }
.sb64-promo-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 10px 0;
}
.sb64-promo-row .sb64-btn { flex: 1 1 auto; justify-content: center; min-width: 130px; }
.sb64-copy {
  color: var(--sb64-slate);
  font-size: 1.1rem;
  text-align: center;
  margin-top: 12px;
  border-top: 1px solid var(--sb64-border);
  padding-top: 10px;
}

/* ============ MOBILE BOTTOM NAV ============ */
.sb64-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--sb64-bottomnav-h);
  background: linear-gradient(180deg, #2a2a2a 0%, #1c1c1c 100%);
  border-top: 2px solid var(--sb64-primary);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.5);
}
.sb64-bottomnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--sb64-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  min-width: 60px;
  min-height: 60px;
  text-decoration: none;
  position: relative;
  transition: color .15s ease, transform .12s ease;
}
.sb64-bottomnav-item i { font-size: 22px; }
.sb64-bottomnav-item .sb64-bn-label { font-size: 1.05rem; font-weight: 600; line-height: 1.2rem; }
.sb64-bottomnav-item:active { transform: scale(0.92); }
.sb64-bottomnav-item.sb64-current { color: var(--sb64-primary-2); }
.sb64-bottomnav-item.sb64-current::before {
  content: "";
  position: absolute; top: 0; left: 25%; right: 25%;
  height: 3px; background: var(--sb64-primary-2); border-radius: 0 0 4px 4px;
}
.sb64-bottomnav-item.sb64-bn-promo {
  color: var(--sb64-gold);
}

/* Back to top */
.sb64-topbtn {
  position: fixed;
  right: 14px;
  bottom: calc(var(--sb64-bottomnav-h) + 12px);
  z-index: 1100;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--sb64-primary);
  color: #fff;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.sb64-topbtn.sb64-show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Reveal animation */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].sb64-visible { opacity: 1; transform: translateY(0); }

/* Category tag bar */
.sb64-catbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.sb64-catbar a {
  background: var(--sb64-bg-2);
  border: 1px solid var(--sb64-border);
  color: var(--sb64-light);
  padding: 6px 10px;
  border-radius: 18px;
  font-size: 1.15rem;
  font-weight: 600;
}

/* Desktop adjustments: hide bottom nav, widen container */
@media (min-width: 769px) {
  .sb64-bottomnav { display: none; }
  .sb64-footer { padding-bottom: 18px; }
  .sb64-container { max-width: 430px; }
  body { background-size: 430px auto; }
}

/* Add bottom padding for main content on mobile so bottom nav never covers it */
@media (max-width: 768px) {
  main { padding-bottom: 80px; }
  .sb64-wrapper { padding-bottom: calc(var(--sb64-bottomnav-h) + 14px); }
}

/* Small screens fine-tuning */
@media (max-width: 360px) {
  .sb64-grid { grid-template-columns: repeat(2, 1fr); }
  .sb64-feature-grid { grid-template-columns: 1fr; }
  .sb64-footer-links { grid-template-columns: 1fr; }
}
