:root {
  --primary-color: #4361ee;
  --primary-dark: #3a56d4;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --success-color: #4bb543;
  --warning-color: #fca311;
  --danger-color: #e63946;
  --border-radius: 12px;
  --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  --icon-size: 5rem;
  --icon-padding: 0.5rem;
}

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

#fixed-icon {
  position: fixed;
  bottom: var(--icon-padding);
  right: var(--icon-padding);
  width: var(--icon-size);
  z-index: 9999;
  cursor: pointer;
}

#fixed-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f5f7ff;
  color: var(--dark-color);
  line-height: 1.6;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.app-header {
  text-align: center;
  padding: 2rem 0;
}

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

.logo-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.tagline {
  font-size: 1.1rem;
  color: var(--gray-color);
  margin-top: 0.5rem;
}

.app-content {
  flex: 1;
  padding-bottom: 2rem;
}

.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.upload-section {
  text-align: center;
}

.upload-section h2 {
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: var(--transition);
}

textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(72, 149, 239, 0.2);
}

.file-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: var(--border-radius);
  padding: 2.5rem 1rem;
  margin: 1.5rem 0;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.file-upload-area:hover {
  border-color: var(--accent-color);
  background-color: rgba(72, 149, 239, 0.05);
}

.file-upload-area.highlight {
  border-color: var(--primary-color);
  background-color: rgba(67, 97, 238, 0.1);
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.file-upload-area p {
  margin-bottom: 1rem;
  color: var(--gray-color);
}

.upload-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.upload-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

#pdfInput {
  display: none;
}

.file-info {
  font-size: 0.9rem;
  color: var(--gray-color);
}

.primary-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.progress-section {
  text-align: center;
}

.progress-section h3 {
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.progress-bar {
  height: 12px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 6px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--gray-color);
}

.results-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Estilos para os resultados */
.curriculo-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.curriculo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.curriculo-header {
  display: flex;
  justify-content: space-between;
  flex-direction: column-reverse;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.75rem;
}

.score-div {
  display: flex;
  gap: 0.25rem;
  flex-direction: row-reverse;
  justify-content: left;
  align-items: flex-end;

}

.score-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  min-width: 60px;
  text-align: center;
}

.relevancia-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.high-relevance {
  background-color: rgba(75, 181, 67, 0.15);
  color: #2e7d32;
}

.medium-relevance {
  background-color: rgba(252, 163, 17, 0.15);
  color: #ff8f00;
}

.low-relevance {
  background-color: rgba(255, 107, 53, 0.15);
  color: #ff6b35;
}

.no-relevance {
  background-color: rgba(230, 57, 70, 0.15);
  color: #e63946;
}

.resumo-curriculo {
  color: var(--gray-color);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.resumo-curriculo p {
  margin-bottom: 0.5rem;
}

.view-details {
  background-color: var(--light-color);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view-details:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Estilos para o resumo */
.analise-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.summary-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  text-align: center;
}

.summary-card h3 {
  font-size: 1rem;
  color: var(--gray-color);
  margin-bottom: 0.5rem;
}

.big-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.top-candidates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.candidate-rank {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.rank-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.rank-1 .rank-icon {
  background: #ffd700;
  /* Ouro */
}

.rank-2 .rank-icon {
  background: #c0c0c0;
  /* Prata */
}

.rank-3 .rank-icon {
  background: #cd7f32;
  /* Bronze */
}

.candidate-info h4 {
  margin-bottom: 0.25rem;
}

.candidate-info .score {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.error-message {
  background: rgba(230, 57, 70, 0.1);
  border-left: 4px solid var(--danger-color);
  padding: 1.5rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.error-message i {
  color: var(--danger-color);
  font-size: 1.5rem;
}

.error-message p {
  margin: 0;
  color: var(--dark-color);
}

/* Drag and drop styles */
.highlight {
  border-color: var(--primary-color) !important;
  background-color: rgba(67, 97, 238, 0.05) !important;
}

.curriculo-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  transition: var(--transition);
}

.curriculo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.summary-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  margin-top: 2rem;
}

.hidden {
  display: none;
}

.app-footer {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--gray-color);
  font-size: 0.9rem;
  border-top: 1px solid #e9ecef;
}

/* Responsividade */
@media (max-width: 768px) {
  .app-container {
    padding: 0 15px;
  }

  h1 {
    font-size: 2rem;
  }

  .card {
    padding: 1.5rem;
  }

  .results-container {
    grid-template-columns: 1fr;
  }
}


.contador-analise {
  position: fixed;
  top: 20px;
  right: 10px;
  background-color: #4361ee;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: none;
  z-index: 1000;
}

/* Estilo para o aviso de muitos currículos */
.aviso-muitos-curriculos {
  background-color: #fff3cd;
  color: #856404;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.aviso-muitos-curriculos i {
  font-size: 1.2em;
}

/* Melhora a responsividade para muitos itens */
.curriculo-card {
  margin-bottom: 15px;
  break-inside: avoid; /* Evita que cards quebrem entre colunas */
}

@media (min-width: 1200px) {
  #output {
    column-count: 2;
    column-gap: 20px;
  }
}

.rota-status {
  font-size: 0.85rem;
  font-weight: bold;
  margin-top: 4px;
  display: inline-block;
}

.rota-ok {
  color: green;
}

.sem-rota {
  color: orange;
}

.sem-bairro {
  color: red;
}
