/*!
 * f98.homes layout stylesheet
 * All custom classes use w66d5- prefix for namespace isolation
 * Comments in English only
 */

:root {
  --w66d5-bg: #0D1117;
  --w66d5-bg-alt: #161B25;
  --w66d5-card: #1B2230;
  --w66d5-primary: #FF8A80;
  --w66d5-secondary: #6A5ACD;
  --w66d5-accent: #800080;
  --w66d5-light: #FFB3BA;
  --w66d5-text: #F5F6FA;
  --w66d5-text-muted: #A8AFC0;
  --w66d5-border: #2A3140;
  --w66d5-gold: #FFD166;
  --w66d5-green: #36D39A;
  --w66d5-radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Roboto", "Inter", system-ui, sans-serif;
  background-color: var(--w66d5-bg);
  color: var(--w66d5-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
}

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

a { color: var(--w66d5-light); text-decoration: none; }

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

.w66d5-wrapper {
  padding: 0 1.4rem;
}

/* ============ Header ============ */
.w66d5-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(13,17,23,0.96), rgba(22,27,37,0.96));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--w66d5-border);
  transition: box-shadow 0.3s ease;
}

.w66d5-header.w66d5-scrolled {
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
}

.w66d5-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5.6rem;
  padding: 0 1.2rem;
  max-width: 430px;
  margin: 0 auto;
}

.w66d5-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--w66d5-text);
  font-weight: 800;
  font-size: 1.8rem;
}

.w66d5-logo img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.6rem;
}

.w66d5-logo span {
  background: linear-gradient(90deg, var(--w66d5-primary), var(--w66d5-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.w66d5-menu-btn {
  background: transparent;
  border: 1px solid var(--w66d5-border);
  color: var(--w66d5-text);
  width: 4rem;
  height: 4rem;
  border-radius: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 2rem;
}

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

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

.w66d5-btn-login {
  background: transparent;
  color: var(--w66d5-text);
  border: 1px solid var(--w66d5-border);
}

.w66d5-btn-register {
  background: linear-gradient(135deg, var(--w66d5-primary), var(--w66d5-accent));
  color: #fff;
  box-shadow: 0 3px 10px rgba(255,138,128,0.35);
}

.w66d5-btn-promo {
  background: linear-gradient(135deg, var(--w66d5-secondary), var(--w66d5-accent));
  color: #fff;
  padding: 1rem 1.6rem;
  width: 100%;
  font-size: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(106,90,205,0.4);
}

/* ============ Mobile Menu (slide-down) ============ */
.w66d5-mobile-menu {
  position: fixed;
  top: 5.6rem;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--w66d5-bg-alt);
  border-bottom: 1px solid var(--w66d5-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
}

.w66d5-mobile-menu.w66d5-menu-open {
  max-height: 32rem;
  padding: 0.6rem 0;
}

.w66d5-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 1.6rem;
  color: var(--w66d5-text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 1.4rem;
}

.w66d5-mobile-menu a:active { background: rgba(255,138,128,0.08); }

.w66d5-mobile-menu a i { color: var(--w66d5-primary); width: 2rem; text-align: center; }

/* ============ Main ============ */
.w66d5-main {
  padding-top: 5.6rem;
}

.w66d5-section {
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--w66d5-border);
}

.w66d5-section-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 1.4rem;
  color: var(--w66d5-text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.w66d5-section-title i { color: var(--w66d5-primary); }

.w66d5-section-sub {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--w66d5-light);
  margin: 1.6rem 0 0.8rem;
}

.w66d5-text-muted { color: var(--w66d5-text-muted); }

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

.w66d5-slides { position: relative; }

.w66d5-slide {
  display: none;
  position: relative;
  cursor: pointer;
}

.w66d5-slide.w66d5-active { display: block; }

.w66d5-slide img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  border-radius: var(--w66d5-radius);
}

.w66d5-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(0deg, rgba(13,17,23,0.92), rgba(13,17,23,0));
  color: #fff;
}

.w66d5-slide-overlay h2 {
  font-size: 1.8rem;
  margin: 0 0 0.3rem;
  color: var(--w66d5-light);
}

.w66d5-slide-overlay p {
  margin: 0;
  font-size: 1.3rem;
  color: var(--w66d5-text);
}

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

.w66d5-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--w66d5-border);
  cursor: pointer;
  transition: background 0.2s ease;
}

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

/* ============ Hero ============ */
.w66d5-hero {
  background: linear-gradient(135deg, rgba(106,90,205,0.25), rgba(128,0,128,0.25));
  border-radius: var(--w66d5-radius);
  padding: 2rem 1.6rem;
  margin: 1.4rem 0;
  text-align: center;
  border: 1px solid var(--w66d5-border);
}

.w66d5-hero h1 {
  font-size: 2.2rem;
  line-height: 2.8rem;
  margin: 0 0 0.8rem;
  color: var(--w66d5-text);
}

.w66d5-hero p {
  margin: 0 0 1.4rem;
  color: var(--w66d5-text-muted);
  font-size: 1.35rem;
}

/* ============ Game Grid ============ */
.w66d5-game-block {
  margin-bottom: 2rem;
}

.w66d5-game-block-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 1.8rem 0 1rem;
  color: var(--w66d5-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--w66d5-primary);
}

.w66d5-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.w66d5-card {
  background: var(--w66d5-card);
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--w66d5-border);
  transition: transform 0.18s ease, border-color 0.2s ease;
  cursor: pointer;
}

.w66d5-card:active { transform: scale(0.95); border-color: var(--w66d5-primary); }

.w66d5-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--w66d5-bg-alt);
}

.w66d5-card-name {
  padding: 0.6rem 0.4rem;
  font-size: 1.05rem;
  text-align: center;
  color: var(--w66d5-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.6rem;
  line-height: 2.4rem;
}

/* ============ Info / Feature boxes ============ */
.w66d5-info-box {
  background: var(--w66d5-card);
  border-radius: var(--w66d5-radius);
  padding: 1.6rem;
  margin: 1rem 0;
  border: 1px solid var(--w66d5-border);
}

.w66d5-info-box h3 {
  margin: 0 0 0.6rem;
  color: var(--w66d5-light);
  font-size: 1.5rem;
}

.w66d5-info-box p {
  margin: 0 0 0.8rem;
  color: var(--w66d5-text-muted);
  font-size: 1.3rem;
}

.w66d5-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.w66d5-step-list li {
  counter-increment: step;
  position: relative;
  padding: 0.8rem 0 0.8rem 3rem;
  font-size: 1.3rem;
  color: var(--w66d5-text-muted);
  border-bottom: 1px dashed var(--w66d5-border);
}

.w66d5-step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--w66d5-primary), var(--w66d5-accent));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.w66d5-faq-item summary {
  padding: 1.2rem 1.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--w66d5-light);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.w66d5-faq-item summary::-webkit-details-marker { display: none; }

.w66d5-faq-item summary i { color: var(--w66d5-primary); }

.w66d5-faq-item p {
  margin: 0;
  padding: 0 1.4rem 1.2rem;
  color: var(--w66d5-text-muted);
  font-size: 1.3rem;
}

/* ============ Winners / Stats ============ */
.w66d5-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}

.w66d5-stat-card {
  background: var(--w66d5-card);
  border-radius: 0.8rem;
  padding: 1.2rem;
  text-align: center;
  border: 1px solid var(--w66d5-border);
}

.w66d5-stat-card .w66d5-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--w66d5-primary);
}

.w66d5-stat-card .w66d5-stat-label {
  font-size: 1.1rem;
  color: var(--w66d5-text-muted);
}

.w66d5-winners {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1rem 0;
}

.w66d5-winner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--w66d5-card);
  border-radius: 0.8rem;
  border: 1px solid var(--w66d5-border);
  font-size: 1.25rem;
}

.w66d5-winner .w66d5-winner-game { color: var(--w66d5-light); font-weight: 700; }
.w66d5-winner .w66d5-winner-amount { color: var(--w66d5-gold); font-weight: 800; }

/* ============ Testimonials ============ */
.w66d5-testimonial {
  background: var(--w66d5-card);
  border-radius: 0.8rem;
  padding: 1.2rem;
  margin: 0.6rem 0;
  border: 1px solid var(--w66d5-border);
}

.w66d5-testimonial .w66d5-testi-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.w66d5-testi-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--w66d5-secondary), var(--w66d5-primary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.4rem;
}

.w66d5-testi-name { font-weight: 700; color: var(--w66d5-light); font-size: 1.3rem; }
.w66d5-testi-stars { color: var(--w66d5-gold); font-size: 1.1rem; }
.w66d5-testi-text { color: var(--w66d5-text-muted); font-size: 1.25rem; margin: 0; }

/* ============ Payment ============ */
.w66d5-pay-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}

.w66d5-pay-item {
  background: var(--w66d5-card);
  border-radius: 0.6rem;
  padding: 0.8rem 0.4rem;
  text-align: center;
  border: 1px solid var(--w66d5-border);
  font-size: 1.05rem;
  color: var(--w66d5-text-muted);
}

.w66d5-pay-item i { font-size: 1.8rem; color: var(--w66d5-primary); display: block; margin-bottom: 0.3rem; }

/* ============ Inline promo links ============ */
.w66d5-link {
  color: var(--w66d5-primary);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.w66d5-link:hover { color: var(--w66d5-light); }

.w66d5-cta-row {
  display: flex;
  gap: 0.8rem;
  margin: 1.2rem 0;
  flex-wrap: wrap;
}

.w66d5-cta-row .w66d5-btn { flex: 1 1 auto; }

/* ============ Footer ============ */
.w66d5-footer {
  background: var(--w66d5-bg-alt);
  border-top: 1px solid var(--w66d5-border);
  padding: 2rem 1.4rem 6rem;
  margin-top: 2rem;
}

.w66d5-footer-brand {
  color: var(--w66d5-light);
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.w66d5-footer-desc {
  color: var(--w66d5-text-muted);
  font-size: 1.25rem;
  margin: 0 0 1.2rem;
  line-height: 2rem;
}

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

.w66d5-footer-links a {
  flex: 1 1 44%;
  text-align: center;
  padding: 0.7rem 0.6rem;
  background: var(--w66d5-card);
  border-radius: 0.6rem;
  border: 1px solid var(--w66d5-border);
  font-size: 1.2rem;
  color: var(--w66d5-text);
}

.w66d5-footer-links a:active { border-color: var(--w66d5-primary); }

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

/* ============ Bottom Nav (mobile) ============ */
.w66d5-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 6rem;
  background: linear-gradient(180deg, rgba(22,27,37,0.98), rgba(13,17,23,0.99));
  border-top: 1px solid var(--w66d5-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  backdrop-filter: blur(8px);
}

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

.w66d5-bottom-nav-btn i,
.w66d5-bottom-nav-btn .material-icons-outlined,
.w66d5-bottom-nav-btn .ionicon { font-size: 2.2rem; }

.w66d5-bottom-nav-btn:active { transform: scale(0.92); }

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

.w66d5-bottom-nav-btn.w66d5-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2.4rem;
  height: 0.25rem;
  background: var(--w66d5-primary);
  border-radius: 0 0 0.3rem 0.3rem;
}

.w66d5-bottom-nav-btn.w66d5-nav-promo {
  color: var(--w66d5-gold);
}

/* ============ Back to top ============ */
.w66d5-back-top {
  position: fixed;
  right: 1.2rem;
  bottom: 7rem;
  z-index: 998;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--w66d5-primary), var(--w66d5-accent));
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.w66d5-back-top.w66d5-visible { opacity: 1; pointer-events: auto; }
.w66d5-back-top:active { transform: scale(0.9); }

/* ============ Desktop: hide bottom nav, show simple desktop nav ============ */
@media (min-width: 769px) {
  .w66d5-bottom-nav { display: none; }
  .w66d5-container { max-width: 960px; }
  .w66d5-header-inner { max-width: 960px; }
  .w66d5-grid { grid-template-columns: repeat(5, 1fr); }
  .w66d5-footer { padding-bottom: 2rem; }
  .w66d5-pay-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ============ Mobile: bottom padding to clear bottom nav ============ */
@media (max-width: 768px) {
  .w66d5-main { padding-bottom: 8rem; }
  .w66d5-footer { padding-bottom: 7rem; }
}
