/* ===== HINDI BARAKHADI — PREMIUM CSS ===== */

/* Mode buttons */
.hb-controls{display:flex;flex-direction:column;gap:14px}
.hb-top-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.hb-mode-group{display:flex;gap:0;border:2px solid #e0e7ff;border-radius:12px;overflow:hidden}
.hb-mode-btn{background:#fff;border:none;padding:10px 24px;font-size:13px;font-weight:700;color:#6366f1;cursor:pointer;transition:all .2s;font-family:inherit}
.hb-mode-btn:hover{background:#eef2ff}
.hb-mode-btn.active{background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff}

/* Filter bar */
.hb-filter-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-height:32px}
.hb-filter-label{font-size:13px;font-weight:700;color:#4f46e5;background:#eef2ff;border-radius:20px;padding:4px 14px}
.hb-clear-btn{background:none;border:1.5px solid #c7d2fe;border-radius:20px;padding:4px 12px;font-size:12px;font-weight:700;color:#6366f1;cursor:pointer;transition:all .2s}
.hb-clear-btn:hover{background:#eef2ff}

/* Table wrap */
.hb-table-wrap{overflow-x:auto;border-radius:16px;border:2px solid #e0e7ff;box-shadow:0 4px 20px rgba(99,102,241,.08)}
.hb-table{border-collapse:collapse;width:100%;min-width:700px;background:#fff}

/* Matra header */
.hb-corner{background:linear-gradient(135deg,#4f46e5,#6366f1);color:#fff;font-size:12px;font-weight:800;padding:12px 10px;text-align:center;position:sticky;left:0;z-index:3}
.hb-matra-th{background:linear-gradient(135deg,#6366f1,#818cf8);color:#fff;padding:10px 8px;text-align:center;min-width:60px}
.hb-matra-vowel{display:block;font-size:16px;font-weight:800;line-height:1.2}
.hb-matra-sym{display:block;font-size:10px;opacity:.85;margin-top:2px}

/* Consonant header cell */
.hb-cons-th{background:linear-gradient(135deg,#f5f3ff,#ede9fe);border-right:2px solid #e0e7ff;padding:10px 12px;text-align:center;cursor:pointer;position:sticky;left:0;z-index:2;min-width:72px;transition:background .2s}
.hb-cons-th:hover{background:linear-gradient(135deg,#ede9fe,#c7d2fe)}
.hb-cons-hi{display:block;font-size:22px;font-weight:800;color:#4338ca;line-height:1.2}
.hb-cons-en{display:block;font-size:10px;color:#818cf8;font-weight:600;margin-top:2px}

/* Data cells */
.hb-cell{padding:10px 6px;text-align:center;cursor:pointer;border:1px solid #f0f0ff;transition:all .18s;position:relative}
.hb-cell:hover{background:linear-gradient(135deg,#eef2ff,#e0e7ff);transform:scale(1.08);z-index:1;border-color:#818cf8;border-radius:8px}
.hb-cell-hi{display:block;font-size:18px;font-weight:700;color:#1e1b4b;line-height:1.3}
.hb-cell-en{display:block;font-size:10px;color:#818cf8;font-weight:500;margin-top:2px}

/* Row colors alternating */
.hb-row:nth-child(odd) .hb-cell{background:#fafaff}
.hb-row:nth-child(even) .hb-cell{background:#fff}
.hb-row:nth-child(odd) .hb-cons-th{background:linear-gradient(135deg,#f5f3ff,#ede9fe)}
.hb-row:nth-child(even) .hb-cons-th{background:linear-gradient(135deg,#faf5ff,#f3e8ff)}
.hb-row-highlight .hb-cell{background:linear-gradient(135deg,#eef2ff,#e0e7ff) !important}
.hb-row-highlight .hb-cell-hi{color:#3730a3;font-size:22px}

/* Popup */
.hb-popup-overlay{position:fixed;inset:0;background:rgba(30,27,75,.5);display:flex;align-items:center;justify-content:center;z-index:999;opacity:0;pointer-events:none;transition:opacity .2s;backdrop-filter:blur(4px)}
.hb-popup-overlay.active{opacity:1;pointer-events:all}
.hb-popup{background:#fff;border-radius:24px;padding:40px 48px;text-align:center;box-shadow:0 20px 60px rgba(99,102,241,.25);transform:scale(.9);transition:transform .2s;max-width:320px;width:90%}
.hb-popup-overlay.active .hb-popup{transform:scale(1)}
.hb-popup-main{font-size:80px;font-weight:800;color:#3730a3;line-height:1;display:block;margin-bottom:8px}
.hb-popup-en{font-size:28px;font-weight:700;color:#6366f1;margin-bottom:10px}
.hb-popup-info{font-size:13px;color:#9ca3af;margin-bottom:20px}
.hb-popup-close{background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff;border:none;border-radius:12px;padding:10px 28px;font-size:14px;font-weight:700;cursor:pointer;transition:all .2s}
.hb-popup-close:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(99,102,241,.35)}

/* Quiz */
.hb-quiz-wrap{display:flex;flex-direction:column;align-items:center;gap:24px;padding:20px 0}
.hb-quiz-card{background:#fff;border:2px solid #e0e7ff;border-radius:24px;padding:36px 40px;text-align:center;width:100%;max-width:500px;box-shadow:0 8px 30px rgba(99,102,241,.1)}
.hb-quiz-q{font-size:18px;font-weight:800;color:#1e1b4b;margin-bottom:8px}
.hb-quiz-sub{font-size:26px;font-weight:800;color:#4f46e5;margin-bottom:24px}
.hb-quiz-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
.hb-quiz-opt{background:#f5f3ff;border:2px solid #e0e7ff;border-radius:14px;padding:16px;font-size:28px;font-weight:800;color:#3730a3;cursor:pointer;transition:all .2s}
.hb-quiz-opt:hover:not(:disabled){background:#eef2ff;border-color:#818cf8;transform:translateY(-2px)}
.hb-quiz-opt.correct{background:linear-gradient(135deg,#d1fae5,#a7f3d0);border-color:#10b981;color:#065f46}
.hb-quiz-opt.wrong{background:linear-gradient(135deg,#fee2e2,#fecaca);border-color:#ef4444;color:#991b1b}
.hb-quiz-feedback{font-size:16px;font-weight:700;min-height:24px}
.hb-quiz-feedback.correct{color:#10b981}
.hb-quiz-feedback.wrong{color:#ef4444}
.hb-quiz-score{font-size:20px;font-weight:800;color:#4f46e5;background:#eef2ff;border-radius:12px;padding:10px 28px}

/* SEO */
.hb-seo{background:#fff;border:2px solid #e0e7ff;border-radius:14px;padding:22px}
.hb-seo h2{color:#4338ca;font-size:18px;font-weight:800;margin-bottom:10px;margin-top:18px}
.hb-seo h2:first-child{margin-top:0}
.hb-seo p{color:#4b5563;font-size:14px;line-height:1.8;margin:0}

@media(max-width:700px){
  .hb-popup{padding:28px 20px}
  .hb-popup-main{font-size:60px}
  .hb-quiz-card{padding:24px 16px}
  .hb-quiz-opt{font-size:22px;padding:12px}
}