/* Bangla Funny Gamer — portal styles. Colours from the game (rickshaw art + the flag). */
:root {
  --ink: #1b1230;
  --gold: #ffcf4a;
  --marigold: #ffb703;
  --pink: #ff3d8b;
  --cyan: #22d3ee;
  --flag: #006a4e;
  --bg: #f6f2ff;
  --card: #ffffff;
  --text: #1d1730;
  --muted: #5b5372;
  --line: #e4dcf4;
  --font: 'Hind Siliguri', 'Noto Sans Bengali', 'Nirmala UI', 'Kohinoor Bangla', 'Vrinda', system-ui, sans-serif;
  --band: radial-gradient(circle at 50% 50%, #fff 0 2px, transparent 3px) 0 0 / 22px 100%,
    linear-gradient(135deg, var(--pink) 25%, transparent 25%) 0 0 / 22px 100%,
    linear-gradient(225deg, var(--marigold) 25%, transparent 25%) 0 0 / 22px 100%,
    linear-gradient(90deg, var(--cyan), #3ccf4e, var(--marigold), var(--pink), var(--cyan));
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #130d24; --card: #1f1838; --text: #f1edff; --muted: #b6acd6; --line: #342a57; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--font); }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; z-index: 99; background: var(--gold); color: var(--ink); padding: 6px 12px; border-radius: 8px; }

/* header */
.site-head { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.site-head::before { content: ''; display: block; height: 7px; background: var(--band); }
.head-row { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; line-height: 1.1; white-space: nowrap; }
.logo-mark { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; font-size: 21px; font-weight: 700; color: var(--ink);
  background: linear-gradient(180deg, #fff1a1, var(--gold) 50%, var(--marigold)); border: 3px solid #fff; }
.logo small { display: block; font-size: 12px; font-weight: 600; color: var(--gold); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .lang { display: block; padding: 7px 11px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; color: #e9e3ff; }
.nav a:hover, .nav a[aria-current='page'] { background: rgba(255,255,255,.12); color: var(--gold); }
.lang { background: rgba(255,255,255,.1); border: 0; font: inherit; font-weight: 700; cursor: pointer; margin-left: 4px; }
@media (max-width: 640px) {
  .head-row { flex-wrap: wrap; gap: 2px 10px; padding-top: 6px; }
  .nav { margin-left: 0; width: 100%; padding-bottom: 6px; }
  .nav a, .lang { padding: 5px 9px; font-size: 14px; }
  .logo { font-size: 18px; }
}

/* ad slots: collapse when empty; never over the game */
.ad-slot { margin: 16px auto; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }
.ad-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }

/* headings & text */
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #fff; background: var(--flag); padding: 2px 12px; border-radius: 999px; }
.h1 { font-size: clamp(25px, 4.4vw, 38px); line-height: 1.25; margin: 8px 0 2px; font-weight: 700; text-wrap: balance; }
.h2 { font-size: 22px; margin: 28px 0 12px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.h2::after { content: ''; flex: 1; height: 4px; border-radius: 4px; background: var(--band); opacity: .75; }
.lead { color: var(--muted); margin: 0 0 12px; }
.prose > p, .prose > ul { max-width: 75ch; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin: 16px 0; }
.box h2 { font-size: 20px; margin: 18px 0 8px; }
.box h2:first-child { margin-top: 0; }
.box ul { padding-left: 20px; margin: 6px 0; }
table.keys { border-collapse: collapse; width: 100%; font-size: 15px; }
table.keys td { border-bottom: 1px solid var(--line); padding: 6px 4px; vertical-align: top; }
table.keys td:first-child { font-weight: 700; color: var(--pink); padding-right: 14px; width: 40%; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* the game player: nothing loads until "▶ খেলা শুরু করো" is tapped */
.hero { margin-top: 14px; }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--ink); border-radius: 16px; overflow: hidden;
  box-shadow: 0 0 0 4px var(--marigold), 0 0 0 8px var(--ink), 0 14px 34px rgba(0,0,0,.3); margin: 12px auto 10px; max-width: 1100px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-start { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; color: #fff; font: inherit;
  background: #2c1b52 center / cover no-repeat; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.player-start::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(27,18,48,.25), rgba(27,18,48,.78)); }
.player-start > * { position: relative; }
.ps-title { font-size: clamp(30px, 7vw, 68px); font-weight: 700; line-height: 1.1; color: var(--gold); text-shadow: 3px 3px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 5px 6px 0 #f42a41; }
.ps-btn { display: inline-block; padding: 10px 32px; border-radius: 999px; background: linear-gradient(180deg, #ffd1e3, #ff6fa5 45%, var(--pink)); border: 4px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink); font-size: clamp(20px, 3.6vw, 32px); font-weight: 700; text-shadow: 2px 2px 0 var(--ink); animation: pulse 1.4s ease-in-out infinite; }
.player-start:hover .ps-btn { filter: brightness(1.08); }
@keyframes pulse { 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .ps-btn { animation: none; } }
@media (orientation: portrait) and (max-width: 700px) {
  .player[data-orient='any'], .player[data-orient='portrait'] { aspect-ratio: 9 / 16; max-height: 82vh; max-height: 82svh; max-width: calc(82svh * 9 / 16); }
}
.player-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; margin: 4px 0 6px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; border: 3px solid var(--ink); font: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; text-decoration: none; background: linear-gradient(180deg, #fff1a1, var(--gold) 50%, var(--marigold)); color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.green { background: linear-gradient(180deg, #8ff0b0, #2fbf71); }
.counter { font-weight: 700; color: var(--flag); font-size: 15px; }
@media (prefers-color-scheme: dark) { .counter { color: #7be3ad; } }

/* game cards */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none;
  transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(27,18,48,.18); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #2c1b52; }
.card-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.card-tag { color: var(--muted); font-size: 14px; flex: 1; }
.card .play { align-self: flex-start; margin-top: 6px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #ff6fa5, var(--pink)); border: 3px solid var(--ink); border-radius: 999px; padding: 2px 14px; box-shadow: 0 3px 0 var(--ink); }
.games .ad-slot { grid-column: 1 / -1; margin: 0; }
.soon { color: var(--muted); }

/* share */
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; font-size: 15px;
  color: #fff; text-decoration: none; cursor: pointer; }
.s-fb { background: #1877f2; }
.s-ms { background: linear-gradient(135deg, #00b2ff, #a033ff); }
.s-wa { background: #25d366; color: #0b2a17 !important; }
.s-cp { background: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 50; font-weight: 600; }

/* footer */
.site-foot { margin-top: 34px; background: var(--ink); color: #d9d2f2; padding: 0 0 26px; font-size: 14px; }
.site-foot::before { content: ''; display: block; height: 7px; background: var(--band); margin-bottom: 18px; }
.site-foot a { color: var(--gold); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.err { text-align: center; padding: 40px 0; }
.err b { font-size: 72px; display: block; line-height: 1; color: var(--pink); }
