/* MHZ Tutorials — core stylesheet */
:root {
  --mhz-primary: #6c5ce7;
  --mhz-primary-2: #00b894;
  --mhz-sidebar-w: 260px;
  --mhz-topbar-h: 60px;
}

[data-bs-theme="light"] {
  --mhz-bg: #f5f6fb;
  --mhz-surface: #ffffff;
  --mhz-surface-2: #f2f3f8;
  --mhz-border: #e6e8ef;
  --mhz-text: #1b1f2a;
  --mhz-muted: #6b7280;
}
[data-bs-theme="dark"] {
  --mhz-bg: #0f1220;
  --mhz-surface: #161a2c;
  --mhz-surface-2: #1d2238;
  --mhz-border: #2a2f49;
  --mhz-text: #e8eaf6;
  --mhz-muted: #9aa3c7;
}

html, body { background: var(--mhz-bg); color: var(--mhz-text); }
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; padding-top: var(--mhz-topbar-h); }
a { color: var(--mhz-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.text-gradient {
  background: linear-gradient(90deg, var(--mhz-primary), var(--mhz-primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Topbar */
.mhz-topbar {
  background: var(--mhz-surface);
  border-bottom: 1px solid var(--mhz-border);
  height: var(--mhz-topbar-h);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  z-index: 1050; /* must beat .mhz-sidebar (1030) so the search dropdown is not clipped */
}
.mhz-topbar .navbar-brand { color: var(--mhz-text) !important; }
.mhz-logo {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--mhz-primary), var(--mhz-primary-2));
  color: #fff; font-size: 18px;
}
.btn-icon {
  width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--mhz-surface-2);
  color: var(--mhz-text); border: 1px solid var(--mhz-border);
}
.btn-icon:hover { background: var(--mhz-border); }
.btn-primary { background: var(--mhz-primary); border-color: var(--mhz-primary); }
.btn-primary:hover { filter: brightness(0.95); }
.btn-outline-primary { color: var(--mhz-primary); border-color: var(--mhz-primary); }
.btn-outline-primary:hover { background: var(--mhz-primary); color: #fff; }

/* Sidebar */
.mhz-sidebar {
  position: fixed; top: var(--mhz-topbar-h); left: 0;
  width: var(--mhz-sidebar-w); bottom: 0;
  background: var(--mhz-surface);
  border-right: 1px solid var(--mhz-border);
  overflow-y: auto; z-index: 1030;
  transition: transform .25s ease;
}
.mhz-sidebar::-webkit-scrollbar { width: 6px; }
.mhz-sidebar::-webkit-scrollbar-thumb { background: var(--mhz-border); border-radius: 3px; }
.mhz-sidebar-inner { padding: 14px 10px 30px; }
.mhz-nav { list-style: none; padding: 0; margin: 0; }

.mhz-nav > li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--mhz-text);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: background .15s ease, transform .15s ease;
  margin-bottom: 2px;
}
.mhz-nav > li > a > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mhz-nav > li > a > i:first-child {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: rgb(var(--icon-rgb, 108 92 231) / 0.12);
  color: rgb(var(--icon-rgb, 108 92 231));
  flex-shrink: 0;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.mhz-nav > li > a:hover {
  background: rgb(var(--icon-rgb, 108 92 231) / 0.08);
  text-decoration: none;
  color: var(--mhz-text);
}
.mhz-nav > li > a:hover > i:first-child {
  background: rgb(var(--icon-rgb, 108 92 231));
  color: #fff;
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 6px 16px rgb(var(--icon-rgb, 108 92 231) / 0.35);
}
.mhz-nav > li > a.is-active,
.mhz-nav > li > a[aria-current="page"] {
  background: rgb(var(--icon-rgb, 108 92 231) / 0.1);
  color: var(--mhz-text);
  font-weight: 600;
}
.mhz-nav > li > a.is-active > i:first-child,
.mhz-nav > li > a[aria-current="page"] > i:first-child {
  background: rgb(var(--icon-rgb, 108 92 231));
  color: #fff;
  box-shadow: 0 4px 14px rgb(var(--icon-rgb, 108 92 231) / 0.35);
}
.mhz-nav > li > a .sub-caret {
  margin-left: auto;
  width: auto;
  height: auto;
  background: transparent !important;
  color: var(--mhz-muted) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  transition: transform .2s ease;
  transform: none !important;
}
.mhz-nav > li.open > a .sub-caret { transform: rotate(180deg) !important; }

.mhz-nav-heading {
  padding: 18px 14px 8px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--mhz-muted);
  font-weight: 800;
  letter-spacing: 1.2px;
  position: relative;
}
.mhz-nav-heading::before {
  content: "";
  position: absolute;
  left: 14px;
  bottom: 4px;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mhz-primary), var(--mhz-primary-2));
  opacity: .6;
}

.mhz-sub {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  border-left: 0;
  transition: max-height .3s ease, padding .25s ease, margin .25s ease, border-left-width .25s ease;
}
.mhz-nav > li.open .mhz-sub {
  max-height: 600px;
  padding: 4px 0 6px 10px;
  margin: 2px 0 6px 20px;
  border-left: 2px dashed var(--mhz-border);
}
.mhz-sub li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  margin-bottom: 2px;
  color: var(--mhz-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
  position: relative;
}
.mhz-sub li a::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--icon-rgb, 108 92 231));
  flex-shrink: 0;
  opacity: .7;
  transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.mhz-sub li a:hover {
  background: rgb(var(--icon-rgb, 108 92 231) / 0.1);
  color: var(--mhz-text);
  text-decoration: none;
}
.mhz-sub li a:hover::before {
  opacity: 1;
  transform: scale(1.4);
  box-shadow: 0 0 0 4px rgb(var(--icon-rgb, 108 92 231) / 0.2);
}

/* Main */
.mhz-main { margin-left: var(--mhz-sidebar-w); min-height: calc(100vh - var(--mhz-topbar-h)); }
@media (max-width: 991.98px) {
  .mhz-sidebar { transform: translateX(-100%); }
  .mhz-sidebar.show { transform: translateX(0); }
  .mhz-main { margin-left: 0; }
}
.mhz-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 1020; display: none;
}
.mhz-backdrop.show { display: block; }

/* Cards */
.card {
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  border-radius: 14px;
}
.card:hover { border-color: rgba(108, 92, 231, .4); }
.form-control, .form-select, .input-group-text {
  background: var(--mhz-surface);
  border-color: var(--mhz-border);
  color: var(--mhz-text);
}
.form-control:focus, .form-select:focus {
  background: var(--mhz-surface);
  color: var(--mhz-text);
  border-color: var(--mhz-primary);
  box-shadow: 0 0 0 .2rem rgba(108,92,231,.15);
}
.table { color: var(--mhz-text); }

/* Tutorial card */
.tut-card {
  display: block;
  height: 100%;
  padding: 22px;
  border-radius: 16px;
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  color: var(--mhz-text);
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
}
.tut-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgb(var(--cat-rgb, 108 92 231)), rgb(var(--cat-rgb, 108 92 231) / 0.3));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s ease;
}
.tut-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(16,24,40,.08);
  text-decoration: none;
  color: var(--mhz-text);
  border-color: rgb(var(--cat-rgb, 108 92 231) / 0.4);
}
.tut-card:hover::before { transform: scaleX(1); }
.tut-card .cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgb(var(--cat-rgb, 108 92 231) / 0.12);
  color: rgb(var(--cat-rgb, 108 92 231));
  letter-spacing: .2px;
}
.tut-card .cat-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(var(--cat-rgb, 108 92 231));
}
.tut-card h5 {
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: 700;
  line-height: 1.35;
  font-size: 16px;
  transition: color .2s ease;
}
.tut-card:hover h5 { color: rgb(var(--cat-rgb, 108 92 231)); }
.tut-card .meta { color: var(--mhz-muted); font-size: 12.5px; line-height: 1.5; }
.tut-card .ai-badge { font-size: 10px; background: linear-gradient(90deg, var(--mhz-primary), var(--mhz-primary-2)); color:#fff; padding: 2px 8px; border-radius: 999px; }

/* Topic card (on homepage "Explore Topics" grid) */
.topic-card {
  display: block;
  padding: 26px 18px;
  border-radius: 16px;
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  text-align: center;
  color: var(--mhz-text);
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
}
.topic-card::after {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgb(var(--cat-rgb, 108 92 231) / 0.18) 0%, transparent 65%);
  opacity: 0;
  transition: opacity .3s ease;
}
.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(16,24,40,.08);
  border-color: rgb(var(--cat-rgb, 108 92 231) / 0.4);
  text-decoration: none;
  color: var(--mhz-text);
}
.topic-card:hover::after { opacity: 1; }
.topic-card .topic-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgb(var(--cat-rgb, 108 92 231) / 0.14);
  color: rgb(var(--cat-rgb, 108 92 231));
  margin-bottom: 12px;
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
  z-index: 1;
}
.topic-card:hover .topic-icon {
  transform: scale(1.08) rotate(-4deg);
  background: rgb(var(--cat-rgb, 108 92 231));
  color: #fff;
  box-shadow: 0 10px 24px rgb(var(--cat-rgb, 108 92 231) / 0.35);
}
.topic-card h6 {
  margin: 0;
  font-weight: 700;
  font-size: 14.5px;
  position: relative;
  z-index: 1;
}

/* =============== /topics.php — All Topics directory =============== */

/* Top-of-page tile grid — visual overview anchor jumps */
.topic-tile {
  display: block;
  padding: 22px 14px 20px;
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  border-radius: 16px;
  text-align: center;
  text-decoration: none !important;
  color: var(--mhz-text);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
  height: 100%;
}
.topic-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgb(var(--cat-rgb, 108 92 231)), rgb(var(--cat-rgb, 108 92 231) / 0.3));
}
.topic-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgb(var(--cat-rgb, 108 92 231) / 0.2);
  border-color: rgb(var(--cat-rgb, 108 92 231) / 0.4);
  text-decoration: none !important;
  color: var(--mhz-text);
}
.topic-tile-ic {
  width: 58px; height: 58px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgb(var(--cat-rgb, 108 92 231)), rgb(var(--cat-rgb, 108 92 231) / 0.72));
  color: #fff;
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 10px 24px rgb(var(--cat-rgb, 108 92 231) / 0.32);
  transition: transform .25s ease;
}
.topic-tile:hover .topic-tile-ic { transform: scale(1.05) rotate(-3deg); }
.topic-tile-name {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
  color: var(--mhz-text);
}
.topic-tile-count {
  font-size: 12px;
  color: var(--mhz-muted);
  font-weight: 600;
}

/* Per-topic section — a big card with header + grid of sub-cards */
.topic-section {
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  border-radius: 20px;
  padding: 30px 32px 34px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 80px;
}
.topic-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, rgb(var(--cat-rgb, 108 92 231)), rgb(var(--cat-rgb, 108 92 231) / 0.3));
}
.topic-section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--mhz-border);
  flex-wrap: wrap;
}
.topic-section-ic {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(var(--cat-rgb, 108 92 231)), rgb(var(--cat-rgb, 108 92 231) / 0.7));
  color: #fff;
  font-size: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 12px 30px rgb(var(--cat-rgb, 108 92 231) / 0.32);
}
.topic-section-title-wrap {
  flex: 1;
  min-width: 220px;
}
.topic-section-title-wrap h2 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.topic-section-title-wrap p {
  margin: 0;
  color: var(--mhz-muted);
  font-size: 14px;
  line-height: 1.5;
}
.topic-section-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(135deg, rgb(var(--cat-rgb, 108 92 231)), rgb(var(--cat-rgb, 108 92 231) / 0.75));
  color: #fff !important;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgb(var(--cat-rgb, 108 92 231) / 0.32);
  transition: transform .15s ease, box-shadow .2s ease;
}
.topic-section-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgb(var(--cat-rgb, 108 92 231) / 0.42);
  color: #fff !important;
  text-decoration: none !important;
}
.topic-section-cta i { transition: transform .2s ease; }
.topic-section-cta:hover i { transform: translateX(3px); }

/* Sub-category grid inside each section */
.topic-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.topic-sub-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  min-height: 76px;
  background: var(--mhz-surface-2);
  border: 1px solid var(--mhz-border);
  border-radius: 12px;
  color: var(--mhz-text);
  text-decoration: none !important;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative;
}
.topic-sub-card:hover {
  transform: translateY(-2px);
  background: var(--mhz-surface);
  border-color: rgb(var(--sub-rgb, 108 92 231) / 0.5);
  box-shadow: 0 10px 24px rgb(var(--sub-rgb, 108 92 231) / 0.18);
  color: var(--mhz-text);
  text-decoration: none !important;
}
.topic-sub-ic {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: rgb(var(--sub-rgb, 108 92 231) / 0.14);
  color: rgb(var(--sub-rgb, 108 92 231));
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.topic-sub-card:hover .topic-sub-ic {
  background: rgb(var(--sub-rgb, 108 92 231));
  color: #fff;
  transform: scale(1.06) rotate(-4deg);
}
.topic-sub-text {
  min-width: 0; /* critical — lets the children actually truncate instead of overflowing */
}
.topic-sub-name {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
  color: var(--mhz-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-sub-count {
  display: block;
  font-size: 12px;
  color: var(--mhz-muted);
  font-weight: 600;
  line-height: 1.2;
}
.topic-sub-empty { opacity: 0.65; }
.topic-sub-empty .topic-sub-ic { filter: grayscale(0.4); }

.topic-empty {
  text-align: center;
  padding: 30px;
  color: var(--mhz-muted);
}
.topic-empty i { font-size: 36px; opacity: .5; display: block; margin-bottom: 8px; }
.topic-empty p { margin: 0; font-size: 14px; }

@media (max-width: 767.98px) {
  .topic-section { padding: 22px 20px 24px; }
  .topic-section-head { gap: 14px; padding-bottom: 18px; margin-bottom: 18px; }
  .topic-section-ic { width: 54px; height: 54px; font-size: 26px; }
  .topic-section-title-wrap h2 { font-size: 20px; }
  .topic-section-cta { width: 100%; justify-content: center; }
  .topic-sub-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .topic-sub-card { padding: 14px 16px; gap: 12px; }
  .topic-sub-ic { width: 40px; height: 40px; font-size: 18px; }
}
@media (max-width: 399.98px) {
  .topic-sub-grid { grid-template-columns: 1fr; }
}

/* Homepage "Latest Questions" list items */
.question-item {
  border-left: 3px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.question-item:hover {
  background: rgb(16 185 129 / 0.06);
  border-left-color: rgb(16 185 129);
  transform: translateX(2px);
  text-decoration: none;
}
.question-item:hover .text-body { color: rgb(16 185 129) !important; }

/* Section heading with colored icon badge */
.mhz-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}
.mhz-section-head h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.mhz-section-head h3 .section-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgb(var(--sec-rgb, 108 92 231) / 0.12);
  color: rgb(var(--sec-rgb, 108 92 231));
  flex-shrink: 0;
}
.mhz-section-head .view-all {
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--sec-rgb, 108 92 231));
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgb(var(--sec-rgb, 108 92 231) / 0.1);
  transition: background .2s ease, transform .15s ease;
}
.mhz-section-head .view-all:hover {
  background: rgb(var(--sec-rgb, 108 92 231) / 0.18);
  text-decoration: none;
  transform: translateX(2px);
}

/* Hero */
.mhz-hero {
  position: relative;
  background:
    radial-gradient(circle at 100% 0%, rgba(0,184,148,.20) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(108,92,231,.20) 0%, transparent 55%),
    linear-gradient(135deg, rgba(108,92,231,.10), rgba(0,184,148,.07));
  border: 1px solid var(--mhz-border);
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 24px;
  overflow: hidden;
}
.mhz-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mhz-primary), var(--mhz-primary-2), var(--mhz-primary));
  background-size: 200% 100%;
  animation: mhz-hero-shine 6s ease-in-out infinite;
}
@keyframes mhz-hero-shine {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.mhz-hero h1 {
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.mhz-hero .lead {
  color: var(--mhz-muted);
  font-size: 15px;
  max-width: 560px;
  margin-bottom: 12px;
}

/* Avatar circles — used in profile, comments, answers, admin lists. */
.mhz-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.18), inset 0 0 0 2px rgba(255,255,255,.18);
  vertical-align: middle;
}
.mhz-avatar i { line-height: 1; display: block; }

/* Avatar picker grid (profile.php) */
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.avatar-picker label {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all .15s ease;
}
.avatar-picker label:hover { background: rgba(108,92,231,.08); }
.avatar-picker input[type="radio"] { display: none; }
.avatar-picker input[type="radio"]:checked + .mhz-avatar {
  outline: 3px solid var(--mhz-primary);
  outline-offset: 2px;
}
@media (max-width: 575.98px) {
  .avatar-picker { grid-template-columns: repeat(6, 1fr); }
}

/* Tutorial content */
.tut-content { line-height: 1.75; font-size: 16px; }
.tut-content h2, .tut-content h3 { margin-top: 1.8em; font-weight: 800; letter-spacing: -0.01em; scroll-margin-top: 80px; }
.tut-content h2 { font-size: 1.5rem; }
.tut-content h3 { font-size: 1.2rem; }
.tut-content p { margin-bottom: 1.1em; }
.tut-content ul, .tut-content ol { padding-left: 1.4em; margin-bottom: 1.1em; }
.tut-content li { margin-bottom: .35em; }
.tut-content blockquote {
  border-left: 4px solid rgb(var(--cat-rgb, 108 92 231));
  padding: 6px 0 6px 16px;
  margin: 1.4em 0;
  color: var(--mhz-muted);
  font-style: italic;
  background: rgb(var(--cat-rgb, 108 92 231) / 0.06);
  border-radius: 0 10px 10px 0;
}
.tut-content pre {
  position: relative;
  background: #0b0f1f;
  color: #d7dcf0;
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13.5px;
  margin: 1.4em 0;
  border: 1px solid #1c2240;
}
.tut-content pre::-webkit-scrollbar { height: 8px; }
.tut-content pre::-webkit-scrollbar-thumb { background: #2a3057; border-radius: 4px; }
.tut-content code { background: var(--mhz-surface-2); padding: 2px 6px; border-radius: 6px; font-size: 90%; color: rgb(var(--cat-rgb, 108 92 231)); }
.tut-content pre code { background: transparent; padding: 0; color: inherit; }
.tut-content img { max-width: 100%; border-radius: 10px; }
.tut-content a { color: rgb(var(--cat-rgb, 108 92 231)); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tut-content a:hover { text-decoration-thickness: 2px; }

/* Top accent bar on the article card */
.tutorial-article {
  position: relative;
  border-top: 4px solid rgb(var(--cat-rgb, 108 92 231));
}

/* Copy-code button */
.tut-content .copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.08);
  color: #d7dcf0;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.tut-content pre:hover .copy-code-btn { opacity: 1; transform: translateY(0); }
.tut-content .copy-code-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.tut-content .copy-code-btn.copied {
  background: rgba(16,185,129,.25);
  border-color: rgba(16,185,129,.5);
  color: #6ee7b7;
}
@media (max-width: 575.98px) { .tut-content .copy-code-btn { opacity: 1; } }

/* Byline avatar */
.byline-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mhz-primary), var(--mhz-primary-2));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(108,92,231,.25);
}

/* Share buttons */
.share-buttons { display: flex; gap: 8px; align-items: center; }
.share-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mhz-surface-2);
  color: var(--mhz-text);
  border: 1px solid var(--mhz-border);
  text-decoration: none !important;
  font-size: 16px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.share-btn:hover { transform: translateY(-2px); text-decoration: none !important; }
.share-btn.share-tw:hover { background: #000; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.share-btn.share-fb:hover { background: #1877f2; color: #fff; box-shadow: 0 8px 20px rgba(24,119,242,.35); }
.share-btn.share-li:hover { background: #0a66c2; color: #fff; box-shadow: 0 8px 20px rgba(10,102,194,.35); }
.share-btn.share-wa:hover { background: #25d366; color: #fff; box-shadow: 0 8px 20px rgba(37,211,102,.35); }
.share-btn.share-copy:hover { background: var(--mhz-primary); color: #fff; box-shadow: 0 8px 20px rgba(108,92,231,.35); }
.share-btn.copied { background: #10b981 !important; color: #fff !important; }

/* Comment cards */
.comment-card {
  border-left: 3px solid rgb(var(--cat-rgb, 108 92 231) / 0.5);
}

/* Table of contents (sticky right rail on desktop) */
.tut-toc-wrap {
  position: sticky;
  top: 78px;
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  border-radius: 14px;
  padding: 18px 16px 18px 22px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.tut-toc-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 800;
  color: var(--mhz-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tut-toc-title i { color: var(--mhz-primary); }
.tut-toc { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--mhz-border); }
.tut-toc li { margin: 0; }
.tut-toc-link {
  display: block;
  padding: 6px 12px 6px 14px;
  font-size: 13px;
  color: var(--mhz-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  line-height: 1.4;
}
.tut-toc-link:hover { color: var(--mhz-text); text-decoration: none; border-left-color: var(--mhz-primary); }
.tut-toc-link.active { color: var(--mhz-primary); font-weight: 700; border-left-color: var(--mhz-primary); }
.tut-toc-l3 .tut-toc-link { padding-left: 28px; font-size: 12.5px; }

/* Footer */
.mhz-footer { margin-left: var(--mhz-sidebar-w); padding: 40px 0 30px; border-top: 1px solid var(--mhz-border); background: var(--mhz-surface); }
@media (max-width: 991.98px) { .mhz-footer { margin-left: 0; } }
.mhz-footer a { color: var(--mhz-muted); }
.mhz-footer a:hover { color: var(--mhz-primary); }

/* Profile avatar (large) */
.profile-card .profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mhz-primary), var(--mhz-primary-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 38px;
  box-shadow: 0 14px 36px rgba(108,92,231,.32);
}

/* Q&A stat tile */
.qna-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  border-radius: 14px;
  border-left: 4px solid rgb(var(--c-rgb, 108 92 231));
}
.qna-stat > i {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgb(var(--c-rgb, 108 92 231) / 0.14);
  color: rgb(var(--c-rgb, 108 92 231));
}
.qna-stat-num { font-size: 22px; font-weight: 800; line-height: 1; }
.qna-stat-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--mhz-muted); font-weight: 700; margin-top: 4px; }

/* Q&A */
.vote-box { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 46px; }
.vote-btn { background: transparent; border: 1px solid var(--mhz-border); width: 36px; height: 36px; border-radius: 8px; color: var(--mhz-muted); }
.vote-btn:hover { color: var(--mhz-primary); border-color: var(--mhz-primary); }
.vote-btn.active { color: var(--mhz-primary); border-color: var(--mhz-primary); background: rgba(108,92,231,.08); }
.tag-chip { display: inline-block; background: var(--mhz-surface-2); color: var(--mhz-text); font-size: 12px; padding: 3px 10px; border-radius: 999px; margin: 2px; }

/* Admin */
.admin-wrap { display: flex; min-height: calc(100vh - var(--mhz-topbar-h)); }
.admin-side { width: 230px; background: var(--mhz-surface); border-right: 1px solid var(--mhz-border); padding: 18px 10px; }
.admin-side a { display:block; padding: 9px 12px; border-radius: 8px; color: var(--mhz-text); font-size: 14px; }
.admin-side a.active, .admin-side a:hover { background: var(--mhz-surface-2); text-decoration: none; }
.admin-content { flex: 1; padding: 24px; }
@media (max-width: 767.98px) {
  .admin-side { display: none; }
}

/* =============== Search autocomplete dropdown =============== */
.mhz-search-dd {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: 100%;
  max-width: 640px;
  min-width: 320px;
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18);
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1100;
  padding: 6px 0 0;
}
[data-bs-theme="dark"] .mhz-search-dd { box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.mhz-search-dd::-webkit-scrollbar { width: 8px; }
.mhz-search-dd::-webkit-scrollbar-thumb { background: var(--mhz-border); border-radius: 4px; }

.mhz-sd-section {
  padding: 14px 20px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--mhz-muted);
  border-top: 1px solid var(--mhz-border);
  margin-top: 6px;
}
.mhz-sd-section:first-child { border-top: 0; margin-top: 0; }

.mhz-sd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  margin: 2px 8px;
  border-radius: 10px;
  color: var(--mhz-text);
  text-decoration: none !important;
  transition: background .12s ease, transform .12s ease;
}
.mhz-sd-item:hover,
.mhz-sd-item.active {
  background: var(--mhz-surface-2);
  text-decoration: none !important;
  color: var(--mhz-text);
}
.mhz-sd-item.active {
  background: rgb(var(--ic, 108 92 231) / 0.12);
}

.mhz-sd-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  background: rgb(var(--ic, 108 92 231) / 0.14);
  color: rgb(var(--ic, 108 92 231));
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.mhz-sd-item:hover .mhz-sd-ic,
.mhz-sd-item.active .mhz-sd-ic {
  background: rgb(var(--ic, 108 92 231));
  color: #fff;
  transform: scale(1.05);
}

.mhz-sd-body {
  flex: 1;
  min-width: 0;
}
.mhz-sd-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--mhz-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mhz-sd-title mark {
  background: rgba(245, 158, 11, 0.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}
.mhz-sd-meta {
  font-size: 12px;
  color: var(--mhz-muted);
  margin-top: 2px;
}
.mhz-sd-arrow {
  font-size: 12px;
  color: var(--mhz-muted);
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
}
.mhz-sd-item:hover .mhz-sd-arrow,
.mhz-sd-item.active .mhz-sd-arrow {
  opacity: 1;
  transform: translateX(-2px);
}

.mhz-sd-empty {
  padding: 36px 20px 26px;
  text-align: center;
  color: var(--mhz-muted);
  font-size: 14px;
}
.mhz-sd-empty i { display: block; font-size: 26px; margin-bottom: 8px; opacity: .6; }

.mhz-sd-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin-top: 8px;
  border-top: 1px solid var(--mhz-border);
  color: var(--mhz-primary);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none !important;
  background: var(--mhz-surface-2);
}
.mhz-sd-footer:hover,
.mhz-sd-footer.active {
  background: rgb(108 92 231 / 0.12);
  color: var(--mhz-primary);
  text-decoration: none !important;
}

/* =============== Search results page =============== */
.mhz-search-page .mhz-search-result {
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  border-left: 3px solid rgb(var(--cat-rgb, 108 92 231));
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 16px 20px;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.mhz-search-page .mhz-search-result:hover {
  background: var(--mhz-surface-2);
  transform: translateX(2px);
  text-decoration: none;
  border-left-width: 5px;
}
.mhz-search-page .mhz-search-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--mhz-text);
  margin-bottom: 4px;
  line-height: 1.35;
}
.mhz-search-page .mhz-search-snippet {
  color: var(--mhz-muted);
  line-height: 1.55;
  font-size: 13.5px;
}
.mhz-search-page .mhz-search-snippet mark {
  background: rgba(245, 158, 11, 0.35);
  color: var(--mhz-text);
  padding: 0 3px;
  border-radius: 3px;
}
.mhz-search-page .list-group { background: transparent; }
.mhz-search-page .list-group-item { background: transparent; border: 0; padding: 0; }

/* =============== Auth pages (login, register, forgot, reset) =============== */
.auth-wrap {
  min-height: calc(100vh - var(--mhz-topbar-h) - 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(108,92,231,.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 85%, rgba(0,184,148,.12) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: 0 30px 80px rgba(16,24,40,.08);
  position: relative;
  z-index: 1;
}
[data-bs-theme="dark"] .auth-card { box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.auth-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 5px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, var(--mhz-primary), var(--mhz-primary-2), var(--mhz-primary));
  background-size: 200% 100%;
  animation: mhz-hero-shine 6s ease-in-out infinite;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  text-align: center;
}
.auth-brand .auth-logo {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--mhz-primary), var(--mhz-primary-2));
  color: #fff;
  font-size: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 14px 32px rgba(108,92,231,.32);
}
.auth-card h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  color: var(--mhz-text);
}
.auth-card .auth-sub {
  color: var(--mhz-muted);
  font-size: 14.5px;
  margin: 0 0 26px;
  line-height: 1.5;
}
.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--mhz-text);
}
.auth-field-wrap { position: relative; }
.auth-field .field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mhz-muted);
  font-size: 16px;
  pointer-events: none;
}
.auth-field .auth-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: 12px;
  border: 1px solid var(--mhz-border);
  background: var(--mhz-surface-2);
  color: var(--mhz-text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.auth-field .auth-input:focus {
  outline: 0;
  border-color: var(--mhz-primary);
  background: var(--mhz-surface);
  box-shadow: 0 0 0 4px rgba(108,92,231,.14);
}
.auth-field .auth-input::placeholder { color: var(--mhz-muted); opacity: .8; }

.auth-inline-link {
  display: block;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  margin: -6px 0 16px;
  color: var(--mhz-primary);
}
.auth-inline-link:hover { text-decoration: none; opacity: .85; }

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mhz-primary), var(--mhz-primary-2));
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 10px 28px rgba(108,92,231,.32);
  transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
  font-family: inherit;
  text-decoration: none !important;
}
.auth-btn:hover,
.auth-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(108,92,231,.42);
  filter: brightness(1.05);
  color: #fff !important;
  text-decoration: none !important;
}
.auth-btn i { font-size: 16px; }
.auth-btn-secondary {
  background: var(--mhz-surface-2) !important;
  color: var(--mhz-text) !important;
  border: 1px solid var(--mhz-border);
  box-shadow: none;
}
.auth-btn-secondary:hover,
.auth-btn-secondary:focus {
  background: var(--mhz-border) !important;
  color: var(--mhz-text) !important;
  box-shadow: none;
  filter: none;
}

.auth-alert {
  padding: 13px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
}
.auth-alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.auth-alert strong { display: block; margin-bottom: 2px; }
.auth-alert-success { background: rgba(16,185,129,.08); color: #047857; border: 1px solid rgba(16,185,129,.3); }
.auth-alert-danger  { background: rgba(239,68,68,.08);  color: #b91c1c; border: 1px solid rgba(239,68,68,.3); }
.auth-alert-info    { background: rgba(108,92,231,.08); color: var(--mhz-primary); border: 1px solid rgba(108,92,231,.3); }
[data-bs-theme="dark"] .auth-alert-success { color: #6ee7b7; }
[data-bs-theme="dark"] .auth-alert-danger  { color: #fca5a5; }

.auth-divider {
  margin: 22px 0 18px;
  font-size: 12px;
  color: var(--mhz-muted);
  text-align: center;
  position: relative;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background: var(--mhz-border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* Captcha hint line inside auth form */
.auth-captcha {
  margin: 8px 0 0;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(108,92,231,.08), rgba(0,184,148,.06));
  border: 1px dashed rgba(108,92,231,.3);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--mhz-text);
  text-align: center;
  font-weight: 600;
  letter-spacing: .5px;
}
.auth-captcha strong { color: var(--mhz-primary); font-size: 15px; }

/* Let the auth card select element match the other auth-input fields */
.auth-field select.auth-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'><path fill='%236b7280' d='M4 6l4 4 4-4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.auth-footer-link {
  text-align: center;
  font-size: 14px;
  color: var(--mhz-muted);
  margin-top: 18px;
}
.auth-footer-link a {
  font-weight: 700;
  color: var(--mhz-primary);
}
.auth-footer-link a:hover { text-decoration: none; opacity: .85; }

@media (max-width: 575.98px) {
  .auth-card { padding: 32px 24px; border-radius: 18px; }
  .auth-brand .auth-logo { width: 56px; height: 56px; font-size: 26px; }
  .auth-card h1 { font-size: 22px; }
}

/* =============== Sponsored ads =============== */
.mhz-ad {
  display: block;
  position: relative;
  background: linear-gradient(135deg, rgba(108,92,231,.05), rgba(0,184,148,.04) 60%, rgba(255,255,255,0));
  border: 1px solid var(--mhz-border);
  border-radius: 18px;
  padding: 26px 30px 28px;
  margin: 36px 0;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(16,24,40,.05);
  color: inherit;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}
.mhz-ad:hover,
.mhz-ad:focus-visible {
  text-decoration: none !important;
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(108,92,231,.14);
  border-color: rgba(108,92,231,.35);
}
.mhz-ad:focus-visible {
  outline: 3px solid rgba(108,92,231,.4);
  outline-offset: 3px;
}
[data-bs-theme="dark"] .mhz-ad {
  background: linear-gradient(135deg, rgba(108,92,231,.12), rgba(0,184,148,.08) 60%, rgba(0,0,0,0));
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
.mhz-ad::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--mhz-primary), var(--mhz-primary-2));
}
.mhz-ad::after {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(108,92,231,.10) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.mhz-ad > * { position: relative; z-index: 1; }

.mhz-ad-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--mhz-muted);
  background: var(--mhz-surface);
  border: 1px solid var(--mhz-border);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.mhz-ad-label i { color: var(--mhz-primary); font-size: 12px; }

.mhz-ad-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.mhz-ad-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--mhz-primary), var(--mhz-primary-2));
  color: #fff;
  font-size: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(108,92,231,.28);
}
.mhz-ad-image {
  flex-shrink: 0;
  display: block;
  width: 140px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--mhz-border);
}
.mhz-ad-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.mhz-ad-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}
.mhz-ad-title-wrap h4 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--mhz-text) !important;
  letter-spacing: -0.01em;
}
.mhz-ad-title-wrap p {
  margin: 0;
  color: var(--mhz-muted) !important;
  font-size: 14.5px;
  line-height: 1.55;
}

.mhz-ad-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: linear-gradient(135deg, var(--mhz-primary), var(--mhz-primary-2)) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(108,92,231,.32);
  transition: transform .18s ease, box-shadow .25s ease, filter .2s ease;
  border: 0;
}
.mhz-ad:hover .mhz-ad-cta,
.mhz-ad:focus-visible .mhz-ad-cta {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(108,92,231,.42);
  filter: brightness(1.05);
  color: #fff !important;
  text-decoration: none !important;
}
.mhz-ad-cta i {
  font-size: 15px;
  transition: transform .2s ease;
}
.mhz-ad:hover .mhz-ad-cta i { transform: translateX(4px); }
.mhz-ad:hover .mhz-ad-icon {
  transform: rotate(-3deg) scale(1.04);
  transition: transform .25s ease;
}
.mhz-ad-icon { transition: transform .25s ease; }

@media (max-width: 575.98px) {
  .mhz-ad { padding: 22px 20px; margin: 26px 0; border-radius: 14px; }
  .mhz-ad-header { gap: 14px; margin-bottom: 16px; }
  .mhz-ad-icon { width: 52px; height: 52px; font-size: 24px; border-radius: 12px; }
  .mhz-ad-image { width: 100%; height: 160px; }
  .mhz-ad-header { flex-wrap: wrap; }
  .mhz-ad-title-wrap h4 { font-size: 17px; }
  .mhz-ad-title-wrap p { font-size: 13.5px; }
  .mhz-ad-cta { width: 100%; justify-content: center; padding: 12px 20px; }
}

/* =============== Sponsor footer strip =============== */
.mhz-sponsor-strip {
  margin-top: 20px; padding: 14px 20px;
  background: linear-gradient(135deg, rgba(108,92,231,.08), rgba(0,184,148,.06));
  border: 1px solid var(--mhz-border);
  border-radius: 12px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 13px;
}
.mhz-sponsor-strip .mhz-sponsor-label {
  color: var(--mhz-muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.mhz-sponsor-strip .mhz-sponsor-name {
  font-weight: 700; font-size: 15px;
  background: linear-gradient(90deg, var(--mhz-primary), var(--mhz-primary-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.mhz-sponsor-strip .mhz-sponsor-name:hover { text-decoration: underline; }
.mhz-sponsor-strip .mhz-sponsor-tagline { color: var(--mhz-muted); flex: 1 1 240px; }
@media (max-width: 575.98px) {
  .mhz-sponsor-strip { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* Status badges */
.badge-status { font-size: 11px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.badge-draft    { background: #eef0f8; color: #475569; }
.badge-pending  { background: #fff4d6; color: #92690b; }
.badge-published{ background: #d7f5e6; color: #057a4e; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }
[data-bs-theme="dark"] .badge-draft { background: #263049; color: #c6cde8; }
[data-bs-theme="dark"] .badge-pending { background: #3a2f10; color: #ffd966; }
[data-bs-theme="dark"] .badge-published { background: #123024; color: #7ae0b4; }
[data-bs-theme="dark"] .badge-rejected { background: #3a1414; color: #ff9c9c; }
