/* =========================================================
 * Super Ace - super-ace.homes
 * Mobile-first PH casino stylesheet.
 * All custom class selectors use the `ui43-` prefix.
 * Palette: #141414 (deep base) + #708090 (slate accent).
 * Literal mobile container width: max-width: 430px
 * ======================================================= */

:root {
  --ui43-bg: #141414;
  --ui43-bg-soft: #1d1d1f;
  --ui43-bg-card: #232327;
  --ui43-line: #2e2e33;
  --ui43-slate: #708090;
  --ui43-slate-soft: #8a99ab;
  --ui43-gold: #d9b25a;
  --ui43-gold-soft: #f0d089;
  --ui43-text: #f4f4f6;
  --ui43-text-mute: #a9a9b3;
  --ui43-danger: #e2574c;
  --ui43-ok: #4caf87;
  --ui43-radius: 14px;
  --ui43-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --ui43-header-h: 58px;
  --ui43-bottomnav-h: 64px;
  --ui43-wrap: 430px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -100px, #20212a 0%, #141414 55%);
  color: var(--ui43-text);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--ui43-gold-soft); text-decoration: none; }
a:hover { color: #ffffff; }

h1, h2, h3, h4 { color: #ffffff; line-height: 1.25; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ui43-text-mute); }

/* ---------- Layout container ---------- */
.ui43-wrap {
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 14px;
  padding-right: 14px;
  position: relative;
}

main { padding-bottom: calc(var(--ui43-bottomnav-h) + 24px); }

/* ---------- Header ---------- */
.ui43-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(20,20,20,0.96), rgba(20,20,20,0.86));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ui43-line);
}

.ui43-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--ui43-header-h);
  gap: 10px;
}

.ui43-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ui43-brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--ui43-gold), #8a6a2c);
  display: grid; place-items: center; color: #1a1a1a; font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
  flex: 0 0 auto;
}
.ui43-brand-logo .material-symbols-outlined { font-size: 22px; }
.ui43-brand-name { font-weight: 800; letter-spacing: 0.3px; font-size: 16px; color: #fff; white-space: nowrap; }
.ui43-brand-name b { color: var(--ui43-gold-soft); }

.ui43-header-actions { display: flex; align-items: center; gap: 8px; }

.ui43-btn {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  min-height: 38px;
}
.ui43-btn .material-symbols-outlined,
.ui43-btn i { font-size: 16px; }
.ui43-btn:hover { transform: translateY(-1px); }
.ui43-btn:active { transform: translateY(0); }

.ui43-btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--ui43-text);
  border: 1px solid var(--ui43-line);
}
.ui43-btn-primary {
  background: linear-gradient(135deg, var(--ui43-gold), #c0943f);
  color: #1a1a1a;
  box-shadow: 0 6px 16px rgba(217,178,90,0.25);
}
.ui43-btn-outline {
  background: transparent;
  color: var(--ui43-gold-soft);
  border: 1px solid var(--ui43-gold);
}
.ui43-btn-block { width: 100%; justify-content: center; padding: 12px 16px; font-size: 14px; }

.ui43-icon-btn {
  width: 38px; height: 38px; min-height: 38px; padding: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--ui43-line);
  color: var(--ui43-text);
  display: grid; place-items: center;
  cursor: pointer;
}
.ui43-icon-btn .material-symbols-outlined { font-size: 22px; }

/* ---------- Mobile menu ---------- */
.ui43-menu-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  z-index: 9998;
}
.ui43-mobile-menu {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 82%;
  max-width: 320px;
  background: #161618;
  border-left: 1px solid var(--ui43-line);
  transform: translateX(105%);
  transition: transform .28s ease;
  z-index: 9999;
  padding: 18px 18px calc(var(--ui43-bottomnav-h) + 24px);
  overflow-y: auto;
}
.ui43-menu-open { transform: translateX(0); }
.ui43-menu-open + .ui43-menu-backdrop { opacity: 1; pointer-events: auto; }

.ui43-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.ui43-menu-head h3 { margin: 0; font-size: 18px; }
.ui43-menu-list { list-style: none; padding: 0; margin: 0 0 18px; }
.ui43-menu-list li { border-bottom: 1px solid var(--ui43-line); }
.ui43-menu-list a {
  display: flex; align-items: center; gap: 12px;
  color: var(--ui43-text);
  padding: 14px 8px;
  font-size: 15px; font-weight: 600;
}
.ui43-menu-list a .material-symbols-outlined,
.ui43-menu-list a i { color: var(--ui43-gold); font-size: 20px; }

/* ---------- Hero / carousel ---------- */
.ui43-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin: 16px 0 18px;
  box-shadow: var(--ui43-shadow);
  border: 1px solid var(--ui43-line);
}
.ui43-hero-track { position: relative; }
.ui43-slide {
  position: relative;
  display: none;
  min-height: 200px;
  padding: 22px 18px;
  background-size: cover;
  background-position: center;
}
.ui43-slide-active { display: block; }
.ui43-slide::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,20,20,0.25), rgba(20,20,20,0.92));
}
.ui43-slide-inner { position: relative; z-index: 2; }
.ui43-slide .ui43-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  background: rgba(217,178,90,0.18);
  color: var(--ui43-gold-soft);
  border: 1px solid rgba(217,178,90,0.4);
  margin-bottom: 10px;
}
.ui43-slide h2 { font-size: 22px; margin-bottom: 6px; }
.ui43-slide p { font-size: 13px; color: #d6d6db; margin-bottom: 12px; max-width: 90%; }
.ui43-slide .ui43-btn { padding: 10px 18px; }

.ui43-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
  z-index: 3;
}
.ui43-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer; border: none; padding: 0;
}
.ui43-dot-active { background: var(--ui43-gold); width: 18px; border-radius: 999px; transition: width .25s; }

/* ---------- Quick category chips ---------- */
.ui43-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.ui43-chips::-webkit-scrollbar { display: none; }
.ui43-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--ui43-line);
  color: var(--ui43-text-mute);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.ui43-chip .material-symbols-outlined { font-size: 16px; }
.ui43-chip-active {
  background: linear-gradient(135deg, var(--ui43-gold), #c0943f);
  color: #1a1a1a; border-color: transparent;
}

/* ---------- Section heading ---------- */
.ui43-section { margin: 26px 0; }
.ui43-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 10px;
}
.ui43-section-title {
  font-size: 17px; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.ui43-section-title .material-symbols-outlined,
.ui43-section-title i { color: var(--ui43-gold); font-size: 20px; }
.ui43-section-more { font-size: 12px; color: var(--ui43-slate-soft); font-weight: 600; }

/* ---------- Game grid ---------- */
.ui43-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ui43-card {
  background: var(--ui43-bg-card);
  border: 1px solid var(--ui43-line);
  border-radius: var(--ui43-radius);
  overflow: hidden;
  position: relative;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.ui43-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217,178,90,0.5);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}
.ui43-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0e0e10;
  overflow: hidden;
}
.ui43-card-media img { width: 100%; height: 100%; object-fit: cover; }
.ui43-card-badge {
  position: absolute; top: 6px; left: 6px;
  padding: 3px 7px; font-size: 9px; font-weight: 800;
  border-radius: 5px; letter-spacing: 0.5px;
  background: var(--ui43-danger); color: #fff;
}
.ui43-card-badge.hot { background: linear-gradient(135deg, #e2574c, #b8392f); }
.ui43-card-badge.new { background: var(--ui43-ok); }
.ui43-card-badge.vip { background: var(--ui43-gold); color: #1a1a1a; }
.ui43-card-body {
  padding: 8px 9px 10px;
}
.ui43-card-title {
  font-size: 12px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui43-card-meta { font-size: 10px; color: var(--ui43-slate-soft); margin-top: 2px; }
.ui43-card-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,0.55);
  opacity: 0; transition: opacity .2s ease;
}
.ui43-card:hover .ui43-card-play { opacity: 1; }
.ui43-card-play .ui43-btn { padding: 8px 14px; font-size: 12px; }

/* Featured grid spans */
.ui43-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Feature / promo banner ---------- */
.ui43-banner {
  border-radius: 16px;
  background: linear-gradient(135deg, #23272e, #15171b);
  border: 1px solid var(--ui43-line);
  padding: 16px;
  margin: 18px 0;
  position: relative;
  overflow: hidden;
}
.ui43-banner::after {
  content: "";
  position: absolute; top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(217,178,90,0.18), transparent 70%);
}
.ui43-banner h3 { font-size: 16px; }
.ui43-banner p { font-size: 13px; margin-bottom: 12px; }
.ui43-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Steps ---------- */
.ui43-steps { display: grid; gap: 10px; }
.ui43-step {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--ui43-bg-card);
  border: 1px solid var(--ui43-line);
  padding: 12px; border-radius: 12px;
}
.ui43-step-num {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ui43-gold), #8a6a2c);
  color: #1a1a1a; font-weight: 800;
  display: grid; place-items: center; font-size: 13px;
}
.ui43-step-body h4 { font-size: 14px; margin-bottom: 2px; }
.ui43-step-body p { font-size: 12px; margin: 0; }

/* ---------- FAQ ---------- */
.ui43-faq-item {
  border: 1px solid var(--ui43-line);
  background: var(--ui43-bg-card);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.ui43-faq-toggle {
  width: 100%; text-align: left;
  background: transparent; color: #fff;
  border: none; cursor: pointer;
  padding: 13px 14px;
  font-size: 14px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.ui43-faq-toggle .material-symbols-outlined { font-size: 20px; color: var(--ui43-gold); transition: transform .2s; }
.ui43-faq-open .ui43-faq-toggle .material-symbols-outlined { transform: rotate(45deg); }
.ui43-faq-body {
  max-height: 0; overflow: hidden;
  transition: max-height .25s ease;
  padding: 0 14px;
}
.ui43-faq-open .ui43-faq-body { max-height: 360px; padding-bottom: 14px; }
.ui43-faq-body p { font-size: 13px; margin: 0; }

/* ---------- SEO long text ---------- */
.ui43-seo { font-size: 13px; line-height: 1.7; color: var(--ui43-text-mute); }
.ui43-seo h2 { font-size: 17px; color: #fff; margin-top: 18px; }
.ui43-seo h3 { font-size: 15px; color: #fff; margin-top: 14px; }
.ui43-seo ul { padding-left: 18px; margin: 0 0 12px; }
.ui43-seo li { margin-bottom: 6px; }
.ui43-seo strong { color: var(--ui43-gold-soft); }

/* ---------- Footer ---------- */
.ui43-footer {
  margin-top: 30px;
  border-top: 1px solid var(--ui43-line);
  background: #101012;
  padding: 24px 0 0;
}
.ui43-footer-cols { display: grid; gap: 18px; }
.ui43-footer h4 { font-size: 13px; color: #fff; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }
.ui43-footer ul { list-style: none; padding: 0; margin: 0; }
.ui43-footer li { margin-bottom: 8px; }
.ui43-footer a { color: var(--ui43-text-mute); font-size: 13px; }
.ui43-footer a:hover { color: var(--ui43-gold-soft); }
.ui43-footer-bottom {
  border-top: 1px solid var(--ui43-line);
  margin-top: 20px; padding: 14px 0;
  font-size: 11px; color: var(--ui43-text-mute); text-align: center;
}
.ui43-pay-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ui43-pay-chip {
  font-size: 11px; padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--ui43-line);
  color: var(--ui43-slate-soft);
}

/* ---------- Bottom nav ---------- */
.ui43-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: var(--ui43-bottomnav-h);
  background: rgba(18,18,20,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--ui43-line);
  display: flex; justify-content: space-around; align-items: stretch;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}
.ui43-bottomnav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--ui43-text-mute);
  font-size: 10px; font-weight: 600;
  background: transparent; border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 6px 2px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.ui43-bottomnav-btn .material-symbols-outlined,
.ui43-bottomnav-btn i { font-size: 22px; }
.ui43-bottomnav-btn .bi { font-size: 20px; }
.ui43-bottomnav-btn .ion { font-size: 22px; }
.ui43-bottomnav-btn span:not(.label) { line-height: 1; }
.ui43-bottomnav-btn .label { font-size: 10px; }
.ui43-bottomnav-active { color: var(--ui43-gold-soft); }
.ui43-bottomnav-active::before {
  content: ""; position: absolute; top: 0;
  width: 30px; height: 3px; border-radius: 0 0 4px 4px;
  background: var(--ui43-gold);
}
.ui43-bottomnav-promo {
  color: #1a1a1a;
  background: linear-gradient(135deg, var(--ui43-gold), #c0943f);
  margin: 6px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(217,178,90,0.3);
  font-weight: 800;
}
.ui43-bottomnav-promo .material-symbols-outled,
.ui43-bottomnav-promo i { color: #1a1a1a; }
.ui43-bottomnav-promo:active { transform: scale(0.96); }

/* Back to top */
.ui43-totop {
  position: fixed; right: 14px; bottom: calc(var(--ui43-bottomnav-h) + 14px);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ui43-bg-card);
  border: 1px solid var(--ui43-line);
  color: var(--ui43-gold-soft);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--ui43-shadow);
  z-index: 900;
  opacity: 0.95;
}

.ui43-noscroll { overflow: hidden; }

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .ui43-bottomnav { display: none; }
  .ui43-totop { bottom: 24px; }
  main { padding-bottom: 40px; }
  .ui43-wrap { max-width: 960px; }
  .ui43-grid { grid-template-columns: repeat(6, 1fr); }
  .ui43-grid-2 { grid-template-columns: repeat(4, 1fr); }
  .ui43-footer-cols { grid-template-columns: repeat(4, 1fr); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
