* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #0d1117;
  color: #c9d1d9;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #1a1f36 0%, #0f1419 100%);
  border-radius: 12px;
  border: 1px solid #30363d;
}

header h1 {
  color: #58a6ff;
  font-size: 2rem;
  margin-bottom: 8px;
}

.subtitle {
  color: #8b949e;
  font-size: 0.9rem;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background-color: #161b22;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid #30363d;
}

.status-indicator {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-indicator.connected {
  background-color: #238636;
  color: white;
}

.status-indicator.error {
  background-color: #da3633;
  color: white;
}

.status-indicator.connecting {
  background-color: #9e6a03;
  color: white;
}

#last-update {
  color: #8b949e;
  font-size: 0.85rem;
}

main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
}

.pool-card {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s ease;
}

.pool-card:hover {
  border-color: #58a6ff;
}

.pool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #30363d;
}

.pool-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #f0f6fc;
}

.pool-address {
  font-size: 0.75rem;
  color: #8b949e;
  font-family: monospace;
  background-color: #0d1117;
  padding: 4px 8px;
  border-radius: 4px;
}

.token-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: #0d1117;
  border-radius: 8px;
  margin-bottom: 12px;
}

.token-row:last-child {
  margin-bottom: 0;
}

.token-info {
  display: flex;
  flex-direction: column;
}

.token-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f0f6fc;
  margin-bottom: 4px;
}

.token-address {
  font-family: monospace;
  font-size: 0.75rem;
  color: #58a6ff;
}

.token-balance {
  text-align: right;
}

.balance-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: #7ee787;
  font-family: monospace;
}

.balance-label {
  font-size: 0.75rem;
  color: #8b949e;
}

.balance-raw {
  font-size: 0.65rem;
  color: #6e7681;
  font-family: monospace;
  margin-top: 4px;
}

.loading {
  text-align: center;
  padding: 60px;
  color: #8b949e;
  grid-column: 1 / -1;
}

footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: #8b949e;
  font-size: 0.85rem;
}

/* Animation for balance updates */
@keyframes highlight {
  0% { background-color: rgba(46, 160, 67, 0.3); }
  100% { background-color: #0d1117; }
}

.balance-updated {
  animation: highlight 2s ease-out;
}

/* Responsive adjustments */
@media (max-width: 500px) {
  main {
    grid-template-columns: 1fr;
  }

  .pool-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .token-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .token-balance {
    text-align: left;
  }
}
