/* ════════════════════════════════════════════════════════════════
   help.css — Language Lab Gorakhpur · Help & Support Page
   Uses ONLY CSS variables from theme.css. Zero hardcoded colors.
   ════════════════════════════════════════════════════════════════ */

/* ── Local semantic aliases ──────────────────────────────────── */
:root {
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 8px 32px rgba(123, 63, 242, 0.08);
  --radius-card: 18px;
  --radius-sm: 10px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --section-gap: 80px;
}

html.dark {
  --glass-bg: rgba(17, 24, 39, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* ════════════════════ RESET / BASE ═════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-main, var(--bg-secondary));
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ════════════════════ GLOBAL MARK RESET ════════════════════════ */
mark {
  background: rgba(123, 63, 242, 0.16);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 3px;
  font-weight: 600;
  font-style: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background 0.6s ease, color 0.6s ease, font-weight 0.6s ease;
}

html.dark mark {
  background: rgba(159, 107, 255, 0.22);
  color: var(--accent);
}

mark.fading {
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

/* ════════════════════ NAVBAR ════════════════════════════════════ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--bg-primary);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
}

.nav-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-center {
  display: flex;
  gap: 28px;
}

.nav-center a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav-center a:hover {
  color: var(--accent);
  background: rgba(123, 63, 242, 0.07);
}

.nav-center a.active {
  color: var(--accent);
  background: rgba(123, 63, 242, 0.1);
}

.nav-right {
  display: flex;
  align-items: center;
  cursor: pointer;
}

#themeToggle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

#themeToggle:hover {
  color: var(--accent);
  background: rgba(123, 63, 242, 0.07);
}

/* ════════════════════ HERO ═════════════════════════════════════ */
.help-hero {
  position: relative;
  overflow: visible;
  padding: 90px 24px 100px;
  text-align: center;
  background: var(--bg-primary);
}

.hero-bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.25;
}

html.dark .orb {
  opacity: 0.18;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -180px;
  left: -120px;
  animation: orbFloat 12s ease-in-out infinite;
}

.orb-2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #0ea5e9, transparent 70%);
  top: -60px;
  right: -80px;
  animation: orbFloat 16s ease-in-out infinite reverse;
}

.orb-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #f59e0b, transparent 70%);
  bottom: -100px;
  left: 50%;
  animation: orbFloat 10s ease-in-out infinite 3s;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: rgba(123, 63, 242, 0.1);
  border: 1px solid rgba(123, 63, 242, 0.2);
  padding: 6px 16px;
  border-radius: 50px;
  animation: fadeSlideDown 0.7s ease both;
}

html.dark .hero-tag {
  background: rgba(159, 107, 255, 0.12);
  border-color: rgba(159, 107, 255, 0.25);
}

.hero-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  animation: fadeSlideDown 0.7s 0.1s ease both;
}

.hero-heading em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  animation: fadeSlideDown 0.7s 0.18s ease both;
}

/* ════════════════════ SEARCH WRAPPER ═══════════════════════════ */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeSlideDown 0.7s 0.26s ease both;
  z-index: 10;
}

/* ════════════════════ SEARCH BOX ════════════════════════════════ */
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color, rgba(0, 0, 0, 0.1));
  border-radius: 50px;
  padding: 14px 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box > .fa-magnifying-glass {
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.search-box input::placeholder {
  color: var(--text-secondary);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(123, 63, 242, 0.12), 0 4px 24px rgba(123, 63, 242, 0.18);
}

/* ── Clear button ────────────────────────────────────────────── */
.clear-btn {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.clear-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.clear-btn:hover {
  color: #fff;
  background: var(--accent);
  opacity: 1;
  transform: scale(1.1);
}

/* ════════════════════ SEARCH RESULTS DROPDOWN ══════════════════ */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22), 0 4px 14px rgba(0, 0, 0, 0.1);
  z-index: 500;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  transform-origin: top center;
  animation: fadeScale 0.2s ease both;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  isolation: isolate;
}

.search-results::-webkit-scrollbar {
  width: 4px;
}

.search-results::-webkit-scrollbar-track {
  background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
  background: rgba(123, 63, 242, 0.3);
  border-radius: 4px;
}

.search-results.active {
  display: block;
}

/* ── Individual result item ─────────────────────────────────── */
.search-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
  cursor: pointer;
  transition: background var(--transition);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: rgba(123, 63, 242, 0.07);
}

.search-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.search-item-icon.type-cat {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.search-item-icon.type-guide {
  background: rgba(123, 63, 242, 0.12);
  color: var(--accent);
}

.search-item-icon.type-faq {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.search-item-body {
  flex: 1;
  min-width: 0;
}

.search-item-type {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.search-item-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
}

/* ── Highlighted match ──────────────────────────────────────── */
.search-item-title mark,
.highlight {
  background: rgba(123, 63, 242, 0.15);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}

/* ── No results state ───────────────────────────────────────── */
.search-no-results {
  padding: 28px 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.search-no-results i {
  font-size: 1.4rem;
  opacity: 0.5;
}

/* ════════════════════ POPULAR TAGS ═════════════════════════════ */
.popular-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeSlideDown 0.7s 0.34s ease both;
  max-height: 100px;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.3s ease, margin-top 0.3s ease;
}

.popular-tags.hidden {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  margin-top: -20px;
}

.quick-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.quick-chip {
  background: var(--card-bg);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
}

.quick-chip:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(123, 63, 242, 0.3);
}

/* ════════════════════ SECTIONS COMMON ══════════════════════════ */
.categories-section,
.problem-solver,
.cta-banner {
  padding: var(--section-gap) 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ════════════════════ CATEGORY CARDS ══════════════════════════ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.cat-card--open {
  grid-column: 1 / -1;
}

.cat-card:nth-child(1) { --cat-color: #7b3ff2; }
.cat-card:nth-child(2) { --cat-color: #0ea5e9; }
.cat-card:nth-child(3) { --cat-color: #f59e0b; }
.cat-card:nth-child(4) { --cat-color: #10b981; }
.cat-card:nth-child(5) { --cat-color: #ef4444; }
.cat-card:nth-child(6) { --cat-color: #8b5cf6; }

.cat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.07));
  border-radius: var(--radius-card);
  padding: 28px 24px;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat-color) 6%, transparent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: var(--radius-card);
  pointer-events: none;
}

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--cat-color);
}

.cat-card--open:hover {
  transform: none;
}

.cat-card:hover::before {
  opacity: 1;
}

/* ════════════════════ INLINE EXPAND PANEL ═══════════════════════ */
.cat-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              margin-top 0.35s ease;
  opacity: 0;
  margin-top: 0;
  border-top: none;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.cat-card--open .cat-expand {
  max-height: 9999px;
  opacity: 1;
  margin-top: 20px;
  border-top: 1px solid var(--border-color, rgba(0,0,0,0.08));
  padding-top: 20px;
}

.cat-expand-inner {
  max-width: 960px;
  min-width: 0;
  width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

.cat-card.active {
  border-color: var(--cat-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-color) 20%, transparent), 0 12px 32px rgba(0, 0, 0, 0.1);
}

.cat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--cat-color) 14%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cat-color);
  font-size: 1.2rem;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.cat-card:hover .cat-icon-wrap {
  transform: scale(1.1) rotate(-4deg);
}

.cat-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cat-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cat-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(123, 63, 242, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.75rem;
  align-self: flex-end;
  transition: transform var(--transition), background var(--transition);
}

.cat-card:hover .cat-arrow {
  transform: translateX(3px);
  background: var(--cat-color);
  color: #fff;
}

/* ════════════════════ DYNAMIC CONTENT ══════════════════════════ */
.container {
  display: none;
}

/* Rotate arrow when card is open */
.cat-card--open .cat-arrow {
  transform: rotate(90deg);
  background: var(--cat-color);
  color: #fff;
}

/* ════════════════════ TITLE HIGHLIGHT ══════════════════════════ */
.guide-title.title-highlight,
.faq-question.title-highlight {
  background: rgba(123, 63, 242, 0.14) !important;
  outline: 2px solid rgba(123, 63, 242, 0.28);
  outline-offset: 3px;
  border-radius: 8px;
  transition: background 0.9s ease, outline-color 0.9s ease !important;
}

html.dark .guide-title.title-highlight,
html.dark .faq-question.title-highlight {
  background: rgba(159, 107, 255, 0.18) !important;
  outline-color: rgba(159, 107, 255, 0.36);
}

.guide-title.title-highlight-fading,
.faq-question.title-highlight-fading {
  background: transparent !important;
  outline-color: transparent !important;
}

#supportContent:empty {
  display: none;
}

.content-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
}

.content-section-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.content-section-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
}

.content-back-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.content-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Guides ─────────────────────────────────────────────────── */
.guides-block {
  margin-bottom: 44px;
}

.block-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(123, 63, 242, 0.3), transparent);
}

.guide-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.07));
  border-radius: var(--radius-card);
  padding: 24px 26px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  animation: fadeSlideUp 0.4s ease both;
  transition: box-shadow var(--transition);
}

.guide-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

.guide-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(123, 63, 242, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.guide-steps {
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-steps li {
  display: block;
  position: relative;
  padding: 10px 14px 10px 48px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  counter-increment: step-counter;
  border-radius: 10px;
  background: var(--bg-secondary, rgba(0, 0, 0, 0.02));
  transition: background var(--transition);
  word-break: normal;
  overflow-wrap: break-word;
}

.guide-steps li:hover {
  background: rgba(123, 63, 242, 0.06);
  color: var(--text-primary);
}

.guide-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 14px;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── FAQ Accordion ──────────────────────────────────────────── */

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.07));
  border-radius: var(--radius-card);
  margin-bottom: 10px;
  overflow: hidden;
  animation: fadeSlideUp 0.4s ease both;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  transition: box-shadow var(--transition);
}

.faq-item.open {
  box-shadow: 0 6px 24px rgba(123, 63, 242, 0.12);
  border-color: rgba(123, 63, 242, 0.3);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--transition);
}

.faq-question:hover {
  background: rgba(123, 63, 242, 0.04);
}

.faq-item.open .faq-question {
  color: var(--accent);
}

.faq-q-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(123, 63, 242, 0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}

.faq-item.open .faq-q-icon {
  background: var(--accent);
  color: #fff;
  transform: rotate(180deg);
}

.faq-answer-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer-wrap {
  max-height: 500px;
}

.faq-answer {
  padding: 16px 22px 20px 22px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
}

.faq-answer mark {
  background: rgba(123, 63, 242, 0.12);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 600;
}

/* ════════════════════ PROBLEM SOLVER ═══════════════════════════ */
.problem-solver {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
}

.solver-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.solver-header {
  text-align: center;
  margin-bottom: 36px;
}

.solver-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.solver-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.solver-header p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.solver-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.solver-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color, rgba(0, 0, 0, 0.1));
  color: var(--text-secondary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.solver-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(123, 63, 242, 0.05);
}

.solver-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(123, 63, 242, 0.3);
}

.solver-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  align-items: start;
}

.solver-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.07));
  border-radius: var(--radius-card);
  padding: 20px 22px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: fadeSlideUp 0.35s ease both;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  align-self: start;
  width: 100%;
  box-sizing: border-box;
}

.solver-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.solver-card-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
  display: inline-flex;
  margin-bottom: 10px;
}

.tag-login {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.tag-payment {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.tag-course {
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
}

.tag-tech {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.solver-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.solver-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.solver-card-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.solver-card-footer i {
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.solver-card--open .solver-card-footer i {
  transform: rotate(180deg);
}

/* ── Solver inline expand panel ──────────────────────────────── */
.solver-expand {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.32s ease,
              margin-top 0.32s ease,
              padding-top 0.32s ease;
  padding-top: 0;
  border-top: none;
}

.solver-card--open .solver-expand {
  max-height: 800px;
  opacity: 1;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
}

.solver-card--open {
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(123, 63, 242, 0.14);
  grid-column: 1 / -1;
}

/* ── Solver step list ────────────────────────────────────────── */
.solver-steps {
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.solver-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.65;
  counter-increment: step-counter;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--bg-secondary, rgba(0, 0, 0, 0.02));
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.solver-steps li::before {
  content: counter(step-counter);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.solver-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ════════════════════ CTA BANNER ═══════════════════════════════ */
.cta-banner {
  background: var(--bg-secondary);
}

.cta-inner {
  max-width: 860px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 24px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: 0 20px 60px rgba(123, 63, 242, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.cta-inner::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.cta-text {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #fff;
  position: relative;
  z-index: 1;
}

.cta-icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.cta-text h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cta-text p {
  font-size: 0.88rem;
  opacity: 0.85;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* ════════════════════ FOOTER ═══════════════════════════════════ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

html.dark .footer {
  background: #0b1220;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-top strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-top p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ════════════════════ ANIMATIONS ═══════════════════════════════ */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.97) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.fade-section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.guide-card:nth-child(1) { animation-delay: 0.05s; }
.guide-card:nth-child(2) { animation-delay: 0.1s; }
.guide-card:nth-child(3) { animation-delay: 0.15s; }

.faq-item:nth-child(1) { animation-delay: 0.08s; }
.faq-item:nth-child(2) { animation-delay: 0.14s; }
.faq-item:nth-child(3) { animation-delay: 0.2s; }
.faq-item:nth-child(4) { animation-delay: 0.26s; }
.faq-item:nth-child(5) { animation-delay: 0.32s; }

/* ════════════════════ RESPONSIVE ════════════════════════════════ */

/* ── Tablet ─────────────────────────────────────────────────── */
@media (max-width: 960px) and (min-width: 601px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .cat-card--open {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
  }

  .cat-card--open .cat-icon-wrap,
  .cat-card--open h3,
  .cat-card--open p,
  .cat-card--open .cat-arrow {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .cat-expand-inner {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .guide-card {
    padding: 20px 18px;
  }

  .faq-question {
    padding: 16px 18px;
    font-size: 0.875rem;
  }
}

/* ── Tablet (legacy ≤768) ────────────────────────────────────── */
@media (max-width: 768px) {
  .topbar {
    padding: 12px 16px;
  }

  .nav-center {
    display: none;
  }

  .help-hero {
    padding: 56px 16px 72px;
  }

  .hero-heading {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .search-box {
    padding: 13px 18px;
  }

  .popular-tags {
    gap: 7px;
  }

  .quick-chip {
    font-size: 0.78rem;
    padding: 5px 12px;
  }

  /* Categories */
  .categories-section {
    padding: 48px 16px;
  }

  .categories-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .cat-card {
    padding: 20px 16px;
  }

  .cat-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    border-radius: 11px;
  }

  /* Dynamic content */
  .container {
    padding: 0 16px 48px;
  }

  .content-section-head {
    flex-wrap: wrap;
  }

  .content-back-btn {
    margin-left: 0;
  }

  .guide-card {
    padding: 18px 16px;
  }

  .guide-steps li {
    font-size: 0.84rem;
    padding-left: 46px;
  }

  .faq-question {
    font-size: 0.85rem;
    padding: 16px 16px;
  }

  /* Problem solver & CTA */
  .problem-solver,
  .cta-banner {
    padding: 48px 16px;
  }

  .solver-chips {
    gap: 8px;
  }

  .solver-chip {
    padding: 9px 16px;
    font-size: 0.82rem;
  }

  .solver-results {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .cta-text {
    flex-direction: column;
    text-align: center;
  }

  /* Footer */
  .footer {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* ── Mobile (≤600px) ────────────────────────────────────────── */
@media (max-width: 600px) {
  .categories-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cat-card--open {
    flex-direction: column;
    align-items: stretch;
    grid-column: 1 / -1;
  }

  .cat-expand-inner {
    max-width: 100%;
  }

  .guide-card {
    padding: 18px 14px;
  }

  .guide-steps li {
    font-size: 0.83rem;
  }

  .faq-question {
    font-size: 0.83rem;
    padding: 14px 14px;
  }

  .faq-answer {
    font-size: 0.82rem;
    padding: 14px 14px 16px;
  }

  .solver-results {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .solver-steps li {
    font-size: 0.81rem;
    padding: 8px 10px;
  }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .help-hero {
    padding: 48px 12px 64px;
  }

  .hero-tag {
    font-size: 0.68rem;
    padding: 5px 13px;
  }

  .hero-heading {
    font-size: 1.75rem;
  }

  .hero-sub {
    font-size: 0.88rem;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .search-box {
    padding: 12px 14px;
    gap: 10px;
  }

  .search-box input {
    font-size: 0.88rem;
  }

  /* Dropdown full-width on mobile */
  .search-results {
    border-radius: 12px;
    max-height: 300px;
  }

  .search-item {
    padding: 12px 14px;
    gap: 10px;
  }

  .search-item-icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .search-item-title {
    font-size: 0.82rem;
  }

  .popular-tags {
    gap: 6px;
    justify-content: flex-start;
    padding: 0 2px;
  }

  .quick-chip {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  /* Categories single column */
  .categories-section {
    padding: 36px 12px;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cat-card {
    padding: 18px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }

  /* Expanded card: keep icon + h3 + arrow in one row, expand panel wraps below */
  .cat-card--open {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    grid-column: 1 / -1;
  }

  .cat-card--open .cat-icon-wrap {
    flex-shrink: 0;
    align-self: center;
  }

  .cat-card--open h3 {
    flex: 1;
    min-width: 0;
    align-self: center;
  }

  /* Keep p hidden on mobile even when open */
  .cat-card--open p,
  .cat-card p {
    display: none;
  }

  .cat-card--open .cat-arrow {
    flex-shrink: 0;
    align-self: center;
    margin-left: 0;
  }

  /* Expand panel must span the full row width */
  .cat-card--open .cat-expand {
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .cat-expand-inner {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .cat-arrow {
    align-self: center;
    margin-left: auto;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .cat-card h3 {
    flex: 1 1 0%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
  }

  /* Dynamic content */
  .container {
    padding: 0 12px 40px;
  }

  .content-section-head {
    gap: 10px;
  }

  .content-section-head h2 {
    font-size: 1.2rem;
  }

  .guide-card {
    padding: 16px 14px;
    border-radius: 14px;
  }

  .guide-steps li {
    font-size: 0.82rem;
    padding: 9px 12px 9px 42px;
  }

  .guide-steps li::before {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
    left: 12px;
    top: 9px;
  }

  .faq-question {
    font-size: 0.83rem;
    padding: 14px 14px;
  }

  .faq-answer {
    font-size: 0.82rem;
    padding: 14px 14px 16px;
  }

  /* Problem solver */
  .solver-inner {
    padding: 0;
  }

  .solver-chips {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .solver-chips::-webkit-scrollbar {
    display: none;
  }

  .solver-chip {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .solver-card {
    padding: 16px 18px;
  }

  .solver-steps li {
    font-size: 0.8rem;
    padding: 8px 10px;
    gap: 9px;
  }

  .solver-steps li::before {
    width: 18px;
    height: 18px;
    font-size: 0.62rem;
  }

  /* CTA */
  .cta-inner {
    padding: 28px 20px;
    gap: 20px;
  }

  .cta-text h2 {
    font-size: 1.15rem;
  }

  .cta-btn {
    width: 100%;
    justify-content: center;
    padding: 13px 24px;
  }
}

/* ── Small mobile (≤360px) ──────────────────────────────────── */
@media (max-width: 360px) {
  .help-hero {
    padding: 40px 10px 56px;
  }

  .hero-heading {
    font-size: 1.55rem;
  }

  .search-box {
    padding: 11px 12px;
  }

  .topbar {
    padding: 10px 12px;
  }

  .logo-text {
    font-size: 0.88rem;
  }
}

/* ════════════════════ SHOOTING STARS BACKGROUND ════════════════
   Spawn positions are set entirely in JS (spawnStar).
   This block owns ONLY:
     • the fixed overlay layer  (.stars-bg)
     • the star shape + physics (.star, .star::before)
     • the keyframe animation   (@keyframes shootingStar)
   ══════════════════════════════════════════════════════════════ */
.stars-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

/* Base star shape — NO top/right here; JS sets those per-star */
.star {
  position: absolute;
  width: 80px;          /* JS overrides per-star width */
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translate(0, 0) rotate(-45deg);
  transform-origin: center center;
  /* gradient overridden per-star by JS with individual tint color */
  background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  opacity: 0;
  animation: shootingStar linear infinite;
}

/* Bright head at the leading (left) tip */
.star::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.9);
}

/* Direction: top-right → bottom-left at 45°.  DO NOT CHANGE. */
@keyframes shootingStar {
  0%   { transform: translate(0, 0) rotate(-45deg);           opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate(-120vw, 120vh) rotate(-45deg);  opacity: 0; }
}

/* ── Large desktop ──────────────────────────────────────────── */
@media (min-width: 1280px) {
  .categories-section {
    padding: var(--section-gap) 64px;
  }

  .container {
    padding: 0 64px var(--section-gap);
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}