/* Estilos customizados para AI Citation Optimizer */

/* Reset e base */
html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  line-height: 1.6;
}

/* Animações customizadas */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-purple {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

/* Classes de animação */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.pulse-purple {
  animation: pulse-purple 2s ease-in-out infinite;
}

.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Gradientes customizados */
.gradient-purple-blue {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
}

.gradient-text-purple {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cards com efeitos especiais */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.metric-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

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

/* Barras de progresso customizadas */
.progress-bar {
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

/* Botões com efeitos especiais */
.btn-gradient {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

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

.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

/* Tags de prioridade */
.priority-high {
  border-left: 4px solid #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.priority-medium {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.priority-low {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

/* Scores com cores dinâmicas */
.score-excellent {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: white;
}

.score-good {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  color: white;
}

.score-average {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
}

.score-poor {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: white;
}

/* Tooltips */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
}

/* Elementos de loading */
.loading-dots::after {
  content: '';
  animation: loading-dots 1.5s steps(4, end) infinite;
}

@keyframes loading-dots {
  0%, 20% { 
    color: rgba(0,0,0,0);
    text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0), .75em 0 0 rgba(0,0,0,0);
  }
  40% { 
    color: black; 
    text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0), .75em 0 0 rgba(0,0,0,0);
  }
  60% { 
    text-shadow: .25em 0 0 black, .5em 0 0 rgba(0,0,0,0), .75em 0 0 rgba(0,0,0,0);
  }
  80%, 100% { 
    text-shadow: .25em 0 0 black, .5em 0 0 black, .75em 0 0 black;
  }
}

/* Responsividade customizada */
@media (max-width: 768px) {
  .metric-card {
    padding: 1rem;
  }
  
  .gradient-text-purple {
    font-size: 1.25rem;
  }
  
  .btn-gradient {
    padding: 0.75rem 1.5rem;
  }
}

/* Estados de focus customizados */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  border-color: #7c3aed;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #6d28d9, #2563eb);
}

/* Efeitos de hover para links */
.link-hover {
  position: relative;
  transition: color 0.3s ease;
}

.link-hover::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  transition: width 0.3s ease;
}

.link-hover:hover::after {
  width: 100%;
}

/* Badges personalizados */
.badge-ai {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-local {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Indicadores de status */
.status-online {
  position: relative;
}

.status-online::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Transições suaves para mudanças de estado */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  .glass-card {
    background: white !important;
    border: 1px solid #e5e7eb !important;
  }
}