/* ===================================================================
   হিসাবের গল্প — ডিজাইন সিস্টেম
   রঙ/ফন্ট বদলাতে চাইলে শুধু নিচের :root অংশটা বদলালেই পুরো সাইটে লাগবে
   =================================================================== */
:root {
  --bg: #f6f8fb;          /* পেজের ব্যাকগ্রাউন্ড */
  --surface: #ffffff;     /* কার্ড */
  --ink: #0f1f3d;         /* মূল টেক্সট (গাঢ় নেভি) */
  --ink-2: #4a5872;       /* হালকা টেক্সট */
  --ink-3: #8a94a8;       /* আরও হালকা */
  --line: #e4e8f0;        /* বর্ডার */
  --primary: #0e8a5f;     /* মূল সবুজ (বাটন, প্রোগ্রেস) */
  --primary-dark: #0b6e4c;
  --primary-soft: #e3f5ed;
  --accent: #f5a623;      /* হলুদ-কমলা (হাইলাইট, পেন্ডিং) */
  --accent-soft: #fff4de;
  --danger: #d6433b;
  --danger-soft: #fdecea;
  --bkash: #e2136e;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,31,61,.04), 0 6px 20px -8px rgba(15,31,61,.12);
  --font: "Hind Siliguri", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
body.has-bottom-nav { padding-bottom: 72px; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, video, iframe { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 2.2vw + 1rem, 2.5rem); }
h2 { font-size: clamp(1.3rem, 1.2vw + 1rem, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.tiny { font-size: .8rem; }
.bold { font-weight: 700; }
.center { text-align: center; }
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2.5rem}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}
.flex { display: flex; gap: .75rem; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 1rem; }
.hide-mobile { display: none; }
@media (min-width: 760px) { .hide-mobile { display: initial; } .hide-desktop { display: none !important; } }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.medium { max-width: 820px; }

/* ---------- হেডার ---------- */
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 1.05rem; font-weight: 800;
}
.nav { display: flex; gap: .25rem; align-items: center; }
.nav a { padding: .45rem .8rem; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a.active { background: var(--bg); color: var(--ink); text-decoration: none; }

/* মোবাইল নিচের ন্যাভ (লগইন থাকলে) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 10px; font-size: .72rem; color: var(--ink-3); font-weight: 600;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav svg { width: 22px; height: 22px; }
@media (min-width: 760px) { .bottom-nav { display: none; } body.has-bottom-nav { padding-bottom: 0; } }

/* ---------- বাটন ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.3rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; line-height: 1.2;
  transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap; min-height: 46px;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(14,138,95,.6); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #3a2a00; }
.btn-accent:hover { background: #e59a16; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #f9d9d6; }
.btn-sm { padding: .45rem .85rem; font-size: .875rem; min-height: 36px; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.08rem; min-height: 52px; }
.btn-block { width: 100%; white-space: normal; text-align: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- কার্ড ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }
.card + .card { margin-top: 1rem; }
@media (min-width: 760px) { .card { padding: 1.6rem; } }

/* ---------- ফর্ম ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; font-size: .95rem; }
.field .hint { color: var(--ink-3); font-size: .82rem; margin-top: .3rem; }
.input, select, textarea {
  width: 100%; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.is-invalid { border-color: var(--danger); }
textarea { min-height: 110px; resize: vertical; }
.error { color: var(--danger); font-size: .85rem; margin-top: .35rem; font-weight: 600; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.input-group { display: flex; gap: .5rem; }
.input-group .input { flex: 1; }

/* ---------- অ্যালার্ট / ব্যাজ ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 600; border: 1px solid transparent; }
.alert-success { background: var(--primary-soft); color: var(--primary-dark); border-color: #bfe8d4; }
.alert-warning { background: var(--accent-soft); color: #7a4e00; border-color: #f8dfae; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #f4c4c0; }
.alert-info { background: #e8f0fe; color: #1e49a3; border-color: #c9d9f7; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-green { background: var(--primary-soft); color: var(--primary-dark); }
.badge-yellow { background: var(--accent-soft); color: #7a4e00; }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-gray { background: #eef1f6; color: var(--ink-2); }
.badge-blue { background: #e8f0fe; color: #1e49a3; }

/* ---------- প্রোগ্রেস ---------- */
.progress { height: 10px; background: #e7ebf2; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #19b37d); border-radius: 999px; transition: width .6s ease; }
.progress-lg { height: 14px; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: var(--primary-dark);
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), #e7ebf2 0); }
.ring > span { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }

/* ---------- লেসন লিস্ট ---------- */
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-item {
  display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  margin-bottom: .6rem; transition: border-color .15s, box-shadow .15s;
}
.lesson-item:hover { text-decoration: none; border-color: #c9d2e3; box-shadow: var(--shadow); }
.lesson-item.current { border-color: var(--primary); background: #f3fbf7; }
.lesson-item.locked { color: var(--ink-2); background: #fafbfd; }
.lesson-num {
  flex: 0 0 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; background: #eef1f6; color: var(--ink-2); font-size: .95rem;
}
.lesson-item.done .lesson-num { background: var(--primary); color: #fff; }
.lesson-item.current .lesson-num { background: var(--primary-soft); color: var(--primary-dark); }
.lesson-title { font-weight: 700; line-height: 1.35; }
.lesson-meta { font-size: .8rem; color: var(--ink-3); margin-top: 2px; display: flex; gap: .6rem; flex-wrap: wrap; }
.lesson-item .icon { margin-left: auto; color: var(--ink-3); flex: 0 0 auto; }

/* ---------- ভিডিও প্লেয়ার ---------- */
.player-wrap { background: #000; border-radius: var(--radius); overflow: hidden; position: relative; box-shadow: var(--shadow); }
.player-wrap .plyr { --plyr-color-main: var(--primary); --plyr-video-control-color-hover: #fff; }
.plyr__video-embed iframe { pointer-events: none; } /* YouTube-এর নিজের UI-তে ক্লিক বন্ধ */
.player-wrap .plyr__video-embed { aspect-ratio: 16/9; }
.player-locked { aspect-ratio: 16/9; display: grid; place-items: center; background: linear-gradient(135deg, #0f1f3d, #1d3461); color: #fff; text-align: center; padding: 1.5rem; }
.player-locked h3 { color: #fff; }
.player-wrap:fullscreen { border-radius: 0; }

/* ---------- ল্যান্ডিং ---------- */
.hero { padding: 2rem 0 1.5rem; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .4rem; background: var(--primary-soft); color: var(--primary-dark); padding: .3rem .8rem; border-radius: 999px; font-weight: 700; font-size: .82rem; margin-bottom: 1rem; }
.hero .lead { font-size: 1.1rem; color: var(--ink-2); max-width: 36rem; }
.hero-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .hero { padding: 3.5rem 0 2.5rem; } .hero-grid { grid-template-columns: 1.15fr 1fr; align-items: center; } }
.promo { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #0f1f3d, #0e8a5f); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); position: relative; }
.promo .play { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--primary); display: grid; place-items: center; font-size: 1.7rem; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .5rem; text-align: center; }
.stat b { display: block; font-size: 1.25rem; color: var(--primary-dark); }
.stat span { font-size: .78rem; color: var(--ink-2); }
.price-box { background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.price { font-size: 2.2rem; font-weight: 800; color: var(--ink); line-height: 1; }
.price s { color: var(--ink-3); font-size: 1.1rem; font-weight: 500; margin-left: .5rem; }
.section { padding: 2rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.features { display: grid; gap: .8rem; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; }
.feature .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-size: 1.2rem; margin-bottom: .6rem; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: .4rem 0 .4rem 1.8rem; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: .35rem; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
details.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: .9rem 1rem; margin-bottom: .6rem; }
details.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: .6rem 0 0; color: var(--ink-2); }

/* মোবাইলে স্টিকি ভর্তি বাটন */
.sticky-cta { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--line); padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 1rem; z-index: 40; box-shadow: 0 -8px 24px -12px rgba(15,31,61,.25); }
.sticky-cta .price { font-size: 1.35rem; }
body.has-sticky { padding-bottom: 84px; }
@media (min-width: 900px) { .sticky-cta { display: none; } body.has-sticky { padding-bottom: 0; } }

/* ---------- পেমেন্ট ধাপ ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-left: 3rem; margin-bottom: 1.4rem; }
.steps li::before { counter-increment: s; content: counter(s, bengali); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; }
.bkash-num { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; background: #fff0f6; border: 1.5px dashed var(--bkash); border-radius: var(--radius-sm); padding: .7rem .9rem; margin: .5rem 0; }
.bkash-num b { font-size: 1.3rem; letter-spacing: .06em; color: var(--bkash); font-family: "Inter", monospace; }
.copy-btn { margin-left: auto; }

/* ---------- টেবিল (অ্যাডমিন) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); background: #fafbfd; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.mono { font-family: "Inter", ui-monospace, monospace; letter-spacing: .03em; }

/* ---------- অ্যাডমিন লেআউট ---------- */
.admin { display: grid; min-height: 100vh; grid-template-rows: auto 1fr; }
.admin-side { background: var(--ink); color: #c9d2e3; padding: .6rem 12px; display: flex; gap: .25rem; overflow-x: auto; position: sticky; top: 0; z-index: 40; }
.admin-side .brand { color: #fff; margin-right: .5rem; font-size: 1rem; white-space: nowrap; }
.admin-side a.item { color: #c9d2e3; padding: .5rem .8rem; border-radius: 8px; font-weight: 600; white-space: nowrap; font-size: .92rem; display: flex; align-items: center; gap: .4rem; }
.admin-side a.item.active, .admin-side a.item:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.admin-side .count { background: var(--accent); color: #3a2a00; border-radius: 999px; font-size: .72rem; padding: 0 .45rem; }
.admin-main { padding: 1.25rem 16px 3rem; max-width: 1100px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) {
  .admin { grid-template-rows: none; grid-template-columns: 240px 1fr; }
  .admin-side { flex-direction: column; padding: 1.25rem .9rem; position: sticky; top: 0; height: 100vh; overflow: visible; }
  .admin-side .brand { margin: 0 .3rem 1.25rem; font-size: 1.1rem; }
  .admin-side a.item { padding: .65rem .9rem; }
  .admin-side .spacer { flex: 1; }
  .admin-main { padding: 2rem 2rem 4rem; }
}
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; }
.kpi b { display: block; font-size: 1.7rem; line-height: 1.1; }
.kpi span { color: var(--ink-2); font-size: .85rem; }
.kpi.warn { border-color: var(--accent); background: var(--accent-soft); }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; font-weight: 700; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--primary-dark); border-color: var(--primary); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.pay-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: .8rem; }
.pay-card .trx { font-family: "Inter", monospace; font-size: 1.15rem; font-weight: 800; letter-spacing: .06em; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.pagination { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: 1rem; list-style: none; padding: 0; }
.pagination li a, .pagination li span { display: inline-block; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .9rem; }
.pagination li.active span { background: var(--primary); color: #fff; border-color: var(--primary); }
.sortable .lesson-item { cursor: grab; }
.drag-handle { color: var(--ink-3); cursor: grab; }

/* ---------- কুইজ ---------- */
.quiz-q { padding: 1rem 0; border-top: 1px solid var(--line); }
.quiz-q:first-child { border-top: 0; }
.option { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .5rem; cursor: pointer; background: var(--surface); }
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.option input { margin-top: .25rem; accent-color: var(--primary); width: 18px; height: 18px; }
.option.correct { border-color: var(--primary); background: var(--primary-soft); }
.option.wrong { border-color: var(--danger); background: var(--danger-soft); }

/* ---------- ফুটার ---------- */
.footer { padding: 2rem 0 1.5rem; color: var(--ink-3); font-size: .85rem; text-align: center; }

/* ---------- অ্যানিমেশন ---------- */
@keyframes pop { 0% { transform: scale(.9); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
.pop { animation: pop .25s ease-out; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
