/* ============================================================
   bd333 apk layout - s185- prefix
   Palette: #333333 bg / #FFC0CB / #1E90FF / #D3D3D3 / #BAFFC9 / #E91E63
   Mobile-first 320-430px canvas. Desktop stays as centered phone canvas.
   ============================================================ */

:root {
  --s185-bg: #1a1a1a;
  --s185-bg-2: #262626;
  --s185-bg-3: #333333;
  --s185-card: #2e2e2e;
  --s185-text: #FFFFFF;
  --s185-text-dim: #D3D3D3;
  --s185-muted: #9a9a9a;
  --s185-pink: #FFC0CB;
  --s185-blue: #1E90FF;
  --s185-mint: #BAFFC9;
  --s185-accent: #E91E63;
  --s185-accent-2: #ff5a8a;
  --s185-gold: #ffcf5c;
  --s185-border: rgba(255, 255, 255, 0.08);
  --s185-header-h: 96px;
  --s185-nav-h: 64px;
  --s185-radius: 12px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--s185-bg);
  color: var(--s185-text);
  font-family: "Hind Siliguri", "Noto Sans Bengali", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--s185-pink); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--s185-blue); outline-offset: 2px; }

body {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
  min-height: 100vh;
  padding-bottom: calc(var(--s185-nav-h) + 24px);
}

.s185-wrap { padding: 0 14px; }

/* ==================== HEADER ==================== */
.s185-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, #242424 0%, #1c1c1c 100%);
  border-bottom: 1px solid var(--s185-border);
}
.s185-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
}
.s185-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.s185-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--s185-accent);
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.35);
  background: #fff;
  flex-shrink: 0;
}
.s185-brand-text { min-width: 0; line-height: 1.15; }
.s185-brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s185-brand-name b { color: var(--s185-accent); }
.s185-brand-tag {
  font-size: 11px;
  color: var(--s185-mint);
  font-weight: 600;
}
.s185-menu-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.s185-menu-btn:hover { background: rgba(233,30,99,0.2); }

.s185-header-cta {
  display: flex;
  gap: 8px;
  padding: 8px 14px 10px;
}
.s185-btn {
  flex: 1;
  height: 42px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.s185-btn:active { transform: scale(0.97); }
.s185-btn-login {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid var(--s185-border);
}
.s185-btn-register {
  background: linear-gradient(135deg, var(--s185-accent) 0%, var(--s185-accent-2) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(233,30,99,0.35);
}

/* ==================== SIDE DRAWER ==================== */
.s185-drawer {
  position: fixed;
  top: 0; right: -280px;
  width: 270px;
  height: 100vh;
  background: #1f1f1f;
  z-index: 100;
  transition: right 0.25s ease;
  padding: 18px 0 30px;
  overflow-y: auto;
  box-shadow: -6px 0 24px rgba(0,0,0,0.5);
}
.s185-drawer.s185-open { right: 0; }
.s185-drawer-head {
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--s185-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.s185-drawer-head img { width: 36px; height: 36px; border-radius: 8px; }
.s185-drawer-title { font-size: 15px; font-weight: 700; color: #fff; }
.s185-drawer-close {
  margin-left: auto;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  width: 34px; height: 34px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
}
.s185-drawer nav { display: flex; flex-direction: column; padding: 8px 0; }
.s185-drawer nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  color: var(--s185-text-dim);
  font-weight: 600;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.s185-drawer nav a:hover, .s185-drawer nav a:focus {
  background: rgba(255,255,255,0.04);
  color: #fff;
  border-left-color: var(--s185-accent);
}
.s185-drawer nav a::before {
  content: "▸";
  color: var(--s185-mint);
  font-size: 13px;
}
.s185-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.s185-mask.s185-show { opacity: 1; pointer-events: auto; }

/* ==================== HERO ==================== */
.s185-hero {
  position: relative;
  margin: 12px 0 4px;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.s185-slide {
  position: relative;
  display: none;
  cursor: pointer;
}
.s185-slide.s185-active { display: block; }
.s185-slide img { width: 100%; height: 168px; object-fit: cover; }
.s185-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.78) 100%);
}
.s185-slide-text {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  z-index: 2;
}
.s185-slide-text h2 {
  margin: 0 0 4px;
  font-size: 17px;
  color: #fff;
  font-weight: 800;
}
.s185-slide-text p {
  margin: 0;
  font-size: 12px;
  color: var(--s185-pink);
}
.s185-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 5px;
  z-index: 3;
}
.s185-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  padding: 0;
}
.s185-dot.s185-active { background: var(--s185-accent); width: 18px; border-radius: 4px; }

/* ==================== CATEGORY CHIPS ==================== */
.s185-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 14px 4px;
  scrollbar-width: none;
}
.s185-chips::-webkit-scrollbar { display: none; }
.s185-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--s185-card);
  border: 1px solid var(--s185-border);
  border-radius: 999px;
  color: var(--s185-text-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.s185-chip:hover, .s185-chip:focus {
  background: var(--s185-accent);
  color: #fff;
}

/* ==================== SECTION ==================== */
.s185-section { padding: 18px 0 6px; }
.s185-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 10px;
}
.s185-section-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.s185-section-head .s185-bar {
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--s185-accent), var(--s185-blue));
  border-radius: 2px;
}
.s185-section-head .s185-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--s185-pink);
  font-weight: 600;
}

/* ==================== GAME GRID ==================== */
.s185-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 14px;
}
@media (min-width: 360px) {
  .s185-grid { gap: 10px; }
}
@media (min-width: 400px) {
  .s185-grid { grid-template-columns: repeat(5, 1fr); }
}
.s185-game {
  background: var(--s185-card);
  border: 1px solid var(--s185-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.s185-game:hover, .s185-game:focus {
  transform: translateY(-2px);
  border-color: var(--s185-accent);
}
.s185-pulse { animation: s185pulse 0.26s ease; }
@keyframes s185pulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.s185-game-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #111;
}
.s185-game-name {
  font-size: 11px;
  color: var(--s185-text-dim);
  padding: 5px 4px 6px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

/* ==================== FEATURE TILES ==================== */
.s185-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 14px;
}
.s185-tile {
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
  border: 1px solid var(--s185-border);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease;
}
.s185-tile:hover { border-color: var(--s185-accent); }
.s185-tile-ic {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(233,30,99,0.18);
  color: var(--s185-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 8px;
}
.s185-tile h4 { margin: 0 0 4px; font-size: 14px; color: #fff; }
.s185-tile p { margin: 0; font-size: 12px; color: var(--s185-text-dim); }

/* ==================== CONTENT BLOCK ==================== */
.s185-content {
  padding: 6px 14px;
  color: var(--s185-text-dim);
  font-size: 14px;
}
.s185-content h2 {
  color: #fff;
  font-size: 17px;
  margin: 18px 0 8px;
  font-weight: 800;
}
.s185-content h3 {
  color: var(--s185-pink);
  font-size: 15px;
  margin: 14px 0 6px;
  font-weight: 700;
}
.s185-content p { margin: 0 0 10px; }
.s185-content a { color: var(--s185-blue); font-weight: 600; }
.s185-content ul { padding-left: 20px; margin: 0 0 10px; }
.s185-content li { margin-bottom: 4px; }

/* ==================== EXTENDED FOOTER ==================== */
.s185-ext-footer {
  margin: 18px 14px 14px;
  background: var(--s185-bg-2);
  border: 1px solid var(--s185-border);
  border-radius: 14px;
  padding: 16px;
}
.s185-ext-footer h3 {
  font-size: 15px;
  margin: 0 0 10px;
  color: #fff;
  font-weight: 800;
}
.s185-ext-brand {
  font-size: 13px;
  color: var(--s185-text-dim);
  margin-bottom: 14px;
}
.s185-promo-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.s185-promo-btn {
  height: 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.s185-promo-btn-a { background: linear-gradient(135deg, var(--s185-accent), var(--s185-accent-2)); color: #fff; }
.s185-promo-btn-b { background: linear-gradient(135deg, var(--s185-blue), #4ab3ff); color: #fff; }
.s185-promo-btn-c { background: linear-gradient(135deg, var(--s185-mint), #6ed98e); color: #0d3a1c; }
.s185-promo-btn-d { background: linear-gradient(135deg, var(--s185-gold), #ffe28a); color: #5a3d00; }

.s185-dir-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
  margin-bottom: 14px;
}
.s185-dir-grid a {
  font-size: 12px;
  color: var(--s185-text-dim);
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.s185-dir-grid a:hover { color: var(--s185-pink); }
.s185-disclaimer {
  font-size: 11px;
  color: var(--s185-muted);
  border-top: 1px solid var(--s185-border);
  padding-top: 10px;
  line-height: 1.5;
}

/* ==================== FOOTER ==================== */
.s185-footer {
  padding: 16px 14px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--s185-muted);
  border-top: 1px solid var(--s185-border);
  margin-top: 10px;
}

/* ==================== BOTTOM NAV ==================== */
.s185-bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: var(--s185-nav-h);
  background: linear-gradient(180deg, #1f1f1f 0%, #161616 100%);
  border-top: 1px solid var(--s185-border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 70;
  padding-bottom: env(safe-area-inset-bottom);
}
.s185-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--s185-text-dim);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 6px 2px;
  position: relative;
  transition: color 0.15s ease;
}
.s185-nav-item svg { width: 22px; height: 22px; }
.s185-nav-item:hover { color: var(--s185-pink); }
.s185-nav-item.s185-current {
  color: #fff;
  background: linear-gradient(180deg, rgba(233,30,99,0.18) 0%, transparent 100%);
}
.s185-nav-item.s185-current::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--s185-accent);
  border-radius: 0 0 3px 3px;
}
.s185-nav-item.s185-current svg { transform: translateY(-1px) scale(1.08); }

/* ==================== UTIL ==================== */
.s185-hide { display: none !important; }
.s185-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(186,255,201,0.16);
  color: var(--s185-mint);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
