body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f2f2f2;
  margin: 0;
  padding: 0;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 50px auto;
  background-color: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1,
h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #1e3a8a;
}

form {
  margin-bottom: 30px;
}

.form-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
  min-width: 45%;
  margin-right: 10px;
  margin-bottom: 20px;
  display: block;
}

.form-group:last-child {
  margin-right: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 16px;
  color: #1e3a8a;
}

input,
select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

button[type='submit'],
#stop-resume-button,
.full-download-button {
  background-color: #007bff;
  height: 50px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  padding: 0 20px;
}

#download-button {
  background-color: #0e5ca1;
  color: white;
  flex: 1;
}

#download-button:hover {
  background-color: #0056b3;
}

.stop-button {
  background-color: #dc3545; /* Red */
  color: white;
}

.stop-button:hover {
  background-color: #c82333;
}

.resume-button {
  background-color: #28a745; /* Green */
  color: white;
}

.resume-button:hover {
  background-color: #218838;
}

.progress-box {
  margin-top: 30px;
  text-align: center;
}

.progress-box h2 {
  margin-bottom: 20px;
  color: #c82333;
}

.progress-bar {
  width: 100%;
  background-color: #e9ecef;
  border-radius: 25px;
  margin: 0 auto;
  overflow: hidden;
  height: 30px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background-color: #28a745; /* Green */
  transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

#progress-text {
  margin-top: 10px;
  font-size: 18px;
}

.full-download {
  text-align: right;
  margin-top: 20px;
}

.full-download-button {
  background-color: #6c757d; /* Gray */
  color: white;
  padding: 10px 20px;
}

.full-download-button:hover {
  background-color: #5a6268;
}

.papers-list {
  margin-top: 40px;
}

.papers-list h2 {
  margin-bottom: 20px;
}

.papers-list ul {
  list-style-type: none;
  padding: 0;
}

.papers-list li {
  background-color: #f8f9fa;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.paper-title {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

.paper-actions {
  display: flex;
  gap: 10px;
}

.download-button {
  padding: 8px 15px;
  font-size: 15px;
  background-color: #28a745; /* Green */
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
}

.download-button:hover {
  background-color: #218838;
}
.view-button {
  padding: 8px 15px;
  font-size: 15px;
  background-color: #2839a7; /* Green */
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
}

.view-button:hover {
  background-color: #3473d2;
}

.delete-button {
  padding: 8px 15px;
  font-size: 14px;
  background-color: #f8f9fa;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.log-box {
  margin-top: 40px;
}

.log-box h2 {
  margin-bottom: 15px;
}

#log-content {
  width: 100%;
  height: 200px;
  padding: 15px;
  font-size: 14px;
  font-family: monospace;
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 4px;
  resize: none;
  overflow-y: scroll;
}

.tips-section {
  margin-top: 50px;
  padding: 30px;
  background-color: #e9ecef;
  border-radius: 4px;
}

.tips-section h2 {
  margin-bottom: 20px;
}

.tips-section ul {
  list-style-type: disc;
  padding-left: 20px;
}

.tips-section li {
  margin-bottom: 15px;
  font-size: 16px;
}

.tips-section code {
  background-color: #f1f1f1;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 15px;
}
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}
.loading-text-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-tips-button {
  background-color: #0e5ca1; /* Rich blue color */
  color: white;
  text-align: center;
  padding: 10px 20px;
  border-radius: 25px; /* Fully rounded ends */
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  border: none;
  width: 250px; /* Fixed width */
  height: 30px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  margin-left: 750px;
}

.search-tips-button:hover {
  background-color: #0d4f8c; /* Slightly darker on hover */
}

.build-database-btn {
  background-color: #2839a7; /* Blue background */
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-family: Arial, sans-serif;
  transition: background-color 0.3s ease;
  text-decoration: none;
  font-size: 16px;
  margin-left: 78%;
}

.build-database-btn:hover {
  background-color: #1d4ed8; /* Slightly darker blue on hover */
}

.build-database-btn::after {
  content: '→'; /* Right arrow */
  margin-left: 10px;
  font-size: 18px;
}

.scrollable-list {
  max-height: 350px;
  overflow-y: auto;
}
