/* ===================================================
   ACESMIND — ENGAGEMENT ENHANCEMENTS CSS
   =================================================== */

/* ── 1. PARTICLE CANVAS ───────────────────────────── */
#particle-canvas {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}

/* ── 2. AGENT WIDGET ──────────────────────────────── */
#agent-widget {
  position: fixed; bottom: 90px; right: 24px; z-index: 990;
  background: rgba(18,18,31,0.95); backdrop-filter: blur(12px);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 12px; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
#agent-widget.visible {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.aw-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10B981; flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(16,185,129,0.5);
}
.aw-text {
  font-size: 0.72rem; color: var(--text-mid); line-height: 1.4;
}
.aw-count {
  font-weight: 700; color: var(--text);
}

/* ── 5. SOCIAL PROOF TOAST ────────────────────────── */
#social-proof-toast {
  position: fixed; bottom: 24px; left: 24px; z-index: 990;
  background: rgba(18,18,31,0.95); backdrop-filter: blur(12px);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 10px; padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateX(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  max-width: 340px;
}
#social-proof-toast.visible {
  opacity: 1; transform: translateX(0); pointer-events: auto;
}
.spt-icon { font-size: 1.1rem; flex-shrink: 0; }
.spt-text { font-size: 0.78rem; color: var(--text-mid); line-height: 1.5; }
.spt-text strong { color: var(--text); }

/* ── 6. COMPARISON TABLE ──────────────────────────── */
.compare-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border);
}
.compare-table th, .compare-table td {
  padding: 14px 18px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-mid);
}
.compare-table th {
  background: var(--surface2); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-low);
}
.compare-table th:first-child { color: var(--text); }
.compare-table td:first-child { font-weight: 600; color: var(--text); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td { background: var(--surface); }
.compare-highlight {
  background: rgba(168,85,247,0.06) !important;
  border-left: 2px solid var(--purple);
}
.compare-check { color: #10B981; font-weight: 700; }
.compare-x { color: rgba(239,68,68,0.6); }
.compare-mid { color: var(--text-low); }

/* ── 7. BEFORE/AFTER SLIDER ───────────────────────── */
.ba-slider {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--border); user-select: none;
  display: grid; grid-template-columns: 1fr 1fr;
}
@media(max-width:700px) { .ba-slider { grid-template-columns: 1fr; } }
.ba-before, .ba-after {
  padding: 2rem; min-height: 280px;
  display: flex; flex-direction: column; justify-content: center;
}
.ba-before { background: rgba(239,68,68,0.04); border-right: 1px solid var(--border); }
@media(max-width:700px) { .ba-before { border-right: none; border-bottom: 1px solid var(--border); } }
.ba-after { background: rgba(16,185,129,0.04); }
.ba-handle { display: none; }
.ba-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.ba-label-before { color: rgba(239,68,68,0.7); }
.ba-label-after { color: #34D399; }
.ba-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; color: var(--text-mid); padding: 6px 0;
}

/* ── 8. RESULTS TICKER ────────────────────────────── */
.results-ticker {
  overflow: hidden; padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.results-ticker-inner {
  display: flex; gap: 3rem; white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
}
.ticker-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-mid); flex-shrink: 0;
}
.ticker-val { font-weight: 800; color: var(--text); }
.ticker-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--purple); opacity: 0.5;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── 9. AI QUIZ ───────────────────────────────────── */
.quiz-container {
  background: var(--surface); border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--r-xl); padding: 2.5rem;
  position: relative; overflow: hidden;
}
.quiz-container::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(236,72,153,0.03));
  pointer-events: none;
}
.quiz-progress {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 0.75rem;
  position: relative;
}
.quiz-question {
  font-size: 1.2rem; font-weight: 700; color: var(--text);
  margin-bottom: 1.5rem; line-height: 1.35; position: relative;
}
.quiz-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  position: relative;
}
@media(max-width:600px) { .quiz-options { grid-template-columns: 1fr; } }
.quiz-opt {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r); padding: 14px 18px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.88rem; font-weight: 400; color: var(--text-mid);
  cursor: pointer; text-align: left;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}
.quiz-opt:hover {
  border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.08);
  color: var(--text); transform: translateY(-2px);
}
.quiz-result { display: none; position: relative; }
.quiz-result-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 0.5rem;
}
.quiz-result-title {
  font-size: 1.5rem; font-weight: 800; color: var(--text);
  margin-bottom: 0.5rem;
}
.quiz-result-desc {
  font-size: 0.92rem; color: var(--text-mid); line-height: 1.75;
  font-weight: 300;
}

/* ── 10. FLOATING CTA ─────────────────────────────── */
#floating-cta {
  position: fixed; bottom: 24px; right: 24px; z-index: 991;
  opacity: 0; transform: translateY(20px) scale(0.9);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}
#floating-cta.visible {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: auto;
}
.floating-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 50px;
  background: var(--grad); border: none;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.82rem; font-weight: 600; color: #fff;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 32px rgba(168,85,247,0.4), 0 0 0 4px rgba(168,85,247,0.1);
  transition: transform 0.15s, box-shadow 0.2s;
  animation: floatPulse 3s ease-in-out infinite;
}
.floating-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(168,85,247,0.55), 0 0 0 6px rgba(168,85,247,0.15);
}
@keyframes floatPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(168,85,247,0.4), 0 0 0 4px rgba(168,85,247,0.1); }
  50% { box-shadow: 0 8px 32px rgba(168,85,247,0.5), 0 0 0 8px rgba(168,85,247,0.06); }
}

/* ── REDUCED MOTION ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .results-ticker-inner { animation: none !important; }
  #agent-widget, #social-proof-toast, #floating-cta { transition: none !important; }
  .floating-btn { animation: none !important; }
  @keyframes tickerScroll { from, to { transform: none; } }
}

/* ── MOBILE ADJUSTMENTS ───────────────────────────── */
@media(max-width:900px) {
  #agent-widget { bottom: 80px; right: 12px; }
  #social-proof-toast { left: 12px; right: 12px; max-width: none; bottom: 12px; }
  #floating-cta { bottom: 16px; right: 16px; }
  .floating-btn { padding: 12px 20px; font-size: 0.78rem; }
}
