/* PostHub website — mirrors the Android app's Material 3 design (brand indigo + amber). */
:root {
  --bg: #f5f6fc; --card: #fff; --line: #e6e8f3; --text: #1e1b4b; --muted: #5b6478;
  --primary: #4f46e5; --primary-soft: rgba(79, 70, 229, .1); --amber: #fbbf24; --danger: #dc2626;
  --grad: linear-gradient(135deg, #6366f1, #4f46e5 50%, #5b21b6);
  --shadow: 0 14px 30px rgba(79, 70, 229, .16); --r: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1021; --card: #17182f; --line: #2a2c4a; --text: #e0e7ff; --muted: #a3acc4;
    --primary: #a5b4fc; --primary-soft: rgba(165, 180, 252, .14); --shadow: 0 14px 30px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1021; --card: #17182f; --line: #2a2c4a; --text: #e0e7ff; --muted: #a3acc4;
  --primary: #a5b4fc; --primary-soft: rgba(165, 180, 252, .14); --shadow: 0 14px 30px rgba(0, 0, 0, .35); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.55 Inter, "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* Icons */
.msr { font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; display: inline-block; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-variation-settings: "FILL" 0, "wght" 500; vertical-align: middle; flex-shrink: 0; }
.msr.fill { font-variation-settings: "FILL" 1, "wght" 500; }
.msr.xs { font-size: 15px; }

/* Top bar + navigation */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-in { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.32rem; letter-spacing: -.02em; }
.brand img { border-radius: 10px; }
.brand b { color: var(--primary); font-weight: 800; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.avatar-btn { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; overflow: hidden; flex-shrink: 0; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--muted); }
.nav-item.active { color: var(--text); font-weight: 700; }
.nav-pill { position: relative; width: 60px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background .2s; }
.nav-item.active .nav-pill { background: var(--primary-soft); color: var(--primary); }
.nav-badge { position: absolute; top: 1px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; display: grid; place-items: center; }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  .topnav .nav-item { flex-direction: row; gap: 6px; padding: 0 12px; height: 40px; border-radius: 20px; font-size: 14px; }
  .topnav .nav-item.active { background: var(--primary-soft); color: var(--primary); }
  .topnav .nav-pill { width: auto; height: auto; background: none !important; }
  .avatar-btn { margin-left: 8px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 16px; border: 0; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .12s, filter .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; margin-top: 12px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.btn-white { background: #fff; color: #4f46e5; }
.btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.btn-tonal { background: var(--primary-soft); color: var(--primary); }
.btn-tonal.on .msr { font-variation-settings: "FILL" 1; }
.btn-outline { background: transparent; border: 1.5px solid var(--line); color: var(--text); }
.btn-danger-text { background: transparent; color: var(--danger); }
.btn-google { width: 100%; height: 56px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; font-size: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); position: relative; z-index: 2; }
.icon-btn.outline { border: 1.5px solid var(--line); border-radius: 14px; width: 48px; height: 48px; color: var(--text); }
.icon-btn.on { color: var(--primary); }
.icon-btn.on .msr { font-variation-settings: "FILL" 1; }

/* Cards & sections */
.card { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.section { display: flex; align-items: center; gap: 8px; margin: 26px 4px 12px; font-size: 12.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.section .msr { color: var(--primary); font-size: 18px; text-transform: none; letter-spacing: 0; }
.msr { text-transform: none; letter-spacing: normal; }
.page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 10px 4px 16px; }
.page-title small { color: var(--muted); font-weight: 600; font-size: 1rem; }

/* Hero */
.hero { position: relative; overflow: hidden; margin-top: 8px; padding: 22px 20px 20px; border-radius: 28px; background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 170px; height: 170px; right: -40px; top: -50px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.eyebrow { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 12px; font-weight: 600; }
.hero h1 { margin: 14px 0 8px; font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; }
.hero h1 span { color: var(--amber); }
.hero p { margin: 0; opacity: .88; font-size: 14.5px; max-width: 520px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.stats div { padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18); }
.stats b { display: block; font-size: 1.3rem; font-weight: 800; }
.stats span { font-size: 11.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.hero-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-actions .btn { height: 44px; padding: 0 16px; font-size: 14px; }

/* Search */
.searchbar { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 0 18px; height: 54px; border-radius: 18px; background: color-mix(in srgb, var(--primary) 7%, var(--card)); border: 1px solid var(--line); }
.searchbar .msr { color: var(--muted); }
.searchbar input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--text); outline: none; min-width: 0; }

/* Quick links */
.quicks { display: grid; gap: 10px; }
.quick { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; color: #fff; transition: transform .15s; }
.quick:active { transform: scale(.98); }
.quick-meet { background: linear-gradient(90deg, #059669, #10b981); }
.quick-keno { background: linear-gradient(90deg, #7c3aed, #c026d3); }
.quick-ic { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.quick-txt { flex: 1; min-width: 0; }
.quick-txt b { display: block; font-size: 16px; }
.quick-txt small { opacity: .85; font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: 11px; font-weight: 700; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* Platform chips */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 18px -16px 0; padding: 2px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.chip.on { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.chip-ic svg { width: 17px; height: 17px; color: var(--c); display: block; }

/* Post cards */
.feed { display: grid; gap: 12px; }
.post-card { padding: 16px 10px 16px 18px; transition: transform .15s, box-shadow .2s; }
.post-card:hover { box-shadow: var(--shadow); }
.post-card.highlight { box-shadow: var(--shadow); }
.stretched { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.post-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.post-meta .icon-btn { margin-left: auto; }
.pid { padding: 4px 8px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font: 800 11.5px ui-monospace, monospace; }
.date { display: inline-flex; align-items: center; gap: 4px; }
.badge-latest { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 8px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 700; }
.post-title { margin: 2px 10px 0 0; font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.highlight .post-title { font-size: 20px; }
.dots { display: flex; gap: 6px; margin-top: 14px; }
.pdot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); }
.pdot svg { width: 16px; height: 16px; }

/* Post page */
.post-hero { margin-top: 8px; padding: 26px 22px; border-radius: 28px; background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.post-hero h1 { margin: 12px 0 0; font-size: clamp(1.5rem, 5.5vw, 2.1rem); line-height: 1.18; letter-spacing: -.02em; font-weight: 800; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 12.5px; font-weight: 700; }
.actions { display: flex; gap: 10px; margin-top: 16px; }
.actions .btn { flex: 1; }
.plats { display: grid; gap: 10px; }
@media (min-width: 640px) { .plats { grid-template-columns: 1fr 1fr; } }
.plat { display: flex; align-items: center; gap: 14px; padding: 12px 14px; transition: transform .15s; }
.plat:active { transform: scale(.98); }
.plat-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; }
.plat-ic svg { width: 24px; height: 24px; }
.plat-txt { flex: 1; min-width: 0; }
.plat-txt b { display: block; font-size: 16px; }
.plat-txt small { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plat > .msr { color: var(--muted); }
.desc { margin: 16px 4px 0; font-size: 14px; }

/* App CTA */
.cta-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; padding: 20px; border-radius: 26px; background: linear-gradient(135deg, #1e1b4b, #312e81); color: #fff; }
.cta-card img { border-radius: 14px; }
.cta-card div { flex: 1; min-width: 200px; }
.cta-card p { margin: 2px 0 0; opacity: .8; font-size: 13.5px; }

/* Empty states + skeleton */
.empty { text-align: center; padding: 40px 24px; }
.empty-ic { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 30px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty-ic .msr { font-size: 44px; }
.empty h2 { margin: 0 0 6px; font-size: 1.25rem; }
.empty p { margin: 0 auto 20px; color: var(--muted); max-width: 360px; }
.skel { height: 120px; background: linear-gradient(90deg, var(--card), color-mix(in srgb, var(--primary) 6%, var(--card)), var(--card)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Alerts */
.follow-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 24px; background: var(--grad); color: #fff; margin-bottom: 18px; }
.follow-card p { margin: 2px 0 0; font-size: 13px; opacity: .85; }
.follow-card div { flex: 1; }
.follow-card .btn { height: 40px; padding: 0 14px; font-size: 14px; }
.follow-ic { width: 48px; height: 48px; border-radius: 16px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex-shrink: 0; }
.alerts { display: grid; gap: 10px; }
.alert-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.alert-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.alert-ic.is-post { background: var(--primary-soft); color: var(--primary); }
.alert-ic.is-note { background: rgba(251, 191, 36, .18); color: #b45309; }
.alert-txt { flex: 1; min-width: 0; }
.alert-txt b { display: block; }
.alert-txt small { color: var(--muted); }
.unread-dot { display: none; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.alert-item.unread .unread-dot { display: block; }

/* Profile */
.profile-card { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 26px; background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.profile-card b { display: block; font-size: 1.25rem; }
.profile-card small { display: block; opacity: .85; font-size: 13px; }
.profile-card .pill { margin-top: 8px; }
.avatar-lg { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .16); overflow: hidden; font-size: 24px; font-weight: 800; }
.avatar-lg .msr { font-size: 36px; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.group { overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row-txt { flex: 1; min-width: 0; }
.row-txt b { display: block; font-weight: 600; }
.row-txt small { color: var(--muted); font-size: 13px; }
.row.danger > .msr:first-child { color: var(--danger); }
.seg { display: flex; margin-top: 8px; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 38px; border: 0; background: transparent; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button.on { background: var(--primary-soft); color: var(--primary); }
.switch { appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(20px); }

/* Login */
.login { margin: 10px -16px 0; min-height: calc(100vh - 160px); border-radius: 0 0 0 0; background: var(--grad); color: #fff; text-align: center; padding: 48px 24px 0; display: flex; flex-direction: column; }
.login-logo { border-radius: 28px; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); margin: 0 auto; }
.login h1 { margin: 26px 0 10px; font-size: 1.9rem; letter-spacing: -.02em; }
.login p { margin: 0 auto; opacity: .86; max-width: 380px; }
.perks { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 22px 0 34px; }
.perks span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); font-size: 13px; font-weight: 600; }
.perks .msr { color: var(--amber); }
.login-sheet { margin-top: auto; background: var(--bg); color: var(--text); border-radius: 32px 32px 0 0; padding: 26px 24px 30px; }
.terms { display: block; margin-top: 14px; font-size: 12.5px; color: var(--muted); text-decoration: underline; }
@media (min-width: 640px) { .login { margin: 16px 0 0; border-radius: 32px; overflow: hidden; } }

/* Footer */
.footer { margin-top: 40px; padding-top: 24px; padding-bottom: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; text-align: center; }
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 8px; }
.foot-brand img { border-radius: 8px; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0; }
.foot-links a { color: var(--primary); }
.foot-copy { font-size: 12.5px; }

/* Toasts + dialog */
.toast-host { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; display: grid; gap: 8px; width: min(92vw, 440px); }
@media (min-width: 900px) { .toast-host { bottom: 28px; } }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #1e1b4b; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: toastIn .25s ease-out; font-size: 14px; }
.toast button { margin-left: auto; background: none; border: 0; color: var(--amber); font-weight: 700; cursor: pointer; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
dialog.sheet { border: 0; padding: 0; width: min(560px, 100%); max-height: 92vh; border-radius: 28px; background: var(--bg); color: var(--text); }
dialog.sheet::backdrop { background: rgba(10, 8, 40, .55); backdrop-filter: blur(3px); }
.sheet-in { padding: 22px; }
.sheet-in h2 { margin: 0 0 6px; }
.sheet-in label.opt { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.sheet-in textarea, .sheet-in input[type=email] { width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* Admin-managed extras */
.announce { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 16px; border-radius: 16px; background: rgba(251, 191, 36, .16); border: 1px solid rgba(251, 191, 36, .45); font-weight: 600; font-size: 14px; }
.announce > span:not(.msr) { flex: 1; }
.announce .msr { color: #b45309; }
.post-img { display: block; width: 100%; margin-top: 14px; border-radius: 22px; border: 1px solid var(--line); }
.summary { margin-top: 14px; padding: 16px 18px; line-height: 1.6; }

/* Get a comment */
.claim { padding: 16px; }
.claim-steps { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.claim-steps li + li { margin-top: 4px; }
.claim-text { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: var(--primary-soft); border: 1.5px dashed var(--primary); }
.claim-text small { color: var(--primary); font-weight: 700; }
.claim-text p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; }
.claim-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }