body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 400px;
  width: 100%;
}

h1 {
  margin-bottom: 1rem;
}

input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  padding: 0.5rem 1rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}

#results {
  margin-top: 1rem;
  text-align: left;
}

/* Scrollable container for the results */
.results-container {
  max-height: 300px; /* Adjust height as needed */
  overflow-y: auto;
  margin-top: 1rem;
  padding: 0.5rem;
  border: 1px solid var(--text-muted);
  border-radius: 0.5rem;
  background: var(--card-bg);
}

/* Style for individual list items */
.results-container ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.results-container li {
  padding: 0.5rem;
  border-bottom: 1px solid var(--text-muted);
}

.results-container li:last-child {
  border-bottom: none;
}

.results-container a {
  color: var(--primary);
  text-decoration: none;
  display: block; /* Make the entire list item clickable */
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.results-container a:hover {
  background: rgba(56, 189, 248, 0.1); /* Light background on hover */
  color: var(--secondary);
}

/* Loading state styles */
.loading-state {
  text-align: center;
  padding: 1rem;
}

.loading-note {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Stats summary styles */
.stats-summary {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  text-align: center;
}

.stats-summary p {
  margin: 0;
  font-size: 0.9rem;
}

.stats-summary p:last-child {
  color: #dc3545;
  font-weight: bold;
}

/* Success message */
.success {
  color: #28a745;
  text-align: center;
  padding: 1rem;
  font-weight: bold;
}

/* Error message */
.error {
  color: #dc3545;
  text-align: center;
  padding: 1rem;
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid #dc3545;
}

/* Results list improvements */
.results-list {
  margin-top: 1rem;
}

.results-list ul {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.results-list li {
  transition: background-color 0.2s;
}

.results-list li:hover {
  background-color: #f8f9fa;
}

/* Button loading state */
button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Partial results warning */
.partial-results-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 1rem;
  border-radius: 8px;
}

.partial-results-warning p {
  margin: 0;
}

.partial-results-warning p:first-child {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.partial-note {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Pagination styles */
.pagination-controls {
  margin-top: 2rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-section {
  margin-bottom: 1rem;
}

.pagination-section h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: #495057;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pagination-buttons button {
  padding: 0.5rem 1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.pagination-buttons button:hover:not(:disabled) {
  background-color: #0056b3;
}

.pagination-buttons button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.pagination-buttons span {
  font-size: 0.9rem;
  color: #6c757d;
}

.pagination-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.pagination-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #6c757d;
}

.pagination-note {
  font-size: 0.8rem !important;
  color: #adb5bd !important;
  margin-top: 0.25rem !important;
}

.completion-status {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 8px;
}

.complete-results {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 1rem;
  border-radius: 8px;
}

.complete-results p {
  margin: 0;
}

.complete-results p:first-child {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.complete-note {
  font-size: 0.9rem;
  line-height: 1.5;
}
