body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  background: #0e0e1a;
  color: white;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  display: flex;
  align-items: center;
  padding: 20px;
  background: #141426;
  border-bottom: 2px solid #1f1f38;
}

.header-left {
  display: flex;
  align-items: center;
  margin-right: 40px;
}

header img {
  height: 50px;
  margin-right: 15px;
}

header h1 {
  font-size: 24px;
  color: #f0f0f0;
  margin: 0;
}

.container {
  padding: 20px;
  padding-top: 100px; /* adjusted for single header bar */
  max-width: 1200px;
  margin: auto;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stats-section {
  margin-top: 0;
}

.stats-section h2 {
  color: #00bfff;
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 20px;
}

.card {
  background: #1c1c30;
  border: 1px solid #2b2b45;
  border-radius: 12px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.2);
}

.card h3 {
  margin: 0 0 10px;
  color: #00bfff;
}

.card p {
  font-size: 18px;
}

.form-section {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: #ccc;
}

input[type="number"] {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #0f0f20;
  color: white;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #0f0f20;
  color: white;
}

button {
  background: linear-gradient(90deg, #00bfff, #ff00cc);
  color: white;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover:not(:disabled) {
  opacity: 0.8;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.account-info {
  margin-bottom: 40px;
}

.account-info h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #00bfff;
  font-size: 20px;
}


.validators-section {
  margin-top: 40px;
}

.validators-section h2 {
  color: #00bfff;
  font-size: 20px;
  margin-bottom: 20px;
}

#validatorsTable {
  width: 100%;
  border-collapse: collapse;
  background: #1c1c30;
  border: 1px solid #2b2b45;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.2);
}

#validatorsTable thead {
  background: #141426;
}

#validatorsTable th {
  color: #00bfff;
  text-align: left;
  padding: 12px 16px;
  font-size: 16px;
  border-bottom: 1px solid #2b2b45;
}

#validatorsTable td {
  padding: 12px 16px;
  font-size: 16px;
  color: #ccc;
  border-bottom: 1px solid #2b2b45;
  word-break: break-all;
}

#validatorsTable tr:nth-child(even) {
  background: #1f1f38;
}

#validatorsTable tr:hover {
  background: #2b2b45;
}

/* ============================================================================
   LOADING INDICATOR
   ============================================================================ */

.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: linear-gradient(90deg, #00bfff, #ff00cc);
  padding: 15px;
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.loading-indicator.visible {
  transform: translateY(0);
}

.loading-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 500;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================================
   TAB NAVIGATION
   ============================================================================ */

.tab-navigation {
  display: flex;
  gap: 10px;
}

.tab-button {
  background: transparent;
  color: #ccc;
  padding: 10px 20px;
  font-size: 14px;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Orbitron', sans-serif;
}

.tab-button:hover {
  color: #00bfff;
  opacity: 1;
}

.tab-button.active {
  color: #00bfff;
  border-bottom-color: #00bfff;
  opacity: 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================================================
   UTILITY STYLES
   ============================================================================ */

.info-text {
  color: #aaa;
  font-size: 14px;
  margin: 10px 0;
}

.warning-text {
  color: #ff9900;
  font-size: 14px;
  margin: 10px 0;
  padding: 10px;
  background: rgba(255, 153, 0, 0.1);
  border-left: 3px solid #ff9900;
  border-radius: 4px;
}

.error-text {
  color: #ff4444;
  font-size: 14px;
  margin: 10px 0;
}

.button-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.danger-button {
  background: linear-gradient(90deg, #ff4444, #cc0000);
}

.danger-button:hover:not(:disabled) {
  opacity: 0.8;
}

/* ============================================================================
   HEALTH DISPLAY
   ============================================================================ */

.health-display {
  margin-top: 20px;
}

.health-status {
  background: #1c1c30;
  border: 1px solid #2b2b45;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.2);
}

.health-status h3 {
  margin-top: 0;
  color: #00bfff;
}

.health-details {
  margin-top: 15px;
}

.health-details p {
  margin: 8px 0;
  font-size: 16px;
  color: #ccc;
}

/* ============================================================================
   FLOW RECORDS TABLE
   ============================================================================ */

.flow-records-container {
  margin-top: 20px;
  max-height: 600px;
  overflow: auto;
  border: 1px solid #2b2b45;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.2);
}

#flowRecordsTable {
  min-width: 1400px;
  width: 100%;
  border-collapse: collapse;
  background: #1c1c30;
}

#flowRecordsTable thead {
  background: #141426;
  position: sticky;
  top: 0;
  z-index: 10;
}

#flowRecordsTable th {
  color: #00bfff;
  text-align: left;
  padding: 12px 12px;
  font-size: 14px;
  border-bottom: 1px solid #2b2b45;
  white-space: nowrap;
}

#flowRecordsTable td {
  padding: 10px 12px;
  font-size: 13px;
  color: #ccc;
  border-bottom: 1px solid #2b2b45;
  white-space: nowrap;
}

#flowRecordsTable tr:nth-child(even) {
  background: #1f1f38;
}

#flowRecordsTable tr:hover {
  background: #2b2b45;
}

#flowRecordsTable a {
  color: #00bfff;
  text-decoration: none;
}

#flowRecordsTable a:hover {
  text-decoration: underline;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

.container {
  padding-top: 160px; /* Increased to account for both header and tabs */
}

/* ============================================================================
   STAKE ACCOUNTS LIST
   ============================================================================ */

.stake-accounts-list {
  margin-top: 20px;
}

.stake-accounts-list table {
  width: 100%;
  border-collapse: collapse;
  background: #1c1c30;
  border: 1px solid #2b2b45;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 200, 255, 0.2);
}

.stake-accounts-list thead {
  background: #141426;
}

.stake-accounts-list th {
  color: #00bfff;
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid #2b2b45;
  white-space: nowrap;
}

.stake-accounts-list td {
  padding: 12px 16px;
  font-size: 14px;
  color: #ccc;
  border-bottom: 1px solid #2b2b45;
}

.stake-accounts-list tr:nth-child(even) {
  background: #1f1f38;
}

.stake-accounts-list tr:hover {
  background: #2b2b45;
}

@media (max-width: 768px) {
  .tab-navigation {
    flex-wrap: wrap;
    padding: 5px 10px;
  }

  .tab-button {
    padding: 10px 15px;
    font-size: 12px;
  }

  .container {
    padding: 20px;
    padding-top: 180px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .button-row {
    flex-direction: column;
  }

  .button-row button {
    width: 100%;
  }
}
