:root {
  --bg: #0f1115;
  --card-bg: #171a21;
  --card-border: #262b35;
  --text: #e8eaed;
  --text-dim: #8a8f98;
  --green: #33d17a;
  --red: #ef4444;
  --shadow: rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem 2rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header h1 {
  margin: 0 0 0.4rem;
  font-size: 2rem;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  max-width: 960px;
  width: 100%;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  box-shadow: 0 8px 20px var(--shadow);
  transition: border-color 0.3s ease;
}

.logo-wrap {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  filter: none;
  opacity: 1;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

/* offline state: grayscale + dimmed logo */
.card.offline .logo {
  filter: grayscale(100%) brightness(0.6);
  opacity: 0.55;
}

.name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.card.online .light {
  background: var(--green);
  box-shadow: 0 0 10px var(--green), 0 0 2px var(--green);
}

.card.offline .light {
  background: var(--red);
  box-shadow: 0 0 10px var(--red), 0 0 2px var(--red);
}

.status-text {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

.card.online .status-text {
  color: var(--green);
}

.card.offline .status-text {
  color: var(--red);
}

footer {
  margin-top: 2.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .card {
    width: 100%;
    max-width: 260px;
  }
}
