:root {
  color-scheme: dark;
  --bg-1: #06101d;
  --bg-2: #0c1728;
  --bg-3: #132238;
  --card: rgba(255, 255, 255, 0.08);
  --card-hover: rgba(255, 255, 255, 0.13);
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.22);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --glass: blur(20px) saturate(165%);
  --hero-glow: radial-gradient(circle at top right, rgba(255,255,255,0.16), transparent 38%);
  --accent-blue: #60a5fa;
  --accent-green: #34d399;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.25), transparent 24%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 22%),
    radial-gradient(circle at bottom center, rgba(16, 185, 129, 0.13), transparent 30%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2) 58%, var(--bg-3));
  padding: 32px 20px 48px;
}

.shell {
  max-width: 1220px;
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    var(--hero-glow),
    linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.05));
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px 24px 22px;
  margin-bottom: 22px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -70px -70px auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -70px;
  left: -70px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(96,165,250,0.14), transparent 68%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 4px;
}

.hero-copy {
  max-width: 760px;
}

.clock-box {
  flex-shrink: 0;
  min-width: 220px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-soft);
  text-align: right;
}

.clock-time {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
}

.clock-date {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.subtitle {
  margin: 12px 0 0;
  max-width: 640px;
  color: #d6e2f0;
  font-size: 16px;
  line-height: 1.6;
}

.toolbar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.10);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-soft);
}

.pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #93c5fd, #60a5fa);
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.45);
  flex-shrink: 0;
}

.pill-summary {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.14), rgba(16, 185, 129, 0.08));
  border-color: rgba(52, 211, 153, 0.22);
  color: #ecfdf5;
}

.pill-summary::before {
  background: linear-gradient(180deg, #6ee7b7, #34d399);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.5);
}

.pill-summary.is-offline {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.18), rgba(185, 28, 28, 0.10));
  border-color: rgba(248, 113, 113, 0.28);
  color: #fff1f2;
}

.pill-summary.is-offline::before {
  background: linear-gradient(180deg, #fca5a5, #f87171);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.55);
}

.pill-summary.is-unknown {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.16), rgba(100, 116, 139, 0.08));
  border-color: rgba(148, 163, 184, 0.24);
  color: #f8fafc;
}

.pill-summary.is-unknown::before {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.5);
}

.section-title {
  margin: 30px 0 14px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 800;
}

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

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  min-height: 208px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.card:hover {
  transform: translateY(-5px);
  background: var(--card-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(255,255,255,0.11), transparent 68%);
  pointer-events: none;
}

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

.icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
}

.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.status-online {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
  color: #bbf7d0;
}

.status-online::before {
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.75);
}

.status-offline {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.25);
  color: #fecaca;
}

.status-offline::before {
  background: #f87171;
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.75);
}

.status-unknown {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.status-unknown::before {
  background: #94a3b8;
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.55);
}

.card-body {
  margin-top: 18px;
}

.card-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.card-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.card-domain {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 600;
}

.card-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-badge-small {
  padding: 5px 9px;
  font-size: 11px;
}

.card-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
  border: 1px solid transparent;
}

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

.card-link-remote {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.24);
  color: #dbeafe;
}

.card-link-local {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.22);
  color: #d1fae5;
}

.footer-note {
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 640px) {
  body {
    padding: 18px 14px 28px;
  }

  .hero {
    padding: 18px 16px 16px;
    margin-bottom: 18px;
  }

  .hero-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .clock-box {
    min-width: auto;
    text-align: left;
    padding: 12px 14px;
    display: none;
  }

  .toolbar {
    margin-top: 14px;
    gap: 8px;
  }

  .pill {
    font-size: 12px;
    padding: 8px 10px;
  }

  h1 {
    font-size: 28px;
  }

  .subtitle {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.55;
  }

  .card-domain {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 185px;
    padding: 18px;
  }

  .card-title {
    font-size: 21px;
  }

  .icon-wrap {
    width: 58px;
    height: 58px;
  }

  .icon {
    width: 36px;
    height: 36px;
  }
}
