:root {
  --primary-color: #0056b3;
  --primary-hover: #004494;
  --bg-color: #f4f6f9;
  --card-bg: #ffffff;
  --text-color: #333333;
  --border-radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

h3 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 600;
}

form {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  width: 100%;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

input[type="text"] {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

button {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

button:hover {
  background-color: var(--primary-hover);
}

button:active {
  transform: scale(0.98);
}

#resultado {
  margin-top: 2rem;
  width: 100%;
  max-width: 800px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--primary-color);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background-color: #f8f9fa;
}

.error-message {
  color: #dc3545;
  background: #ffe6e6;
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid #ffcccc;
}

.not-found {
  background: #e9ecef;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  line-height: 1.6;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 999999;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  position: relative;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  /* Custom Scrollbar for better UX */
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 5px;
  line-height: 1;
}

.close-button:hover {
  color: #000;
}

/* Success Layout */
.congrats-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.congrats-subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.result-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.result-id {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.result-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 0.2rem;
}

.result-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.modal-footer-img {
  width: calc(100% + 5rem - 10px);
  margin-left: calc(-2.5rem + 5px);
  margin-right: calc(-2.5rem + 5px);
  max-height: none;
  object-fit: contain;
  margin-top: 1.5rem;
  border-radius: 4px;
  /* Slight radius for the image itself */
}

/* Error Layout */
.info-icon {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.modal-message {
  line-height: 1.6;
  color: #444;
}