/* ============================================================
   111bd shared design system
   CSS class / variable prefix: pg41-
   Palette: #FFB3FF (accent) | #CCCCCC (light text) | #262626 (dark base)
   Mobile-first 320-430px canvas; wider screens keep the phone canvas centered.
   ============================================================ */

:root {
  --pg41-bg: #262626;
  --pg41-bg-deep: #1a1a1a;
  --pg41-bg-soft: #303030;
  --pg41-bg-card: #2e2e2e;
  --pg41-bg-card-hi: #363636;
  --pg41-accent: #FFB3FF;
  --pg41-accent-deep: #e58be0;
  --pg41-accent-soft: rgba(255, 179, 255, 0.16);
  --pg41-text: #CCCCCC;
  --pg41-text-bright: #f4f4f4;
  --pg41-text-dim: #9a9a9a;
  --pg41-line: rgba(204, 204, 204, 0.14);
  --pg41-line-strong: rgba(255, 179, 255, 0.35);
  --pg41-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  --pg41-radius-s: 8px;
  --pg41-radius-m: 14px;
  --pg41-radius-l: 22px;
  --pg41-header-h: 64px;
  --pg41-bottom-h: 64px;
  --pg41-max: 460px;
  --pg41-touch: 44px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--pg41-bg);
  color: var(--pg41-text);
  font-family: "Hind Siliguri", "Noto Sans Bengali", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 50% -120px, rgba(255, 179, 255, 0.10), transparent 70%),
    linear-gradient(180deg, #2b2b2b 0%, #232323 30%, #1f1f1f 100%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: var(--pg41-accent); text-decoration: none; }
a:hover, a:focus { color: var(--pg41-text-bright); }

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

/* ============================================================
   Header: brand + action two-row layout
   ============================================================ */
.pg41-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(38, 38, 38, 0.98), rgba(31, 31, 31, 0.96));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--pg41-line);
}

.pg41-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
}

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

.pg41-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--pg41-accent), #d77fd1);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1a1a1a;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(255, 179, 255, 0.35);
  flex-shrink: 0;
}

.pg41-brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.pg41-brand-name strong {
  color: var(--pg41-text-bright);
  font-size: 17px;
  letter-spacing: 0.3px;
}
.pg41-brand-name span {
  color: var(--pg41-accent);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pg41-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pg41-icon-btn {
  width: var(--pg41-touch);
  height: var(--pg41-touch);
  border: none;
  border-radius: 10px;
  background: var(--pg41-bg-soft);
  color: var(--pg41-text-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s ease;
}
.pg41-icon-btn:hover { background: var(--pg41-bg-card-hi); }
.pg41-icon-btn:active { transform: scale(0.94); }
.pg41-icon-btn svg { width: 22px; height: 22px; }

.pg41-action-row {
  display: flex;
  gap: 8px;
  padding: 0 14px 10px;
}

.pg41-btn {
  flex: 1;
  height: 42px;
  border: none;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-family: inherit;
}
.pg41-btn:active { transform: translateY(1px) scale(0.99); }

.pg41-btn-primary {
  background: linear-gradient(135deg, var(--pg41-accent) 0%, var(--pg41-accent-deep) 100%);
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(255, 179, 255, 0.28);
}
.pg41-btn-primary:hover { color: #1a1a1a; filter: brightness(1.05); }

.pg41-btn-ghost {
  background: transparent;
  color: var(--pg41-text-bright);
  border: 1px solid var(--pg41-line-strong);
}
.pg41-btn-ghost:hover { background: var(--pg41-accent-soft); color: var(--pg41-text-bright); }

/* ============================================================
   Stacked overlay menu
   ============================================================ */
.pg41-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 70;
}
.pg41-backdrop-on { opacity: 1; pointer-events: auto; }

.pg41-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(82%, 360px);
  height: 100%;
  background: linear-gradient(180deg, #2c2c2c, #1f1f1f);
  border-left: 1px solid var(--pg41-line);
  z-index: 80;
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}
.pg41-menu-open { transform: translateX(0); }

.pg41-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pg41-line);
}
.pg41-menu-head strong { color: var(--pg41-text-bright); font-size: 16px; }
.pg41-menu-close {
  width: 38px; height: 38px;
  border: none; border-radius: 10px;
  background: var(--pg41-bg-soft);
  color: var(--pg41-text-bright);
  font-size: 20px;
  cursor: pointer;
}
.pg41-menu-close:active { transform: scale(0.92); }

.pg41-menu-section { padding: 12px 16px; }
.pg41-menu-title {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pg41-accent);
  margin: 4px 0 8px;
}
.pg41-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: 10px;
  color: var(--pg41-text);
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: background 0.16s ease, color 0.16s ease;
}
.pg41-menu-link:hover, .pg41-menu-link:focus {
  background: var(--pg41-accent-soft);
  color: var(--pg41-text-bright);
  border-color: var(--pg41-line);
}
.pg41-menu-link::after {
  content: "›";
  color: var(--pg41-accent);
  font-size: 20px;
  line-height: 1;
}
.pg41-menu-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--pg41-line);
}

/* ============================================================
   Hero carousel
   ============================================================ */
.pg41-hero {
  position: relative;
  margin: 12px 0 4px;
  border-radius: var(--pg41-radius-l);
  overflow: hidden;
  box-shadow: var(--pg41-shadow);
  border: 1px solid var(--pg41-line);
}
.pg41-hero-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.45, 0, 0.2, 1);
}
.pg41-hero-slide {
  min-width: 100%;
  position: relative;
  display: block;
  cursor: pointer;
}
.pg41-hero-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.pg41-hero-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 10%, rgba(0,0,0,0.35) 70%, transparent);
  color: var(--pg41-text-bright);
}
.pg41-hero-caption span {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pg41-accent);
  margin-bottom: 4px;
}
.pg41-hero-caption strong {
  display: block;
  font-size: 18px;
  line-height: 1.3;
  color: var(--pg41-text-bright);
}
.pg41-hero-caption em {
  font-style: normal;
  font-size: 12.5px;
  color: var(--pg41-text);
}

.pg41-hero-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 5px;
  z-index: 3;
}
.pg41-hero-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(204, 204, 204, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.pg41-dot-active { background: var(--pg41-accent); transform: scale(1.25); }

.pg41-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: var(--pg41-text-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.16s ease;
}
.pg41-hero-nav:hover { background: rgba(0, 0, 0, 0.7); }
.pg41-hero-nav:active { transform: translateY(-50%) scale(0.92); }
#pg41-hero-prev { left: 8px; }
#pg41-hero-next { right: 8px; }
.pg41-hero-nav svg { width: 18px; height: 18px; }

/* ============================================================
   Quick nav chips
   ============================================================ */
.pg41-quicknav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 14px 4px;
  scrollbar-width: none;
}
.pg41-quicknav::-webkit-scrollbar { display: none; }
.pg41-quickchip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--pg41-bg-card);
  color: var(--pg41-text);
  border: 1px solid var(--pg41-line);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.pg41-quickchip:active { transform: scale(0.96); }
.pg41-quickchip:hover {
  background: var(--pg41-accent-soft);
  color: var(--pg41-text-bright);
  border-color: var(--pg41-line-strong);
}

/* ============================================================
   Section blocks
   ============================================================ */
.pg41-section {
  padding: 18px 14px 6px;
}
.pg41-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.pg41-section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--pg41-text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.pg41-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--pg41-accent), var(--pg41-accent-deep));
  border-radius: 3px;
}
.pg41-section-link {
  font-size: 12.5px;
  color: var(--pg41-accent);
  font-weight: 600;
}

/* ============================================================
   Game grid
   ============================================================ */
.pg41-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (min-width: 375px) {
  .pg41-game-grid { grid-template-columns: repeat(5, 1fr); gap: 11px; }
}
.pg41-game-card {
  background: var(--pg41-bg-card);
  border: 1px solid var(--pg41-line);
  border-radius: var(--pg41-radius-m);
  padding: 6px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: var(--pg41-touch);
}
.pg41-game-card:hover {
  border-color: var(--pg41-line-strong);
  background: var(--pg41-bg-card-hi);
}
.pg41-game-card:active, .pg41-pressed {
  transform: scale(0.95);
  border-color: var(--pg41-accent);
}
.pg41-game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #222;
  margin-bottom: 5px;
}
.pg41-game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pg41-game-name {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--pg41-text);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 28px;
}
.pg41-game-badge {
  display: inline-block;
  margin-top: 3px;
  font-size: 9.5px;
  letter-spacing: 0.5px;
  color: var(--pg41-accent);
  background: var(--pg41-accent-soft);
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* ============================================================
   Info / content blocks
   ============================================================ */
.pg41-card {
  background: var(--pg41-bg-card);
  border: 1px solid var(--pg41-line);
  border-radius: var(--pg41-radius-m);
  padding: 14px 14px;
  margin-bottom: 12px;
}
.pg41-card h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  color: var(--pg41-text-bright);
}
.pg41-card p { margin: 0 0 8px; font-size: 13.5px; color: var(--pg41-text); }
.pg41-card p:last-child { margin-bottom: 0; }

.pg41-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pg41-stat {
  background: var(--pg41-bg-card);
  border: 1px solid var(--pg41-line);
  border-radius: var(--pg41-radius-m);
  padding: 12px;
  text-align: center;
}
.pg41-stat strong {
  display: block;
  font-size: 22px;
  color: var(--pg41-accent);
  line-height: 1.1;
  font-weight: 800;
}
.pg41-stat span { font-size: 12px; color: var(--pg41-text-dim); }

.pg41-list { margin: 6px 0 0; padding: 0; list-style: none; }
.pg41-list li {
  position: relative;
  padding: 7px 0 7px 22px;
  font-size: 13.5px;
  color: var(--pg41-text);
  border-bottom: 1px dashed var(--pg41-line);
}
.pg41-list li:last-child { border-bottom: none; }
.pg41-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 7px;
  color: var(--pg41-accent);
  font-size: 12px;
}

.pg41-prose {
  font-size: 13.5px;
  color: var(--pg41-text);
  line-height: 1.75;
}
.pg41-prose h2 {
  font-size: 18px;
  margin: 22px 0 8px;
  color: var(--pg41-text-bright);
}
.pg41-prose h3 {
  font-size: 15px;
  margin: 16px 0 6px;
  color: var(--pg41-text-bright);
}
.pg41-prose p { margin: 0 0 10px; }
.pg41-prose a { font-weight: 600; }

/* ============================================================
   CTA band
   ============================================================ */
.pg41-cta {
  margin: 18px 14px;
  padding: 18px 16px;
  border-radius: var(--pg41-radius-l);
  background: linear-gradient(135deg, rgba(255, 179, 255, 0.18), rgba(255, 179, 255, 0.04));
  border: 1px solid var(--pg41-line-strong);
  text-align: center;
}
.pg41-cta h2 {
  margin: 0 0 6px;
  font-size: 19px;
  color: var(--pg41-text-bright);
}
.pg41-cta p { margin: 0 0 14px; font-size: 13.5px; color: var(--pg41-text); }
.pg41-cta .pg41-btn { display: inline-flex; width: auto; min-width: 180px; margin: 0 auto; }

/* ============================================================
   Extended footer (home only)
   ============================================================ */
.pg41-ext-footer {
  margin: 18px 14px 8px;
  padding: 16px 14px;
  background: var(--pg41-bg-deep);
  border: 1px solid var(--pg41-line);
  border-radius: var(--pg41-radius-l);
}
.pg41-ext-footer h2 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--pg41-text-bright);
}
.pg41-ext-footer p { margin: 0 0 14px; font-size: 13px; color: var(--pg41-text-dim); }
.pg41-promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.pg41-promo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: var(--pg41-bg-card);
  border: 1px solid var(--pg41-line);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pg41-text);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
.pg41-promo-link:hover {
  background: var(--pg41-accent-soft);
  color: var(--pg41-text-bright);
}
.pg41-promo-link:active { transform: scale(0.97); }
.pg41-promo-link svg { width: 18px; height: 18px; color: var(--pg41-accent); flex-shrink: 0; }

.pg41-directory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}
.pg41-directory a {
  font-size: 12.5px;
  color: var(--pg41-text);
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 7px;
  border: 1px solid var(--pg41-line);
}
.pg41-directory a:hover { color: var(--pg41-accent); }

.pg41-disclaimer {
  font-size: 11.5px;
  color: var(--pg41-text-dim);
  border-top: 1px dashed var(--pg41-line);
  padding-top: 10px;
  line-height: 1.6;
}

.pg41-copyright {
  text-align: center;
  font-size: 11.5px;
  color: var(--pg41-text-dim);
  padding: 10px 14px 4px;
}

/* ============================================================
   Bottom navigation (brand-emphasis band)
   ============================================================ */
.pg41-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: linear-gradient(180deg, #2c2c2c, #1c1c1c);
  border-top: 1px solid var(--pg41-line-strong);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.45);
}
.pg41-bottom-inner {
  max-width: var(--pg41-max);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 6px 6px;
}
.pg41-bottom-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  min-height: 54px;
  color: var(--pg41-text-dim);
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  transition: color 0.16s ease, transform 0.12s ease;
  border-radius: 10px;
}
.pg41-bottom-item svg { width: 22px; height: 22px; }
.pg41-bottom-item:active { transform: scale(0.9); }
.pg41-bottom-item:hover { color: var(--pg41-text); }
.pg41-bottom-active { color: var(--pg41-accent); }
.pg41-bottom-active svg { filter: drop-shadow(0 2px 6px rgba(255, 179, 255, 0.45)); }

/* Bottom-nav center promo button gets the brand emphasis. */
.pg41-bottom-cta {
  color: #1a1a1a;
  background: linear-gradient(135deg, var(--pg41-accent), var(--pg41-accent-deep));
  border-radius: 14px;
  margin-top: -10px;
  padding-top: 10px;
  box-shadow: 0 4px 14px rgba(255, 179, 255, 0.4);
}
.pg41-bottom-cta:hover { color: #1a1a1a; }
.pg41-bottom-cta svg { filter: none; }

/* Safety padding so fixed bottom nav never overlaps content. */
.pg41-bottom-pad { height: 84px; }

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

/* Focus visibility for keyboard users */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--pg41-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Skip link */
.pg41-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pg41-accent);
  color: #1a1a1a;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 200;
}
.pg41-skip:focus { left: 12px; top: 12px; }
