/* Base Styles */
body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background-color: #f5f5f5;
}

/* Section Styling */
.section-container {
  margin-bottom: 2em;
  padding: 1em;
  border-radius: 8px;
  background-color: #f9f9f9;
}

/* Heading Styles */
.section-title {
  margin-top: 0;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #ddd;
  color: #333;
}

/* Responsive Spacing */
@media (max-width: 600px) {
  .section-container {
      margin-bottom: 1em;
      padding: 0.75em;
  }
}

/* Container Styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1 {
  color: #333;
  text-align: center;
  margin-bottom: 30px;
}

/* Header Styles */
header {
  padding: 20px;
  background-color: #f2f2f2;
}

header a {
  color: #333;
  text-decoration: none;
}

header a:hover {
  text-decoration: underline;
}

/* Input Styling */
.input-section {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.address-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

/* Button Styles */
.button {
  padding: 10px 20px;
  border: none;
  color: white;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#btnConnect {
  background-color: #8800ffd7;
}

#btnDisconnect {
  background-color: darkred;
}

/* Action Buttons */

.action-button {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

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

/* Table Styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th,
.data-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.data-table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Error Messages */
.error-message {
  color: #dc3545;
  margin-top: 10px;
  font-size: 14px;
}

/* Loading Mask Styles */
.loading-mask {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

.loading-mask.active {
  display: flex;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

.loading-message {
  text-align: center;
  color: #333;
}

#loadingProgress {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

#loadingContext {
  font-size: 14px;
  color: #666;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

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