/* ═══════════════════════════════════════════════════════════════════
 *  ViViDly Chatbot — Obsidian-Gold Dark Theme
 *  ─────────────────────────────────────────────────────────────────
 *  Matches vividappstudio.in design system exactly.
 *  All colors use CSS custom properties — never hardcoded hex.
 * ═══════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ──────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@300;400;500&display=swap");

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
  --ob-bg: #0B0B0F;
  --ob-surface: #16161D;
  --ob-text: #EDE9FE;
  --ob-muted: rgba(237, 233, 254, 0.62);
  --ob-stroke: rgba(255, 255, 255, 0.10);
  --ob-violet: #8B5CF6;
  --ob-orange: #F97316;
  --ob-gold: #D4AF37;
  --cta-gradient: linear-gradient(135deg, #8B5CF6, #F97316);
  --glass-bg: rgba(22, 22, 29, 0.82);
  --glass-blur: blur(16px);
  --text-gradient: linear-gradient(135deg, #a78bfa, #c084fc, #F97316, #D4AF37);
  --glow-violet: 0 0 24px rgba(139, 92, 246, 0.45);
  --glow-gold: 0 0 20px rgba(212, 175, 55, 0.35);
  --glow-orange: 0 0 20px rgba(249, 115, 22, 0.35);
  --text-gradient-animated: linear-gradient(120deg, #8B5CF6, #F97316, #D4AF37, #8B5CF6);
}

@keyframes color-loop {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes avatar-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes blink-cursor {

  from,
  to {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.vv-loop-text {
  background: var(--text-gradient-animated);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  animation: color-loop 5s linear infinite;
}

.vv-tooltip-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--ob-violet);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink-cursor 1s step-end infinite;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--ob-bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.08) 0%, transparent 40%);
  color: var(--ob-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
 *  DEMO PAGE / LANDING STYLES
 * ═══════════════════════════════════════════════════════════════════ */
.demo-page-container {
  width: 100vw;
  max-width: 1000px;
  margin: 0 auto;
  padding: 16vh 2vw 0 2vw; /* Standardized to 2vw side margins */
  /* Dynamic top padding (20vh) and responsive side margins (2vw) for perfect mobile fit */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  justify-content: flex-start;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ob-stroke);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--ob-muted);
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.demo-dot {
  width: 8px;
  height: 8px;
  background: var(--ob-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--ob-gold);
  animation: badge-pulse 2s infinite;
}

.demo-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(40px, 8vw, 84px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: clamp(12px, 3vh, 24px);
  letter-spacing: -0.02em;
}

.demo-highlight {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ob-muted);
  max-width: 600px;
  margin-bottom: 24px;
  /* Reduced to make space for cards */
  line-height: 1.6;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.feature-card {
  background: var(--ob-surface);
  border: 1px solid var(--ob-stroke);
  padding: 30px;
  border-radius: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--ob-violet);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cta-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.feature-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.feature-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--ob-text);
}

.feature-desc {
  font-size: 15px;
  color: var(--ob-muted);
  line-height: 1.5;
}

.demo-click-hint {
  position: relative;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: var(--ob-gold);
  font-size: 18px;
  margin-top: 20px;
  z-index: 10;
}

.demo-arrow-svg-wrapper {
  position: absolute;
  top: 20px;
  right: -360px;
  /* Shifted from -280px to move it 80px further right, total shift from original is 180px */
  opacity: 0.6;
  pointer-events: none;
}

.demo-footer-card {
  margin-top: 100px;
  background: var(--ob-surface);
  border: 1px solid var(--ob-stroke);
  padding: 40px;
  border-radius: 28px;
  max-width: 800px;
  /* Increased from 500px */
  width: 100%;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.demo-footer-card:hover {
  transform: translateY(-5px);
  border-color: var(--ob-violet);
}

.demo-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 16px;
  background: var(--text-gradient-animated);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: color-loop 5s linear infinite;
}

.demo-card-desc {
  font-size: 18px;
  /* Increased from 14px */
  color: var(--ob-muted);
  line-height: 1.6;
}

.demo-card-desc a {
  color: var(--ob-violet);
  text-decoration: none;
  font-weight: 600;
}

/* ── Demo Buttons ── */
.demo-btn-primary,
.demo-btn-secondary {
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.demo-btn-primary {
  position: relative;
  border: 2px solid transparent;
  background-image:
    linear-gradient(rgba(22, 22, 29, 0.92), rgba(22, 22, 29, 0.92)),
    linear-gradient(90deg, #06B6D4, #10B981, #D4AF37, #a78bfa, #06B6D4);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 300% 300%;
  animation: color-loop 5s linear infinite;
  color: #ede9fe;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
  backdrop-filter: blur(8px);
}

.demo-btn-primary:hover {
  box-shadow:
    0 0 22px rgba(6, 182, 212, 0.35),
    0 0 22px rgba(16, 185, 129, 0.25);
  color: #D4AF37 !important;
  transform: translateY(-3px) scale(1.02);
}

.demo-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ob-text);
  border: 1px solid var(--ob-stroke);
  backdrop-filter: blur(8px);
  margin-bottom: 20px;
  /* Space above hint */
}

.demo-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--ob-violet);
  transform: translateY(-3px) scale(1.02);
}

.demo-bottom-text {
  margin-top: 80px;
  padding: 0 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.8;
  max-width: 800px;
  text-align: center;
}

.demo-bottom-text strong a:hover {
  color: var(--ob-gold) !important;
}

@media (max-width: 768px) {
  .demo-arrow-svg-wrapper {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════
 *  TRIGGER BUTTON & TOOLTIP
 * ═══════════════════════════════════════════════════════════════════ */
.vv-trigger-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.vv-trigger-container.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
}

.vv-trigger-tooltip {
  background: rgba(13, 12, 20, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--ob-text);
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 14px 18px;
  border-radius: 18px;
  position: relative;
  white-space: nowrap;
  animation: tool-tip-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 1.5s;
  opacity: 0;
  border: 1px solid var(--ob-stroke);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), var(--glow-violet);
  transform: translateX(10px);
  cursor: default;
}

.vv-tooltip-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
}

.vv-tooltip-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ob-violet);
  box-shadow: var(--glow-violet);
}

.vv-tooltip-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 18px;
  background: var(--text-gradient-animated);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: color-loop 5s linear infinite;
}

.vv-tooltip-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ob-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
}

.vv-tooltip-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

.vv-tooltip-msg {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 12px;
}

.vv-tooltip-sub {
  font-size: 14px;
  font-style: italic;
  color: var(--ob-muted);
  margin-top: 4px;
}

.vv-tooltip-footer {
  font-size: 18px;
  font-weight: 400;
  color: var(--ob-text);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

/* ── Tooltip Close Button ─── */
.vv-tooltip-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(237, 233, 254, 0.6);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  z-index: 1;
}

.vv-tooltip-close:hover {
  background: rgba(139, 92, 246, 0.2);
  color: var(--ob-text);
  border-color: rgba(139, 92, 246, 0.4);
}

.vv-tooltip-tail {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(13, 12, 20, 0.92);
  border-top: 1px solid rgba(139, 92, 246, 0.3);
  border-right: 1px solid rgba(139, 92, 246, 0.3);
}

/* ── Full-Page Toggle Button in Tooltip ─── */
.fullpage-toggle-btn {
  display: block;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s ease;
}

.fullpage-toggle-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: conic-gradient(from 0deg, #8B5CF6, #F97316, #D4AF37, #ec4899, #8B5CF6);
  animation: orbit-spin 2.5s linear infinite;
  z-index: -1;
}

.fullpage-toggle-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(13, 12, 20, 0.9);
  z-index: -1;
}

.fullpage-toggle-btn:hover {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

/* ── Orbiting Dot on Button Border ── */
.orbit-rect-wrapper {
  position: relative;
  display: inline-block;
  padding: 3px;
  border-radius: 17px;
  /* btn 14px + 3px padding */
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  /* faint track bg */
}

.orbit-rect-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 300%;
  background: conic-gradient(from 0deg,
      transparent 0 300deg,
      rgba(255, 255, 255, 0.15) 330deg,
      rgba(255, 255, 255, 0.6) 345deg,
      rgba(255, 255, 255, 1) 355deg,
      rgba(255, 255, 255, 1) 360deg);
  z-index: 0;
  animation: btn-orbit-spin 3s linear infinite;
}

/* KEY FIX: translate AND rotate TOGETHER — separate from avatar orbit-spin */
@keyframes btn-orbit-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Nav specific orbit button to keep it clean */
.orbit-rect-wrapper.nav-orbit-btn {
  padding: 2px;
  border-radius: 12px;
}

.orbit-rect-wrapper.nav-orbit-btn::before {
  width: 150%;
  height: 350%;
}

.orbit-rect-wrapper.nav-orbit-btn .demo-btn-primary {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}

.orbit-rect-wrapper .demo-btn-primary {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 !important;
}

#vividly-trigger {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: avatar-float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.45));
  transition: filter 0.3s ease, transform 0.2s ease;
}

#vividly-trigger:hover {
  filter: drop-shadow(0 0 28px rgba(139, 92, 246, 0.7));
  transform: scale(1.05);
}

.vv-trigger-orbit {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
      #ffffff 0deg, #ffffff 5deg,
      #8B5CF6 15deg, #F97316 90deg, #D4AF37 180deg, #ec4899 270deg, #8B5CF6 360deg);
  animation: orbit-spin 2.5s linear infinite;
  z-index: 0;
  padding: 2.5px;
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), black calc(100% - 3px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), black calc(100% - 3px));
}

.vv-trigger-avatar-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ob-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  border: 2px solid rgba(139, 92, 246, 0.3);
}

.vv-trigger-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.vv-trigger-avatar-fallback {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 24px;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.trigger-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--ob-bg);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
  animation: badge-pulse 2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════
 *  CHAT WINDOW
 * ═══════════════════════════════════════════════════════════════════ */
#vividly-window {
  position: fixed;
  bottom: 98px;
  right: 28px;
  width: 480px;
  /* Increased from 400px */
  max-height: calc(100vh - 150px);
  height: 800px;
  /* Increased base height */
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--ob-stroke);
  border-radius: 32px; /* Increased roundness for premium look */
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    var(--glow-violet);
  z-index: 9999;

  /* Default hidden state — origin at bottom, slides up naturally */
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#vividly-window.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* Top accent line */
#vividly-window::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cta-gradient);
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════
 *  HEADER
 * ═══════════════════════════════════════════════════════════════════ */
.vv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: rgba(22, 22, 29, 0.6);
  border-bottom: 1px solid var(--ob-stroke);
  position: relative;
  z-index: 2;
}

.vv-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Avatar Ring ───────────────────────────────────────────────── */
.vv-avatar-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px;
  overflow: hidden;
}

.vv-avatar-ring::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg,
      #ffffff 0deg, #ffffff 5deg,
      #8B5CF6 15deg, #F97316 90deg, #D4AF37 180deg, #ec4899 270deg, #8B5CF6 360deg);
  animation: orbit-spin 3s linear infinite;
  z-index: 0;
  border-radius: 50%;
}

.vv-avatar-inner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ob-bg);
  border: 1.5px solid var(--ob-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
}

/* Avatar Images */
.vv-avatar-img,
.vv-avatar-img-lg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Avatar Fallback */
.vv-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--cta-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 18px;
  position: absolute;
  inset: 0;
}

.vv-avatar-fallback-sm {
  font-size: 12px;
}

/* ── Header Text ───────────────────────────────────────────────── */
.vv-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 16px;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vv-subtitle {
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  color: var(--ob-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.vv-online-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
  animation: badge-pulse 2s ease-in-out infinite;
}

/* ── Close Button ──────────────────────────────────────────────── */
.vv-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--ob-stroke);
  background: var(--glass-bg);
  color: var(--ob-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.vv-close-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  color: var(--ob-violet);
  transform: scale(1.08);
}

.vv-close-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Header Actions (toggle + close) ── */
.vv-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vv-fullpage-toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--ob-stroke);
  transition: all 0.3s ease;
}

.vv-fullpage-toggle svg {
  color: var(--ob-muted);
  transition: color 0.2s, transform 0.2s;
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
}

.vv-fullpage-toggle:hover {
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
  transform: scale(1.08);
}

.vv-fullpage-toggle:hover svg {
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════
 *  MESSAGES AREA
 * ═══════════════════════════════════════════════════════════════════ */
.vv-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
}

/* Custom scrollbar */
.vv-messages::-webkit-scrollbar {
  width: 5px;
}

.vv-messages::-webkit-scrollbar-track {
  background: transparent;
}

.vv-messages::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 10px;
}

.vv-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* ── Message Row ───────────────────────────────────────────────── */
.vv-msg {
  display: flex;
  gap: 9px;
  align-items: flex-end;
  animation: msg-in 0.35s ease-out;
}

.vv-msg.user {
  flex-direction: row-reverse;
}

/* ── Bot Icon (small) ──────────────────────────────────────────── */
.vv-bot-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: var(--cta-gradient);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-violet);
  flex-shrink: 0;
}

/* ── Bubbles ───────────────────────────────────────────────────── */
.vv-bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 16px;
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  word-break: break-word;
  text-align: left; /* Explicitly left aligned for readability */
}

/* Bot bubble */
.vv-msg.bot .vv-bubble {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--ob-text);
  border-bottom-left-radius: 4px;
}

/* User bubble */
.vv-msg.user .vv-bubble {
  background: var(--cta-gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: var(--glow-violet);
}

/* ── Welcome sub-text ──────────────────────────────────────────── */
.vv-welcome-sub {
  font-size: 12px;
  color: var(--ob-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Quick Chips ───────────────────────────────────────────────── */
.vv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.vv-chip {
  background: var(--glass-bg);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--ob-text);
  border-radius: 20px;
  padding: 6px 13px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.vv-chip:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--ob-violet);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════
 *  TYPING INDICATOR
 * ═══════════════════════════════════════════════════════════════════ */
.vv-typing .vv-bubble {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
}

.vv-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: dot-bounce 1.4s ease-in-out infinite;
}

.vv-dot:nth-child(1) {
  background: var(--ob-violet);
}

.vv-dot:nth-child(2) {
  background: var(--ob-orange);
  animation-delay: 0.18s;
}

.vv-dot:nth-child(3) {
  background: var(--ob-gold);
  animation-delay: 0.36s;
}

/* ═══════════════════════════════════════════════════════════════════
 *  INPUT AREA
 * ═══════════════════════════════════════════════════════════════════ */
.vv-input-area {
  padding: 13px 14px;
  border-top: 1px solid var(--ob-stroke);
  background: rgba(11, 11, 15, 0.6);
}

.vv-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.vv-textarea {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--ob-stroke);
  color: var(--ob-text);
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  border-radius: 14px;
  padding: 10px 14px;
  resize: none;
  outline: none;
  max-height: 110px;
  line-height: 1.5;
  transition: border-color 0.2s;
}

.vv-textarea::placeholder {
  color: var(--ob-muted);
}

.vv-textarea:focus {
  border-color: var(--ob-violet);
}

.vv-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Send Button ───────────────────────────────────────────────── */
.vv-send-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: none;
  border-radius: 10px;
  background: var(--cta-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--glow-violet);
  transition: transform 0.2s, box-shadow 0.2s;
}

.vv-send-btn:hover {
  transform: scale(1.08);
  box-shadow: var(--glow-violet), var(--glow-orange);
}

.vv-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.vv-send-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Footer ────────────────────────────────────────────────────── */
.vv-footer-text {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  text-align: center;
  color: var(--ob-muted);
  margin-top: 8px;
  padding-bottom: 2px;
}

.vv-footer-text a {
  text-decoration: none;
}

.vv-footer-text span {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════
 *  KEYFRAME ANIMATIONS
 * ═══════════════════════════════════════════════════════════════════ */

/* Badge pulse — green dot */
@keyframes badge-pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

/* Ring spin — avatar glow */
@keyframes ring-spin {
  0% {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
  }

  50% {
    box-shadow: 0 0 18px rgba(249, 115, 22, 0.5);
  }

  100% {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
  }
}

/* Message entry */
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tool-tip-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Dot bounce — typing indicator */
@keyframes dot-bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

/* Float — optional background deco */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

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

/* ── Tablet ── */
@media (max-width: 768px) {
  #vividly-window {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 100px;
    max-height: calc(100vh - 120px);
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .vv-trigger-container {
    right: 14px;
    bottom: 18px;
  }

  #vividly-trigger {
    width: 52px;
    height: 52px;
  }

  .vv-trigger-avatar-wrapper {
    width: 48px;
    height: 48px;
  }

  /* Tooltip — compact for mobile */
  .vv-trigger-tooltip {
    position: fixed;
    right: 14px;
    bottom: 78px;
    left: auto;
    width: auto;
    max-width: 260px;
    white-space: normal;
    transform-origin: bottom right;
    font-size: 12.5px;
    padding: 10px 14px;
    line-height: 1.5;
  }

  .vv-tooltip-tail {
    right: 28px;
    top: auto;
    bottom: -5px;
    transform: rotate(45deg);
    border-top: none;
    border-left: none;
    border-right: 1px solid var(--ob-stroke);
    border-bottom: 1px solid var(--ob-stroke);
  }

  /* ─── FULL-SCREEN CHAT ON MOBILE ─── */
  /* Immersive mobile chat */
  #vividly-window {
    position: fixed;
    inset: 2vw; /* Consistent with requested 2vw margins */
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for mobile */
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 32px; /* Maintain rounded corners on mobile */
    bottom: 0;
    right: 0;
    transform-origin: bottom right;
    z-index: 10000;
  }

  /* Increase touch targets on mobile */
  .vv-chip {
    padding: 10px 18px;
    font-size: 13px;
  }

  .vv-textarea {
    font-size: 16px;
    /* Prevents auto-zoom on iOS */
  }

  .demo-page-container {
    padding: 16vh 2vw 0 2vw; /* Tighter 2vw side margins for mobile */
  }

  header {
    padding: 12px 2vw !important;
    gap: 10px !important;
  }

  header a span {
    font-size: 16px !important;
    background: linear-gradient(90deg, #8B5CF6, #F97316, #D4AF37, #ec4899, #8B5CF6);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logo-glow-loop 3s linear infinite;
  }

  @keyframes logo-glow-loop {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
  }

  header nav {
    gap: 12px !important;
  }

  header nav a[href="index.html"] {
    display: none; /* Hide redundant Home link on small mobile screens */
  }

  .demo-title {
    font-size: clamp(32px, 12vw, 42px);
    margin-bottom: 20px;
  }

  /* Ultra-narrow screen fixes */
  @media (max-width: 380px) {
    header nav .nav-orbit-btn .demo-btn-primary {
      content: ""; /* Use CSS content to shorten text if supported, or just let it overflow? Better to change class or use text-overflow */
    }
    
    /* Shorten nav text for 380px and below */
    .orbit-rect-wrapper.nav-orbit-btn .demo-btn-primary {
        font-size: 11px;
        padding: 6px 10px;
    }
  }

  .features-grid {
    grid-template-columns: 1fr; /* Force single column on smaller mobile */
    padding: 0 2vw;
  }

  .demo-footer-card {
    padding: 24px 2vw;
  }

  .demo-policy-row {
    font-size: 11px;
    gap: 8px;
    justify-content: center;
    line-height: 2;
  }

  .vv-header {
    padding: 14px 16px;
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .vv-messages {
    min-height: 0;
    max-height: none;
    flex: 1;
    padding: 16px 12px;
  }

  .vv-bubble {
    font-size: 13.5px;
    max-width: 88%;
  }

  .vv-input-area {
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .vv-textarea {
    font-size: 16px;
    /* Prevents auto-zoom on iOS */
    padding: 10px 12px;
  }

  .vv-chips {
    gap: 6px;
  }

  .vv-chip {
    padding: 8px 14px;
    font-size: 12px;
  }
}

/* ── Full Page Chat Experience ── */
.full-page-body {
  background-color: #0b0b0f;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
}

@media (max-width: 640px) {
  .chat-hero-mesh {
    padding: 16vh 2vw 40px 2vw;
  }
}

.chat-hero-mesh {
  position: relative;
  padding: 16vh 2vw 60px 2vw;
  /* Responsive spacing for Full Page Chat hero */
  text-align: center;
  overflow: hidden;
}

.chat-window-wrapper {
  width: 100%; /* Changed from 100vw to fit parent container */
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 2vw; /* Standardized to 2vw side margins */
  position: relative;
  border-radius: 32px; /* Standardized roundness for overall container */
}

.hero-avatar-container {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  position: relative;
  border-radius: 24px;
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: avatar-float 3s ease-in-out infinite;
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #8b5cf6;
  margin-bottom: 20px;
}

.demo-card-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #D4AF37, #F97316, #ec4899, #8B5CF6, #D4AF37);
  background-size: 300% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: crafted-color-loop 4s linear infinite;
}

@keyframes crafted-color-loop {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 300% 50%;
  }
}

.demo-card-desc {
  max-width: 600px;
  margin: 0 auto;
  font-size: 18px;
  color: var(--ob-muted);
  line-height: 1.6;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-typed-text {
  max-width: 600px;
  margin: 0 auto;
  font-size: 18px;
  color: var(--ob-muted);
  line-height: 1.6;
  min-height: 80px;
}

.bottom-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

.action-card {
  background: rgba(22, 22, 29, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.action-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--ob-violet);
  transform: translateY(-5px);
}

.action-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.action-card-info h4 {
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.action-card-info p {
  font-size: 14px;
  color: var(--ob-muted);
}

.wa-card-icon {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
}

.quote-card-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.floating-wa-btn {
  position: fixed;
  left: 28px;
  bottom: 28px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 10001;
  transition: all 0.3s ease;
}

.floating-wa-btn:hover {
  transform: scale(1.1) rotate(12deg);
}

.export-group {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 10px 0;
}

.export-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ob-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.export-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--ob-violet);
}

.back-home-btn {
  margin: 60px auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  width: fit-content;
  transition: all 0.3s;
}

.back-home-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--ob-violet);
  transform: translateX(-5px);
}

/* ── Premium Footer ── */
.vivid-premium-footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  /* Matches border-t border-white/8 */
  padding: 40px 20px 16px 20px;
  text-align: left;
  margin: 60px auto 0 auto;
  /* Reduced margin */
  width: 100vw;
  max-width: 1000px;
  padding-left: 2vw;
  padding-right: 2vw;
}

.footer-legal-desc {
  max-width: 900px;
  margin: 0;
  font-size: 14px;
  color: rgba(237, 233, 254, 0.6);
  /* text-ob-muted/60 */
  line-height: 1.8;
  font-weight: 400;
}

.footer-policy-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--ob-muted);
}

.footer-policy-row a {
  text-decoration: none;
  color: var(--ob-muted);
  transition: color 0.2s;
}

.footer-policy-row a:hover {
  color: var(--ob-gold);
}

.footer-policy-row .dot {
  color: rgba(237, 233, 254, 0.2);
}

.footer-copyright-line {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  /* border-t border-white/5 */
  padding-top: 16px;
  font-size: 12px;
  color: rgba(237, 233, 254, 0.5);
  /* text-ob-muted/50 */
}

.footer-copyright-line a {
  color: inherit;
  text-decoration: none;
  font-weight: 400;
  transition: opacity 0.2s;
}

.footer-copyright-line a:hover {
  opacity: 0.8;
}

/* ── Brand Gradient Classes (Matched with website index.css) ── */
.brand-vivid,
.brand-global,
.brand-code,
.brand-payment,
.brand-legal {
  background: linear-gradient(90deg, #8B5CF6, #a78bfa, #c084fc, #D4AF37, #F97316, #D4AF37, #a78bfa, #8B5CF6);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
  animation: gradient-flow 8s linear infinite;
  display: inline;
}

@keyframes gradient-flow {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 400% 50%;
  }
}

/* ═══════════════════════════════════════════════════════════════════
 *  FULL-PAGE CHAT OVERRIDES
 *  When #vividly-window is embedded in .full-page-body
 * ═══════════════════════════════════════════════════════════════════ */
.full-page-body #vividly-window {
  display: flex;
  flex-direction: column;
}

.full-page-body .vv-messages {
  flex: 1;
  overflow-y: auto;
}

.full-page-body .vv-input-area {
  margin-top: auto;
  flex-shrink: 0;
}

/* Bigger fonts for full-page */
.full-page-body .vv-bubble {
  font-size: 16px;
  line-height: 1.7;
}

.full-page-body .vv-welcome-sub {
  font-size: 15px;
}

.full-page-body .vv-chip {
  font-size: 14px;
  padding: 10px 18px;
}

.full-page-body .vv-textarea {
  font-size: 16px;
}

.full-page-body .vv-title {
  font-size: 18px;
}

.full-page-body .vv-subtitle {
  font-size: 13px;
}

.full-page-body .vv-footer-text {
  font-size: 13px;
}