:root {
  --brand: #4f46e5;
  --brand-light: #818cf8;
  --accent: #22d3ee;
  --bg: #0f172a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.12);
  --text: #eef2ff;
  --text-muted: #a5b4cf;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1.1rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 3vw, 1.75rem);
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(79, 70, 229, 0.55), transparent 55%),
    radial-gradient(circle at 88% 82%, rgba(34, 211, 238, 0.28), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* Keep content clear of the notch / home indicator when installed standalone */
@supports (padding: max(0px)) {
  body {
    padding-top: max(clamp(1.1rem, 4vw, 2.5rem), env(safe-area-inset-top));
    padding-bottom: max(clamp(1.1rem, 4vw, 2.5rem), env(safe-area-inset-bottom));
  }
}

.app-header {
  text-align: center;
  max-width: 34rem;
}

.app-title {
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  letter-spacing: -0.02em;
}

.app-subtitle {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: clamp(0.85rem, 2.6vw, 0.95rem);
}

#app-main {
  width: 100%;
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 5vw, 1.9rem);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hello-text {
  margin: 0;
  font-size: clamp(1.9rem, 8vw, 2.7rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  background: linear-gradient(100deg, var(--text), var(--brand-light) 45%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hello-copy {
  margin: 0.9rem 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.45);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--surface-border);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.greet-output {
  margin: 1rem 0 0;
  min-height: 1.4rem;
  text-align: center;
  font-size: 1rem;
  color: var(--accent);
}

.status-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.status-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.92rem;
}

.status-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-label {
  color: var(--text-muted);
}

.status-value {
  font-weight: 600;
  text-align: right;
}

.is-online {
  color: #4ade80;
}

.is-offline {
  color: #fb7185;
}

.app-footer {
  max-width: 32rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.app-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
