/* ==========================================================================
   bd87.homes - shell-0829d4.css
   Layered brand-mark header + dropdown menu + layered bottom panel nav.
   All custom classes / CSS variables use the `v9d4-` prefix.
   Mobile-first canvas (320-430px); centered on wider screens without
   expanding into a desktop layout.
   ========================================================================== */

:root {
  --v9d4-bg: #3A3A3A;
  --v9d4-bg-soft: #424242;
  --v9d4-bg-deep: #2c2c2c;
  --v9d4-card: #f8f8ff;
  --v9d4-line: #D3D3D3;
  --v9d4-line-soft: rgba(211, 211, 211, 0.18);
  --v9d4-text: #ECF0F1;
  --v9d4-text-dim: #c9ced0;
  --v9d4-text-dark: #2c2c2c;
  --v9d4-accent: #FF7F50;
  --v9d4-accent-deep: #e8653a;
  --v9d4-accent-soft: rgba(255, 127, 80, 0.16);
  --v9d4-shadow: 0 6px 22px rgba(0, 0, 0, 0.34);
  --v9d4-radius: 12px;
  --v9d4-radius-sm: 8px;
  --v9d4-radius-pill: 999px;
  --v9d4-max: 460px;
  --v9d4-header-h: 56px;
  --v9d4-bottom-h: 64px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--v9d4-bg);
  color: var(--v9d4-text);
  font-family: "Hind Siliguri", "Noto Sans Bengali", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

.v9d4-no-scroll {
  overflow: hidden;
}

a {
  color: var(--v9d4-accent);
  text-decoration: none;
}

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

.v9d4-wrap {
  max-width: var(--v9d4-max);
  margin: 0 auto;
  padding: 0 14px;
}

/* ----------------------------------------------------------------------
   Header (tight brand mark)
   ---------------------------------------------------------------------- */
.v9d4-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--v9d4-header-h);
  background: linear-gradient(180deg, #2c2c2c 0%, #3A3A3A 100%);
  border-bottom: 1px solid var(--v9d4-line-soft);
}

.v9d4-header-row {
  height: var(--v9d4-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v9d4-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.v9d4-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: contain;
  background: var(--v9d4-bg-deep);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.v9d4-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.v9d4-brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--v9d4-text);
  white-space: nowrap;
}

.v9d4-brand-tag {
  font-size: 10px;
  color: var(--v9d4-accent);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.v9d4-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v9d4-btn {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  border-radius: var(--v9d4-radius-pill);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

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

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

.v9d4-btn-register {
  background: linear-gradient(135deg, var(--v9d4-accent), var(--v9d4-accent-deep));
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 127, 80, 0.32);
}

.v9d4-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--v9d4-line-soft);
  color: var(--v9d4-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.v9d4-menu-btn svg {
  width: 18px;
  height: 18px;
}

/* ----------------------------------------------------------------------
   Layered dropdown menu
   ---------------------------------------------------------------------- */
.v9d4-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  z-index: 70;
  transition: opacity 0.22s ease;
}

.v9d4-nav-backdrop.v9d4-is-visible {
  opacity: 1;
  visibility: visible;
}

.v9d4-nav-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 86%;
  max-width: 360px;
  height: 100%;
  background: var(--v9d4-bg-deep);
  z-index: 80;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.24, 1);
  overflow-y: auto;
  padding: 18px 16px calc(var(--v9d4-bottom-h) + 24px);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}

.v9d4-nav-menu.v9d4-is-open {
  transform: translateX(0);
}

.v9d4-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.v9d4-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--v9d4-text);
}

.v9d4-nav-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--v9d4-text);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.v9d4-nav-group {
  border: 1px solid var(--v9d4-line-soft);
  border-radius: var(--v9d4-radius);
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.v9d4-nav-group-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  background: transparent;
  border: none;
  color: var(--v9d4-text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.v9d4-nav-group-trigger .v9d4-chev {
  transition: transform 0.2s ease;
  color: var(--v9d4-accent);
  font-size: 12px;
}

.v9d4-nav-group.v9d4-is-expanded .v9d4-chev {
  transform: rotate(180deg);
}

.v9d4-nav-group-links {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 14px;
}

.v9d4-nav-group.v9d4-is-expanded .v9d4-nav-group-links {
  max-height: 520px;
  padding: 4px 14px 12px;
}

.v9d4-nav-group-links a {
  display: block;
  padding: 10px 2px;
  color: var(--v9d4-text-dim);
  font-size: 13.5px;
  border-top: 1px solid var(--v9d4-line-soft);
}

.v9d4-nav-group-links a:first-child {
  border-top: none;
}

.v9d4-nav-group-links a:active {
  color: var(--v9d4-accent);
}

.v9d4-nav-promo {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v9d4-nav-promo .v9d4-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
}

/* ----------------------------------------------------------------------
   Hero carousel
   ---------------------------------------------------------------------- */
.v9d4-hero {
  position: relative;
  margin: 12px 0 4px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--v9d4-bg-deep);
  box-shadow: var(--v9d4-shadow);
  aspect-ratio: 16 / 9;
}

.v9d4-hero-track {
  position: absolute;
  inset: 0;
}

.v9d4-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  cursor: pointer;
}

.v9d4-hero-slide.v9d4-is-active {
  opacity: 1;
}

.v9d4-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v9d4-hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 14px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.v9d4-hero-title {
  margin: 0 0 3px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.v9d4-hero-sub {
  margin: 0;
  font-size: 12px;
  color: var(--v9d4-text-dim);
}

.v9d4-hero-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 5px;
  z-index: 2;
}

.v9d4-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
}

.v9d4-hero-dot.v9d4-is-active {
  background: var(--v9d4-accent);
  width: 18px;
  border-radius: 4px;
}

/* ----------------------------------------------------------------------
   Category tab strip
   ---------------------------------------------------------------------- */
.v9d4-cat-bar {
  position: sticky;
  top: var(--v9d4-header-h);
  z-index: 25;
  background: var(--v9d4-bg);
  margin: 6px -14px 4px;
  padding: 8px 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--v9d4-line-soft);
}

.v9d4-cat-bar::-webkit-scrollbar {
  display: none;
}

.v9d4-cat-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--v9d4-text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--v9d4-line-soft);
  border-radius: var(--v9d4-radius-pill);
  cursor: pointer;
  position: relative;
  font-family: inherit;
}

.v9d4-cat-tab.v9d4-is-active {
  color: #fff;
  background: var(--v9d4-accent-soft);
  border-color: rgba(255, 127, 80, 0.45);
}

.v9d4-cat-tab.v9d4-is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--v9d4-accent);
  transform: translateX(-50%);
}

/* ----------------------------------------------------------------------
   Section header
   ---------------------------------------------------------------------- */
.v9d4-section {
  margin: 18px 0 6px;
}

.v9d4-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.v9d4-section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--v9d4-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.v9d4-section-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--v9d4-accent);
}

.v9d4-section-more {
  font-size: 12px;
  color: var(--v9d4-accent);
}

/* ----------------------------------------------------------------------
   Game grid (tight 4 columns at 320px, 5 columns at 375px+)
   ---------------------------------------------------------------------- */
.v9d4-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (min-width: 360px) {
  .v9d4-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
}

@media (min-width: 392px) {
  .v9d4-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.v9d4-tile {
  display: block;
  background: var(--v9d4-bg-deep);
  border-radius: var(--v9d4-radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--v9d4-line-soft);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.v9d4-tile:active {
  transform: scale(0.96);
  border-color: rgba(255, 127, 80, 0.55);
}

.v9d4-tile-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #1f1f1f;
}

.v9d4-tile-name {
  padding: 5px 6px 7px;
  font-size: 11px;
  line-height: 1.25;
  color: var(--v9d4-text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v9d4-tag {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: var(--v9d4-radius-pill);
  background: var(--v9d4-accent);
  color: #fff;
  letter-spacing: 0.3px;
}

.v9d4-tag-new {
  background: #2ecc71;
}

.v9d4-tag-event {
  background: #e74c3c;
}

.v9d4-tag-pulse {
  box-shadow: 0 0 0 0 rgba(255, 127, 80, 0.6);
  animation: v9d4-pulse 1.8s infinite;
}

.v9d4-tag-beat {
  animation: v9d4-beat 1.4s 1 ease;
}

@keyframes v9d4-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 127, 80, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 127, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 127, 80, 0); }
}

@keyframes v9d4-beat {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ----------------------------------------------------------------------
   Highlights & testimonials (compact horizontal groups)
   ---------------------------------------------------------------------- */
.v9d4-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.v9d4-chip {
  padding: 12px;
  border-radius: var(--v9d4-radius);
  background: linear-gradient(135deg, rgba(255,127,80,0.12), rgba(255,127,80,0.04));
  border: 1px solid rgba(255, 127, 80, 0.25);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.v9d4-chip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--v9d4-accent);
}

.v9d4-chip-text {
  font-size: 12px;
  color: var(--v9d4-text-dim);
  line-height: 1.45;
}

.v9d4-reviews {
  display: grid;
  gap: 10px;
}

.v9d4-review {
  padding: 12px 14px;
  background: var(--v9d4-bg-deep);
  border-radius: var(--v9d4-radius);
  border: 1px solid var(--v9d4-line-soft);
}

.v9d4-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.v9d4-review-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--v9d4-text);
}

.v9d4-stars {
  color: #f1c40f;
  font-size: 12px;
  letter-spacing: 1px;
}

.v9d4-review-text {
  margin: 0;
  font-size: 12.5px;
  color: var(--v9d4-text-dim);
  line-height: 1.5;
}

/* CTA block */
.v9d4-cta {
  margin: 18px 0 8px;
  padding: 18px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--v9d4-accent-deep), var(--v9d4-accent));
  color: #fff;
  text-align: center;
  box-shadow: 0 8px 22px rgba(255, 127, 80, 0.32);
}

.v9d4-cta-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.v9d4-cta-text {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.92);
}

.v9d4-cta .v9d4-btn {
  background: #fff;
  color: var(--v9d4-accent-deep);
  padding: 11px 22px;
  font-size: 14px;
}

/* ----------------------------------------------------------------------
   Homepage extended footer (compact groups)
   ---------------------------------------------------------------------- */
.v9d4-ext-foot {
  margin-top: 22px;
  padding: 16px 14px 4px;
  background: var(--v9d4-bg-deep);
  border-radius: 14px 14px 0 0;
  border-top: 1px solid var(--v9d4-line-soft);
}

.v9d4-ext-group {
  margin-bottom: 16px;
}

.v9d4-ext-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--v9d4-accent);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.v9d4-ext-text {
  margin: 0;
  font-size: 12.5px;
  color: var(--v9d4-text-dim);
  line-height: 1.6;
}

.v9d4-ext-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
}

.v9d4-ext-links a {
  font-size: 12.5px;
  color: var(--v9d4-text-dim);
  padding: 4px 0;
}

.v9d4-ext-links a:active {
  color: var(--v9d4-accent);
}

.v9d4-ext-disclaimer {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--v9d4-line-soft);
  font-size: 11px;
  color: rgba(236, 240, 241, 0.5);
  line-height: 1.5;
}

/* ----------------------------------------------------------------------
   Global footer
   ---------------------------------------------------------------------- */
.v9d4-footer {
  background: #232323;
  padding: 16px 14px calc(var(--v9d4-bottom-h) + 20px);
  text-align: center;
  font-size: 12px;
  color: rgba(236, 240, 241, 0.55);
}

.v9d4-footer p {
  margin: 0 0 6px;
}

.v9d4-footer-brand {
  color: var(--v9d4-text);
  font-weight: 600;
}

/* ----------------------------------------------------------------------
   Bottom navigation panel (layered bottom bar)
   ---------------------------------------------------------------------- */
.v9d4-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 65;
  background: linear-gradient(180deg, #2c2c2c 0%, #1c1c1c 100%);
  border-top: 1px solid rgba(255, 127, 80, 0.25);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: var(--v9d4-bottom-h);
  padding: 0 4px;
  max-width: var(--v9d4-max);
  margin: 0 auto;
}

.v9d4-bottom-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px 8px;
  color: var(--v9d4-text-dim);
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
  position: relative;
  min-height: 44px;
  transition: color 0.18s ease;
}

.v9d4-bottom-item:active {
  color: var(--v9d4-text);
}

.v9d4-bottom-item.v9d4-is-current {
  color: var(--v9d4-accent);
}

.v9d4-bottom-item.v9d4-is-current::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--v9d4-accent);
}

.v9d4-bottom-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--v9d4-line-soft);
}

.v9d4-bottom-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v9d4-bottom-item.v9d4-is-current .v9d4-bottom-icon {
  background: var(--v9d4-accent-soft);
  border-color: rgba(255, 127, 80, 0.55);
}

.v9d4-bottom-item.v9d4-bottom-promo .v9d4-bottom-icon {
  background: linear-gradient(135deg, var(--v9d4-accent), var(--v9d4-accent-deep));
  border-color: rgba(255, 127, 80, 0.6);
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 127, 80, 0.35);
}

.v9d4-bottom-label {
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Back-to-top */
.v9d4-to-top {
  position: fixed;
  right: 14px;
  bottom: calc(var(--v9d4-bottom-h) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--v9d4-bg-deep);
  border: 1px solid rgba(255, 127, 80, 0.4);
  color: var(--v9d4-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 40;
  box-shadow: var(--v9d4-shadow);
}

.v9d4-to-top.v9d4-is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Safe spacing under content */
.v9d4-content-pad {
  padding-bottom: calc(var(--v9d4-bottom-h) + 18px);
}

/* Small utility for hidden a11y text */
.v9d4-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
