body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  color: #333;
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1rem;
  background-color: #f9f9f9;
}

h1 {
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  text-align: center;
  margin-bottom: 1.5rem;
}

#balance-form {
  background-color: #fff;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: bold;
  margin-bottom: 0.25rem;
  display: block; /* Ensure label takes its own line */
}

input[type="text"] {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  width: 100%; /* Make input take full width */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Apply styles to both buttons using the class */
.action-button {
  background-color: #007bff;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  align-self: flex-start; /* Align button to the start */
}

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

#loading {
  text-align: center;
  color: #555;
  margin-top: 1em;
}

#result {
  margin-top: 1.5em;
  padding: 1rem;
  background-color: #e9ecef;
  border-radius: 4px;
  min-height: 1.6em; /* Ensure it takes space even when empty */
  word-wrap: break-word; /* Prevent long error messages from overflowing */
}

#logs-section {
  margin-top: 2em;
  background-color: #fff;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#logs-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

#logs-container {
  max-height: 400px; /* Limit height and make it scrollable */
  overflow-y: auto;
  border: 1px solid #eee;
  padding: 1rem;
  border-radius: 4px;
  background-color: #fdfdfd;
}

.log-entry {
  padding: 0.5rem 0;
  border-bottom: 1px dashed #eee;
  font-size: 0.9em;
  color: #555;
}

.log-entry:last-child {
  border-bottom: none;
}

#load-more-logs {
  background-color: #6c757d;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 1em;
  display: block; /* Ensure it takes block space */
}

#load-more-logs:hover {
  background-color: #5a6268;
}

#load-more-logs:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
