/*
 * STORY-2: Interface Minimalista - Campo Único
 * Estilos específicos para página IA para Responder Questões
 */

/* =================================================================
   STORY-10: Design System & UI Professional Polish
   CSS Variables Design Tokens (Base 8pt grid, Modular Scale 1.25)
   ================================================================= */

:root {
  /* ===================================
     Primary Colors (STORY-13 Brand Alignment - Sapien Blue)
     =================================== */
  --color-primary: #2979FF;
  --color-primary-dark: #1c6efd;
  --color-primary-light: #42A5F5;
  --color-primary-50: rgba(41, 121, 255, 0.05);
  --color-primary-100: rgba(41, 121, 255, 0.1);
  --color-primary-200: rgba(41, 121, 255, 0.2);
  --color-primary-300: rgba(41, 121, 255, 0.3);
  --color-primary-400: rgba(41, 121, 255, 0.4);

  /* ===================================
     Neutral Colors (WCAG AA Compliant)
     =================================== */
  --color-text-primary: #212121;
  --color-text-secondary: #666666;
  --color-text-tertiary: #999999;
  --color-text-muted: #6c757d;
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F5F5F5;
  --color-bg-tertiary: #F8F9FA;
  --color-border: #E0E0E0;
  --color-border-light: #DEE2E6;

  /* ===================================
     Semantic Colors
     =================================== */
  --color-success: #4CAF50;
  --color-success-light: #D1FAE5;
  --color-success-border: #A7F3D0;
  --color-error: #F44336;
  --color-warning-bg: #FFF3CD;
  --color-warning-border: #FFE69C;
  --color-warning-text: #856404;
  --color-info: #2979FF;

  /* ===================================
     Typography Scale (Modular Scale 1.25)
     =================================== */
  --font-size-xs: 0.8rem;    /* 12.8px */
  --font-size-sm: 1rem;      /* 16px base */
  --font-size-md: 1.25rem;   /* 20px */
  --font-size-lg: 1.563rem;  /* 25px */
  --font-size-xl: 1.953rem;  /* 31px */
  --font-size-2xl: 2.441rem; /* 39px */
  --font-size-3xl: 3.052rem; /* 49px */
  --font-size-4xl: 3.815rem; /* 61px */

  /* ===================================
     Font Weights
     =================================== */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* ===================================
     Line Heights
     =================================== */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  --line-height-loose: 1.8;

  /* ===================================
     Spacing Scale (8pt Grid System)
     =================================== */
  --spacing-1: 0.125rem;  /* 2px */
  --spacing-2: 0.25rem;   /* 4px */
  --spacing-3: 0.375rem;  /* 6px */
  --spacing-4: 0.5rem;    /* 8px */
  --spacing-5: 0.625rem;  /* 10px */
  --spacing-6: 0.75rem;   /* 12px */
  --spacing-8: 1rem;      /* 16px */
  --spacing-10: 1.25rem;  /* 20px */
  --spacing-12: 1.5rem;   /* 24px */
  --spacing-16: 2rem;     /* 32px */
  --spacing-20: 2.5rem;   /* 40px */
  --spacing-24: 3rem;     /* 48px */
  --spacing-32: 4rem;     /* 64px */
  --spacing-40: 5rem;     /* 80px */
  --spacing-48: 6rem;     /* 96px */
  --spacing-64: 8rem;     /* 128px */

  /* ===================================
     Border Radius
     =================================== */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 50%;

  /* ===================================
     Shadows (Elevation System)
     =================================== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-2xl: 0 32px 64px rgba(0, 0, 0, 0.15);

  /* ===================================
     Colored Shadows (STORY-13 Brand Alignment)
     =================================== */
  --shadow-primary: 0 4px 12px rgba(41, 121, 255, 0.3);
  --shadow-primary-hover: 0 8px 24px rgba(41, 121, 255, 0.4);
  --shadow-answer: 0 8px 32px rgba(41, 121, 255, 0.15);
  --shadow-success: 0 4px 12px rgba(76, 175, 80, 0.3);

  /* ===================================
     Premium Gradients (STORY-13 Brand Alignment - Blue Palette)
     =================================== */
  --gradient-primary: linear-gradient(135deg, #2979FF 0%, #1c6efd 100%);
  --gradient-secondary: linear-gradient(135deg, #42A5F5 0%, #2979FF 100%);
  --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-success: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
  --gradient-hero: linear-gradient(135deg, #2979FF 0%, #1c6efd 50%, #42A5F5 100%);
  --gradient-accent: linear-gradient(90deg, #2979FF 0%, #1c6efd 50%, #42A5F5 100%);
  --gradient-premium: linear-gradient(135deg, #2979FF 0%, #1c6efd 50%, #42A5F5 75%, #1E88E5 100%);
  --gradient-warning: linear-gradient(135deg, var(--color-warning-bg) 0%, #FFE69C 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);

  /* ===================================
     Transitions & Animations
     =================================== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ===================================
     Legacy Spacing (Backward Compatibility)
     =================================== */
  --spacing-04: 4px;
  --spacing-08: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-48: 48px;
  --spacing-56: 56px;
  --spacing-64: 64px;
  --spacing-80: 80px;

  /* ===================================
     Safe Areas (Mobile Support)
     =================================== */
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);

  /* ===================================
     Component-Specific Colors (Legacy Support)
     =================================== */
  --color-answer-bg: var(--color-primary-50);
  --color-answer-border: var(--color-primary-200);
  --color-answer-gradient: var(--gradient-primary);
  --surface-glass: rgba(255, 255, 255, 0.95);
  --surface-elevated: var(--color-bg-primary);
  --surface-base: var(--color-bg-secondary);
  --surface-sunken: #f3f4f6;
  --shadow-button: var(--shadow-primary);
  --shadow-button-hover: var(--shadow-primary-hover);

  /* ===================================
     STORY-11: Premium Design System Tokens
     =================================== */

  /* Glass Morphism System */
  --glass-backdrop: blur(20px) saturate(1.8);
  --glass-surface: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  --glass-highlight: rgba(255, 255, 255, 0.6);

  /* Premium Shadow System (STORY-13 Brand Alignment) */
  --shadow-premium-sm: 0 2px 8px rgba(41, 121, 255, 0.12);
  --shadow-premium-md: 0 4px 20px rgba(41, 121, 255, 0.15);
  --shadow-premium-lg: 0 8px 40px rgba(41, 121, 255, 0.2);
  --shadow-premium-xl: 0 16px 60px rgba(41, 121, 255, 0.25);
  --shadow-premium-glass: 0 8px 32px rgba(31, 38, 135, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.4);

  /* Answer Display Hero Typography */
  --answer-font-size-hero: clamp(2.625rem, 5vw, 3.375rem); /* 42px - 54px responsive */
  --answer-font-weight-hero: 800;
  --answer-line-height-hero: 1.1;
  --answer-gradient-text: var(--gradient-primary);

  /* Premium Button System */
  --button-premium-gradient: var(--gradient-primary);
  --button-premium-shadow: var(--shadow-premium-md);
  --button-premium-shadow-hover: var(--shadow-premium-lg);
  --button-premium-transform-hover: translateY(-4px);
  --button-premium-transform-active: translateY(-2px);

  /* Section Icon System */
  --icon-question: "";
  --icon-answer: "";
  --icon-justification: "";
  --icon-sparkle: "";
  --icon-success: "🎉";

  /* Microinteraction Timing */
  --timing-premium-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --timing-premium-base: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --timing-premium-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --timing-shimmer: 0.6s ease-in-out;

  /* Background System */
  --bg-main: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
  --bg-pattern: radial-gradient(circle at 25% 25%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);

  /* Quota Display Enhancement */
  --quota-glow: 0 0 20px rgba(102, 126, 234, 0.3);
  --quota-gradient: var(--gradient-tertiary);
  --quota-sparkle: var(--timing-shimmer);
}

/* ========== Accessibility Utilities ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===================================
   STORY-5: Mobile Touch Optimizations
   =================================== */

/* Remove 300ms tap delay on mobile */
* {
  touch-action: manipulation;
}

/* Apply safe areas to body (iOS notch/home indicator) */
body {
  padding-top: var(--safe-area-inset-top);
  padding-bottom: var(--safe-area-inset-bottom);
}

/* Prevent scroll when loading (mobile) */
body.loading {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Hide non-essential elements when keyboard is open (mobile) */
body.keyboard-open .quota-display,
body.keyboard-open footer {
  display: none !important;
}

/* STORY-11: Premium Body Background */
body {
  background: var(--bg-main);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-pattern);
  pointer-events: none;
  z-index: -1;
  animation: subtleBackgroundShift 30s ease-in-out infinite;
}

@keyframes subtleBackgroundShift {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05) rotate(1deg);
  }
}

/* ========== Hero Section (STORY-10 Design System) ========== */
.hero-question-input {
  padding: var(--spacing-16) var(--spacing-8);
  text-align: center;
}

.hero-question-input h1 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-4);
  line-height: var(--line-height-tight);
}

.hero-subtitle {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-10);
  line-height: var(--line-height-relaxed);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== Question Input Wrapper (STORY-10 Design System) ========== */
.question-input-wrapper {
  max-width: 800px;
  margin: var(--spacing-10) auto;
  position: relative;
}

/* ========== Text Mode (STORY-10 Design System) ========== */
.input-text-mode {
  position: relative;
}

.input-text-mode textarea {
  width: 100%;
  min-height: 200px;
  padding: var(--spacing-5);
  padding-bottom: var(--spacing-16); /* Space for counter and camera button */
  font-size: var(--font-size-sm);
  font-family: 'Roboto', sans-serif;
  line-height: var(--line-height-relaxed);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  resize: vertical;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  background: var(--color-bg-primary);
}

.input-text-mode textarea::placeholder {
  color: var(--color-text-tertiary);
}

.input-text-mode textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-100);
  outline: none;
}

.input-text-mode textarea.invalid {
  border-color: var(--color-error);
  animation: shake 0.3s ease;
}

/* ========== Camera Button (Floating) - STORY-10 Design System ========== */
.camera-button {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 56px;
  height: 56px;
  /* STORY-5: Ensure minimum touch target size */
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  border: 2px solid white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.camera-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.camera-button:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.camera-button svg {
  width: 24px;
  height: 24px;
}

/* Tooltip for camera button - STORY-10 */
.camera-button::after {
  content: 'Enviar foto';
  position: absolute;
  bottom: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  margin-bottom: var(--spacing-2);
}

.camera-button:hover::after {
  opacity: 1;
}

/* ========== Character Counter - STORY-10 Design System ========== */
.char-counter {
  position: absolute;
  bottom: var(--spacing-4);
  left: var(--spacing-5);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  user-select: none;
}

.char-counter .current-chars {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

/* ========== Image Mode ========== */
.input-image-mode {
  max-width: 800px;
  margin: 0 auto;
}

.image-preview-container {
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 20px;
  background: #f8f9fa;
}

.image-preview-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 16px;
  display: block;
}

.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-remove-image {
  background: #dc3545;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  /* STORY-5: Ensure minimum touch target size */
  min-height: 44px;
}

.btn-remove-image:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-remove-image:active {
  transform: scale(0.95);
  background: #a71d2a;
}

.image-info {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  text-align: center;
}

.image-filename {
  font-weight: 500;
  color: #495057;
}

/* ========== Modern Quota Display (Top Position) ========== */
.quota-display-top {
  text-align: center;
  margin-bottom: var(--spacing-4);
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quota-badge-top {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  padding: var(--spacing-2) var(--spacing-4);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.quota-badge-top:hover {
  border-color: var(--color-primary-200);
  box-shadow: var(--shadow-sm);
}

.quota-icon-svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.quota-text-top {
  white-space: nowrap;
  color: var(--color-text-secondary);
}

.quota-text-top strong {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

/* ========== CTA Button - STORY-10 Design System (Modernized) ========== */
.cta-container {
  text-align: center;
  margin: var(--spacing-6) 0;
}

.cta-button {
  background: var(--gradient-primary);
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* STORY-5: Ensure minimum touch target size */
  min-height: 56px;
  min-width: 240px;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.cta-button:not(:disabled):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.cta-button:not(:disabled):active {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.cta-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  box-shadow: none;
}

/* SVG icon styling (replaces emoji) */
.btn-icon-svg {
  flex-shrink: 0;
  animation: rotateIcon 2s linear infinite;
}

@keyframes rotateIcon {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Pause animation on hover for better UX */
.cta-button:hover .btn-icon-svg {
  animation-play-state: paused;
}

/* Legacy emoji icon (kept for backwards compatibility) */
.btn-icon {
  font-size: 24px;
  line-height: 1;
}

.btn-text {
  line-height: 1;
}

/* Loading state for STORY-3 & STORY-10 */
.cta-button.loading {
  pointer-events: none;
  opacity: 0.8;
}

.cta-button.loading .btn-text::after {
  content: '...';
  animation: dots 1.5s infinite;
}

/* Loading spinner for STORY-10 */
.cta-button.loading::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: var(--spacing-2);
}

/* Enhanced focus states for accessibility */
.cta-button:focus-visible {
  outline: 3px solid var(--color-primary-200);
  outline-offset: 2px;
}

.camera-button:focus-visible {
  outline: 3px solid var(--color-primary-200);
  outline-offset: 2px;
}

.btn-remove-image:focus-visible {
  outline: 3px solid var(--color-error);
  outline-offset: 2px;
}

textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-100);
  outline: none;
}

/* Enhanced button hover states */
.cta-button:not(:disabled):hover {
  background: var(--gradient-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary-hover);
}

.cta-button:not(:disabled):active {
  transform: translateY(0);
  box-shadow: var(--shadow-primary);
}

/* STORY-10: Skeleton loading states */
.answer-skeleton {
  background: linear-gradient(90deg,
    var(--color-bg-secondary) 25%,
    var(--color-bg-tertiary) 50%,
    var(--color-bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s ease-in-out infinite;
  border-radius: var(--radius-lg);
  height: 200px;
  margin: var(--spacing-24) 0;
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Loading states for benefit cards */
.benefit-card.loading {
  opacity: 0.7;
  pointer-events: none;
}

.benefit-card.loading .benefit-card-icon {
  background: var(--color-bg-secondary);
  animation: pulse 2s ease-in-out infinite;
}

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

/* Enhanced disabled state visibility */
.cta-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg,
    rgba(30, 136, 229, 0.6) 0%,
    rgba(21, 101, 192, 0.6) 100%
  );
}

/* STORY-11: Premium Gamified Quota Display */
.quota-badge {
  background: var(--quota-gradient);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 2px solid rgba(79, 172, 254, 0.3);
  color: white;
  padding: var(--spacing-4) var(--spacing-6);
  border-radius: var(--radius-2xl);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-top: var(--spacing-6);
  box-shadow: var(--quota-glow);
  transition: all var(--timing-premium-base);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  animation: quotaGlow 3s ease-in-out infinite;
}

/* Gamified Glow Animation */
@keyframes quotaGlow {
  0%, 100% {
    box-shadow: var(--quota-glow);
  }
  50% {
    box-shadow: 0 0 30px rgba(79, 172, 254, 0.4);
  }
}

/* Sparkle Effect */
.quota-badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  animation: sparkle 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(0.8) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.3;
  }
}

/* Enhanced Hover State */
.quota-badge:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 40px rgba(79, 172, 254, 0.5);
  border-color: rgba(79, 172, 254, 0.5);
}

/* Icon Animation */
.quota-badge .quota-icon {
  display: inline-block;
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Enhanced character counter contrast */
.char-counter {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  background: rgba(255, 255, 255, 0.9);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

/* Micro-interactions for input elements */
.input-text-mode textarea {
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast);
}

.input-text-mode textarea:hover:not(:focus) {
  border-color: var(--color-primary-200);
  transform: translateY(-1px);
}

/* Enhanced icon interactions */
.benefit-card-icon svg {
  transition: transform var(--transition-fast), color var(--transition-base);
}

.benefit-card:hover .benefit-card-icon svg {
  transform: scale(1.1);
  color: var(--color-primary-dark);
}

/* Enhanced testimonial card interactions */
.testimonial-card {
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
  border: 1px solid transparent;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-200);
}

/* Enhanced table interactions */
.comparison-table tbody tr {
  transition: background-color var(--transition-fast);
}

.comparison-table tbody tr:hover {
  background: var(--color-primary-50);
}


/* ========== Quota Display - STORY-10 Badge Design ========== */
.quota-display {
  text-align: center;
  margin: var(--spacing-6) 0;
}

.quota-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  color: var(--color-warning-text);
  padding: var(--spacing-3) var(--spacing-6);
  border-radius: var(--radius-xl);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  margin-top: var(--spacing-6);
}

.quota-text strong {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.quota-icon {
  font-size: 20px;
  margin-right: var(--spacing-2);
}

/* ========== Drag Over State ========== */
/* Applied to container for clearer visual hierarchy */
.input-text-mode.drag-over {
  border-radius: 12px;
}

.input-text-mode.drag-over textarea {
  border: 2px dashed #2979FF;
  background: rgba(41, 121, 255, 0.05);
}

/* ========== Animations ========== */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(10px);
  }
  75% {
    transform: translateX(-10px);
  }
}

@keyframes dots {
  0%, 20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%, 100% {
    content: '...';
  }
}

/* ========== Mobile Responsive ========== */
@media (max-width: 767px) {
  .hero-question-input h1 {
    font-size: 1.875rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .input-text-mode textarea {
    min-height: 160px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 16px;
    padding-bottom: 60px;
  }

  .camera-button {
    width: 56px;
    height: 56px;
    bottom: 56px;
  }

  .camera-button svg {
    width: 28px;
    height: 28px;
  }

  .cta-button {
    width: 100%;
    max-width: 400px;
    font-size: 16px;
    padding: 16px 32px;
  }

  .char-counter {
    font-size: 12px;
    left: 16px;
    bottom: 16px;
  }
  
  /* Consistent spacing using design tokens */
  .hero-question-input {
    padding: 40px 20px; /* Using base values to be overridden by mobile-specific values above */
  }
}

/* ========== Tablet Responsive ========== */
/* STORY-11: Tablet Premium Optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
  .input-text-mode textarea {
    min-height: 200px;
  }

  .cta-button {
    max-width: 400px;
  }

  /* Tablet glass morphism adjustments */
  .result-card {
    padding: var(--spacing-32);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .answer-text-display {
    font-size: clamp(2rem, 4vw, 2.25rem); /* 32px - 36px responsive */
    padding: var(--spacing-10) var(--spacing-8);
  }

  .answer-block::before {
    font-size: clamp(1.75rem, 4vw, 2rem); /* 28px - 32px responsive */
    top: -45px;
  }

  /* Tablet background optimization */
  .result-section::before,
  .result-section::after {
    animation-duration: 25s; /* Slightly slower for tablet */
  }

  .quota-badge {
    animation-duration: 4s;
  }
}

/* ========== Desktop Responsive ========== */
@media (min-width: 1024px) {
  .input-text-mode textarea {
    min-height: 240px;
  }

  .camera-button {
    width: 48px;
    height: 48px;
  }

  .hero-question-input h1 {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }
}

/* ========== Focus Visible (Keyboard Navigation) ========== */
.camera-button:focus-visible,
.btn-remove-image:focus-visible,
.cta-button:focus-visible {
  outline: 3px solid #2979FF;
  outline-offset: 2px;
}

textarea:focus-visible {
  border-color: #2979FF;
  box-shadow: 0 0 0 4px rgba(41, 121, 255, 0.1);
}

/* ========== STORY-3: Loading & Modal Styles ========== */

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-overlay[hidden] {
  display: none !important;
}

.loading-content {
  background: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2979FF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-message {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.loading-submessage {
  font-size: 14px;
  color: #666;
}

/* Modal Base Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none !important;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 12px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #333;
}

.modal-content p {
  margin-bottom: 24px;
  color: #666;
  line-height: 1.5;
}

.modal-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: #2979FF;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  /* STORY-5: Ensure minimum touch target size */
  min-height: 44px;
  min-width: 44px;
}

.btn-primary:hover {
  background-color: #1c6efd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(41, 121, 255, 0.3);
}

.btn-primary:active {
  transform: scale(0.95);
  background-color: #1565C0;
}

.btn-secondary {
  background-color: #f8f9fa;
  color: #333;
  padding: 12px 24px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  /* STORY-5: Ensure minimum touch target size */
  min-height: 44px;
  min-width: 44px;
}

.btn-secondary:hover {
  background-color: #e9ecef;
}

.btn-secondary:active {
  transform: scale(0.95);
  background-color: #dee2e6;
}

/* ===================================
   STORY-5: Mobile Bottom-Sheet Modals & Fullscreen Loading
   =================================== */
@media (max-width: 767px) {
  /* Modal → Bottom Sheet (slide up from bottom) */
  .modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpModal 0.3s ease-out forwards;
    align-items: flex-end;
    justify-content: flex-start;
  }

  @keyframes slideUpModal {
    to {
      transform: translateY(0);
    }
  }

  /* iOS-style handle (visual indicator to swipe) */
  .modal-content::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 0 auto 16px;
    flex-shrink: 0;
  }

  .modal-content {
    padding: 20px;
    max-width: 100%;
    margin: 0;
    width: 100%;
  }

  .modal-actions {
    flex-direction: column;
    gap: var(--spacing-12);
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  /* Loading Overlay → Fullscreen (more visible on mobile) */
  .loading-overlay {
    background: rgba(255, 255, 255, 0.98);
  }

  .loading-content {
    padding: 40px 24px;
    max-width: 100%;
    background: transparent;
    box-shadow: none;
  }

  .spinner {
    width: 64px;
    height: 64px;
    border-width: 5px;
  }

  .loading-message {
    font-size: 20px;
    margin-top: 24px;
  }

  .loading-submessage {
    font-size: 15px;
    margin-top: 8px;
  }
}

/* ===================================
   STORY-4: Result Card Styles (2025 refresh)
   =================================== */

/* STORY-11: Premium Background Gradient & Atmosphere */
.result-section {
  padding: clamp(4rem, 10vw, 6rem) var(--spacing-5) clamp(6rem, 12vw, 9rem);
  background: var(--bg-main);
  position: relative;
  overflow: hidden;
}

/* Premium Pattern & Atmosphere */
.result-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    /* Primary radial gradient */
    radial-gradient(circle at 25% 25%, rgba(102, 126, 234, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 75% 25%, rgba(118, 75, 162, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 25% 75%, rgba(79, 172, 254, 0.05) 0%, transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(240, 147, 251, 0.04) 0%, transparent 45%),
    /* Subtle texture overlay */
    radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.02) 0%, transparent 80%);
  pointer-events: none;
  z-index: 0;
  animation: atmosphereFloat 20s ease-in-out infinite;
}

/* Floating Atmosphere Animation */
@keyframes atmosphereFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  33% {
    transform: translateY(-10px) scale(1.02);
  }
  66% {
    transform: translateY(5px) scale(0.98);
  }
}

/* Additional Atmospheric Particles */
.result-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(102, 126, 234, 0.03) 0%, transparent 30%),
    radial-gradient(circle at 85% 30%, rgba(240, 147, 251, 0.03) 0%, transparent 25%),
    radial-gradient(circle at 10% 70%, rgba(79, 172, 254, 0.02) 0%, transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(118, 75, 162, 0.02) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: particleDrift 25s ease-in-out infinite;
}

@keyframes particleDrift {
  0%, 100% {
    opacity: 0.7;
    transform: translateX(0) translateY(0);
  }
  25% {
    opacity: 1;
    transform: translateX(20px) translateY(-15px);
  }
  50% {
    opacity: 0.8;
    transform: translateX(-15px) translateY(10px);
  }
  75% {
    opacity: 0.9;
    transform: translateX(10px) translateY(-8px);
  }
}

.result-container {
  max-width: 960px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.result-card {
  /* STORY-11: Premium Glass Morphism Card */
  background: var(--glass-surface);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-3xl);
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-premium-glass);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
  position: relative;
  overflow: hidden;
  transition: transform var(--timing-premium-base),
              box-shadow var(--timing-premium-base);
}

/* Glass Morphism Hover Effect */
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium-xl),
              var(--glass-shadow),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* STORY-11: Premium Glass Surface Effects */
.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  opacity: 0.9;
  z-index: 2;
}

/* Glass Texture Overlay */
.result-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.result-overline {
  font-size: 0.85rem; /* 13.6px */
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #6c757d; /* Use site color */
}

/* Container for result overline and info icon */
.result-overline-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quota tooltip (STORY-4.1) */
.quota-tooltip {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-medium);
  z-index: 10000;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.quota-tooltip .tooltip-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quota-tooltip .tooltip-close {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-top: 8px;
  font-weight: 500;
}

.result-block {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
  position: relative;
  z-index: 3;
  padding: var(--spacing-4);
  border-radius: var(--radius-lg);
  transition: all var(--timing-premium-base);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* STORY-11: Section Container Hover Effects */
.result-block:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: var(--shadow-premium-sm);
  border-color: rgba(102, 126, 234, 0.2);
}

/* Enhanced Question Section */
.question-block:hover {
  border-color: rgba(102, 126, 234, 0.3);
  background: rgba(102, 126, 234, 0.05);
}

/* Enhanced Answer Section */
.answer-block:hover {
  border-color: rgba(76, 175, 80, 0.3);
  background: rgba(76, 175, 80, 0.05);
}

/* Enhanced Justification Section */
.justification-block:hover {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
}

/* Animações staggered (STORY-4.2) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-section {
  animation: fadeInUp 0.6s ease-out;
}

.result-block:nth-child(1) {
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.result-block:nth-child(2) {
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.result-block:nth-child(3) {
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.result-block:nth-child(4) {
  animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

/* STORY-11: Premium Floating Icon Above Answer */
.answer-block {
  position: relative;
  margin: var(--spacing-8) 0;
}

.answer-block::before {
  content: none; /* Removed emoji decoration */
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(2rem, 5vw, 2.5rem); /* 32px - 40px responsive */
  animation: premiumFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
  z-index: 4;
  transition: all var(--timing-premium-base);
}

/* Enhanced Float Animation with Rotation */
@keyframes premiumFloat {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateX(-50%) translateY(-8px) rotate(5deg) scale(1.05);
  }
  50% {
    transform: translateX(-50%) translateY(-12px) rotate(-3deg) scale(1.1);
  }
  75% {
    transform: translateX(-50%) translateY(-6px) rotate(2deg) scale(1.05);
  }
}

/* Sparkle Trail Effect */
.answer-block::after {
  content: none; /* Removed sparkle trail */
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(2rem, 5vw, 2.5rem);
  height: clamp(2rem, 5vw, 2.5rem);
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.4) 0%,
    rgba(255, 215, 0, 0.2) 30%,
    transparent 70%
  );
  animation: sparkleTrail 4s ease-in-out infinite;
  z-index: 3;
  pointer-events: none;
}

@keyframes sparkleTrail {
  0%, 100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.5);
  }
}

/* Interactive Hover Effect */
.answer-block:hover::before {
  animation-duration: 2s;
  filter: drop-shadow(0 6px 12px rgba(102, 126, 234, 0.5));
  transform: translateX(-50%) translateY(-5px) rotate(10deg) scale(1.2);
}

.result-label {
  /* STORY-11: Premium Label Typography */
  font-size: clamp(0.6875rem, 2vw, 0.75rem); /* 11px - 12px responsive */
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-3);
  font-family: 'Poppins', sans-serif;
  opacity: 0.8;
  transition: opacity var(--timing-premium-fast);
}

.result-label:hover {
  opacity: 1;
}

/* STORY-11: Premium Section Icons */
.question-block .result-label::before {
  content: var(--icon-question);
  font-size: clamp(1rem, 3vw, 1.25rem); /* 16px - 20px responsive */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: transform var(--timing-premium-fast);
}

.answer-block .result-label::before {
  content: var(--icon-answer);
  font-size: clamp(1rem, 3vw, 1.25rem); /* 16px - 20px responsive */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: transform var(--timing-premium-fast);
}

.justification-block .result-label::before {
  content: var(--icon-justification);
  font-size: clamp(1rem, 3vw, 1.25rem); /* 16px - 20px responsive */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  transition: transform var(--timing-premium-fast);
}

/* Icon hover effects */
.question-block:hover .result-label::before,
.answer-block:hover .result-label::before,
.justification-block:hover .result-label::before {
  transform: scale(1.1) rotate(5deg);
}

.question-text-display {
  /* STORY-11: Premium Question Display */
  background: rgba(248, 249, 251, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 126, 234, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--spacing-5);
  color: var(--color-text-primary);
  font-size: clamp(0.9375rem, 2.5vw, 1rem); /* 15px - 16px responsive */
  line-height: var(--line-height-relaxed);
  white-space: pre-wrap;
  transition: all var(--timing-premium-fast);
  box-shadow: var(--shadow-premium-sm);
}

.question-text-display:hover {
  background: rgba(248, 249, 251, 0.95);
  border-color: rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-premium-md);
}

/* STORY-11: Premium Justification Display */
.justification-text-display {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 251, 0.9) 100%);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-left: 4px solid var(--color-primary);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--color-text-primary);
  font-size: clamp(0.9375rem, 2.5vw, 1.0625rem); /* 15px - 17px responsive */
  line-height: var(--line-height-loose);
  white-space: pre-wrap;
  box-shadow: var(--shadow-premium-md);
  transition: all var(--timing-premium-base);
  position: relative;
  overflow: hidden;
}

.justification-text-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  opacity: 0.8;
}

.justification-text-display:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium-lg);
}

.justification-text-display p {
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.justification-text-display p:last-child {
  margin-bottom: 0;
}

.justification-text-display strong {
  color: var(--color-primary);
  font-weight: 700;
}

.answer-text-display {
  /* STORY-11: Premium Hero Typography */
  font-size: var(--answer-font-size-hero);
  font-weight: var(--answer-font-weight-hero);
  line-height: var(--answer-line-height-hero);
  text-align: center;
  font-family: 'Poppins', 'Roboto', sans-serif;

  /* Solid readable color instead of gradient */
  color: var(--color-text-primary);

  /* Enhanced Container com Glass Morphism */
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--glass-surface);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  position: relative;
  overflow: hidden;

  /* Premium Shadow System */
  box-shadow: var(--shadow-premium-glass);

  /* Enhanced Animação de entrada */
  animation: answerReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: pre-wrap;
}

.answer-text-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--glass-highlight);
}

@keyframes answerReveal {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.answer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-copy {
  /* Smaller, discrete button style */
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  padding: var(--spacing-2) var(--spacing-4);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  font-size: 0.875rem; /* 14px - smaller */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  min-height: 32px;
  min-width: auto;

  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  text-transform: none;
  letter-spacing: normal;
}

/* Removed premium shimmer effect */
.btn-copy::before {
  content: none;
}

/* Subtle Hover States */
.btn-copy:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn-copy:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-xs);
}

/* Simplified Success State */
.btn-copy.copied {
  background: var(--color-success-light);
  border-color: var(--color-success);
  color: var(--color-success);
}

.btn-copy.copied::after {
  content: none;
}

@keyframes successPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1.05);
  }
}

@keyframes successIcon {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-180deg);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

.copy-feedback {
  font-size: 13px;
  color: #1fa97c;
}

.result-footer {
  border-top: 1px solid rgba(107, 114, 128, 0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.quota-confirmation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
  border-radius: 12px;
  border: 1px solid var(--color-success-border);
  font-size: 15px;
  color: #065f46;
}

.quota-confirmation::before {
  content: none; /* Removed emoji decoration */
  font-size: 24px;
  animation: sparkle 2s ease-in-out infinite;
}

.quota-confirmation strong {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(20deg);
    opacity: 0.8;
  }
}

@media (max-width: 900px) {
  .result-card {
    padding: 28px 24px;
  }

  .answer-text-display {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  /* STORY-11: Mobile Premium Adjustments */
  .hero-question-input {
    padding: 40px var(--spacing-16) var(--spacing-40);
  }

  .question-input-wrapper {
    margin: var(--spacing-24) auto;
  }

  .hero-subtitle {
    margin-bottom: var(--spacing-32);
  }

  .cta-container {
    margin: var(--spacing-32) 0;
  }

  .quota-display {
    margin: var(--spacing-24) 0;
  }

  /* STORY-11: Mobile Background Optimization */
  .result-section {
    padding: var(--spacing-40) 0 var(--spacing-64);
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  }

  /* Simplified mobile background pattern for performance */
  .result-section::before,
  .result-section::after {
    animation: none; /* Disable animations for mobile performance */
    background-image:
      radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
  }

  .result-card {
    padding: var(--spacing-20);
    border-radius: var(--radius-2xl);
    gap: var(--spacing-20);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }

  .result-block {
    gap: var(--spacing-12);
  }

  .question-text-display,
  .justification-text-display {
    padding: var(--spacing-16);
    font-size: 15px;
  }

  /* STORY-11: Mobile Premium Answer Display */
  .answer-text-display {
    font-size: clamp(1.75rem, 6vw, 2rem); /* 28px - 32px responsive */
    padding: var(--spacing-8) var(--spacing-6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }

  .answer-block::before {
    font-size: clamp(1.5rem, 5vw, 1.75rem); /* 24px - 28px responsive */
    top: -40px;
    animation-duration: 6s; /* Slower animation for mobile */
  }

  .answer-block::after {
    display: none; /* Remove sparkle trail on mobile for performance */
  }

  .answer-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-12);
  }

  .btn-copy {
    justify-content: center;
    width: 100%;
    padding: var(--spacing-4) var(--spacing-6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Mobile optimized quota badge */
  .quota-badge {
    animation-duration: 5s; /* Slower animation for mobile */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .quota-badge::before {
    animation-duration: 4s; /* Slower sparkle for mobile */
  }

  /* Ensure minimum touch target size */
  .camera-button {
    min-height: 48px;
    min-width: 48px;
  }

  .btn-copy {
    min-height: 48px;
  }
}

@media (max-width: 600px) {
  .result-overline-container {
    flex-direction: row;
    align-items: center;
  }
  
  .result-section {
    padding: var(--spacing-36) 0 var(--spacing-64);
  }
  
  .result-card {
    padding: var(--spacing-20) var(--spacing-16);
    border-radius: 12px;
  }
  
  .answer-text-display {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .hero-question-input {
    padding: var(--spacing-24) var(--spacing-12) var(--spacing-48);
  }

  .hero-question-input h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .input-text-mode textarea {
    min-height: 144px;
    padding: var(--spacing-12);
    padding-bottom: 56px;
  }

  .camera-button {
    width: 52px;
    height: 52px;
    bottom: 52px;
  }

  .char-counter {
    font-size: 11px;
    left: var(--spacing-12);
    bottom: var(--spacing-12);
  }

  .result-card {
    padding: var(--spacing-16) var(--spacing-12);
  }

  .cta-button {
    padding: var(--spacing-16) var(--spacing-20);
    font-size: 16px;
  }

  .result-block {
    gap: var(--spacing-16);
  }

  .question-text-display,
  .justification-text-display {
    padding: var(--spacing-12);
  }

  /* STORY-4.2: Smallest responsive hero */
  .answer-text-display {
    font-size: 28px;
    padding: 24px 20px;
  }

  .quota-confirmation {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .quota-confirmation strong {
    font-size: 24px;
  }
}

/* ===================================
   STORY-11: Enhanced Accessibility - Reduced Motion & Performance
   =================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transform: none !important;
  }

  /* STORY-11: Disable premium animations */
  .quota-badge,
  .quota-badge::before,
  .answer-block::before,
  .answer-block::after,
  .result-section::before,
  .result-section::after,
  body::before {
    animation: none !important;
  }

  /* Keep essential transforms but remove animations */
  .benefit-card:hover,
  .testimonial-card:hover,
  .cta-button:not(:disabled):hover,
  .result-card:hover,
  .btn-copy:hover {
    transform: none !important;
  }

  /* Keep color changes for interactivity */
  .benefit-card:hover,
  .testimonial-card:hover,
  .result-card:hover,
  .btn-copy:hover {
    box-shadow: var(--shadow-lg) !important;
  }

  /* Simplified glass morphism for reduced motion */
  .result-card,
  .answer-text-display,
  .btn-copy,
  .quota-badge {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }
}

/* ===================================
   STORY-11: Enhanced High Contrast Mode & Performance
   =================================== */

@media (prefers-contrast: high) {
  :root {
    --color-border: #000000;
    --color-text-secondary: #000000;
    --color-bg-secondary: #FFFFFF;
    --glass-border: rgba(0, 0, 0, 0.8);
    --shadow-premium-glass: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  /* STORY-11: High contrast glass morphism */
  .result-card,
  .answer-text-display,
  .btn-copy,
  .quota-badge {
    background: #FFFFFF !important;
    border: 2px solid #000000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #000000 !important;
  }

  .answer-text-display {
    background: #000000 !important;
    color: #FFFFFF !important;
  }

  /* High contrast text gradients */
  .answer-text-display {
    background: #000000 !important;
    -webkit-text-fill-color: #FFFFFF !important;
    color: #FFFFFF !important;
  }

  .benefit-card {
    border-left-width: 6px;
    border: 3px solid var(--color-border);
  }

  .cta-button,
  .btn-copy {
    border: 3px solid var(--color-text-primary);
    background: #000000 !important;
    color: #FFFFFF !important;
  }

  .comparison-table th {
    border: 2px solid var(--color-border);
  }

  .comparison-table td {
    border: 1px solid var(--color-border);
  }

  /* Disable animations for high contrast */
  .quota-badge,
  .answer-block::before,
  .result-section::before,
  .result-section::after {
    animation: none !important;
  }
}

/* STORY-11: Performance optimizations for low-end devices */
@media (max-width: 480px) and (prefers-reduced-data: reduce) {
  /* Disable background animations and effects */
  .result-section::before,
  .result-section::after,
  body::before {
    display: none !important;
  }

  /* Simplified backgrounds */
  .result-section {
    background: #f8fafc !important;
  }

  .result-card,
  .answer-text-display,
  .btn-copy,
  .quota-badge {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }

  /* Disable animations */
  .quota-badge,
  .answer-block::before,
  .answer-block::after {
    animation: none !important;
  }
}

/* ===================================
   STORY-10: Screen Reader Optimizations
   =================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Enhanced semantic markup support */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Focus management for keyboard navigation */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 6px;
}

/* ===================================
   STORY-10: Print Styles
   =================================== */

@media print {
  .hero-question-input,
  .benefits-section,
  .comparison-section,
  .testimonials-section {
    break-inside: avoid;
  }

  .cta-button,
  .camera-button,
  .modal-overlay,
  .loading-overlay {
    display: none !important;
  }

  .benefit-card,
  .testimonial-card {
    box-shadow: none;
    border: 1px solid #000;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  h1, h2, h3 {
    color: #000;
    break-after: avoid;
  }
}

/* ===================================================================
   STORY-8: Paywall Modal & Conversion Optimization
   =================================================================== */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
}

.modal-overlay[hidden] {
  display: none;
}

/* Modal Container */
.modal-container {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 30px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: #6c757d;
  line-height: 1;
  padding: 5px 10px;
  transition: color 0.2s, transform 0.2s;
}

.modal-close:hover {
  color: #212529;
  transform: scale(1.1);
}

.modal-close:focus {
  outline: 2px solid var(--primary-color, #2979FF);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Modal Header */
.modal-header {
  text-align: center;
  margin-bottom: 25px;
}

.modal-title {
  font-size: 26px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 12px;
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 16px;
  color: #495057;
  margin: 0;
  line-height: 1.5;
}

.modal-subtitle strong {
  color: #dc3545;
  font-weight: 600;
}

/* Pricing Highlight */
.pricing-highlight {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 25px;
}

.limited-offer-badge {
  display: inline-block;
  background: #dc3545;
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.price-container {
  margin-top: 10px;
}

.price-from {
  display: block;
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 5px;
}

.original-price {
  text-decoration: line-through;
  color: #6c757d;
  font-weight: 500;
}

.price-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}

.current-price {
  font-size: 36px;
  font-weight: 700;
  color: #28a745;
  line-height: 1;
}

.price-period {
  font-size: 18px;
  color: #495057;
  font-weight: 500;
}

/* Features List */
.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.features-list li:last-child {
  border-bottom: none;
}

.feature-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-text {
  font-size: 15px;
  color: #495057;
  line-height: 1.5;
}

.feature-text strong {
  color: #212529;
  font-weight: 600;
}

/* Social Proof */
.social-proof {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 25px;
}

.rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stars {
  font-size: 18px;
  letter-spacing: 2px;
}

.rating-value {
  font-size: 18px;
  font-weight: 700;
  color: #212529;
}

.rating-count {
  font-size: 13px;
  color: #6c757d;
}

/* CTA Button (PRIMARY) */
.btn-primary-cta {
  display: block;
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, #2979FF 0%, #1c6efd 100%);
  color: white;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  margin: 0 0 15px 0;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(41, 121, 255, 0.4);
  border: none;
  cursor: pointer;
}

.btn-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(41, 121, 255, 0.5);
  color: white;
  text-decoration: none;
}

.btn-primary-cta:active {
  transform: translateY(0);
}

.btn-primary-cta:focus {
  outline: 3px solid rgba(41, 121, 255, 0.5);
  outline-offset: 2px;
}

/* Security Badge */
.security-badge {
  text-align: center;
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.security-icon {
  font-size: 16px;
}

/* Modal Footer (Secondary Links) */
.modal-footer {
  text-align: center;
  font-size: 14px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.link-secondary {
  color: #2979FF;
  text-decoration: none;
  transition: color 0.2s;
}

.link-secondary:hover {
  color: #1c6efd;
  text-decoration: underline;
}

.link-secondary:focus {
  outline: 2px solid #2979FF;
  outline-offset: 2px;
  border-radius: 2px;
}

.separator {
  margin: 0 8px;
  color: #dee2e6;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Fallback Inline Message */
.inline-quota-warning {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.inline-quota-warning[hidden] {
  display: none;
}

.warning-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.warning-icon {
  font-size: 24px;
}

.warning-text {
  font-size: 15px;
  color: #856404;
  line-height: 1.5;
}

.warning-text strong {
  color: #212529;
  font-weight: 700;
}

.warning-link {
  color: #2979FF;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #2979FF;
}

.warning-link:hover {
  color: #1c6efd;
  border-bottom-color: #1c6efd;
}

/* Mobile Responsive (Bottom Sheet Style - STORY-5) */
@media (max-width: 767px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-container {
    max-height: 85vh;
    padding: 25px 20px 20px;
    margin: 0;
    border-radius: 20px 20px 0 0;
    animation: slideUpMobile 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  /* Drag handle (visual indicator) */
  .modal-container::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: -10px auto 20px;
  }

  @keyframes slideUpMobile {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .modal-title {
    font-size: 22px;
  }

  .modal-subtitle {
    font-size: 15px;
  }

  .pricing-highlight {
    padding: 15px;
  }

  .current-price {
    font-size: 32px;
  }

  .features-list li {
    padding: 8px 0;
  }

  .feature-text {
    font-size: 14px;
  }

  .btn-primary-cta {
    position: sticky;
    bottom: 0;
    background: linear-gradient(135deg, #2979FF 0%, #1c6efd 100%);
    padding: 16px 20px;
    font-size: 16px;
    margin-top: 20px;
  }

  .modal-footer {
    padding-bottom: 10px;
  }
}

/* Extra Small Screens */
@media (max-width: 375px) {
  .modal-container {
    padding: 20px 15px 15px;
  }

  .modal-title {
    font-size: 20px;
  }

  .current-price {
    font-size: 28px;
  }

  .btn-primary-cta {
    font-size: 15px;
    padding: 14px 16px;
  }
}

/* Prevent body scroll when modal open */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* ===================================
   STORY-19: Login Modal Styles
   =================================== */

.login-modal-content {
  max-width: 450px;
}

.login-modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.login-modal-content p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-google-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-google-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-google-login:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 121, 255, 0.3);
}

.login-error-message {
  margin-top: 16px;
  padding: 12px 16px;
  background-color: #FEE;
  border: 1px solid #FCC;
  border-radius: 8px;
  text-align: left;
}

.login-error-message p {
  margin: 0;
  font-size: 14px;
  color: var(--color-error);
  line-height: 1.4;
}

.login-error-message[hidden] {
  display: none;
}

/* ===================================
   STORY-10: Benefits Section Design System
   =================================== */

.benefits-section {
  padding: var(--spacing-40) var(--spacing-8);
  background: var(--color-bg-secondary);
}

.benefits-section h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: var(--spacing-6);
  line-height: var(--line-height-tight);
}

.section-subtitle {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--spacing-32);
  line-height: var(--line-height-relaxed);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-24);
  max-width: 1200px;
  margin: 0 auto;
}

.benefit-card {
  background: var(--color-bg-primary);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-24);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.benefit-card-icon {
  width: 56px;
  height: 56px;
  background: var(--color-primary-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-4);
}

.benefit-card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.benefit-card h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0;
  line-height: var(--line-height-normal);
}

.benefit-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin: 0;
  flex-grow: 1;
}

/* ===================================
   STORY-10: Comparison Table Design System
   =================================== */

.comparison-section {
  padding: var(--spacing-40) var(--spacing-8);
  background: var(--color-bg-primary);
}

.comparison-section h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: var(--spacing-6);
  line-height: var(--line-height-tight);
}

.comparison-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comparison-table thead {
  background: var(--gradient-secondary);
}

.comparison-table th {
  color: white;
  padding: var(--spacing-20) var(--spacing-16);
  font-weight: var(--font-weight-semibold);
  text-align: left;
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
}

.comparison-table td {
  padding: var(--spacing-16);
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.comparison-table tbody tr:hover {
  background: var(--color-bg-secondary);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.feature-name {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  width: 30%;
}

.sapien-feature {
  color: var(--color-success);
  font-weight: var(--font-weight-medium);
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.traditional-feature,
.other-ai-feature {
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ===================================
   STORY-10: Testimonials Section Design System
   =================================== */

.testimonials-section {
  padding: var(--spacing-40) var(--spacing-8);
  background: var(--color-bg-secondary);
}

.testimonials-section h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: var(--spacing-6);
  line-height: var(--line-height-tight);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-32);
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-32);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.rating {
  display: flex;
  gap: var(--spacing-1);
  margin-bottom: var(--spacing-20);
}

.star {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

.star:hover {
  transform: scale(1.1);
}

.testimonial-text {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin: 0 0 var(--spacing-24) 0;
  font-style: italic;
  position: relative;
}

.testimonial-text::before {
  content: '"';
  font-size: 3rem;
  color: var(--color-primary-200);
  position: absolute;
  top: -1rem;
  left: -1rem;
  font-family: Georgia, serif;
  opacity: 0.5;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
}

.author-info {
  flex-grow: 1;
}

.author-name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-1);
}

.author-details {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}


/* ===================================
   STORY-10: Responsive Design System
   =================================== */

/* Mobile First - Benefits Section */
@media (max-width: 767px) {
  .benefits-section {
    padding: var(--spacing-32) var(--spacing-4);
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-20);
  }

  .benefit-card {
    padding: var(--spacing-20);
  }

  .benefit-card-icon {
    width: 48px;
    height: 48px;
  }

  .benefit-card-icon svg {
    width: 24px;
    height: 24px;
  }

  .benefit-card h3 {
    font-size: var(--font-size-md);
  }
}

/* Tablet - Benefits Section */
@media (min-width: 768px) and (max-width: 1023px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop - Benefits Section */
@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-32);
  }
}

/* Mobile - Comparison Table */
@media (max-width: 767px) {
  .comparison-section {
    padding: var(--spacing-32) var(--spacing-4);
  }

  .comparison-table {
    font-size: var(--font-size-xs);
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--spacing-12) var(--spacing-8);
  }

  .feature-name {
    width: 35%;
  }
}

/* Mobile - Testimonials */
@media (max-width: 767px) {
  .testimonials-section {
    padding: var(--spacing-32) var(--spacing-4);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-24);
  }

  .testimonial-card {
    padding: var(--spacing-24);
  }
}

/* Tablet - Testimonials */
@media (min-width: 768px) and (max-width: 1023px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Small Mobile */
@media (max-width: 480px) {
  .benefit-card,
  .testimonial-card {
    padding: var(--spacing-16);
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--spacing-8) var(--spacing-4);
  }
}

/* ===================================
   STORY-6: SEO Content Styles
   =================================== */

/* --- Content Sections --- */
.content-section {
  padding: 80px 0;
}

.content-section.bg-light {
  background-color: #f8f9fa;
}

.section-heading {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: #333;
}

.section-intro {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
  color: #555;
  line-height: 1.8;
}

/* --- Steps Grid (Como Funciona) --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.step-card {
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.step-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-primary);
}

/* --- Personas Grid --- */
.personas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.persona-card {
  background: white;
  padding: 24px;
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
}

.persona-card ul {
  margin-top: 12px;
  padding-left: 20px;
}

.persona-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.persona-card p {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 16px;
}

.persona-card li {
  font-size: 14px;
  margin-bottom: 8px;
  color: #666;
}

/* --- Comparison Table --- */
.comparison-table-wrapper {
  overflow-x: auto;
  margin-bottom: 32px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.comparison-table thead {
  background-color: var(--color-primary);
  color: white;
}

.comparison-ctas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.cta-box {
  background: white;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta-box h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.cta-box p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

/* --- FAQ --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  padding: 24px;
  margin-bottom: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.faq-question {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.faq-answer {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

/* --- Social Proof --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.stat-card {
  text-align: center;
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-label {
  font-size: 16px;
  color: #666;
}

.social-proof-disclaimer {
  text-align: center;
  font-size: 14px;
  color: #888;
  font-style: italic;
  margin-bottom: 32px;
}

.testimonial-stars {
  font-size: 20px;
  margin-bottom: 12px;
}

.testimonial-text {
  font-size: 15px;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 16px;
  color: #555;
}

.testimonial-author {
  font-size: 14px;
  color: #888;
}

/* --- CTA Final --- */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1c6efd 100%);
  color: white;
  text-align: center;
}

.cta-section .section-heading,
.cta-section .section-intro {
  color: white;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

.cta-features {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  font-size: 16px;
}

.cta-features .feature {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  .content-section {
    padding: 48px 0;
  }

  .section-heading {
    font-size: 26px;
  }

  .section-intro {
    font-size: 16px;
  }

  .steps-grid,
  .personas-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 36px;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn-lg {
    width: 100%;
  }

  .cta-features {
    flex-direction: column;
    gap: 12px;
  }
}

/* ===================================
   STORY-11: Cross-Browser Compatibility & Fallbacks
   =================================== */

/* Safari compatibility */
@supports not (backdrop-filter: blur(20px)) {
  .result-card,
  .answer-text-display,
  .btn-copy,
  .quota-badge {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.2);
  }
}

/* Firefox backdrop-filter fallback */
@supports (-moz-appearance: none) {
  .result-card,
  .answer-text-display,
  .btn-copy,
  .quota-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Legacy browser gradient fallbacks (STORY-13 Brand Alignment) */
@supports not (background: linear-gradient(135deg, #2979FF 0%, #1c6efd 100%)) {
  .answer-text-display {
    background: #2979FF !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
  }

  .btn-copy {
    background: #2979FF !important;
  }

  .quota-badge {
    background: #4facfe !important;
  }
}

/* CSS Custom Properties fallback for older browsers */
@supports not (--css: variables) {
  .result-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 40px;
    border-radius: 24px;
  }

  .answer-text-display {
    font-size: 42px;
    background: #2979FF;
    color: white;
    padding: 40px 32px;
    border-radius: 20px;
  }

  .btn-copy {
    background: #2979FF;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
  }

  .quota-badge {
    background: #4facfe;
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
  }
}
