/* ===== Design Tokens (Radar de Erros v3 - Premium Glassmorphism) ===== */
:root {
  --color-bg-base: #090A0F;
  --color-bg-surface: #10121A;
  --color-surface-card: rgba(22, 26, 38, 0.6);
  --color-surface-card-hover: rgba(28, 33, 48, 0.8);
  --color-surface-input: #121520;
  --color-border-subtle: rgba(255, 255, 255, 0.05);
  --color-border-strong: rgba(255, 255, 255, 0.12);
  --color-border-active: #8b5fff;

  --color-text-primary: #F3F4F6;
  --color-text-secondary: #9CA3AF;
  --color-text-muted: #6B7280;

  --color-accent-primary: #8b5fff;
  --color-accent-primary-hover: #a47fff;
  --color-accent-secondary: #06b6d4;
  --color-accent-cta: #2454eb;
  --color-accent-cta-hover: #3d6bff;

  --color-mint-success: #10b981;
  --color-pen-coral: #ef4444;
  --color-amber-soft: #f59e0b;

  --color-bg-alt: #0d0e15;
  --color-header-bg: rgba(27, 30, 39, 0.8);
  --color-btn-secondary-bg: rgba(255, 255, 255, 0.03);
  --color-btn-secondary-hover-bg: rgba(255, 255, 255, 0.08);
  --color-table-th-bg: rgba(0, 0, 0, 0.25);
  --color-footer-bg: #06070a;

  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-card: 20px;
  --radius-card-inner: 12px;
  --radius-button: 10px;
  --radius-pill: 999px;

  --gradient-brand: linear-gradient(135deg, #8b5fff 0%, #06b6d4 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
  --gradient-glow: radial-gradient(circle at 50% -20%, rgba(139, 95, 255, 0.18) 0%, rgba(9, 10, 15, 0) 60%);
  --gradient-glow-bottom: radial-gradient(circle at 50% 120%, rgba(6, 182, 212, 0.12) 0%, rgba(9, 10, 15, 0) 50%);

  --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1) inset;
  --shadow-glow: 0 0 30px rgba(139, 95, 255, 0.25);

  --max-width: 1160px;
  --space-page: 24px;
}

/* ===== Light Theme Override (Design System Compliant) ===== */
[data-theme="light"] {
  --color-bg-base: #f7f7f5;
  --color-bg-surface: #ffffff;
  --color-surface-card: rgba(255, 255, 255, 0.7);
  --color-surface-card-hover: rgba(240, 240, 238, 0.9);
  --color-surface-input: #ffffff;
  --color-border-subtle: rgba(0, 0, 0, 0.06);
  --color-border-strong: rgba(0, 0, 0, 0.12);
  --color-border-active: #8b5fff;

  --color-text-primary: #20232b;
  --color-text-secondary: #5c6270;
  --color-text-muted: #888d99;

  --color-bg-alt: #ededeb;
  --color-header-bg: rgba(247, 247, 245, 0.8);
  
  --color-btn-secondary-bg: rgba(0, 0, 0, 0.03);
  --color-btn-secondary-hover-bg: rgba(0, 0, 0, 0.06);
  --color-table-th-bg: rgba(0, 0, 0, 0.03);
  --color-footer-bg: #ededeb;

  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
  --gradient-glow: radial-gradient(circle at 50% -20%, rgba(139, 95, 255, 0.08) 0%, rgba(247, 247, 245, 0) 60%);
  --gradient-glow-bottom: radial-gradient(circle at 50% 120%, rgba(6, 182, 212, 0.05) 0%, rgba(247, 247, 245, 0) 50%);

  --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

/* Light Theme overrides for specific components */
[data-theme="light"] th.table-highlight {
  color: var(--color-accent-primary-active) !important;
}
[data-theme="light"] .pricing-card.featured {
  background: linear-gradient(180deg, rgba(139, 95, 255, 0.06) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
  box-shadow: 0 25px 60px rgba(139, 95, 255, 0.1), 0 0 80px rgba(139, 95, 255, 0.03) !important;
}
[data-theme="light"] .showcase-title h3 {
  color: #000000 !important;
}

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

html, body {
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-primary);
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  background: var(--color-accent-primary);
  color: #fff;
  padding: 12px 24px;
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-button);
  box-shadow: var(--shadow-glow);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 20px;
}

/* ===== Layout Utility ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-page, 24px);
}

.section {
  padding: 120px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 80px auto;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.section-header p {
  color: var(--color-text-secondary);
  font-size: 18px;
}

/* Text Formatting */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.font-mono { font-family: var(--font-mono); }

/* Buttons & CTAs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-button);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent-primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-primary:hover {
  background: var(--color-accent-primary-hover);
  transform: translateY(-2px);
}
.btn-cta {
  background: var(--color-accent-cta);
  color: #fff;
  box-shadow: 0 4px 24px rgba(36, 84, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-cta:hover {
  background: var(--color-accent-cta-hover);
  box-shadow: 0 8px 32px rgba(36, 84, 235, 0.5);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--color-btn-secondary-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong);
}
.btn-secondary:hover {
  background: var(--color-btn-secondary-hover-bg);
  transform: translateY(-2px);
}
.btn-block {
  width: 100%;
}
.btn-lg {
  padding: 18px 36px;
  font-size: 16px;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--color-header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-start;
}
.logo span {
  color: var(--color-accent-primary);
}
.logo-icon {
  margin-right: 8px;
  color: var(--color-accent-primary);
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}
.nav-links a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--color-text-primary);
}
.nav-links a.btn {
  color: var(--color-text-primary);
}
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: #fff;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: flex-end;
}
.nav-login {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.nav-login:hover {
  color: var(--color-accent-primary);
}

.nav-toggle-checkbox {
  display: none;
}

.mobile-only {
  display: none;
}

/* ===== Reveal Animation ===== */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 1. HERO (Two Column + Animation Wrapper) ===== */
.hero {
  padding-top: 200px;
  padding-bottom: 120px;
  background-image: var(--gradient-glow);
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% 600px;
  display: flex;
  align-items: center;
  overflow: visible;
}
.hero .container {
  max-width: 1240px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  text-align: left;
  width: 100%;
}
.hero-text-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 5;
  margin-left: -30px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 46px; /* Ajustado para visualização lado a lado */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 18px;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 580px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.hero-note {
  font-size: 13px;
  color: var(--color-text-muted);
}
.hero-video-side {
  width: 115%;
  margin-left: 0;
  perspective: 1000px;
  z-index: 10;
}
.video-wrapper-glow {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-strong);
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  background: var(--color-bg-surface);
  width: 100%;
  aspect-ratio: 16/9;
  transform-origin: center center;
  transition: box-shadow 0.3s ease;
}

.hero-loop-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(9, 10, 15, 0) 80%, rgba(9, 10, 15, 0.3) 100%);
}

/* ===== 2. PROBLEMA (The Frustrating Cycle) ===== */
.problema {
  background: linear-gradient(180deg, var(--color-bg-base) 0%, var(--color-bg-alt) 100%);
}
.problema-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.problema-card {
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  padding: 48px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.problema-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-card);
  pointer-events: none;
  z-index: 1;
}
.problema-card:hover {
  border-color: rgba(255, 107, 92, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.problema-icon-wrapper {
  width: 52px;
  height: 52px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.problema-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.problema-card p {
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

/* ===== 3. COMO FUNCIONA (Timeline Workflow) ===== */
.como-funciona {
  background: var(--color-bg-alt);
}
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.workflow-step {
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.workflow-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-card);
  pointer-events: none;
}
.workflow-step:hover {
  border-color: var(--color-accent-primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(139, 95, 255, 0.15);
}
@media (min-width: 861px) {
  .workflow-grid .workflow-step:nth-child(1) {
    transform: scale(0.92);
  }
  .workflow-grid .workflow-step:nth-child(3) {
    transform: scale(1);
  }
  .workflow-grid .workflow-step:nth-child(5) {
    transform: scale(1.08);
  }
  
  .workflow-grid .workflow-step:nth-child(1):hover {
    transform: scale(0.96) translateY(-4px);
  }
  .workflow-grid .workflow-step:nth-child(3):hover {
    transform: scale(1.04) translateY(-4px);
  }
  .workflow-grid .workflow-step:nth-child(5):hover {
    transform: scale(1.12) translateY(-4px);
  }
}
.step-num {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: var(--gradient-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  border: 3px solid var(--color-bg-alt);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.workflow-step .step-icon {
  margin: 16px 0 28px 0;
  display: inline-flex;
}
.workflow-step h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.workflow-step p {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
}
.workflow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-border-strong);
}

/* ===== 4. AUTOMACAO (1 Click Actions) ===== */
.automacao {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg-base) 100%);
}
.automacao-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
.automacao-info h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.automacao-info p {
  color: var(--color-text-secondary);
  font-size: 18px;
  margin-bottom: 40px;
}
.automacao-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.automacao-list li {
  display: flex;
  gap: 20px;
}
.automacao-list .check-icon {
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 50%;
  color: var(--color-mint-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}
.automacao-list strong {
  color: var(--color-text-primary);
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
}
.automacao-list div {
  font-size: 15px;
  color: var(--color-text-secondary);
}

/* Visual Automations Loader */
.card-loader-mockup {
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
}
.card-loader-mockup::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-card);
  pointer-events: none;
}
.loader-header {
  display: flex;
  gap: 6px;
  margin-bottom: 40px;
}
.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.loader-status {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 24px;
  border-radius: var(--radius-card-inner);
  border: 1px solid var(--color-border-subtle);
}
.loader-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(139, 95, 255, 0.15);
  border-top-color: var(--color-accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loader-text {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-accent-secondary);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.loader-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.loader-step {
  font-size: 15px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 16px;
}
.step-bullet {
  font-weight: bold;
  font-family: var(--font-mono);
}
.loader-step.active {
  color: var(--color-text-primary);
}
.loader-step.active .step-bullet {
  color: var(--color-mint-success);
}
.loader-step.current {
  color: var(--color-accent-primary-hover);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ===== 5. DEMONSTRACAO ===== */
.demo-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 56px;
}
.demo-tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  padding: 12px 28px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-display);
}
.demo-tab-btn:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.demo-tab-btn.active {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.demo-pane {
  display: none;
  max-width: 860px;
  margin: 0 auto;
}
.demo-pane.active {
  display: block;
}

.showcase-card {
  background: var(--color-surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}
.showcase-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-card);
  pointer-events: none;
}
.showcase-header {
  padding: 28px 40px;
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.showcase-title h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.showcase-title p {
  color: var(--color-text-secondary);
  font-size: 14px;
}
.showcase-badge {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--color-accent-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.showcase-body {
  padding: 40px;
}
.showcase-footer {
  padding: 20px 40px;
  background: var(--color-btn-secondary-bg);
  border-top: 1px solid var(--color-border-subtle);
}
.footer-hint {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Dashboard Mockup Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stat-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--color-border-subtle);
  padding: 28px;
  border-radius: var(--radius-card-inner);
  position: relative;
}
.stat-label {
  display: block;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  font-weight: 500;
}
.stat-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.stat-trend {
  font-size: 13px;
  color: var(--color-text-muted);
}
.trend-up { color: var(--color-mint-success); }
.trend-neutral { color: var(--color-text-muted); }

.alert-box {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.02);
}

/* Flashcard Mockup Styling */
.flashcard-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.flashcard-mock {
  border: 1px solid var(--color-border-subtle);
  background: rgba(255, 255, 255, 0.01);
  padding: 40px;
  border-radius: var(--radius-card-inner);
}
.flashcard-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-accent-primary-hover);
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
}
.flashcard-question {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 28px;
  font-family: var(--font-display);
  line-height: 1.5;
}
.flashcard-answer-revealed {
  border-top: 1px dashed var(--color-border-strong);
  padding-top: 24px;
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}
.flashcard-answer-revealed strong {
  color: var(--color-text-primary);
}
.flashcard-actions {
  display: flex;
  gap: 16px;
}
.flashcard-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.flashcard-btn:hover {
  transform: translateY(-2px);
}
.btn-errei { background: #dc2626; color: #fff; }
.btn-dificil { background: #d97706; color: #fff; }
.btn-bom { background: #4f46e5; color: #fff; }
.btn-facil { background: #059669; color: #fff; }

/* Explanations Mockup Styling */
.badge-tag {
  display: inline-flex;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid transparent;
}
.tag-banca { background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.2); color: var(--color-accent-secondary); }
.tag-materia { background: rgba(139, 95, 255, 0.1); border-color: rgba(139, 95, 255, 0.2); color: var(--color-accent-primary-hover); }

.question-header-mock {
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
}
.question-body-mock .question-text {
  font-size: 17px;
  color: var(--color-text-primary);
  margin-bottom: 32px;
  line-height: 1.6;
}
.explanation-box {
  background: rgba(16, 185, 129, 0.01);
  border: 1px solid rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--color-mint-success);
  padding: 28px;
  border-radius: 0 var(--radius-card-inner) var(--radius-card-inner) 0;
}
.explanation-title {
  display: block;
  font-weight: 700;
  color: var(--color-mint-success);
  margin-bottom: 12px;
  font-family: var(--font-display);
}
.explanation-box p {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-secondary);
}
.explanation-box strong {
  color: var(--color-text-primary);
}

/* ===== 6. BENEFICIOS ===== */
.beneficios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.beneficios-card {
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  padding: 40px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.beneficios-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-card);
  pointer-events: none;
}
.beneficios-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.beneficio-bullet {
  width: 36px;
  height: 36px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 50%;
  color: var(--color-mint-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 24px;
  font-size: 14px;
}
.beneficios-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.beneficios-card p {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ===== 7. COMPARAÇÃO (Side-by-side Cards) ===== */
.table-responsive {
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}
.comparacao-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}
.comparacao-table th, .comparacao-table td {
  padding: 24px 36px;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 16px;
}
.comparacao-table th {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  background: var(--color-table-th-bg);
}
.comparacao-table tr:last-child td {
  border-bottom: none;
}
.table-highlight {
  border-left: 1px solid rgba(139, 95, 255, 0.2);
  border-right: 1px solid rgba(139, 95, 255, 0.2);
  background: rgba(139, 95, 255, 0.02);
  font-weight: 600;
}
th.table-highlight {
  background: rgba(139, 95, 255, 0.08);
  color: var(--color-accent-primary-hover);
  border-bottom-color: rgba(139, 95, 255, 0.25);
}

/* ===== 8. PROVA SOCIAL ===== */
.stats-counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto 80px auto;
}
.counter-box {
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-subtle);
  padding: 40px 24px;
  border-radius: var(--radius-card);
  transition: border-color 0.3s ease;
}
.counter-box:hover {
  border-color: var(--color-border-strong);
}
.counter-box .counter {
  display: block;
  font-size: 44px;
  font-weight: 700;
  color: var(--color-accent-secondary);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}
.counter-box p {
  color: var(--color-text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}
.testimonial-card {
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-subtle);
  padding: 48px;
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}
.testimonial-card:hover {
  border-color: var(--color-border-strong);
}
.testimonial-text {
  font-style: italic;
  font-size: 17px;
  color: var(--color-text-primary);
  margin-bottom: 40px;
  line-height: 1.6;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}
.author-avatar {
  width: 48px;
  height: 48px;
  background: var(--gradient-brand);
  color: var(--color-on-gradient-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-mono);
  box-shadow: 0 4px 12px rgba(139, 95, 255, 0.3);
}
.author-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}
.author-role {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ===== 9. PLANOS ===== */
.pricing-layout {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}
.pricing-card {
  flex: 1;
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-subtle);
  padding: 56px 40px;
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pricing-card:hover {
  border-color: var(--color-accent-primary);
}
.pricing-card.featured {
  border: 2px solid var(--color-accent-primary);
  background: linear-gradient(180deg, rgba(139, 95, 255, 0.08) 0%, rgba(27, 30, 39, 0.6) 100%);
  transform: scale(1.03);
  box-shadow: 0 25px 60px rgba(139, 95, 255, 0.2), 0 0 80px rgba(139, 95, 255, 0.05);
  z-index: 2;
}
.pricing-card.featured:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 30px 70px rgba(139, 95, 255, 0.3), 0 0 90px rgba(139, 95, 255, 0.08);
}
.pricing-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 20px rgba(139, 95, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.pricing-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-text-primary);
}
.price-value {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--color-text-primary);
  letter-spacing: -0.04em;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 2px;
}
.price-currency {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-right: 4px;
}
.price-period {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.price-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  line-height: 1.5;
}
.pricing-features {
  list-style: none;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-grow: 1;
}
.pricing-features li {
  display: flex;
  gap: 14px;
  font-size: 15px;
  color: var(--color-text-secondary);
}
.pricing-features li .check-icon {
  font-size: 16px;
  color: var(--color-accent-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== 10. FAQ ===== */
.faq-accordion {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.faq-item {
  background: var(--color-surface-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-subtle);
  border-radius: 16px;
  overflow: hidden;
}
.faq-item summary {
  padding: 28px 40px;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  font-family: var(--font-display);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary:hover {
  background: var(--color-surface-card-hover);
}
.faq-toggle-icon {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--color-text-secondary);
}
.faq-content {
  padding: 0 40px 28px 40px;
  color: var(--color-text-secondary);
  font-size: 15px;
  margin: 0;
  line-height: 1.7;
}
.faq-item[open] .faq-toggle-icon {
  transform: rotate(45deg);
}

/* ===== 11. CTA FINAL ===== */
.cta-final {
  text-align: center;
  padding: 140px 0;
  background-image: var(--gradient-glow-bottom);
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: 100% 500px;
}
.cta-final h2 {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}
.cta-final p {
  font-size: 20px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 48px auto;
  line-height: 1.6;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: 80px 0 48px 0;
  background: var(--color-footer-bg);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 32px;
}
.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: var(--color-text-secondary);
}
.footer-bottom {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ===== Responsive Adaptations ===== */
@media (max-width: 1024px) {
  .hero h1 { font-size: 52px; }
  .section-header h2 { font-size: 36px; }
  .beneficios-grid { grid-template-columns: repeat(2, 1fr); }
  .automacao-layout { gap: 48px; }
}

@media (max-width: 860px) {
  .hero {
    padding-top: 140px;
    padding-bottom: 60px;
    text-align: center;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-text-side {
    align-items: center;
    margin-left: 0;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-video-side {
    width: 100%;
    margin-left: 0;
  }

  .site-header {
    height: 72px;
  }
  .main-nav {
    position: relative;
  }
  .nav-links {
    position: absolute;
    top: 56px;
    right: -24px;
    width: 280px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-card);
    flex-direction: column;
    padding: 32px;
    gap: 20px;
    display: none;
    box-shadow: var(--shadow-elevation-3);
  }
  .nav-links a { font-size: 15px; }
  .nav-toggle-checkbox {
    display: block;
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
  }
  .nav-toggle-checkbox::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--color-text-primary);
    box-shadow: 0 -6px 0 var(--color-text-primary), 0 6px 0 var(--color-text-primary);
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
  }
  .nav-toggle-checkbox:checked::before {
    box-shadow: none;
    transform: translate(-50%, -50%) rotate(45deg);
  }
  .nav-toggle-checkbox:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--color-text-primary);
    transform: translate(-50%, -50%) rotate(-45deg);
  }
  .nav-toggle-checkbox:checked ~ .nav-links {
    display: flex;
  }
  .main-nav {
    order: 3;
    position: relative;
  }
  .header-cta {
    display: flex;
    gap: 8px;
    align-items: center;
    order: 2;
    margin-right: 12px;
  }
  .header-cta .nav-login,
  .header-cta .btn-primary {
    display: none;
  }
  .mobile-only {
    display: block;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .workflow-arrow {
    transform: rotate(90deg);
  }

  .automacao-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-layout {
    flex-direction: column;
    gap: 40px;
    max-width: 480px;
    margin: 0 auto;
  }
  .pricing-card.featured {
    transform: none;
  }
  .pricing-card.featured:hover {
    transform: translateY(-4px);
  }
  
  .stats-counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .hero h1 { font-size: 38px; }
  .hero-sub { font-size: 17px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .problema-grid { grid-template-columns: 1fr; }
  .beneficios-grid { grid-template-columns: 1fr; }
  .stats-counter-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; gap: 32px; text-align: center; }
  .footer-links { justify-content: center; }

  /* Ajustes das abas de demonstração para caber em telas móveis */
  .demo-tabs {
    gap: 8px;
    row-gap: 10px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .demo-tab-btn {
    padding: 9px 16px;
    font-size: 13px;
    white-space: nowrap;
  }
  .comparacao-table th, .comparacao-table td {
    padding: 14px 18px !important;
    font-size: 14px !important;
  }

  /* Ações do flashcard: 2x2 em telas pequenas para não cortar o botão "Fácil" */
  .flashcard-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .flashcard-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    padding: 12px 8px;
    font-size: 14px;
  }
}

.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
  width: 40px;
  height: 40px;
}
.theme-toggle-btn:hover {
  background: var(--color-btn-secondary-hover-bg);
}
.theme-toggle-btn svg {
  stroke: var(--color-text-primary);
  transition: stroke 0.2s ease;
}
.theme-toggle-btn:hover svg {
  stroke: var(--color-accent-primary);
}

.theme-toggle-btn .sun-icon {
  display: block;
}
.theme-toggle-btn .moon-icon {
  display: none;
}
[data-theme="light"] .theme-toggle-btn .sun-icon {
  display: none;
}
[data-theme="light"] .theme-toggle-btn .moon-icon {
  display: block;
}

/* ===== Bubble Chat (Suporte Virtual) ===== */
.bubblechat-container {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));
  z-index: 1100;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  font-family: var(--font-body);
  pointer-events: none;
}

.bubblechat-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(139, 95, 255, 0.35), var(--shadow-premium);
  position: relative;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  padding: 0;
  outline: none;
  pointer-events: auto;
  flex-shrink: 0;
}
.bubblechat-fab:hover {
  background: var(--color-accent-primary-hover);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 36px rgba(139, 95, 255, 0.5), var(--shadow-premium);
}
.bubblechat-fab:active {
  transform: translateY(0) scale(0.95);
}

.bubblechat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-pen-coral);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-bg-base);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.bubblechat-window {
  width: 380px;
  height: 520px;
  max-height: calc(100vh - 120px);
  max-width: calc(100vw - 48px);
  background: rgba(16, 18, 26, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-premium), 0 24px 72px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.95);
  transform-origin: bottom right;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

[data-theme="light"] .bubblechat-window {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-premium), 0 24px 72px rgba(0, 0, 0, 0.1);
}

.bubblechat-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Cabeçalho */
.bubblechat-header {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
[data-theme="light"] .bubblechat-header {
  background: rgba(0, 0, 0, 0.02);
}

.bubblechat-agent {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bubblechat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(139, 95, 255, 0.15);
  color: var(--color-accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(139, 95, 255, 0.25);
}

.avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: var(--color-mint-success);
  border-radius: 50%;
  border: 2px solid var(--color-bg-surface);
  box-shadow: 0 0 0 2px var(--color-bg-surface);
}

.bubblechat-agent-info {
  display: flex;
  flex-direction: column;
}

.bubblechat-agent-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.bubblechat-agent-role {
  font-size: 11px;
  color: var(--color-text-muted);
}

.bubblechat-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.bubblechat-close-btn:hover {
  background: var(--color-btn-secondary-hover-bg);
  color: var(--color-text-primary);
}

/* Corpo e Mensagens */
.bubblechat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

/* Scrollbar personalizada */
.bubblechat-body::-webkit-scrollbar {
  width: 4px;
}
.bubblechat-body::-webkit-scrollbar-track {
  background: transparent;
}
.bubblechat-body::-webkit-scrollbar-thumb {
  background: var(--color-border-subtle);
  border-radius: 2px;
}

.bubblechat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubblechat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: msg-appear 0.3s cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes msg-appear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bubblechat-msg.bot {
  align-self: flex-start;
}

.bubblechat-msg.user {
  align-self: flex-end;
}

.msg-bubble {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 16px;
}

.bubblechat-msg.bot .msg-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-primary);
  border-bottom-left-radius: 4px;
}
[data-theme="light"] .bubblechat-msg.bot .msg-bubble {
  background: rgba(0, 0, 0, 0.03);
}

.bubblechat-msg.user .msg-bubble {
  background: var(--color-accent-primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(139, 95, 255, 0.2);
}

/* Indicador de Digitação */
.bubblechat-typing {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-subtle);
  padding: 12px 18px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
}
[data-theme="light"] .bubblechat-typing {
  background: rgba(0, 0, 0, 0.03);
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--color-text-muted);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Rodapé e Opções */
.bubblechat-footer {
  padding: 16px;
  border-top: 1px solid var(--color-border-subtle);
  background: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .bubblechat-footer {
  background: rgba(0, 0, 0, 0.01);
}

.bubblechat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.bubblechat-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-primary);
  padding: 11px 14px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color 0.2s ease;
}
[data-theme="light"] .bubblechat-input {
  background: rgba(0, 0, 0, 0.01);
}
.bubblechat-input:focus {
  outline: none;
  border-color: var(--color-accent-primary);
}
.bubblechat-input::placeholder {
  color: var(--color-text-secondary);
}

.bubblechat-send-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--color-accent-primary);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bubblechat-send-btn:hover {
  background: var(--color-accent-primary-hover);
  transform: translateY(-1px);
}
.bubblechat-send-btn:active {
  transform: scale(0.95);
}
.bubblechat-send-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.bubblechat-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.bubblechat-options::-webkit-scrollbar {
  width: 3px;
}
.bubblechat-options::-webkit-scrollbar-thumb {
  background: var(--color-border-subtle);
  border-radius: 2px;
}

.bubblechat-opt-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-primary);
  padding: 11px 16px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  display: block;
  width: 100%;
}
[data-theme="light"] .bubblechat-opt-btn {
  background: rgba(0, 0, 0, 0.01);
}

.bubblechat-opt-btn:hover {
  background: rgba(139, 95, 255, 0.06);
  border-color: var(--color-accent-primary);
  color: var(--color-accent-primary);
  transform: translateX(2px);
}
.bubblechat-opt-btn:active {
  transform: scale(0.98);
}

/* Botão Link de Ação Externa (ex: E-mail de suporte) */
.bubblechat-action-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent-primary);
  color: #ffffff !important;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  transition: all 0.2s ease;
  width: fit-content;
}
.bubblechat-action-link:hover {
  background: var(--color-accent-primary-hover);
  transform: translateY(-1px);
}

/* Responsividade Mobile */
@media (max-width: 480px) {
  .bubblechat-container {
    bottom: 0;
    right: 0;
  }
  .bubblechat-fab {
    margin: 0 calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) 0;
  }
  .bubblechat-window {
    width: 100vw;
    height: 100vh;
    height: -webkit-fill-available;
    max-height: 100%;
    max-width: 100%;
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    bottom: 0;
    right: 0;
  }
  .bubblechat-container.open .bubblechat-fab {
    display: none;
  }
}

/* --- Estilos para Arrastar --- */
.bubblechat-fab {
  cursor: grab;
}
.bubblechat-header {
  cursor: grab;
}
.bubblechat-fab:active,
.bubblechat-header:active {
  cursor: grabbing;
}
.bubblechat-container.dragging {
  transition: none !important;
}
.bubblechat-container.dragging .bubblechat-window {
  transition: none !important;
}

/* --- Novo Layout de Header Actions e Maximizar --- */
.bubblechat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bubblechat-expand-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.bubblechat-expand-btn:hover {
  background: var(--color-btn-secondary-hover-bg);
  color: var(--color-text-primary);
}

.bubblechat-window.expanded {
  width: 520px;
  height: 680px;
  max-height: calc(100vh - 80px) !important;
  max-width: calc(100vw - 48px) !important;
}

/* --- Rodapé Otimizado e Opções Colapsáveis --- */
.bubblechat-footer {
  padding: 12px 16px !important;
}

.bubblechat-options-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--color-accent-primary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
  outline: none;
}
.bubblechat-options-toggle:hover {
  color: var(--color-accent-primary-hover);
}

.options-toggle-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
  display: inline-block;
  flex-shrink: 0;
}

.bubblechat-options-toggle.active .options-toggle-icon {
  transform: rotate(-180deg);
}

/* Modificação do comportamento padrão de opções para ser colapsável */
.bubblechat-options {
  max-height: 0 !important;
  opacity: 0 !important;
  overflow-y: auto !important;
  margin-top: 0 !important;
  pointer-events: none !important;
  transition: max-height 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.25s ease, margin-top 0.3s ease;
}

.bubblechat-options.show {
  max-height: 220px !important;
  opacity: 1 !important;
  margin-top: 12px !important;
  pointer-events: all !important;
}

/* Ajustes Responsivos adicionais */
@media (max-width: 480px) {
  .bubblechat-window.expanded {
    width: 100vw;
    height: 100vh;
    height: -webkit-fill-available;
    max-height: 100% !important;
    max-width: 100% !important;
  }
  .bubblechat-expand-btn {
    display: none !important;
  }
  .bubblechat-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 12px)) !important;
  }
}

