/* ============================================================
   HireMind — Design tokens & base styles
   Light mode mặc định (dịu, thân thiện) + Dark mode (toggle)
   ============================================================ */

:root {
  /* Light palette — soft, friendly */
  --bg: #f6f7fb;
  --bg-soft: #eef0f7;
  --card: #ffffff;
  --card-hover: #fbfbfe;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --fg: #1e293b;
  --fg-soft: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --primary: #6366f1;
  --primary-2: #7c3aed;
  --primary-soft: rgba(99, 102, 241, 0.1);
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --info: #0284c7;
  --info-soft: rgba(2, 132, 199, 0.1);
  --grad: linear-gradient(135deg, #6366f1 0%, #7c3aed 55%, #a855f7 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.08), rgba(168,85,247,.08));
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 34px rgba(79, 70, 229, 0.1);
  --shadow-strong: 0 16px 44px rgba(79, 70, 229, 0.16);
  --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
  --aurora-opacity: 0.22;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-soft: #131c31;
  --card: #192134;
  --card-hover: #1e2a3f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --fg: #f1f5f9;
  --fg-soft: #cbd5e1;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --primary: #818cf8;
  --primary-soft: rgba(129, 140, 248, 0.14);
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --warn: #f59e0b;
  --danger: #f87171;
  --info: #38bdf8;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 16px 44px rgba(0, 0, 0, 0.45);
  --aurora-opacity: 0.3;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.35s ease, color 0.35s ease;
}

/* ---------- Ambient aurora background (v2: 4 blob + dot-grid) ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before, .aurora::after,
.aurora .blob-3, .aurora .blob-4 {
  content: '';
  position: absolute;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: var(--aurora-opacity);
}
.aurora::before { background: #6366f1; top: -260px; left: -180px; animation: drift 26s ease-in-out infinite alternate; }
.aurora::after { background: #a855f7; top: 20%; right: -240px; animation: drift 32s ease-in-out infinite alternate-reverse; }
.aurora .blob-3 { background: #38bdf8; bottom: -300px; left: 30%; animation: drift 38s ease-in-out infinite alternate; }
.aurora .blob-4 { background: #f472b6; width: 520px; height: 520px; bottom: 18%; right: -180px; animation: drift 30s ease-in-out infinite alternate-reverse; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(110px, 80px) scale(1.22); }
}
/* Lưới chấm mờ tăng chiều sâu — ẩn trên mobile để tiết kiệm paint */
.aurora-dots {
  position: fixed; inset: 0; z-index: -1;
  background-image: radial-gradient(color-mix(in srgb, var(--fg) 14%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
@media (max-width: 700px) { .aurora-dots { display: none; } }

/* ---------- Header (shared) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--fg);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.icon-btn:hover { background: rgba(99, 102, 241, 0.08); border-color: var(--primary); }
.icon-btn:active { transform: scale(0.94); }

/* ---------- Focus ring (a11y) — hiện ngay, không animate ---------- */
:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}
.tab:focus-visible, .icon-btn:focus-visible, .btn:focus-visible {
  outline-offset: 3px;
}

/* ---------- Layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container, .container-narrow { padding: 0 16px; } }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Shimmer màu chạy chậm qua chữ gradient */
.grad-text {
  background-size: 220% auto;
  animation: gradShimmer 7s ease-in-out infinite;
}
@keyframes gradShimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* Viền gradient quay quanh card điểm nhấn (hero kết quả, wizard) */
.grad-border {
  position: relative;
  background-clip: padding-box;
}
.grad-border::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--gb-angle, 0deg), #6366f1, #a855f7, #38bdf8, #f472b6, #6366f1);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  animation: gradBorderSpin 8s linear infinite;
  pointer-events: none;
}
@property --gb-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes gradBorderSpin { to { --gb-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .grad-text, .grad-border::before { animation: none; } }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  user-select: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 20px rgba(99, 102, 241, 0.32); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99, 102, 241, 0.42); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { background: rgba(99, 102, 241, 0.06); border-color: var(--primary); }
.btn-soft { background: var(--primary-soft); color: var(--primary); border-color: rgba(99, 102, 241, 0.25); }
.btn-soft:hover:not(:disabled) { background: rgba(99, 102, 241, 0.16); }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; border-radius: 10px; }

/* ---------- Cards & badges ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover { border-color: rgba(99, 102, 241, 0.4); transform: translateY(-3px); box-shadow: var(--shadow); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-green { background: var(--accent-soft); color: var(--accent); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-indigo { background: var(--primary-soft); color: var(--primary); }
.badge-sky { background: var(--info-soft); color: var(--info); }

/* ---------- Inputs ---------- */
.input, .textarea, .select {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { resize: vertical; min-height: 120px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
}
[data-theme="dark"] .select option { background: #192134; }
.field-label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.field-hint { font-size: 0.82rem; color: var(--muted-2); margin-top: 6px; }

/* ---------- Progress / loading ---------- */
.progress-track { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad); border-radius: 999px; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.progress-fill.indeterminate { width: 40% !important; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-indigo { border-color: rgba(99, 102, 241, 0.25); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.typing-dots { display: inline-flex; gap: 5px; align-items: center; }
.typing-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse-dot 1.2s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse-dot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.85); }
  30% { opacity: 1; transform: scale(1); }
}

/* ---------- Score ring ---------- */
.score-ring { position: relative; display: inline-grid; place-items: center; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .ring-bg { fill: none; stroke: var(--bg-soft); }
.score-ring .ring-val { fill: none; stroke: url(#scoreGrad); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.score-ring .score-num { position: absolute; font-family: var(--font-head); font-weight: 700; text-align: center; line-height: 1.1; }
.score-ring .score-num .num { font-size: 1.9em; }
.score-ring .score-num .den { font-size: 0.72em; color: var(--muted); }

/* ---------- Chat ---------- */
.chat-wrap { display: flex; flex-direction: column; height: 560px; }
.chat-log { flex: 1; overflow-y: auto; padding: 4px 4px 16px; display: flex; flex-direction: column; gap: 14px; }
.chat-msg { display: flex; gap: 10px; max-width: 88%; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 0.8rem;
}
.chat-msg.ai .chat-avatar { background: var(--grad); color: #fff; }
.chat-msg.user .chat-avatar { background: var(--bg-soft); border: 1px solid var(--border-strong); color: var(--muted); }
.chat-bubble { padding: 12px 16px; border-radius: 16px; font-size: 0.95rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.chat-msg.ai .chat-bubble { background: var(--bg-soft); border: 1px solid var(--border); border-top-left-radius: 4px; }
.chat-msg.user .chat-bubble { background: var(--grad); color: #fff; border-top-right-radius: 4px; }
.chat-inputbar { display: flex; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.chat-inputbar .input { flex: 1; }

/* ---------- Tabs (sticky khi cuộn) ---------- */
.tabs {
  position: sticky;
  top: 76px;
  z-index: 40;
  display: flex; gap: 4px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px; border: none;
  background: transparent; color: var(--muted);
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.tab:hover { color: var(--fg); }
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4); }
.tab .tab-badge { font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); }

/* ---------- Shared processing panel (wizard step 3 + session loading) ---------- */
.proc-panel { text-align: center; padding: 26px 0 6px; max-width: 560px; margin: 0 auto; }

.proc-orb { display: grid; place-items: center; margin-bottom: 20px; height: 96px; position: relative; }
.proc-orb::before {
  content: '';
  position: absolute;
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 2px dashed rgba(99, 102, 241, 0.4);
  animation: procSpin 9s linear infinite;
}
.proc-orb::after {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.16) 0%, transparent 70%);
  animation: procPulse 2.4s ease-in-out infinite;
}
.proc-orb-core {
  width: 68px; height: 68px;
  border-radius: 20px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
  animation: procFloat 2.8s ease-in-out infinite;
  z-index: 1;
}
@keyframes procSpin { to { transform: rotate(360deg); } }
@keyframes procPulse { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes procFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.proc-head { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.proc-title { font-size: 1.3rem !important; font-weight: 700; }
.proc-chip {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.proc-chip + .proc-chip { background: var(--bg-soft); color: var(--muted); }

.proc-bar { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-bottom: 24px; }
.proc-bar-fill {
  height: 100%; width: 6%;
  background: var(--grad);
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.proc-bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: procShine 1.6s ease-in-out infinite;
}
@keyframes procShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.proc-stages { text-align: left; display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.proc-stage { display: flex; gap: 14px; opacity: 0.45; transition: opacity 0.3s ease; padding: 8px 0; }
.proc-stage.active, .proc-stage.done { opacity: 1; }
.proc-stage-rail { display: flex; flex-direction: column; align-items: center; }
.proc-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-soft);
  border: 2px solid var(--border-strong);
  color: var(--muted);
  font-weight: 700; font-size: 0.82rem;
  font-family: var(--font-head);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.proc-stage.active .proc-dot {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.15);
  animation: procDotPulse 1.6s ease-in-out infinite;
}
@keyframes procDotPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(99,102,241,0.12); } 50% { box-shadow: 0 0 0 8px rgba(99,102,241,0.06); } }
.proc-stage.done .proc-dot { background: var(--accent); color: #fff; border-color: transparent; }
.proc-stage:not(:last-child) .proc-stage-rail::after {
  content: ''; flex: 1; min-height: 12px; width: 2px;
  background: var(--border-strong); margin-top: 4px; border-radius: 2px;
}
.proc-stage.done:not(:last-child) .proc-stage-rail::after { background: var(--accent); }
.proc-stage-label { font-weight: 600; font-size: 0.95rem; padding-top: 3px; }
.proc-stage.active .proc-stage-label { color: var(--fg); }
.proc-stage-hint { font-size: 0.8rem; color: var(--muted-2); margin-top: 1px; }

.proc-error {
  margin: 18px 0 6px; padding: 16px 20px;
  border-radius: 12px;
  background: var(--danger-soft); color: var(--danger);
  text-align: left; font-size: 0.92rem;
}

.proc-leave { margin-top: 6px; }
.proc-leave-note {
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 0.88rem;
  display: flex; align-items: flex-start; gap: 10px;
  text-align: left;
  margin-bottom: 12px;
}
.proc-linkbox { display: flex; gap: 8px; align-items: center; }
.proc-linkbox .input { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; flex: 1; min-width: 0; }

@media (max-width: 640px) {
  .proc-linkbox { flex-direction: column; align-items: stretch; }
  .proc-head { gap: 8px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .proc-orb::before, .proc-orb::after, .proc-orb-core,
  .proc-stage.active .proc-dot, .proc-bar-fill::after { animation: none; }
}

/* ---------- Lightbox: phóng to ảnh (showcase landing + ảnh chat session) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(8, 11, 22, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  animation: lbIn 0.22s ease forwards;
  cursor: zoom-out;
}
@keyframes lbIn { to { opacity: 1; } }
.lightbox .lb-stage {
  position: relative;
  display: grid; place-items: center;
  max-width: min(1280px, 92vw);
  max-height: 88vh;
}
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  animation: lbZoom 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}
@keyframes lbZoom { from { transform: scale(0.86); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
.lightbox img.lb-zoomed { transform: scale(2.1); cursor: zoom-out; border-radius: 6px; }
.lightbox .lb-close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 2;
}
.lightbox .lb-close:hover { background: rgba(255, 255, 255, 0.22); transform: rotate(90deg); }
.lightbox .lb-nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 2;
}
.lightbox .lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
/* Nav neo theo lightbox (màn hình), không theo stage — ảnh full-width không đẩy nút ra ngoài */
.lightbox > .lb-nav { position: fixed; }
.lightbox > .lb-nav.lb-prev { left: 18px; }
.lightbox > .lb-nav.lb-next { right: 18px; }
@media (max-width: 900px) {
  .lightbox { padding: 56px 56px; }
}
.lightbox .lb-counter {
  position: absolute; top: 26px; left: 26px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}
.lightbox .lb-hint {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  text-align: center;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox img { animation: none; opacity: 1; transform: none; }
  .lightbox img.lb-zoomed { transform: scale(2.1); }
}

/* ---------- Reveal animation (scroll-triggered) ----------
   An toàn no-JS: mặc định HIỆN; chỉ ẩn khi <html> có class .js (theme.js gắn).
   JS fail → nội dung vẫn hiển thị đầy đủ. */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--reveal-delay, 0s); }
html.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Utility ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.hidden { display: none !important; }
.text-center { text-align: center; }

@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
