/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #374151;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 400;
}

/* Main content */
.main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Section styles */
section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

/* Section header with button */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Check now button */
.check-now-btn {
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check-now-btn:hover:not(:disabled) {
  background: #047857;
  transform: translateY(-1px);
}

.check-now-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.btn-loading {
  display: none;
}

.check-now-btn:disabled .btn-text {
  display: none;
}

.check-now-btn:disabled .btn-loading {
  display: inline;
}

/* Last update info */
.last-update {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
}

/* Servers grid */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
}

/* Server card */
.server-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.server-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.server-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.server-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1f2937;
  margin: 0;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-healthy .status-dot {
  background: #10b981;
}

.status-unhealthy .status-dot {
  background: #ef4444;
}

.status-unknown .status-dot {
  background: #6b7280;
}

.status-healthy {
  color: #059669;
}

.status-unhealthy {
  color: #dc2626;
}

.status-unknown {
  color: #6b7280;
}

.server-url {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.875rem;
  word-break: break-all;
  margin-bottom: 0.75rem;
  display: block;
}

.server-url:hover {
  text-decoration: underline;
}

.server-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 0.75rem;
  color: #6b7280;
}

.last-checked {
  font-style: italic;
}

/* Loading and empty states */
.loading, .no-servers {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 2rem;
  grid-column: 1 / -1;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .check-now-btn {
    width: 100%;
    justify-content: center;
  }
  
  .servers-grid {
    grid-template-columns: 1fr;
  }
  
  .server-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}