/* Earnly Advanced - Enterprise Grade Styles */

/* Logo Styles for Dark Backgrounds */
.earnly-logo {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  width: auto;
  height: auto;
  max-height: 40px;
  max-width: 200px;
  object-fit: contain;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.95;
}

.earnly-logo:hover {
  opacity: 1;
  transform: scale(1.05);
  filter: brightness(1.15) contrast(1.1);
}

.earnly-logo-footer {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  width: auto;
  height: auto;
  max-height: 36px;
  max-width: 180px;
  object-fit: contain;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.earnly-logo-footer:hover {
  opacity: 1;
  transform: scale(1.03);
}

/* Responsive Logo Adjustments */
@media (max-width: 768px) {
  .earnly-logo {
    max-height: 36px;
    max-width: 160px;
  }
  .earnly-logo-footer {
    max-height: 32px;
    max-width: 140px;
  }
}

@media (max-width: 480px) {
  .earnly-logo {
    max-height: 32px;
    max-width: 140px;
  }
  .earnly-logo-footer {
    max-height: 28px;
    max-width: 120px;
  }
}

/* Global Variables */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Glass Morphism Effects */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

/* Animated Background */
.animated-bg {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating Elements */
.floating {
  animation: float 6s ease-in-out infinite;
}

.floating:nth-child(2) { animation-delay: -2s; }
.floating:nth-child(3) { animation-delay: -4s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(-10px) rotate(-1deg); }
}

/* Pulse Animation */
.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  from { box-shadow: 0 0 20px #667eea; }
  to { box-shadow: 0 0 40px #667eea, 0 0 60px #667eea; }
}

/* Interactive Buttons */
.btn-interactive {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.btn-interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Card Hover Effects */
.card-interactive {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Real-time Counter Animation */
.counter {
  font-variant-numeric: tabular-nums;
  transition: all 0.3s ease;
}

.counter-animate {
  animation: countUp 0.8s ease-out;
}

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

/* Progress Bars */
.progress-animated {
  position: relative;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.progress-animated::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 10px;
  background: var(--success-gradient);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Interactive Charts */
.chart-container {
  position: relative;
  transition: all 0.3s ease;
}

.chart-container:hover {
  transform: scale(1.05);
  z-index: 10;
}

/* Notification Styles */
.notification-modern {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-left: 4px solid #10b981;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

/* Loading Spinner */
.spinner-modern {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-left: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .glass-card {
    margin: 10px;
    border-radius: 16px;
  }
  
  .floating {
    animation-duration: 4s;
  }
  
  .btn-interactive:hover {
    transform: none;
  }
}

/* AI-Powered Elements */
.ai-glow {
  position: relative;
}

.ai-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #667eea, #764ba2, #11998e, #38ef7d);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-glow:hover::before {
  opacity: 1;
  animation: aiPulse 2s ease-in-out infinite;
}

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

/* Typography Enhancements */
.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* Interactive Elements */
.interactive-demo {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.interactive-demo:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

/* Success States */
.success-pulse {
  animation: successPulse 1s ease-out;
}

@keyframes successPulse {
  0% { background-color: #10b981; transform: scale(1); }
  50% { background-color: #059669; transform: scale(1.05); }
  100% { background-color: #10b981; transform: scale(1); }
}

/* Error States */
.error-shake {
  animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Enhanced Demo Styles */
.glass-card-demo {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.glass-card-demo:hover {
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Demo Particles Background */
.demo-particles {
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
  animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -10px) rotate(90deg); }
  50% { transform: translate(-5px, 5px) rotate(180deg); }
  75% { transform: translate(-10px, -5px) rotate(270deg); }
}

/* AI Brain Animation */
.ai-brain-animation {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #8B5CF6, #3B82F6);
  border-radius: 50%;
  position: relative;
  animation: brainPulse 2s ease-in-out infinite;
}

.ai-brain-animation::before {
  content: '🧠';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  animation: brainThink 1.5s ease-in-out infinite;
}

@keyframes brainPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
}

@keyframes brainThink {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  25% { transform: translate(-50%, -50%) rotate(-5deg); }
  75% { transform: translate(-50%, -50%) rotate(5deg); }
}

/* Processing Bar Animations */
.processing-step {
  opacity: 0;
  animation: slideInLeft 0.6s ease-out forwards;
}

.processing-step:nth-child(1) { animation-delay: 0.2s; }
.processing-step:nth-child(2) { animation-delay: 0.4s; }
.processing-step:nth-child(3) { animation-delay: 0.6s; }

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

.processing-fill {
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.8) 0%, 
    rgba(59, 130, 246, 0.9) 50%, 
    rgba(16, 185, 129, 1) 100%);
  animation: processingGlow 1s ease-in-out infinite alternate;
}

@keyframes processingGlow {
  from { box-shadow: 0 0 5px rgba(139, 92, 246, 0.5); }
  to { box-shadow: 0 0 20px rgba(139, 92, 246, 0.8); }
}

/* Enhanced Product Cards */
.enhanced-product-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.enhanced-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.enhanced-product-card:hover::before {
  left: 100%;
}

.enhanced-product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Match Score Animation */
.match-score {
  position: relative;
  overflow: hidden;
  animation: scoreReveal 0.8s ease-out;
}

.match-score::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: scoreShine 2s ease-in-out infinite;
}

@keyframes scoreReveal {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes scoreShine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Slide In Up Animation */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Metric Cards */
.metric-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Demo Query Buttons */
.demo-query-btn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.demo-query-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.demo-query-btn:hover::before {
  width: 300px;
  height: 300px;
}

.demo-query-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 120px;
  background: rgba(249, 250, 251, 0.8);
  border-radius: 12px;
  padding: 10px;
  backdrop-filter: blur(10px);
}

/* Interactive Brand Demo Styles */
.demo-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.demo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Calculator Card (for ROI calculator pages) */
.calculator-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.calculator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Ad Preview Animation */
.ad-preview-fade-in {
  animation: adPreviewFadeIn 0.8s ease-out;
}

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

/* Brand Demo Input Enhancements */
.demo-card input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.demo-card select:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Example URL Buttons */
.demo-card button[onclick^="setBrandURL"] {
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.demo-card button[onclick^="setBrandURL"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .glass-card-demo {
    padding: 1rem;
    border-radius: 15px;
  }
  
  .enhanced-product-card {
    padding: 1rem;
  }
  
  .ai-brain-animation {
    width: 30px;
    height: 30px;
  }
  
  .ai-brain-animation::before {
    font-size: 16px;
  }
  
  .demo-card {
    padding: 1.5rem;
  }
  
  .calculator-card {
    padding: 1.5rem;
  }
}