* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1a1a1a 50%, #1e293b 100%);
  background-attachment: fixed;
  color: #e5e5e5;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  overflow-x: hidden;
}

/* Efeito de partículas sutis no fundo */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ==========================================
   HEADER COM NAVEGAÇÃO
   ========================================== */
.header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fadeInDown 0.6s ease-out;
}

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

.logo {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-ia {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

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

.nav-link:hover {
  color: #3b82f6;
  transform: translateY(-2px);
}

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

/* ==========================================
   STATUS DE CONEXÃO COM API
   ========================================== */
.api-status {
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8), rgba(30, 30, 30, 0.8));
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.8s ease-out;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.status-icon {
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

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

.status-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #9ca3af;
}

.api-status.online {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
}

.api-status.online .status-icon {
  animation: none;
}

.api-status.offline {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

/* ==========================================
   MODAL (OVERLAY + CAIXA)
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
  border: 2px solid #3b82f6;
  border-radius: 1.5rem;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.modal-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.4));
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.modal-content {
  color: #d1d5db;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

.modal-close-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
}

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

.modal-close-btn:hover::before {
  width: 300px;
  height: 300px;
}

.modal-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.modal-close-btn:active {
  transform: translateY(0);
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.mascot {
  width: 180px;
  height: 180px;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.mascot:hover {
  transform: scale(1.05) rotate(2deg);
}

.mascot-placeholder {
  width: 100%;
  height: 100%;
}

.mascot-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tagline {
  font-size: 2.5rem;
  text-align: center;
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.tagline-ia {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

/* ==========================================
   DISCLAIMER (Aviso sobre Cobertura)
   ========================================== */
.disclaimer {
  max-width: 720px;
  width: 100%;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.5rem;
  text-align: center;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
}

.disclaimer-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #9ca3af;
  font-style: italic;
}

/* Search Bar */
.search-container {
  width: 100%;
  max-width: 900px;
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8) 0%, rgba(30, 30, 30, 0.8) 100%);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 2rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.search-container:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 15px 50px rgba(59, 130, 246, 0.2);
}

.search-container:focus-within {
  border-color: #3b82f6;
  box-shadow: 
    0 15px 50px rgba(59, 130, 246, 0.3),
    0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.search-bar {
  flex: 1;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #e5e5e5;
  outline: none;
  min-width: 0;
  padding: 0.5rem;
}

.search-bar::placeholder {
  color: #6b7280;
}

.search-icons-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 1rem;
  flex-shrink: 0;
}

.icon-btn {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
}

.icon-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.icon-btn:hover::before {
  width: 200px;
  height: 200px;
}

.icon-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.icon-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Contador de caracteres */
.char-counter {
  width: 100%;
  max-width: 900px;
  text-align: right;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: -1rem;
  margin-bottom: 1rem;
}

.char-counter.warning {
  color: #f59e0b;
}

.char-counter.error {
  color: #ef4444;
}

/* ==========================================
   WIDGET: NOTÍCIAS REAIS RECENTES
   ========================================== */
.recent-news-widget {
  max-width: 900px;
  margin: 2rem auto;
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8), rgba(30, 30, 30, 0.8));
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 1.5rem;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out 0.4s both;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.widget-icon {
  font-size: 1.8rem;
}

.widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.widget-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget-loading {
  text-align: center;
  color: #9ca3af;
  padding: 1rem;
}

.widget-news-item {
  padding: 1rem;
  background: #1a1a1a;
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.widget-news-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateX(4px);
  background: rgba(59, 130, 246, 0.05);
}

.widget-news-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.widget-news-source {
  font-size: 0.8rem;
  color: #3b82f6;
}

/* Results Section */
.results-section {
  width: 100%;
  max-width: 900px;
  margin: 3rem auto 0;
  display: none;
  animation: fadeInUp 0.6s ease-out;
}

.results-section.active {
  display: block;
}

.verification-box {
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8) 0%, rgba(30, 30, 30, 0.8) 100%);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 1.5rem;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
}

.verification-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1.25rem;
  font-weight: 500;
  flex-direction: column;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

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

.feedback-box {
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8) 0%, rgba(30, 30, 30, 0.8) 100%);
  border-radius: 1.5rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.feedback-box.verified {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

.feedback-box.unverified {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
  box-shadow: 0 10px 40px rgba(245, 158, 11, 0.3);
}

.feedback-box.false {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3);
}

.feedback-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.feedback-icon {
  display: none;
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
}

.feedback-text {
  font-size: 1.125rem;
  line-height: 1.8;
  max-width: 700px;
  color: #e5e5e5;
}

.feedback-text strong {
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Botão "Ver explicação" */
.explanation-btn {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 1rem;
  color: #3b82f6;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.explanation-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Sources Section */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.source-card {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(20, 20, 20, 0.9) 100%);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.source-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.source-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
}

.source-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: white;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.source-info {
  flex: 1;
  position: relative;
  z-index: 1;
}

.source-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #ffffff;
}

.source-link {
  font-size: 0.875rem;
  color: #3b82f6;
  word-break: break-all;
}

/* ==========================================
   DICA CONFIA
   ========================================== */
.confia-tip {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
  animation: fadeInUp 0.6s ease-out;
}

.tip-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #c084fc;
  font-size: 1.1rem;
}

.tip-icon {
  font-size: 1.8rem;
}

.tip-text {
  margin: 0;
  color: #e5e5e5;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ==========================================
   INDICADOR DE CONFIABILIDADE (TERMÔMETRO)
   ========================================== */
.trust-meter {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8), rgba(30, 30, 30, 0.8));
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.meter-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.meter-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.meter-bar-container {
  position: relative;
  height: 40px;
  background: #1a1a1a;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(59, 130, 246, 0.2);
}

.meter-bar {
  height: 100%;
  border-radius: 20px;
  transition: width 1s ease-out, background 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 1rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.meter-bar.low {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.meter-bar.medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.meter-bar.neutral {
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}

.meter-bar.high {
  background: linear-gradient(90deg, #10b981, #059669);
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0 0.5rem;
}

.meter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9ca3af;
}

/* ==========================================
   HISTÓRICO LOCAL
   ========================================== */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
}

.history-item {
  padding: 1.25rem;
  background: #1a1a1a;
  border: 2px solid rgba(59, 130, 246, 0.1);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.history-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateX(4px);
  background: rgba(59, 130, 246, 0.05);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.history-date {
  font-size: 0.85rem;
  color: #9ca3af;
}

.history-level {
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.history-level.ALTA {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.history-level.MEDIA {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.history-level.NEUTRA {
  background: rgba(99, 102, 241, 0.2);
  color: #6366f1;
}

.history-level.BAIXA {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.history-query {
  color: #e5e5e5;
  font-weight: 500;
  line-height: 1.5;
}

.history-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}

.history-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ==========================================
   MINI DASHBOARD
   ========================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8), rgba(30, 30, 30, 0.8));
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  text-align: center;
}

.dashboard-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 0.5rem;
}

.dashboard-label {
  font-size: 0.9rem;
  color: #9ca3af;
  font-weight: 500;
}

.dashboard-chart {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.8), rgba(30, 30, 30, 0.8));
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  gap: 1rem;
  margin-top: 1rem;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, #3b82f6, #8b5cf6);
  border-radius: 0.5rem 0.5rem 0 0;
  min-height: 20px;
  position: relative;
  transition: all 0.5s ease;
}

.chart-bar:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.chart-bar-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: #9ca3af;
  white-space: nowrap;
}

.chart-bar-value {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-weight: 700;
  color: #3b82f6;
}

/* ==========================================
   CAIXA DE TEXTO EXTRAÍDO (OCR)
   ========================================== */
.extracted-text-box {
  background: linear-gradient(135deg, rgba(42, 42, 42, 0.9), rgba(30, 30, 30, 0.9));
  border: 2px solid #3b82f6;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
  animation: fadeInUp 0.6s ease-out;
}

.extracted-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.extracted-icon {
  font-size: 1.5rem;
}

.extracted-title {
  color: #3b82f6;
  font-size: 1.1rem;
  font-weight: 700;
}

.extracted-content {
  background: #1a1a1a;
  border-radius: 0.75rem;
  padding: 1.25rem;
  line-height: 1.7;
  color: #e5e5e5;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 300px;
  overflow-y: auto;
}

/* Scrollbar personalizada */
.extracted-content::-webkit-scrollbar {
  width: 8px;
}

.extracted-content::-webkit-scrollbar-track {
  background: #2a2a2a;
  border-radius: 4px;
}

.extracted-content::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 4px;
}

.extracted-content::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

/* ==========================================
   CARDS DE FONTES - VERSÃO MELHORADA
   ========================================== */

.sources-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

/* Card completo */
.source-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  border: 2px solid rgba(59, 130, 246, 0.15);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.source-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.source-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

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

/* Logo Container */
.source-logo-container {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  position: relative;
}

.source-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: contain;
  background: #f9fafb;
  padding: 8px;
}

.source-logo-fallback {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.75rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Conteúdo do Card */
.source-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* TÍTULO - Elemento mais importante */
.source-article-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Metadados organizados */
.source-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: #9ca3af;
}

.source-publisher,
.source-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.source-publisher {
  color: #3b82f6;
  font-weight: 600;
}

.source-publisher i,
.source-date i {
  font-size: 1rem;
}

/* Descrição */
.source-description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #d1d5db;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Call to Action */
.source-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #3b82f6;
  font-size: 0.9rem;
  font-weight: 600;
  align-self: flex-start;
  transition: all 0.3s ease;
}

.source-card:hover .source-cta {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  transform: translateX(4px);
}

.source-cta i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.source-card:hover .source-cta i {
  transform: translateX(2px);
}

/* ==========================================
   VERSÃO SIMPLIFICADA (ALTERNATIVA)
   ========================================== */

.sources-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.sources-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.sources-header i {
  color: #3b82f6;
  font-size: 1.75rem;
}

/* Card Simplificado */
.source-card-simple {
  background: #1a1a1a;
  border: 2px solid rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.source-card-simple:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.05);
  transform: translateX(4px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.publisher-badge {
  padding: 0.375rem 0.875rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  color: #3b82f6;
  font-size: 0.85rem;
  font-weight: 600;
}

.date-badge {
  padding: 0.375rem 0.75rem;
  background: rgba(156, 163, 175, 0.1);
  border-radius: 6px;
  color: #9ca3af;
  font-size: 0.8rem;
}

.article-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #3b82f6;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.source-card-simple:hover .read-more {
  gap: 0.75rem;
}

.read-more i {
  font-size: 1rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
  .source-card {
    flex-direction: column;
    padding: 1.25rem;
  }
  
  .source-logo-container {
    width: 56px;
    height: 56px;
    align-self: flex-start;
  }
  
  .source-logo-fallback {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }
  
  .source-article-title {
    font-size: 1rem;
  }
  
  .source-meta {
    font-size: 0.8rem;
    gap: 0.75rem;
  }
  
  .source-description {
    font-size: 0.85rem;
  }
  
  .source-cta {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Simplificado */
  .sources-header h2 {
    font-size: 1.25rem;
  }
  
  .article-title {
    font-size: 0.95rem;
  }
  
  .publisher-badge,
  .date-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
  }
}

@media (max-width: 480px) {
  .source-card {
    padding: 1rem;
    gap: 1rem;
  }
  
  .source-article-title {
    font-size: 0.95rem;
  }
  
  .source-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .api-status {
    padding: 0.75rem 1rem;
  }

  .status-icon {
    font-size: 1.2rem;
  }

  .status-text {
    font-size: 0.85rem;
  }

  .modal-box {
    padding: 1.5rem;
    max-height: 85vh;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-content {
    font-size: 0.95rem;
  }

  .tagline {
    font-size: 1.75rem;
  }

  .mascot {
    width: 140px;
    height: 140px;
  }

  .disclaimer {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
  }
  
  .disclaimer-text {
    font-size: 0.8rem;
  }

  .search-container {
    padding: 1rem;
  }

  .search-bar {
    font-size: 1rem;
  }

  .search-icons-right {
    gap: 0.25rem;
    margin-left: 0.5rem;
  }

  .icon-btn {
    padding: 0.5rem;
    font-size: 1.2rem;
  }

  .char-counter {
    font-size: 0.8rem;
    margin-top: -0.75rem;
  }

  .recent-news-widget {
    padding: 1rem;
  }

  .widget-title {
    font-size: 1rem;
  }

  .widget-news-title {
    font-size: 0.9rem;
  }

  .sources-grid {
    grid-template-columns: 1fr;
  }

  .verification-box {
    padding: 1.5rem;
  }

  .verification-loading {
    font-size: 1rem;
  }

  .feedback-box {
    padding: 1.5rem;
  }

  .feedback-text {
    font-size: 1rem;
  }

  .explanation-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }

  .confia-tip {
    padding: 1rem;
  }

  .tip-text {
    font-size: 0.9rem;
  }

  .trust-meter {
    padding: 1rem;
  }

  .meter-title {
    font-size: 1rem;
  }

  .meter-bar-container {
    height: 35px;
  }

  .meter-labels {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .meter-label {
    font-size: 0.75rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dashboard-card {
    padding: 1rem;
  }

  .dashboard-value {
    font-size: 2rem;
  }

  .dashboard-label {
    font-size: 0.85rem;
  }

  .chart-bars {
    height: 150px;
  }

  .history-list {
    max-height: 400px;
  }

  .history-item {
    padding: 1rem;
  }

  .history-query {
    font-size: 0.9rem;
  }

  .extracted-text-box {
    padding: 1rem;
  }

  .extracted-title {
    font-size: 1rem;
  }

  .extracted-content {
    padding: 1rem;
    font-size: 0.9rem;
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .tagline {
    font-size: 1.5rem;
  }

  .search-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .search-bar {
    width: 100%;
  }

  .search-icons-right {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .modal-box {
    padding: 1rem;
  }

  .modal-icon {
    font-size: 2rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .widget-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-value {
    font-size: 1.75rem;
  }
}

/* ==========================================
   ANIMAÇÕES ADICIONAIS
   ========================================== */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

/* ==========================================
   UTILITÁRIOS
   ========================================== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* ==========================================
   ACESSIBILIDADE
   ========================================== */
.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;
}

/* Foco visível para navegação por teclado */
*:focus-visible {
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline-offset: 2px;
}