/* ============================================================
 * tk 71 - style-aafe.css
 * All custom classes use the "saaf-" prefix.
 * Palette: #6F4E37 | #DEB887 | #FAF0E6 | #FFD700 | #2C2C2C | #CED4DA
 * Dark tones are backgrounds, light tones are text, gold is accent.
 * Mobile-first: built for max-width 430px and scales up to desktop.
 * ============================================================ */

/* --------- CSS variables (prefixed) --------- */
:root {
  --saaf-primary: #6F4E37;       /* coffee brown */
  --saaf-primary-dark: #5a3f2c;  /* deeper coffee */
  --saaf-bg: #2C2C2C;            /* near-black background */
  --saaf-bg-soft: #3a3431;       /* card surface */
  --saaf-text: #FAF0E6;          /* linen light text */
  --saaf-text-muted: #CED4DA;    /* muted grey text */
  --saaf-accent: #DEB887;        /* burlywood accent */
  --saaf-gold: #FFD700;          /* gold highlight */
  --saaf-border: rgba(222, 184, 135, 0.25);
  --saaf-radius: 12px;
  --saaf-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

/* --------- Reset / base --------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, sans-serif;
  background: var(--saaf-bg);
  color: var(--saaf-text);
  line-height: 1.5;
  font-size: 1.6rem;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--saaf-accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.3; font-weight: 700; }

/* --------- Layout helpers --------- */
.saaf-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.saaf-wrapper { width: 100%; }
main.saaf-main { padding-bottom: 84px; }

/* --------- Header --------- */
.saaf-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, #2C2C2C 0%, #3a2f25 100%);
  border-bottom: 1px solid var(--saaf-border);
  box-shadow: var(--saaf-shadow);
}
.saaf-header-inner {
  max-width: 430px; margin: 0 auto; padding: 0.6rem 1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.saaf-logo { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.saaf-logo img { width: 30px; height: 30px; border-radius: 6px; }
.saaf-logo-text { font-size: 1.6rem; font-weight: 800; color: var(--saaf-gold); white-space: nowrap; }
.saaf-logo-text span { color: var(--saaf-accent); }
.saaf-nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.saaf-btn {
  border: none; cursor: pointer; font-family: inherit; font-weight: 700;
  border-radius: 999px; padding: 0.55rem 1.1rem; font-size: 1.3rem;
  transition: transform 0.15s ease, opacity 0.15s ease; line-height: 1;
}
.saaf-btn:active { transform: scale(0.94); }
.saaf-btn-register {
  background: linear-gradient(135deg, var(--saaf-gold), var(--saaf-accent));
  color: var(--saaf-bg);
}
.saaf-btn-login {
  background: transparent; color: var(--saaf-text);
  border: 1px solid var(--saaf-accent);
}
.saaf-menu-btn {
  background: transparent; border: 1px solid var(--saaf-border);
  color: var(--saaf-text); width: 34px; height: 34px;
  border-radius: 8px; font-size: 1.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.saaf-menu-btn.saaf-active { background: var(--saaf-primary); }

/* --------- Mobile slide-down menu --------- */
.saaf-mobile-menu {
  position: fixed; top: 56px; left: 0; right: 0; z-index: 9999;
  background: var(--saaf-bg-soft);
  border-bottom: 1px solid var(--saaf-border);
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.saaf-mobile-menu.saaf-menu-open { max-height: 80vh; overflow-y: auto; }
.saaf-mobile-menu ul { list-style: none; padding: 0.4rem 0; }
.saaf-mobile-menu li a {
  display: block; padding: 1rem 1.4rem; color: var(--saaf-text);
  font-size: 1.4rem; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.saaf-mobile-menu li a:active { background: var(--saaf-primary); }
.saaf-link-current { color: var(--saaf-gold) !important; font-weight: 700; }

/* --------- Banner carousel --------- */
.saaf-banner {
  position: relative; margin-top: 56px; width: 100%;
  height: 180px; overflow: hidden; background: #000;
}
.saaf-banner-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease;
  cursor: pointer;
}
.saaf-banner-slide.saaf-slide-active { opacity: 1; }
.saaf-banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.saaf-banner-dots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px; z-index: 2;
}
.saaf-banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(250, 240, 230, 0.5); cursor: pointer;
}
.saaf-banner-dot.saaf-dot-active { background: var(--saaf-gold); }

/* --------- Section + category navigation --------- */
.saaf-section { padding: 1.6rem 0; }
.saaf-section-title {
  font-size: 1.8rem; color: var(--saaf-gold); margin-bottom: 0.8rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.saaf-section-title i { color: var(--saaf-accent); }
.saaf-section-intro { color: var(--saaf-text-muted); font-size: 1.4rem; margin-bottom: 1rem; }

.saaf-cat-nav {
  display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.4rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}
.saaf-cat-link {
  flex: 0 0 auto; padding: 0.5rem 1rem; border-radius: 999px;
  background: var(--saaf-bg-soft); color: var(--saaf-text);
  font-size: 1.3rem; border: 1px solid var(--saaf-border); cursor: pointer;
}
.saaf-cat-link.saaf-cat-active {
  background: var(--saaf-primary); color: var(--saaf-gold); border-color: var(--saaf-gold);
}

/* --------- Game grid --------- */
.saaf-category-block { margin-bottom: 2rem; }
.saaf-cat-heading {
  font-size: 1.6rem; color: var(--saaf-accent); margin-bottom: 0.8rem;
  padding-left: 0.4rem; border-left: 3px solid var(--saaf-gold);
}
.saaf-games-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem;
}
.saaf-game-card { cursor: pointer; }
.saaf-game-card:active { transform: scale(0.96); }
.saaf-game-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--saaf-border);
  background: var(--saaf-bg-soft);
}
.saaf-game-name {
  font-size: 1.15rem; color: var(--saaf-text); margin-top: 0.35rem;
  text-align: center; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --------- Info modules --------- */
.saaf-card {
  background: var(--saaf-bg-soft); border: 1px solid var(--saaf-border);
  border-radius: var(--saaf-radius); padding: 1.2rem; margin-bottom: 1rem;
  box-shadow: var(--saaf-shadow);
}
.saaf-card h3 { color: var(--saaf-gold); font-size: 1.5rem; margin-bottom: 0.5rem; }
.saaf-card p { color: var(--saaf-text-muted); font-size: 1.35rem; }
.saaf-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.saaf-feature-item {
  background: var(--saaf-bg-soft); border-radius: 10px; padding: 0.9rem;
  text-align: center; border: 1px solid var(--saaf-border);
}
.saaf-feature-item i { font-size: 2.2rem; color: var(--saaf-gold); }
.saaf-feature-item span { display: block; margin-top: 0.3rem; font-size: 1.2rem; color: var(--saaf-text); }

.saaf-rtp-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0; border-bottom: 1px dashed var(--saaf-border); font-size: 1.3rem;
}
.saaf-rtp-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; margin: 0 0.6rem; }
.saaf-rtp-fill { height: 100%; background: linear-gradient(90deg, var(--saaf-primary), var(--saaf-gold)); border-radius: 3px; }

.saaf-faq-item { border-bottom: 1px solid var(--saaf-border); padding: 0.7rem 0; }
.saaf-faq-item h4 { color: var(--saaf-accent); font-size: 1.35rem; margin-bottom: 0.3rem; }
.saaf-faq-item p { color: var(--saaf-text-muted); font-size: 1.3rem; }

.saaf-promo-cta {
  background: linear-gradient(135deg, var(--saaf-primary), var(--saaf-primary-dark));
  border-radius: var(--saaf-radius); padding: 1.4rem; text-align: center;
  border: 1px solid var(--saaf-gold);
}
.saaf-promo-cta h3 { color: var(--saaf-gold); font-size: 1.7rem; margin-bottom: 0.4rem; }
.saaf-promo-cta p { color: var(--saaf-text); font-size: 1.3rem; margin-bottom: 0.9rem; }
.saaf-cta-btn {
  display: inline-block; padding: 0.8rem 2rem; border-radius: 999px;
  background: var(--saaf-gold); color: var(--saaf-bg); font-weight: 800;
  font-size: 1.4rem; cursor: pointer;
}

.saaf-testimonial {
  background: var(--saaf-bg-soft); border-left: 3px solid var(--saaf-gold);
  padding: 0.9rem 1rem; border-radius: 8px; margin-bottom: 0.7rem;
}
.saaf-testimonial p { font-size: 1.3rem; color: var(--saaf-text); }
.saaf-testimonial span { display: block; margin-top: 0.3rem; font-size: 1.15rem; color: var(--saaf-accent); }

.saaf-pay-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.saaf-pay-chip {
  background: var(--saaf-bg-soft); border: 1px solid var(--saaf-border);
  padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 1.2rem; color: var(--saaf-text);
}

/* --------- Back to top --------- */
.saaf-back-top {
  position: fixed; right: 14px; bottom: 84px; z-index: 900;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--saaf-gold); color: var(--saaf-bg);
  border: none; font-size: 1.8rem; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.saaf-back-top.saaf-back-top-show { opacity: 1; pointer-events: auto; }

/* --------- Footer --------- */
.saaf-footer {
  background: #211c19; border-top: 1px solid var(--saaf-border);
  padding: 1.6rem 1.2rem 2rem; margin-top: 1.5rem;
}
.saaf-footer-brand { font-size: 1.3rem; color: var(--saaf-text-muted); margin-bottom: 1rem; }
.saaf-footer-promos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.saaf-footer-promos button {
  background: var(--saaf-primary); color: var(--saaf-gold);
  border: 1px solid var(--saaf-gold); border-radius: 999px;
  padding: 0.5rem 1rem; font-size: 1.2rem; cursor: pointer; font-weight: 700;
}
.saaf-footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 0.8rem; }
.saaf-footer-links a { font-size: 1.2rem; color: var(--saaf-text-muted); }
.saaf-footer-copy { font-size: 1.15rem; color: var(--saaf-text-muted); border-top: 1px solid var(--saaf-border); padding-top: 0.7rem; }

/* --------- Bottom navigation (mobile only) --------- */
.saaf-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  height: 60px; background: #1c1815;
  border-top: 1px solid var(--saaf-gold);
  display: flex; justify-content: space-around; align-items: stretch;
}
.saaf-bottom-nav-btn {
  flex: 1; min-width: 60px; min-height: 60px;
  background: none; border: none; color: var(--saaf-text-muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; font-family: inherit; transition: color 0.2s;
}
.saaf-bottom-nav-btn i, .saaf-bottom-nav-btn .material-symbols-outlined,
.saaf-bottom-nav-btn ion-icon { font-size: 22px; }
.saaf-bottom-nav-btn span { font-size: 1rem; }
.saaf-bottom-nav-btn.saaf-nav-current { color: var(--saaf-gold); }
.saaf-bottom-nav-btn:active { color: var(--saaf-gold); }

/* --------- Responsive: desktop --------- */
@media (min-width: 769px) {
  .saaf-container { max-width: 960px; }
  .saaf-header-inner { max-width: 960px; }
  .saaf-banner { height: 320px; }
  .saaf-games-grid { grid-template-columns: repeat(6, 1fr); }
  .saaf-features { grid-template-columns: repeat(4, 1fr); }
  .saaf-bottom-nav { display: none; }
  main.saaf-main { padding-bottom: 2rem; }
  .saaf-back-top { bottom: 24px; }
}
