/* ===========================================================
 * megapari (megapari.cfd) theme stylesheet
 * All custom classes use the "w5157-" prefix
 * Palette: #8B0000 | #495057 | #FA8072 | #0A0A0A | #FFEF94
 * Mobile-first, max-width 430px, root font 62.5%
 * =========================================================== */

:root {
  --w5157-primary: #8B0000;
  --w5157-primary-2: #b71c1c;
  --w5157-slate: #495057;
  --w5157-salmon: #FA8072;
  --w5157-dark: #0A0A0A;
  --w5157-yellow: #FFEF94;
  --w5157-bg: #120608;
  --w5157-bg-2: #1d0d10;
  --w5157-card: #1f1012;
  --w5157-text: #f6e8ea;
  --w5157-muted: #c4a9ac;
  --w5157-line: rgba(255, 239, 148, 0.18);
  --w5157-radius: 14px;
  --w5157-header-h: 58px;
  --w5157-bottomnav-h: 62px;
  --w5157-maxw: 430px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(139, 0, 0, 0.45), transparent 70%),
    linear-gradient(180deg, #1a0a0c 0%, var(--w5157-bg) 60%, #050203 100%);
  color: var(--w5157-text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--w5157-yellow); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.w5157-wrapper {
  max-width: var(--w5157-maxw);
  margin: 0 auto;
  padding: 0 14px;
}

/* ---------- Header ---------- */
.w5157-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--w5157-header-h);
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(20, 6, 8, 0.96));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--w5157-line);
}
.w5157-header-inner {
  max-width: var(--w5157-maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.w5157-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--w5157-text);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: 0.4px;
}
.w5157-logo img { width: 28px; height: 28px; border-radius: 6px; }
.w5157-logo .w5157-logo-accent { color: var(--w5157-salmon); }

.w5157-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.w5157-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 1.3rem;
  min-height: 38px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  text-decoration: none;
}
.w5157-btn:hover { text-decoration: none; transform: translateY(-1px); }
.w5157-btn:active { transform: scale(0.97); }
.w5157-btn-login {
  background: transparent;
  color: var(--w5157-text);
  border: 1px solid rgba(255, 239, 148, 0.55);
}
.w5157-btn-register {
  background: linear-gradient(135deg, var(--w5157-salmon), var(--w5157-primary));
  color: #fff;
  box-shadow: 0 6px 16px rgba(139, 0, 0, 0.4);
}
.w5157-btn-yellow {
  background: linear-gradient(135deg, var(--w5157-yellow), #f4d35e);
  color: var(--w5157-dark);
  box-shadow: 0 6px 16px rgba(255, 239, 148, 0.25);
}

.w5157-menu-btn {
  background: transparent;
  border: 1px solid var(--w5157-line);
  color: var(--w5157-text);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Mobile slide menu ---------- */
.w5157-mobile-menu {
  position: fixed;
  top: var(--w5157-header-h);
  left: 0; right: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #1a0a0c, #0a0405);
  border-bottom: 1px solid var(--w5157-line);
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
}
.w5157-mobile-menu.w5157-menu-open { max-height: 80vh; overflow-y: auto; }
.w5157-mobile-menu-inner {
  max-width: var(--w5157-maxw);
  margin: 0 auto;
  padding: 10px 14px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.w5157-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--w5157-text);
  font-size: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.w5157-mobile-menu a:hover { background: rgba(250, 128, 114, 0.12); text-decoration: none; }

/* ---------- Main layout ---------- */
main { padding-top: calc(var(--w5157-header-h) + 8px); padding-bottom: 20px; }

/* ---------- Carousel ---------- */
.w5157-carousel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin: 14px 0 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--w5157-line);
  background: #1a0a0c;
}
.w5157-slide {
  position: relative;
  display: none;
  cursor: pointer;
}
.w5157-slide.w5157-active { display: block; }
.w5157-slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.w5157-slide-cap {
  position: absolute;
  left: 14px; bottom: 14px; right: 14px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.w5157-slide-cap h2 { margin: 0 0 4px; font-size: 1.9rem; }
.w5157-slide-cap p { margin: 0; font-size: 1.3rem; color: var(--w5157-yellow); font-weight: 600; }

.w5157-carousel-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.w5157-carousel-nav.w5157-prev { left: 8px; }
.w5157-carousel-nav.w5157-next { right: 8px; }

.w5157-carousel-dots {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.w5157-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: 0; padding: 0; cursor: pointer;
}
.w5157-carousel-dot.w5157-dot-active { background: var(--w5157-yellow); width: 18px; border-radius: 6px; }

/* ---------- Sections / Headings ---------- */
.w5157-section { margin: 22px 0; }
.w5157-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.w5157-section-head h2 {
  font-size: 1.85rem;
  margin: 0;
  color: var(--w5157-text);
  flex: 1;
}
.w5157-section-head .w5157-pill {
  font-size: 1.15rem;
  color: var(--w5157-dark);
  background: var(--w5157-yellow);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}
.w5157-bar {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--w5157-primary), var(--w5157-salmon));
  width: 38px;
  margin: 8px 0 14px;
}

/* ---------- Game grid ---------- */
.w5157-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.w5157-grid-4 { grid-template-columns: repeat(4, 1fr); }
.w5157-game {
  display: block;
  background: var(--w5157-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  color: var(--w5157-text);
  text-align: center;
}
.w5157-game:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--w5157-salmon);
  box-shadow: 0 8px 18px rgba(139, 0, 0, 0.35);
}
.w5157-game img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #0c0608;
}
.w5157-game-name {
  font-size: 1.2rem;
  padding: 6px 6px 8px;
  line-height: 1.25;
  color: var(--w5157-text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w5157-game-hot {
  position: relative;
}
.w5157-game-hot::after {
  content: "HOT";
  position: absolute;
  top: 6px; right: 6px;
  background: var(--w5157-salmon);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ---------- Cards ---------- */
.w5157-card {
  background: var(--w5157-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--w5157-radius);
  padding: 14px;
  margin: 10px 0;
}
.w5157-card-accent {
  border-left: 4px solid var(--w5157-salmon);
}
.w5157-card h3 { margin: 0 0 8px; font-size: 1.55rem; color: var(--w5157-yellow); }
.w5157-card p { margin: 0 0 8px; color: var(--w5157-muted); font-size: 1.35rem; }

/* ---------- Promo banner ---------- */
.w5157-cta {
  background: linear-gradient(135deg, var(--w5157-primary), var(--w5157-salmon));
  border-radius: var(--w5157-radius);
  padding: 18px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  box-shadow: 0 12px 26px rgba(139,0,0,0.4);
}
.w5157-cta .w5157-cta-text { flex: 1; }
.w5157-cta h3 { margin: 0 0 4px; font-size: 1.8rem; color: var(--w5157-yellow); }
.w5157-cta p { margin: 0; font-size: 1.3rem; color: #fff; opacity: .95; }

/* ---------- Steps ---------- */
.w5157-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.w5157-steps li {
  position: relative;
  padding: 8px 10px 8px 42px;
  margin: 6px 0;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  font-size: 1.35rem;
  color: var(--w5157-muted);
}
.w5157-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--w5157-salmon);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

/* ---------- RTP table ---------- */
.w5157-rtp-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  font-size: 1.3rem;
}
.w5157-rtp-row span:first-child { color: var(--w5157-text); font-weight: 600; }
.w5157-rtp-row span { color: var(--w5157-muted); }
.w5157-rtp-row .w5157-rtp-val { color: var(--w5157-yellow); font-weight: 700; }
.w5157-bar-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.08); overflow: hidden; }
.w5157-bar-fill { height: 100%; background: linear-gradient(90deg, var(--w5157-salmon), var(--w5157-yellow)); }

/* ---------- Testimonials ---------- */
.w5157-testi {
  background: var(--w5157-card);
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
  border-left: 3px solid var(--w5157-yellow);
}
.w5157-testi .w5157-stars { color: var(--w5157-yellow); font-size: 1.2rem; letter-spacing: 2px; }
.w5157-testi p { margin: 6px 0 4px; font-size: 1.3rem; color: var(--w5157-text); }
.w5157-testi small { color: var(--w5157-muted); }

/* ---------- Reveal animation ---------- */
.w5157-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.w5157-reveal.w5157-in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.w5157-footer {
  margin-top: 26px;
  padding: 22px 0 24px;
  background: linear-gradient(180deg, #0a0405, #060203);
  border-top: 1px solid var(--w5157-line);
}
.w5157-footer p { color: var(--w5157-muted); font-size: 1.3rem; margin: 0 0 10px; }
.w5157-footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.w5157-footer-links a {
  color: var(--w5157-text);
  font-size: 1.25rem;
  padding: 6px 4px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.w5157-footer-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.w5157-copy { color: var(--w5157-muted); font-size: 1.2rem; margin-top: 12px; }

/* ---------- Bottom nav (mobile) ---------- */
.w5157-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--w5157-bottomnav-h);
  z-index: 1000;
  background: linear-gradient(180deg, #160709, #060203);
  border-top: 1px solid var(--w5157-line);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.5);
}
.w5157-bottomnav-item {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: 0;
  color: var(--w5157-muted);
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  padding: 4px 2px;
  transition: color .15s ease, transform .15s ease;
}
.w5157-bottomnav-item:hover { text-decoration: none; }
.w5157-bottomnav-item .w5157-bn-icon { font-size: 2.2rem; line-height: 1; }
.w5157-bottomnav-item .material-icons,
.w5157-bottomnav-item .bi { font-size: 2.2rem; }
.w5157-bottomnav-item span.w5157-bn-label { font-size: 1.05rem; }
.w5157-bottomnav-item:active { transform: scale(0.92); }
.w5157-bottomnav-active { color: var(--w5157-yellow); }
.w5157-bottomnav-active .w5157-bn-icon { color: var(--w5157-salmon); }
.w5157-bottomnav-promo {
  color: var(--w5157-salmon);
  font-weight: 700;
}

/* ---------- Desktop ---------- */
@media (min-width: 769px) {
  .w5157-bottomnav { display: none; }
  .w5157-wrapper, .w5157-header-inner, .w5157-mobile-menu-inner { max-width: 720px; }
  main { padding-bottom: 30px; }
}
@media (max-width: 768px) {
  main { padding-bottom: calc(var(--w5157-bottomnav-h) + 18px); }
}

/* Inline promo text link */
.w5157-textlink {
  color: var(--w5157-yellow);
  font-weight: 800;
  cursor: pointer;
}
.w5157-textlink:hover { text-decoration: underline; }

/* Small helpers */
.w5157-row { display: flex; gap: 10px; flex-wrap: wrap; }
.w5157-grow { flex: 1; }
.w5157-muted { color: var(--w5157-muted); }
.w5157-center { text-align: center; }
.w5157-mt { margin-top: 12px; }
.w5157-mb { margin-bottom: 12px; }
