/* ============================================================
 * megafunalo.homes - style-8ce9.css
 * All custom classes use the "v97d-" prefix.
 * Palette: #2E4057 (deep background) + #FFDEAD (warm accent/text)
 * Mobile-first; main container capped at max-width: 430px.
 * ============================================================ */

:root {
  --v97d-primary: #2E4057;
  --v97d-accent: #FFDEAD;
  --v97d-bg: #1c2a39;
  --v97d-bg-soft: #243a52;
  --v97d-text: #FFDEAD;
  --v97d-text-soft: #f3e4c8;
  --v97d-muted: #9fb3c8;
  --v97d-card: #2a425c;
  --v97d-border: #3a5878;
  --v97d-gold: #ffd37a;
  --v97d-danger: #ff7a7a;
  --v97d-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--v97d-bg);
  color: var(--v97d-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--v97d-accent); text-decoration: none; }
ul { list-style: none; }

/* Layout containers */
.v97d-wrapper {
  width: 100%;
  max-width: 430px;            /* mobile-first cap */
  margin: 0 auto;
  padding: 0 1.2rem;
  position: relative;
}

.v97d-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

main {
  padding-bottom: 8rem; /* clearance for fixed bottom nav */
}

/* ===== Header ===== */
.v97d-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--v97d-primary), #1d3047);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  border-bottom: 2px solid var(--v97d-accent);
}

.v97d-header-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.v97d-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.v97d-logo img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.6rem;
  border: 2px solid var(--v97d-accent);
}

.v97d-logo .v97d-brand {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--v97d-accent);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v97d-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.v97d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 0.7rem;
  padding: 0.7rem 1.2rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 4rem;
  min-width: 4.4rem;
  text-decoration: none;
}

.v97d-btn:active { transform: scale(0.96); }

.v97d-btn-primary {
  background: linear-gradient(135deg, var(--v97d-accent), var(--v97d-gold));
  color: #4a2e08;
  box-shadow: 0 4px 10px rgba(255, 222, 173, 0.35);
}

.v97d-btn-secondary {
  background: transparent;
  color: var(--v97d-accent);
  border: 2px solid var(--v97d-accent);
}

.v97d-btn-ghost {
  background: var(--v97d-card);
  color: var(--v97d-text);
}

.v97d-icon-btn {
  background: transparent;
  border: none;
  color: var(--v97d-accent);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.4rem;
  min-width: 4rem;
  min-height: 4rem;
}

/* ===== Mobile menu (expandable nav) ===== */
.v97d-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 78%;
  max-width: 320px;
  height: 100vh;
  background: var(--v97d-bg-soft);
  z-index: 9999;
  padding: 6rem 1.5rem 2rem;
  transition: right 0.28s ease;
  overflow-y: auto;
  border-left: 2px solid var(--v97d-accent);
}

.v97d-mobile-menu.v97d-is-open {
  right: 0;
}

.v97d-mobile-menu a {
  display: block;
  padding: 1rem 0.8rem;
  border-bottom: 1px solid var(--v97d-border);
  color: var(--v97d-text-soft);
  font-size: 1.4rem;
  font-weight: 600;
}

.v97d-mobile-menu a:active,
.v97d-mobile-menu a:hover {
  background: var(--v97d-card);
  color: var(--v97d-accent);
}

.v97d-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.4rem;
  color: var(--v97d-accent);
  background: transparent;
  border: none;
  cursor: pointer;
}

.v97d-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 9998;
}

.v97d-overlay.v97d-is-open {
  opacity: 1;
  visibility: visible;
}

.v97d-no-scroll {
  overflow: hidden;
}

/* ===== Carousel ===== */
.v97d-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  margin: 1rem 0;
  box-shadow: var(--v97d-shadow);
}

.v97d-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.v97d-carousel-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
}

.v97d-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.v97d-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: var(--v97d-accent);
  font-size: 1.4rem;
  font-weight: 700;
}

.v97d-carousel-dots {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.v97d-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 222, 173, 0.4);
  border: none;
  cursor: pointer;
}

.v97d-carousel-dot.v97d-active {
  background: var(--v97d-accent);
  width: 2rem;
  border-radius: 0.6rem;
}

/* ===== Section / headings ===== */
.v97d-section {
  padding: 1.5rem 0;
}

.v97d-section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--v97d-accent);
  margin-bottom: 0.8rem;
  border-left: 4px solid var(--v97d-gold);
  padding-left: 0.8rem;
}

.v97d-section-sub {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--v97d-text-soft);
  margin: 1rem 0 0.6rem;
}

.v97d-text {
  color: var(--v97d-text-soft);
  font-size: 1.35rem;
  line-height: 1.7rem;
}

.v97d-text strong { color: var(--v97d-accent); }

/* ===== Category chips ===== */
.v97d-cat-chips {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.v97d-cat-chips::-webkit-scrollbar { display: none; }

.v97d-cat-chip {
  flex: 0 0 auto;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  background: var(--v97d-card);
  color: var(--v97d-text-soft);
  font-size: 1.25rem;
  font-weight: 600;
  border: 1px solid var(--v97d-border);
  cursor: pointer;
  white-space: nowrap;
  min-height: 3.6rem;
  display: inline-flex;
  align-items: center;
}

.v97d-cat-chip.v97d-active,
.v97d-cat-chip:active {
  background: var(--v97d-accent);
  color: #4a2e08;
  border-color: var(--v97d-accent);
}

/* ===== Game grid ===== */
.v97d-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.v97d-game-card {
  background: var(--v97d-card);
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--v97d-border);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  text-align: center;
  padding: 0.4rem;
}

.v97d-game-card:active {
  transform: scale(0.96);
  box-shadow: 0 4px 14px rgba(255, 222, 173, 0.35);
}

.v97d-game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
}

.v97d-game-name {
  font-size: 1.1rem;
  color: var(--v97d-text-soft);
  margin-top: 0.4rem;
  font-weight: 600;
  line-height: 1.3rem;
  min-height: 2.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Feature / info cards ===== */
.v97d-card {
  background: var(--v97d-card);
  border: 1px solid var(--v97d-border);
  border-radius: 0.8rem;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--v97d-shadow);
}

.v97d-card-title {
  font-size: 1.45rem;
  color: var(--v97d-accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.v97d-feature-row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--v97d-border);
}

.v97d-feature-row:last-child { border-bottom: none; }

.v97d-feature-icon {
  font-size: 2.2rem;
  color: var(--v97d-gold);
  flex: 0 0 auto;
}

/* ===== RTP table ===== */
.v97d-rtp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.2rem;
}

.v97d-rtp-table th,
.v97d-rtp-table td {
  padding: 0.6rem 0.4rem;
  text-align: center;
  border-bottom: 1px solid var(--v97d-border);
}

.v97d-rtp-table th { color: var(--v97d-accent); }
.v97d-rtp-table td { color: var(--v97d-text-soft); }
.v97d-rtp-high { color: #6fffa3; font-weight: 700; }

/* ===== Testimonials ===== */
.v97d-testimonial {
  background: var(--v97d-bg-soft);
  border-radius: 0.8rem;
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-left: 3px solid var(--v97d-gold);
}

.v97d-testimonial-name {
  color: var(--v97d-accent);
  font-weight: 700;
  font-size: 1.25rem;
}

.v97d-stars { color: var(--v97d-gold); font-size: 1.3rem; }

/* ===== Winners ===== */
.v97d-winner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--v97d-border);
}

.v97d-winner:last-child { border-bottom: none; }

.v97d-winner-name { color: var(--v97d-text-soft); font-size: 1.25rem; flex: 1; }
.v97d-winner-amount { color: var(--v97d-gold); font-weight: 800; font-size: 1.3rem; }

/* ===== Payment methods ===== */
.v97d-pay-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.v97d-pay-chip {
  flex: 1 1 30%;
  background: var(--v97d-bg-soft);
  border: 1px solid var(--v97d-border);
  border-radius: 0.6rem;
  padding: 0.8rem 0.4rem;
  text-align: center;
  color: var(--v97d-text-soft);
  font-size: 1.15rem;
  font-weight: 600;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

/* ===== FAQ accordion ===== */
.v97d-faq-item {
  border-bottom: 1px solid var(--v97d-border);
  padding: 0.8rem 0;
}

.v97d-faq-q {
  font-weight: 700;
  color: var(--v97d-accent);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.v97d-faq-a { color: var(--v97d-text-soft); font-size: 1.25rem; }

/* ===== Footer ===== */
.v97d-footer {
  background: var(--v97d-primary);
  padding: 2rem 0 1rem;
  margin-top: 2rem;
  border-top: 2px solid var(--v97d-accent);
}

.v97d-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}

.v97d-footer-links a {
  color: var(--v97d-text-soft);
  font-size: 1.2rem;
  padding: 0.4rem 0;
}

.v97d-footer-links a:hover { color: var(--v97d-accent); }

.v97d-footer-copy {
  text-align: center;
  color: var(--v97d-muted);
  font-size: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--v97d-border);
}

/* ===== Mobile bottom nav ===== */
.v97d-bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: linear-gradient(180deg, #243a52, #1c2a39);
  border-top: 2px solid var(--v97d-accent);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.35);
}

.v97d-bottomnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--v97d-text-soft);
  font-size: 1.05rem;
  min-width: 6rem;
  min-height: 6rem;
  cursor: pointer;
  text-decoration: none;
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.2s ease, transform 0.15s ease;
}

.v97d-bottomnav-btn .v97d-ic {
  font-size: 2.2rem;
  line-height: 1;
}

.v97d-bottomnav-btn .v97d-lbl {
  font-size: 1rem;
  font-weight: 600;
}

.v97d-bottomnav-btn:active { transform: scale(0.92); }

.v97d-bottomnav-btn.v97d-current,
.v97d-bottomnav-btn:hover {
  color: var(--v97d-accent);
}

.v97d-bottomnav-btn.v97d-current::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background: var(--v97d-accent);
  border-radius: 0 0 4px 4px;
}

.v97d-badge {
  position: absolute;
  top: 0.4rem;
  right: 30%;
  background: var(--v97d-danger);
  color: #fff;
  font-size: 0.9rem;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
}

/* ===== Reveal animation ===== */
.v97d-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.v97d-reveal.v97d-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CTA banner ===== */
.v97d-cta {
  background: linear-gradient(135deg, var(--v97d-accent), var(--v97d-gold));
  color: #4a2e08;
  border-radius: 1rem;
  padding: 1.4rem;
  text-align: center;
  margin: 1.5rem 0;
  box-shadow: var(--v97d-shadow);
}

.v97d-cta h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.v97d-cta p { font-size: 1.25rem; margin-bottom: 0.8rem; }

/* ===== Misc helpers ===== */
.v97d-center { text-align: center; }
.v97d-mt1 { margin-top: 1rem; }
.v97d-mb1 { margin-bottom: 1rem; }
.v97d-flex { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

/* ===== Desktop rules ===== */
@media (min-width: 769px) {
  .v97d-bottomnav { display: none; }
  main { padding-bottom: 2rem; }
  .v97d-header-inner,
  .v97d-wrapper,
  .v97d-container { max-width: 760px; }
}

@media (min-width: 1024px) {
  .v97d-header-inner,
  .v97d-wrapper,
  .v97d-container { max-width: 960px; }
  .v97d-game-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Ensure touch targets are >= 44px on small devices */
@media (max-width: 430px) {
  .v97d-btn { min-height: 4.4rem; }
  .v97d-icon-btn { min-width: 4.4rem; min-height: 4.4rem; }
}
