body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  padding: 20px;
  text-align: center;
}

.container {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  margin: 50px auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

input[type="text"] {
  width: 80%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  background-color: #007BFF;
  color: #fff;
  cursor: pointer;
}

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

.citation-container {
  margin-top: 20px;
  text-align: left;
  padding: 15px;
  background-color: #f9f9f9;
  border-left: 4px solid #007BFF;
  word-wrap: break-word;
}

.error {
  color: red;
  margin-top: 15px;
}

.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #007BFF;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

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

.ad-placeholder {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 5px;
  border: 1px dashed #ddd;
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  color: #555;
}

@media (max-width: 600px) {
  .input-container {
    flex-direction: column;
    gap: 10px;
  }

  input[type="text"] {
    width: 100%;
  }

  button {
    width: 100%;
  }
}

/* Style for the Recent Citations Section */
#historyList li {
  margin-bottom: 15px; /* Increase space between citations */
  text-align: left; /* Align citations to the left */
  font-size: 0.9em; /* Slightly smaller text for citations */
  line-height: 1.5; /* Improve readability */
}

#historySection h5 {
  text-align: left; /* Align heading to the left */
  margin-bottom: 10px; /* Add space below the heading */
}

.ad-container {
  text-align: center;
  margin: 20px auto;
  padding: 10px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
}

#statistics {
  margin-top: 30px;
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.usage-info {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
}

.recent-searches-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #0056b3;
}

.recent-searches {
  font-size: 14px;
  line-height: 1.8;
}

.recent-searches .search-item {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}

.recent-searches .doi {
  font-weight: bold;
  color: #0056b3;
  text-decoration: none;
  margin-bottom: 4px;
}

.recent-searches .doi:hover {
  text-decoration: underline;
}

.recent-searches .citation {
  color: #333;
}

@media (max-width: 768px) {
  #statistics {
    padding: 14px;
  }

  .usage-info {
    font-size: 13px;
    text-align: left;
  }

  .recent-searches-title {
    font-size: 13px;
    text-align: left;
  }

  .recent-searches {
    font-size: 11px;
    text-align: left;
  }
}
