/**
 * Enhanced UI Components for AI Gift Finder
 * Phase 1: Quick Win Implementations
 */

/* ==================== Hero Section Enhancements ==================== */
/* All hero styling consolidated below at line 441 */

/* ==================== Button Pulse Animation ==================== */
.button-pulse {
  position: relative;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.button-pulse::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: inherit;
  opacity: 0;
  animation: pulse-ring 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0;
  }
}

/* ==================== Trust Bar ==================== */
.trust-bar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-8);
  flex-wrap: wrap;
  margin-top: var(--spacing-8);
  margin-left: auto;
  margin-right: auto;
  padding: var(--spacing-5);
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.trust-icon {
  font-size: var(--font-size-2xl);
}

.trust-text {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: rgba(31, 41, 55, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==================== How It Works Section ==================== */
.how-it-works {
  margin: calc(var(--spacing-16) * 0.7) 0; /* 30% reduction */
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-10);
  position: relative;
  padding-bottom: var(--spacing-4);
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: var(--radius-full);
}

.steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-4);
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  text-align: center;
  padding: var(--spacing-8);
  margin-top: var(--spacing-8);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: var(--radius-2xl);
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid rgba(102, 126, 234, 0.1);
  overflow: visible;
}

.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.step:hover::before {
  opacity: 1;
}

.step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--font-size-lg);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  border: 3px solid white;
  z-index: 1;
}

.step-icon {
  font-size: 3rem;
  margin: var(--spacing-4) 0;
}

.step-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--spacing-2);
}

.step-description {
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
}

.step-arrow {
  font-size: var(--font-size-3xl);
  color: var(--color-gray-400);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ==================== Testimonials Section ==================== */
.testimonials {
  margin: var(--spacing-16) 0;
}

.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-6);
  margin-top: var(--spacing-8);
}

.testimonial-card {
  background: linear-gradient(135deg, #ffffff 0%, #fef3f8 100%);
  padding: var(--spacing-8);
  border-radius: var(--radius-2xl);
  box-shadow: 0 10px 40px rgba(244, 114, 182, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(244, 114, 182, 0.1);
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: var(--spacing-4);
  left: var(--spacing-4);
  font-size: 4rem;
  font-family: Georgia, serif;
  color: rgba(244, 114, 182, 0.1);
  line-height: 1;
}

.testimonial-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(244, 114, 182, 0.25);
  border-color: rgba(244, 114, 182, 0.3);
}

.testimonial-text {
  font-size: var(--font-size-lg);
  color: var(--color-gray-800);
  margin-bottom: var(--spacing-5);
  font-style: italic;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
  margin-bottom: var(--spacing-2);
}

.testimonial-rating {
  font-size: var(--font-size-xl);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.3));
}

/* ==================== Header & Logo Enhancement ==================== */
.header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  padding: var(--spacing-6) var(--spacing-4);
  width: 100%;
  margin-inline: calc(50% - 50vw);
  margin-bottom: 0;
  text-align: center;
  box-sizing: border-box;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(20px, 20px) scale(1.1); opacity: 0.8; }
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  justify-content: center;
  position: relative;
  z-index: 1;
}

.logo-icon {
  font-size: 3rem;
  animation: bounceIcon 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.3));
}

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

.logo-text {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.05em;
}

.tagline {
  animation: fadeInUp 1s ease-out 0.3s both;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-top: var(--spacing-2);
  position: relative;
  z-index: 1;
}

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

/* ==================== Hero Section Enhancement ==================== */
.hero {
  position: relative;
  width: 100% !important;
  max-width: none !important;
  margin-top: 0;
  margin-bottom: var(--spacing-12);
  margin-inline: calc(50% - 50vw) !important;
  /* 30% reduced vertical padding: 3rem→2.1rem, 6rem→4.2rem, 4rem→2.8rem, 7rem→4.9rem */
  padding: clamp(2.1rem, 5.6vw, 4.2rem) var(--spacing-6) clamp(2.8rem, 7vw, 4.9rem);
  box-sizing: border-box;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.6) 100%),
    url('/LP_image.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-2xl);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.1),
    0 20px 60px rgba(99, 102, 241, 0.12),
    0 10px 30px rgba(236, 72, 153, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
  border-radius: var(--radius-2xl);
  z-index: 0;
  animation: heroGlow 10s ease-in-out infinite;
}

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

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(99, 102, 241, 0.03) 60deg, transparent 120deg, rgba(236, 72, 153, 0.03) 180deg, transparent 240deg, rgba(251, 191, 36, 0.03) 300deg, transparent 360deg);
  animation: rotate 30s linear infinite;
  z-index: 0;
}

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

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-sparkles {
  font-size: 3rem;
  text-align: center;
  margin-bottom: var(--spacing-4);
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.hero-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-1);
  flex-wrap: wrap;
}

.hero-title-main {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  background: linear-gradient(135deg, #111827 0%, #4B5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out both;
}

.hero-title-accent {
  font-size: var(--font-size-4xl);
  font-weight: 900;
  background: linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out 0.2s both, pulse 2s ease-in-out 1.5s infinite;
}

.hero-description {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-subtitle {
  margin-bottom: var(--spacing-6); /* 24px gap below subtitle to prevent button overlap */
  padding: 0 var(--spacing-4); /* Horizontal padding for better readability */
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.button-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-3);
  animation: fadeInUp 0.8s ease-out 0.8s both, floatButton 3s ease-in-out infinite;
  margin-top: var(--spacing-8); /* 32px gap from subtitle to prevent overlap */
  margin-bottom: var(--spacing-8); /* 32px gap to trust bar */
  margin-inline: auto;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4), 0 0 0 0 rgba(102, 126, 234, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10; /* Ensure button stays above other elements */
}

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

.button-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.5), 0 0 0 8px rgba(102, 126, 234, 0.2);
}

.button-primary:hover::before {
  width: 400px;
  height: 400px;
}

.button-icon {
  font-size: var(--font-size-xl);
  animation: pulse 1.5s ease-in-out infinite;
}

.button-arrow {
  font-size: var(--font-size-xl);
  transition: transform var(--transition-base);
}

.button-primary:hover .button-arrow {
  transform: translateX(4px);
}

@media (min-width: 768px) {
  .hero-title-main {
    font-size: var(--font-size-4xl);
  }

  .hero-title-accent {
    font-size: 5rem;
  }
}

/* ==================== Stage 2 Refine Banner (Sticky) ==================== */
.refine-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gradient-warm);
  box-shadow: var(--shadow-lg);
  animation: slideDown var(--transition-slow) ease-out;
}

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

.refine-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-4) var(--spacing-6);
  gap: var(--spacing-4);
}

.refine-banner-text {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  flex: 1;
}

.refine-banner-icon {
  font-size: var(--font-size-3xl);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.refine-banner-message {
  color: white;
}

.refine-banner-message strong {
  font-size: var(--font-size-lg);
  display: block;
  margin-bottom: var(--spacing-1);
}

.refine-banner-sub {
  font-size: var(--font-size-sm);
  opacity: 0.9;
  margin: 0;
}

.refine-banner-cta {
  padding: var(--spacing-3) var(--spacing-6);
  background: white;
  color: var(--color-primary);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.refine-banner-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.refine-banner-cta:active {
  transform: translateY(0);
}

/* ==================== Filter Bar ==================== */
.filter-bar {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  margin-bottom: var(--spacing-8);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-5);
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.filter-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: var(--spacing-1);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
}

.filter-chip {
  padding: var(--spacing-2) var(--spacing-4);
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.filter-chip:hover {
  background: var(--color-gray-200);
  border-color: var(--color-primary-light);
}

.filter-chip.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.filter-reset {
  align-self: flex-end;
  padding: var(--spacing-2) var(--spacing-6);
  background: transparent;
  color: var(--color-gray-600);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-reset:hover {
  background: var(--color-gray-100);
  border-color: var(--color-gray-400);
  color: var(--color-gray-800);
}

/* ==================== Product Card Enhancements ==================== */
.product-image-wrapper {
  position: relative;
  overflow: hidden;
}

.product-badges {
  position: absolute;
  top: var(--spacing-2);
  left: var(--spacing-2);
  display: flex;
  gap: var(--spacing-2);
  z-index: 2;
}

.badge {
  padding: var(--spacing-1) var(--spacing-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  display: inline-block;
  backdrop-filter: blur(8px);
}

.badge-match {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(79, 70, 229, 0.95));
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.badge-popular {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.95), rgba(219, 39, 119, 0.95));
  color: white;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.btn-favorite {
  position: absolute;
  top: var(--spacing-2);
  right: var(--spacing-2);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--font-size-xl);
  color: var(--color-gray-400);
  transition: all var(--transition-base);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.btn-favorite:hover {
  transform: scale(1.1);
  color: var(--color-secondary);
}

.btn-favorite.active {
  color: var(--color-secondary);
  background: var(--color-secondary-light);
}

.score-summary {
  margin-top: var(--spacing-4);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-3);
  background: var(--color-gray-50);
  cursor: pointer;
  transition: background var(--transition-base);
}

.score-header:hover {
  background: var(--color-gray-100);
}

.score-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.score-toggle {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  transition: transform var(--transition-base);
}

.score-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.score-detail.expanded {
  max-height: 500px;
}

.score-detail.expanded .score-toggle {
  transform: rotate(180deg);
}

.score-breakdown {
  padding: var(--spacing-4);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
}

.score-item {
  display: grid;
  grid-template-columns: 60px 1fr 50px;
  align-items: center;
  gap: var(--spacing-2);
}

.score-name {
  font-size: var(--font-size-xs);
  color: var(--color-gray-600);
  font-weight: 500;
}

.score-bar {
  height: 8px;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.score-value {
  font-size: var(--font-size-xs);
  color: var(--color-gray-700);
  font-weight: 600;
  text-align: right;
}

.score-reasons {
  padding: 0 var(--spacing-4) var(--spacing-4);
  border-top: 1px solid var(--color-gray-200);
}

.score-reason-title {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-gray-700);
  margin: var(--spacing-3) 0 var(--spacing-2);
}

.score-reason-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.score-reason-list li {
  font-size: var(--font-size-xs);
  color: var(--color-success);
  padding: var(--spacing-1) 0;
}

.btn-product-cta {
  width: 100%;
  margin-top: var(--spacing-4);
  padding: var(--spacing-4);
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.btn-product-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

/* ==================== Product Card Rich Design ==================== */
.product-card {
  position: relative;
  transition: all var(--transition-slow);
  overflow: visible;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  border-radius: var(--radius-xl);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

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

.product-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(99, 102, 241, 0.15),
    0 10px 20px rgba(236, 72, 153, 0.1);
}

.product-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.product-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:hover .product-image-wrapper::after {
  opacity: 1;
}

.product-image {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card:hover .product-image {
  transform: scale(1.1);
}

.product-badges {
  position: absolute;
  top: var(--spacing-3);
  left: var(--spacing-3);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
  z-index: 2;
}

.badge {
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  backdrop-filter: blur(8px);
  animation: slideInLeft 0.5s ease-out both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.badge-match {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(79, 70, 229, 0.95) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.badge-popular {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(251, 146, 60, 0.95) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  animation-delay: 0.1s;
}

.btn-favorite {
  position: absolute;
  top: var(--spacing-3);
  right: var(--spacing-3);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  font-size: var(--font-size-2xl);
  color: var(--color-gray-400);
  cursor: pointer;
  transition: all var(--transition-base);
  z-index: 2;
}

.btn-favorite:hover {
  background: white;
  transform: scale(1.1);
  color: var(--color-secondary);
}

.btn-favorite.active {
  color: var(--color-secondary);
  animation: heartBeat 0.5s ease-out;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
}

.product-info {
  padding: var(--spacing-6);
  background: white;
  position: relative;
}

.product-name {
  transition: color var(--transition-base);
}

.product-card:hover .product-name {
  color: var(--color-primary);
}

.product-price {
  background: linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-score {
  animation: slideInRight 0.5s ease-out both;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==================== Scroll Animations ==================== */
@keyframes fadeInUpScroll {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature,
.testimonial-card,
.step {
  animation: fadeInUpScroll 0.8s ease-out both;
}

.feature:nth-child(1) { animation-delay: 0.1s; }
.feature:nth-child(2) { animation-delay: 0.2s; }
.feature:nth-child(3) { animation-delay: 0.3s; }

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(3) { animation-delay: 0.2s; }
.step:nth-child(5) { animation-delay: 0.3s; }

/* ==================== Rich Visual Enhancements ==================== */

/* Floating Elements Animation */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(3deg); }
  66% { transform: translateY(-10px) rotate(-3deg); }
}

.hero-sparkles::before,
.hero-sparkles::after {
  content: '✨';
  position: absolute;
  font-size: 2rem;
  animation: float 6s ease-in-out infinite;
  opacity: 0.4;
}

.hero-sparkles::before {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
}

.hero-sparkles::after {
  right: 10%;
  top: 20%;
  animation-delay: 2s;
}

/* Feature Cards Rich Design */
.feature {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #6366F1, #EC4899, #F59E0B);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.feature:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow:
    0 25px 50px rgba(99, 102, 241, 0.2),
    0 15px 30px rgba(236, 72, 153, 0.15);
}

/* How It Works Section Enhancement */
.how-it-works {
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.02) 50%, transparent 100%);
  padding: calc(var(--spacing-16) * 0.7) 0; /* 30% reduction */
}

.section-title {
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #6366F1, #EC4899, #F59E0B);
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.step {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.step::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #6366F1, #EC4899);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.step:hover::before {
  opacity: 0.5;
}

.step-number {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

/* Testimonials Rich Design */
.testimonials {
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(236, 72, 153, 0.02) 50%, transparent 100%);
  padding: var(--spacing-16) 0;
}

.testimonial-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(236, 72, 153, 0.1);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 80px;
  font-family: Georgia, serif;
  color: rgba(99, 102, 241, 0.1);
  line-height: 1;
}

.testimonial-card:hover {
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow:
    0 20px 40px rgba(236, 72, 153, 0.15),
    0 10px 20px rgba(99, 102, 241, 0.1);
}

/* Decorative Background Elements */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: float 25s ease-in-out infinite reverse;
}

/* Glowing Text Effect for Important Elements */
.hero-title-accent,
.logo-ai {
  text-shadow:
    0 0 20px rgba(99, 102, 241, 0.3),
    0 0 40px rgba(236, 72, 153, 0.2);
}

/* Button Enhanced Glow */
.button-primary {
  box-shadow:
    0 10px 30px rgba(99, 102, 241, 0.3),
    0 5px 15px rgba(236, 72, 153, 0.2);
}

.button-primary:hover {
  box-shadow:
    0 15px 40px rgba(99, 102, 241, 0.4),
    0 8px 20px rgba(236, 72, 153, 0.3);
}

/* Product Results Enhancement */
#product-results {
  position: relative;
  padding: var(--spacing-8) 0;
}

#product-results::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.3), transparent);
}

/* ==================== Mobile Responsive ==================== */
@media (max-width: 640px) {
  .hero {
    /* 30% reduced mobile padding: 2rem→1.4rem, 4rem→2.8rem, 3rem→2.1rem, 5rem→3.5rem */
    padding: clamp(1.4rem, 4.2vw, 2.8rem) var(--spacing-4) clamp(2.1rem, 5.6vw, 3.5rem);
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-description {
    font-size: var(--font-size-lg);
  }

  .hero-subtitle {
    font-size: var(--font-size-sm);
    padding: 0 var(--spacing-2); /* Reduced horizontal padding for mobile */
    margin-bottom: var(--spacing-4); /* Reduced gap on mobile */
  }

  .button-primary {
    margin-top: var(--spacing-6); /* Reduced from 32px to 24px on mobile */
    margin-bottom: var(--spacing-6);
    padding: var(--spacing-4) var(--spacing-6); /* Comfortable tap target */
    font-size: var(--font-size-base);
  }

  .trust-bar {
    flex-direction: column;
    gap: var(--spacing-4);
  }

  .steps {
    flex-direction: column;
  }

  .step-arrow {
    transform: rotate(90deg);
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }

  .product-badges {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-favorite {
    width: 36px;
    height: 36px;
    font-size: var(--font-size-lg);
  }

  .score-item {
    grid-template-columns: 50px 1fr 45px;
  }

  .refine-banner-content {
    flex-direction: column;
    align-items: stretch;
    padding: var(--spacing-3);
    gap: var(--spacing-3);
  }

  .refine-banner-text {
    gap: var(--spacing-2);
  }

  .refine-banner-icon {
    font-size: var(--font-size-2xl);
  }

  .refine-banner-message strong {
    font-size: var(--font-size-base);
  }

  .refine-banner-sub {
    font-size: var(--font-size-xs);
  }

  .refine-banner-cta {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    font-size: var(--font-size-sm);
  }

  .filter-bar {
    padding: var(--spacing-4);
    gap: var(--spacing-4);
  }

  .filter-options {
    gap: var(--spacing-1);
  }

  .filter-chip {
    font-size: var(--font-size-xs);
    padding: var(--spacing-1) var(--spacing-3);
  }

  .filter-reset {
    width: 100%;
    margin-top: var(--spacing-2);
  }
}

/* ==================== Rich Question UI Enhancements ==================== */

/* Question choice button animations */
.choice-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.choice-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.choice-btn:hover::before {
  left: 100%;
}

.choice-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.choice-btn:active {
  transform: translateY(-2px) scale(0.98);
}

/* Selected state animation */
.choice-btn.selected {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.4);
  animation: select-bounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes select-bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1.05);
  }
}

/* Question container fade-in animation */
.question-container {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Choice options stagger animation */
.choice-options {
  display: grid;
  gap: var(--spacing-4);
}

.choice-btn:nth-child(1) { animation: fadeInScale 0.4s ease 0.1s backwards; }
.choice-btn:nth-child(2) { animation: fadeInScale 0.4s ease 0.2s backwards; }
.choice-btn:nth-child(3) { animation: fadeInScale 0.4s ease 0.3s backwards; }
.choice-btn:nth-child(4) { animation: fadeInScale 0.4s ease 0.4s backwards; }
.choice-btn:nth-child(5) { animation: fadeInScale 0.4s ease 0.5s backwards; }
.choice-btn:nth-child(6) { animation: fadeInScale 0.4s ease 0.6s backwards; }
.choice-btn:nth-child(7) { animation: fadeInScale 0.4s ease 0.7s backwards; }
.choice-btn:nth-child(8) { animation: fadeInScale 0.4s ease 0.8s backwards; }
.choice-btn:nth-child(9) { animation: fadeInScale 0.4s ease 0.9s backwards; }
.choice-btn:nth-child(10) { animation: fadeInScale 0.4s ease 1.0s backwards; }

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==================== AI Processing Loader ==================== */

.ai-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

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

/* Center loading screen - hide by default, show only when active */
#loading-screen {
  display: none;
}

#loading-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.ai-loading-content {
  text-align: center;
  color: white;
  max-width: 400px;
  padding: var(--spacing-8);
}

.ai-brain-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-6);
  animation: brainPulse 2s ease-in-out infinite;
}

@keyframes brainPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.8));
  }
}

.ai-loading-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--spacing-3);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
  background-size: 200% 100%;
}

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

.ai-loading-text {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-6);
}

.ai-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--spacing-4);
}

.ai-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  background-size: 200% 100%;
  animation: progressSlide 2s ease-in-out infinite;
  border-radius: var(--radius-full);
}

@keyframes progressSlide {
  0% {
    width: 0%;
    background-position: 0% 0;
  }
  50% {
    width: 70%;
    background-position: 100% 0;
  }
  100% {
    width: 100%;
    background-position: 200% 0;
  }
}

.ai-loading-dots {
  display: flex;
  gap: var(--spacing-2);
  justify-content: center;
}

.ai-loading-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.ai-loading-dot:nth-child(1) { animation-delay: 0s; }
.ai-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Progress indicator enhancement */
.progress-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--spacing-2);
  font-weight: 600;
  animation: fadeInUp 0.5s ease;
}

/* Stage indicator */
.stage-indicator {
  display: inline-block;
  padding: var(--spacing-2) var(--spacing-4);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-radius: var(--radius-full);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--spacing-4);
  animation: fadeInUp 0.5s ease;
}

/* Mobile optimizations for rich UI */
@media (max-width: 640px) {
  .choice-btn:hover {
    transform: translateY(-2px) scale(1.01);
  }

  .ai-brain-icon {
    font-size: 3rem;
  }

  .ai-loading-title {
    font-size: var(--font-size-xl);
  }
}
/**
 * Enhanced UI Components for AI Gift Finder
 * Phase 1: UX Improvement Implementation
 */

/* ==================== Phase 1 UX Improvements ==================== */

/* 1. Badges Container */
.hero-badges-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* 2. Speed Indicator */
.hero-speed-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  border-radius: 50px;
  border: 2px solid rgba(251, 191, 36, 0.4);
  font-weight: 600;
  font-size: 0.875rem;
  color: #1F2937;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

/* 3. "No Login" Badge */
.hero-no-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(79, 70, 229, 0.12) 100%);
  border-radius: 50px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  font-weight: 600;
  font-size: 0.875rem;
  color: #1F2937;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
    transform: scale(1.02);
  }
}

@keyframes lightning {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

/* 3. Enhanced CTA Button - Shimmer animation removed to prevent visual movement */
.button-shimmer {
  position: relative;
  overflow: hidden;
}

/* 4. Live User Counter */
.live-users-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 20px;
  padding: 10px 20px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 50px;
  border: 2px solid rgba(16, 185, 129, 0.25);
  font-size: 0.875rem;
  color: #1F2937;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.live-users-indicator strong {
  color: #059669;
  font-weight: 700;
}

/* 5. Confetti Animation Container */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
}

.confetti.active {
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* 6. Enhanced Loading Screen with Progress */
.ai-progress-breakdown {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.progress-step.completed,
.progress-step.active {
  opacity: 1;
}

.progress-step .step-icon {
  font-size: 1.5rem;
}

.progress-step .step-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366F1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-step .step-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.progress-step.completed .step-icon {
  color: #10B981;
}

.progress-step.active .step-label {
  color: #6366F1;
}

/* 7. Results Reveal Animation */
.results-reveal {
  animation: results-appear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes results-appear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
  50% {
    transform: scale(1.05) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
  .hero-no-login-badge {
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    font-size: 0.75rem;
  }

  .hero-speed-indicator {
    font-size: 0.875rem;
  }

  .live-users-indicator {
    font-size: 0.75rem;
  }

  .ai-progress-breakdown {
    gap: 16px;
  }

  .progress-step .step-label {
    font-size: 0.75rem;
  }
}
/* ========================================
   STAGE INDICATOR
   ======================================== */

.stage-indicator-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.stage-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.stage-step.active {
  opacity: 1;
  transform: scale(1.1);
}

.stage-step.completed {
  opacity: 0.7;
}

.stage-step.completed .stage-number {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.stage-step.completed .stage-number::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px;
  font-weight: bold;
}

.stage-number {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  border: 2px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.stage-step.active .stage-number {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  border-color: #6366F1;
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.stage-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  transition: color 0.3s ease;
}

.stage-step.active .stage-label {
  color: rgba(255, 255, 255, 0.95);
}

.stage-connector {
  width: 40px;
  height: 2px;
  background: rgba(99, 102, 241, 0.2);
  margin: 0 8px;
  transition: background 0.3s ease;
}

.stage-connector.completed {
  background: #10B981;
}

/* ========================================
   SOCIAL PROOF STRIP
   ======================================== */

.social-proof-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.social-proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.social-proof-number {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #6366F1; /* Fallback for browsers that don't support background-clip */
}

.social-proof-label {
  font-size: 0.75rem;
  color: #4B5563;
  font-weight: 500;
}

.social-proof-divider {
  width: 1px;
  height: 40px;
  background: rgba(99, 102, 241, 0.2);
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
  .stage-indicator-container {
    padding: 16px 12px;
  }

  .stage-number {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .stage-label {
    font-size: 0.625rem;
  }

  .stage-connector {
    width: 24px;
    margin: 0 4px;
  }

  .social-proof-strip {
    gap: 16px;
    padding: 12px 16px;
  }

  .social-proof-number {
    font-size: 1.25rem;
  }

  .social-proof-label {
    font-size: 0.625rem;
  }

  .social-proof-divider {
    height: 32px;
  }
}

/* ========================================
   ENHANCED PRODUCT CARD ANIMATIONS
   ======================================== */

.product-card {
  animation: fadeInUp 0.5s ease-out;
  animation-fill-mode: both;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

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

/* ========================================
   LOADING MESSAGE TRANSITIONS
   ======================================== */

.ai-loading-title,
.ai-loading-text {
  transition: opacity 0.3s ease;
}

/* ========================================
   MATCH INDICATOR STYLES
   ======================================== */

.match-indicator {
  margin-top: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-radius: 12px;
  border: 2px solid rgba(99, 102, 241, 0.2);
}

.match-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4B5563;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.match-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.match-bar {
  flex: 1;
  height: 24px;
  background: rgba(229, 231, 235, 0.5);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.match-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981 0%, #6366F1 50%, #8B5CF6 100%);
  border-radius: 12px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
  position: relative;
}

.match-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.match-percentage {
  font-size: 1.125rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 48px;
  text-align: right;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .match-indicator {
    padding: 10px;
  }

  .match-label {
    font-size: 0.8125rem;
  }

  .match-bar {
    height: 20px;
  }

  .match-percentage {
    font-size: 1rem;
    min-width: 42px;
  }
}
