/* 789bed core stylesheet - basefile
   All custom classes use the w4d8a- prefix.
   Color palette: #212F3D | #FF1493 | #8A2BE2 | #BA55D3 | #C71585 */

:root {
  --w4d8a-primary: #FF1493;
  --w4d8a-secondary: #8A2BE2;
  --w4d8a-accent: #BA55D3;
  --w4d8a-pink: #C71585;
  --w4d8a-bg: #212F3D;
  --w4d8a-bg-deep: #18222e;
  --w4d8a-bg-card: #2a3b4d;
  --w4d8a-text: #f7eaf3;
  --w4d8a-text-muted: #c4b3cf;
  --w4d8a-border: #3b4c5f;
  --w4d8a-gold: #ffd66b;
  --w4d8a-radius: 1.2rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 62.5%; }

body {
  font-family: "Segoe UI", "Be Vietnam Pro", Roboto, Arial, sans-serif;
  background: linear-gradient(160deg, var(--w4d8a-bg-deep), var(--w4d8a-bg) 60%);
  color: var(--w4d8a-text);
  line-height: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

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

a { color: var(--w4d8a-primary); text-decoration: none; }

.w4d8a-wrapper { width: 100%; padding: 0 1.2rem; }

.w4d8a-container { width: 100%; }

/* ===================== Header ===================== */
.w4d8a-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(95deg, var(--w4d8a-bg-deep), var(--w4d8a-bg-card));
  border-bottom: 2px solid var(--w4d8a-primary);
  box-shadow: 0 4px 14px rgba(255, 20, 147, 0.25);
}

.w4d8a-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  gap: 0.8rem;
}

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

.w4d8a-logo img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.8rem;
  border: 1px solid var(--w4d8a-primary);
}

.w4d8a-logo-text {
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--w4d8a-primary), var(--w4d8a-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.5px;
}

.w4d8a-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.w4d8a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 2rem;
  padding: 0.7rem 1.2rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  min-height: 3.6rem;
  color: #fff;
}

.w4d8a-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

.w4d8a-btn-primary {
  background: linear-gradient(90deg, var(--w4d8a-primary), var(--w4d8a-pink));
  box-shadow: 0 4px 12px rgba(199, 21, 133, 0.45);
}

.w4d8a-btn-ghost {
  background: transparent;
  border: 1.5px solid var(--w4d8a-accent);
  color: var(--w4d8a-text);
}

.w4d8a-icon-btn {
  background: transparent;
  border: none;
  color: var(--w4d8a-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  min-width: 4.4rem;
  min-height: 4.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===================== Mobile menu ===================== */
.w4d8a-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 22, 0.6);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.w4d8a-menu-overlay.w4d8a-overlay-show { opacity: 1; pointer-events: auto; }

.w4d8a-mobile-menu {
  position: fixed;
  top: 0;
  right: -80%;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: linear-gradient(180deg, var(--w4d8a-bg-deep), var(--w4d8a-bg-card));
  z-index: 9999;
  padding: 2.4rem 1.6rem;
  transition: right 0.25s ease;
  overflow-y: auto;
}

.w4d8a-mobile-menu.w4d8a-menu-open { right: 0; }

.w4d8a-menu-title {
  font-size: 1.5rem;
  color: var(--w4d8a-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.w4d8a-mobile-menu a {
  display: block;
  padding: 1rem 0.4rem;
  border-bottom: 1px solid var(--w4d8a-border);
  color: var(--w4d8a-text);
  font-size: 1.35rem;
}

.w4d8a-mobile-menu a:hover { color: var(--w4d8a-primary); }

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

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

.w4d8a-carousel-slide {
  min-width: 100%;
  position: relative;
}

.w4d8a-carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: var(--w4d8a-radius);
}

.w4d8a-carousel-caption {
  position: absolute;
  left: 1rem;
  bottom: 1.4rem;
  right: 1rem;
  background: rgba(24, 34, 46, 0.7);
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  border-left: 3px solid var(--w4d8a-primary);
}

.w4d8a-carousel-caption h2 {
  font-size: 1.5rem;
  color: var(--w4d8a-text);
  margin-bottom: 0.2rem;
}

.w4d8a-carousel-caption p { font-size: 1.15rem; color: var(--w4d8a-text-muted); }

.w4d8a-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
}

.w4d8a-carousel-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--w4d8a-border);
  border: none;
  cursor: pointer;
}

.w4d8a-carousel-dot.w4d8a-dot-active { background: var(--w4d8a-primary); }

/* ===================== Sections ===================== */
.w4d8a-section {
  padding: 1.6rem 0;
}

.w4d8a-section-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.w4d8a-section-title::before {
  content: "";
  width: 0.5rem;
  height: 1.8rem;
  background: linear-gradient(180deg, var(--w4d8a-primary), var(--w4d8a-accent));
  border-radius: 0.3rem;
}

.w4d8a-h1 {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.4;
  margin: 1rem 0;
  background: linear-gradient(90deg, #fff, var(--w4d8a-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.w4d8a-lead {
  font-size: 1.3rem;
  color: var(--w4d8a-text-muted);
  margin-bottom: 1rem;
}

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

.w4d8a-game-card {
  background: var(--w4d8a-bg-card);
  border: 1px solid var(--w4d8a-border);
  border-radius: 0.9rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.w4d8a-game-card:hover {
  transform: translateY(-2px);
  border-color: var(--w4d8a-primary);
  box-shadow: 0 6px 14px rgba(255, 20, 147, 0.3);
}

.w4d8a-game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.w4d8a-game-card .w4d8a-game-name {
  padding: 0.4rem 0.5rem;
  font-size: 1.05rem;
  text-align: center;
  color: var(--w4d8a-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===================== Feature / highlight cards ===================== */
.w4d8a-cards {
  display: grid;
  gap: 1rem;
}

.w4d8a-card {
  background: linear-gradient(160deg, var(--w4d8a-bg-card), var(--w4d8a-bg-deep));
  border: 1px solid var(--w4d8a-border);
  border-left: 4px solid var(--w4d8a-primary);
  border-radius: 1rem;
  padding: 1.2rem;
}

.w4d8a-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--w4d8a-gold);
}

.w4d8a-card p { font-size: 1.2rem; color: var(--w4d8a-text-muted); }

.w4d8a-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.w4d8a-feature {
  background: var(--w4d8a-bg-card);
  padding: 1rem;
  border-radius: 0.9rem;
  text-align: center;
  border: 1px solid var(--w4d8a-border);
}

.w4d8a-feature .material-icons,
.w4d8a-feature ion-icon,
.w4d8a-feature i {
  font-size: 2.4rem;
  color: var(--w4d8a-primary);
}

.w4d8a-feature h4 { font-size: 1.2rem; margin-top: 0.4rem; }

.w4d8a-feature p { font-size: 1.05rem; color: var(--w4d8a-text-muted); margin-top: 0.2rem; }

/* ===================== Text / SEO content ===================== */
.w4d8a-prose { font-size: 1.25rem; line-height: 1.55; color: var(--w4d8a-text); }

.w4d8a-prose h2 { font-size: 1.55rem; color: var(--w4d8a-gold); margin: 1.2rem 0 0.6rem; }
.w4d8a-prose h3 { font-size: 1.35rem; color: var(--w4d8a-accent); margin: 1rem 0 0.4rem; }
.w4d8a-prose p { margin-bottom: 0.8rem; }
.w4d8a-prose ul, .w4d8a-prose ol { padding-left: 1.4rem; margin-bottom: 0.8rem; }
.w4d8a-prose li { margin-bottom: 0.4rem; }
.w4d8a-prose a { color: var(--w4d8a-primary); font-weight: 600; text-decoration: underline; }

/* ===================== FAQ ===================== */
.w4d8a-faq-item {
  background: var(--w4d8a-bg-card);
  border: 1px solid var(--w4d8a-border);
  border-radius: 0.8rem;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.w4d8a-faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--w4d8a-text);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 1rem;
  cursor: pointer;
}

.w4d8a-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 1rem;
  color: var(--w4d8a-text-muted);
  font-size: 1.15rem;
}

.w4d8a-faq-item.w4d8a-faq-open .w4d8a-faq-a { max-height: 320px; padding-bottom: 1rem; }

/* ===================== Winners / testimonials ===================== */
.w4d8a-winners {
  display: grid;
  gap: 0.6rem;
}

.w4d8a-winner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--w4d8a-bg-card);
  padding: 0.7rem 1rem;
  border-radius: 0.8rem;
  border-left: 3px solid var(--w4d8a-gold);
  font-size: 1.15rem;
}

.w4d8a-winner span:last-child { color: var(--w4d8a-gold); font-weight: 700; }

.w4d8a-testimonial {
  background: var(--w4d8a-bg-card);
  padding: 1rem;
  border-radius: 0.8rem;
  margin-bottom: 0.7rem;
  border: 1px solid var(--w4d8a-border);
}

.w4d8a-testimonial .w4d8a-stars { color: var(--w4d8a-gold); margin-bottom: 0.3rem; }
.w4d8a-testimonial p { font-size: 1.15rem; color: var(--w4d8a-text-muted); }
.w4d8a-testimonial .w4d8a-author { font-size: 1.1rem; color: var(--w4d8a-primary); margin-top: 0.4rem; font-weight: 700; }

/* ===================== Payment ===================== */
.w4d8a-payment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.w4d8a-payment-chip {
  background: var(--w4d8a-bg-card);
  border: 1px solid var(--w4d8a-border);
  border-radius: 0.6rem;
  padding: 0.5rem 0.9rem;
  font-size: 1.1rem;
}

/* ===================== CTA banner ===================== */
.w4d8a-cta {
  background: linear-gradient(95deg, var(--w4d8a-secondary), var(--w4d8a-pink));
  border-radius: var(--w4d8a-radius);
  padding: 1.4rem;
  text-align: center;
  margin: 1.2rem 0;
  box-shadow: 0 6px 16px rgba(138, 43, 226, 0.4);
}

.w4d8a-cta h3 { font-size: 1.5rem; color: #fff; margin-bottom: 0.4rem; }
.w4d8a-cta p { font-size: 1.2rem; color: #ffe9f5; margin-bottom: 0.8rem; }

/* ===================== Footer ===================== */
.w4d8a-footer {
  background: var(--w4d8a-bg-deep);
  border-top: 2px solid var(--w4d8a-secondary);
  padding: 1.6rem 1rem 2rem;
  margin-top: 1.6rem;
}

.w4d8a-footer h4 { font-size: 1.3rem; color: var(--w4d8a-primary); margin-bottom: 0.6rem; }

.w4d8a-footer p { font-size: 1.15rem; color: var(--w4d8a-text-muted); margin-bottom: 0.8rem; }

.w4d8a-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.6rem 0;
}

.w4d8a-footer-links a {
  color: var(--w4d8a-text-muted);
  font-size: 1.1rem;
}

.w4d8a-footer-links a:hover { color: var(--w4d8a-primary); }

.w4d8a-footer-copy { font-size: 1.05rem; color: var(--w4d8a-text-muted); margin-top: 0.8rem; }

/* ===================== Mobile bottom nav ===================== */
.w4d8a-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  height: 6rem;
  background: linear-gradient(180deg, var(--w4d8a-bg-card), var(--w4d8a-bg-deep));
  border-top: 2px solid var(--w4d8a-primary);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.35);
}

.w4d8a-bottom-nav a,
.w4d8a-bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--w4d8a-text-muted);
  font-size: 1.05rem;
  text-decoration: none;
  min-height: 6rem;
  min-width: 6rem;
  padding: 0.4rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.w4d8a-bottom-nav a:active,
.w4d8a-bottom-nav button:active { transform: scale(0.92); }

.w4d8a-bottom-nav .material-icons,
.w4d8a-bottom-nav ion-icon,
.w4d8a-bottom-nav i { font-size: 2.4rem; }

.w4d8a-bottom-nav .w4d8a-nav-active { color: var(--w4d8a-primary); }

/* ===================== Misc ===================== */
.w4d8a-back-top {
  position: fixed;
  right: 1rem;
  bottom: 7rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--w4d8a-primary);
  color: #fff;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

@media (min-width: 769px) {
  body { max-width: 960px; }
  .w4d8a-game-grid { grid-template-columns: repeat(6, 1fr); }
  .w4d8a-feature-grid { grid-template-columns: repeat(4, 1fr); }
  .w4d8a-bottom-nav { display: none; }
}

@media (max-width: 768px) {
  main { padding-bottom: 8rem; }
}
