/* Complete redesign to match dark theme reference with coral accents */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #111111;
  --color-card: #1a1a1a;
  --color-text: #ffffff;
  --color-text-dim: #999999;
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-coral: #ff6b6b;
  --color-border: #333333;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Corner badge styled like reference */
.corner-badge {
  position: fixed;
  top: 24px;
  left: 24px;
  background: var(--color-coral);
  color: var(--color-bg);
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 14px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

main {
  flex: 1;
  padding: 80px 0 40px;
}

/* Hero section with large centered title */
.hero {
  text-align: center;
  margin-bottom: 48px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.subtitle {
  font-size: 16px;
  color: var(--color-text-dim);
  max-width: 700px;
  margin: 0 auto;
}

/* Status banner matching reference green success style */
.status-banner {
  background: var(--color-success);
  color: var(--color-bg);
  padding: 28px 32px;
  border-radius: 12px;
  margin-bottom: 48px;
  transition: all 0.3s ease;
}

.status-banner.error {
  background: var(--color-error);
}

.status-banner.checking {
  background: #6b7280;
}

.banner-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.banner-content p {
  font-size: 16px;
  opacity: 0.9;
}

/* Checks section with table layout */
.checks-section {
  background: var(--color-card);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 48px;
}

.checks-section h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 24px;
  color: var(--color-text);
}

.checks-table {
  margin-bottom: 24px;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px 0;
  align-items: center;
}

.table-header {
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-dim);
}

.table-row {
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  transition: background 0.2s ease;
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.col-location {
  color: var(--color-text);
}

.col-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-dim);
}

.status-indicator.up {
  background: var(--color-success);
}

.status-indicator.down {
  background: var(--color-error);
}

.status-text {
  font-size: 15px;
}

.col-http,
.col-latency {
  font-weight: 500;
}

.check-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-dim);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.check-meta a {
  color: var(--color-coral);
  text-decoration: none;
}

.check-meta a:hover {
  text-decoration: underline;
}

.separator {
  color: var(--color-border);
}

.refresh-button {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-button:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--color-text-dim);
}

.refresh-button:active {
  transform: scale(0.98);
}

/* Footer matching reference with Globalping info */
footer {
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  margin-top: auto;
  text-align: center;
}

footer p {
  font-size: 14px;
  color: var(--color-text-dim);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 12px;
}

footer p:last-child {
  margin-bottom: 0;
}

footer a {
  color: var(--color-coral);
  text-decoration: none;
}

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

.footer-attribution {
  margin-top: 8px;
  font-size: 13px;
}

/* Loading states */
.loading-row {
  opacity: 0.5;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.3;
  }
}

/* Enhanced mobile responsiveness with better spacing and layout */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .corner-badge {
    top: 12px;
    left: 12px;
    font-size: 12px;
    padding: 8px 14px;
  }

  main {
    padding: 60px 0 24px;
  }

  .hero {
    margin-bottom: 32px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 14px;
  }

  .status-banner {
    padding: 20px;
    margin-bottom: 32px;
  }

  .banner-content h2 {
    font-size: 20px;
  }

  .banner-content p {
    font-size: 14px;
  }

  .checks-section {
    padding: 20px;
    margin-bottom: 32px;
  }

  .checks-section h3 {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .table-header {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 0;
  }

  .col-location {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .col-status,
  .col-http,
  .col-latency {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
  }

  .col-status::before {
    content: "Status:";
    color: var(--color-text-dim);
    font-weight: 500;
  }

  .col-http::before {
    content: "HTTP:";
    color: var(--color-text-dim);
    font-weight: 500;
  }

  .col-latency::before {
    content: "Latency:";
    color: var(--color-text-dim);
    font-weight: 500;
  }

  .check-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
  }

  .separator {
    display: none;
  }

  .refresh-button {
    width: 100%;
    padding: 12px 24px;
  }

  footer {
    padding: 24px 0;
  }

  footer p {
    font-size: 13px;
  }
}

/* Added styles for info banner */
.info-banner {
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #3498db;
  animation: fadeIn 0.3s ease-in;
}

.info-icon {
  font-size: 18px;
  flex-shrink: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive info banner */
.info-banner {
  font-size: 13px;
  padding: 10px 14px;
}

.info-icon {
  font-size: 16px;
}