/* ==========================================================================
   cd66b.homes - Core Stylesheet
   All custom classes use the s5f2- prefix.
   Color palette: #A0522D | #1B263B | #FFE4B5 | #A0522D | #CED4DA
   Dark colors = background; light colors = text.
   Mobile-first, root font 62.5% (1rem = 10px).
   ========================================================================== */

:root {
  --s5f2-primary: #A0522D;
  --s5f2-bg: #1B263B;
  --s5f2-text: #FFE4B5;
  --s5f2-muted: #CED4DA;
  --s5f2-card: #22324a;
  --s5f2-card-alt: #2c3e57;
  --s5f2-gold: #FFE4B5;
  --s5f2-accent: #A0522D;
  --s5f2-shadow: 0 2px 10px rgba(0,0,0,0.35);
  --s5f2-radius: 14px;
}

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

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

body {
  font-family: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--s5f2-bg);
  color: var(--s5f2-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

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

a { color: var(--s5f2-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.s5f2-container { width: 100%; padding: 0 1.2rem; }
.s5f2-wrapper { max-width: 430px; margin: 0 auto; }

/* ============================ HEADER ============================ */
.s5f2-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--s5f2-bg);
  border-bottom: 2px solid var(--s5f2-primary);
  z-index: 1000;
  box-shadow: var(--s5f2-shadow);
}
.s5f2-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  gap: 0.8rem;
}
.s5f2-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--s5f2-gold);
  font-weight: 700;
  font-size: 1.8rem;
}
.s5f2-logo img { width: 28px; height: 28px; border-radius: 6px; }
.s5f2-logo .s5f2-logo-name { white-space: nowrap; }

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

.s5f2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  min-height: 36px;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}
.s5f2-btn:hover { transform: scale(1.04); text-decoration: none; }
.s5f2-btn:active { transform: scale(0.96); }
.s5f2-btn-login {
  background: transparent;
  color: var(--s5f2-gold);
  border: 1.5px solid var(--s5f2-gold);
}
.s5f2-btn-register {
  background: linear-gradient(135deg, var(--s5f2-primary), #c46a3f);
  color: var(--s5f2-gold);
  box-shadow: 0 2px 8px rgba(160,82,45,0.45);
}
.s5f2-btn-gold {
  background: var(--s5f2-gold);
  color: var(--s5f2-bg);
  font-weight: 700;
}
.s5f2-menu-btn {
  background: transparent;
  border: none;
  color: var(--s5f2-gold);
  font-size: 2.2rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================ MOBILE MENU ============================ */
.s5f2-mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--s5f2-card);
  border-bottom: 2px solid var(--s5f2-primary);
  padding: 6rem 1.2rem 1.4rem;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  max-height: 80vh;
  overflow-y: auto;
}
.s5f2-mobile-menu.s5f2-menu-open { transform: translateY(0); }
.s5f2-mobile-menu ul { list-style: none; }
.s5f2-mobile-menu li { border-bottom: 1px solid rgba(206,212,218,0.15); }
.s5f2-mobile-menu a {
  display: block;
  padding: 1.1rem 0.6rem;
  color: var(--s5f2-text);
  font-size: 1.4rem;
}
.s5f2-mobile-menu a:hover { color: var(--s5f2-gold); }

/* ============================ MAIN ============================ */
.s5f2-main {
  padding-top: 6rem;
}
@media (max-width: 768px) {
  .s5f2-main { padding-bottom: 80px; }
}

.s5f2-section { padding: 1.6rem 1.2rem; }
.s5f2-section-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--s5f2-gold);
  margin-bottom: 0.8rem;
}
.s5f2-section-title i { color: var(--s5f2-primary); margin-right: 0.5rem; }
.s5f2-section-sub {
  color: var(--s5f2-muted);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* ============================ CAROUSEL ============================ */
.s5f2-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: var(--s5f2-radius);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--s5f2-shadow);
}
.s5f2-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.s5f2-slide img { width: 100%; height: 100%; object-fit: cover; }
.s5f2-slide.s5f2-slide-active { opacity: 1; }
.s5f2-slide-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(transparent, rgba(27,38,59,0.92));
  color: var(--s5f2-gold);
}
.s5f2-slide-overlay h2 { font-size: 1.7rem; margin-bottom: 0.3rem; }
.s5f2-slide-overlay p { font-size: 1.2rem; color: var(--s5f2-muted); }
.s5f2-dots {
  position: absolute;
  bottom: 0.6rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 0.4rem;
}
.s5f2-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,228,181,0.5);
  cursor: pointer;
}
.s5f2-dot.s5f2-dot-active { background: var(--s5f2-gold); }

/* ============================ H1 HERO ============================ */
.s5f2-hero {
  text-align: center;
  padding: 1.4rem 1.2rem 0.4rem;
}
.s5f2-hero h1 {
  font-size: 2.2rem;
  color: var(--s5f2-gold);
  line-height: 1.3;
  margin-bottom: 0.6rem;
}
.s5f2-hero p { color: var(--s5f2-muted); font-size: 1.3rem; }
.s5f2-hero-cta {
  margin-top: 1rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================ GAME GRID ============================ */
.s5f2-cat-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.6rem 0 0.8rem;
  padding: 0 1.2rem;
}
.s5f2-cat-head h2 {
  font-size: 1.7rem;
  color: var(--s5f2-gold);
  font-weight: 700;
}
.s5f2-cat-head .s5f2-cat-icon { color: var(--s5f2-primary); font-size: 2rem; }
.s5f2-cat-head .s5f2-cat-count {
  margin-left: auto;
  font-size: 1.2rem;
  color: var(--s5f2-muted);
}

.s5f2-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  padding: 0 1.2rem;
}
.s5f2-card {
  background: var(--s5f2-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--s5f2-shadow);
  transition: transform 0.15s ease;
  cursor: pointer;
}
.s5f2-card:hover, .s5f2-card:active { transform: translateY(-2px); }
.s5f2-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--s5f2-card-alt);
}
.s5f2-card-name {
  font-size: 1.1rem;
  text-align: center;
  padding: 0.4rem 0.2rem 0.5rem;
  color: var(--s5f2-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================ INFO / FEATURES ============================ */
.s5f2-info-box {
  background: var(--s5f2-card);
  border-radius: var(--s5f2-radius);
  padding: 1.2rem;
  margin: 1rem 1.2rem;
  box-shadow: var(--s5f2-shadow);
}
.s5f2-info-box h3 {
  color: var(--s5f2-gold);
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}
.s5f2-info-box p { color: var(--s5f2-muted); font-size: 1.3rem; line-height: 1.6; }

.s5f2-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  padding: 0 1.2rem;
}
.s5f2-feature {
  background: var(--s5f2-card);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}
.s5f2-feature i { font-size: 2.6rem; color: var(--s5f2-primary); margin-bottom: 0.4rem; }
.s5f2-feature h3 { color: var(--s5f2-gold); font-size: 1.3rem; margin-bottom: 0.3rem; }
.s5f2-feature p { color: var(--s5f2-muted); font-size: 1.15rem; line-height: 1.4; }

/* ============================ SEO TEXT ============================ */
.s5f2-seo-text {
  padding: 1rem 1.2rem 1.4rem;
  color: var(--s5f2-muted);
  font-size: 1.3rem;
  line-height: 1.7;
}
.s5f2-seo-text h2, .s5f2-seo-text h3 { color: var(--s5f2-gold); margin: 1rem 0 0.5rem; }
.s5f2-seo-text p { margin-bottom: 0.7rem; }
.s5f2-seo-text a { color: var(--s5f2-primary); font-weight: 600; }

/* ============================ FOOTER ============================ */
.s5f2-footer {
  background: #15203a;
  border-top: 2px solid var(--s5f2-primary);
  padding: 1.6rem 1.2rem 2.4rem;
  margin-top: 1.4rem;
}
.s5f2-footer-brand { color: var(--s5f2-gold); font-weight: 700; font-size: 1.6rem; margin-bottom: 0.4rem; }
.s5f2-footer-desc { color: var(--s5f2-muted); font-size: 1.2rem; margin-bottom: 1rem; line-height: 1.5; }
.s5f2-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 0.8rem;
  margin-bottom: 1.2rem;
}
.s5f2-footer-links a {
  color: var(--s5f2-text);
  font-size: 1.2rem;
  padding: 0.3rem 0;
}
.s5f2-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.8rem 0 1.2rem;
}
.s5f2-footer-copy {
  border-top: 1px solid rgba(206,212,218,0.18);
  padding-top: 0.8rem;
  color: var(--s5f2-muted);
  font-size: 1.1rem;
  text-align: center;
}

/* ============================ BOTTOM NAV ============================ */
.s5f2-bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: 60px;
  background: linear-gradient(180deg, #22324a, #15203a);
  border-top: 2px solid var(--s5f2-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.35);
}
.s5f2-bottomnav-btn {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--s5f2-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}
.s5f2-bottomnav-btn i { font-size: 22px; }
.s5f2-bottomnav-btn:active { transform: scale(0.92); }
.s5f2-bottomnav-btn:hover { color: var(--s5f2-gold); text-decoration: none; }
.s5f2-bottomnav-active { color: var(--s5f2-gold); }
.s5f2-bottomnav-active i { color: var(--s5f2-primary); }
.s5f2-bottomnav-badge {
  font-size: 9px;
  background: var(--s5f2-primary);
  color: var(--s5f2-gold);
  border-radius: 6px;
  padding: 0 4px;
  position: absolute;
  margin-left: 14px;
  margin-top: -8px;
}

/* ============================ DESKTOP ============================ */
@media (min-width: 769px) {
  body { max-width: 768px; }
  .s5f2-header, .s5f2-mobile-menu, .s5f2-bottomnav { max-width: 768px; }
  .s5f2-bottomnav { display: none; }
  .s5f2-grid { grid-template-columns: repeat(5, 1fr); }
  .s5f2-features { grid-template-columns: repeat(4, 1fr); }
}

/* Utility */
.s5f2-clear { clear: both; }
.s5f2-hidden { display: none !important; }
