:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0c1118;
  color: #e3e9f3;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: radial-gradient(circle at top right, rgba(56, 162, 255, 0.12), transparent 30%),
    radial-gradient(circle at 20% 20%, rgba(122, 94, 255, 0.08), transparent 30%),
    #070b11;
}

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #7c88a1;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
}

.site-count {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(146, 156, 178, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #d9e5ff;
  font-size: 0.95rem;
}

.controls {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box label {
  font-size: 0.9rem;
  color: #8f9bb3;
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(146, 156, 178, 0.18);
  border-radius: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  color: #f5f8ff;
  font-size: 1rem;
}

.search-box input:focus {
  outline: none;
  border-color: rgba(56, 162, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(56, 162, 255, 0.12);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  border: 1px solid rgba(146, 156, 178, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #d9e5ff;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
  background: rgba(56, 162, 255, 0.16);
  transform: translateY(-1px);
}

.content {
  min-height: 420px;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.badge.online::before { background: #3bd77b; }
.badge.offline::before { background: #ff5b79; }
.badge.unknown::before { background: #8f9bb3; }

.card-data {
  display: grid;
  gap: 12px;
}

.data-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  color: #b8c2d1;
}

.data-row span {
  min-width: 0;
}

.data-row .value {
  margin: 0;
  color: #f5f8ff;
  text-align: right;
  max-width: 100%;
  font-size: 1.05rem;
  font-weight: 700;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.button.primary {
  background: #3b7fff;
  color: white;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e8eefc;
}

.button:hover {
  transform: translateY(-1px);
}

.message-card {
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #d2dbe8;
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-actions {
    flex-direction: column;
  }
}
