/* ==========================================================================
   xDNS Monitoring — Apple iOS 26 Liquid Glass Design Tokens & Base Layer
   ========================================================================== */

:root {
  /* Atmospheric Canvas */
  --bg-canvas: #060f1e;
  --bg-canvas-deep: #040914;

  /* Liquid Glass Surfaces */
  --glass-bg: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.06) 52%,
    rgba(255, 255, 255, 0.1) 100%
  );
  --glass-bg-elevated: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 55%,
    rgba(255, 255, 255, 0.13) 100%
  );
  --glass-bg-subtle: rgba(255, 255, 255, 0.07);
  --glass-bg-hover: rgba(255, 255, 255, 0.14);
  --glass-well: rgba(6, 14, 28, 0.44);
  --glass-well-focus: rgba(8, 20, 40, 0.62);

  /* Specular Borders & Optical Highlights */
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-border-strong: rgba(255, 255, 255, 0.36);
  --glass-specular-top: rgba(255, 255, 255, 0.52);
  --glass-specular-bottom: rgba(255, 255, 255, 0.08);
  --glass-shadow:
    0 24px 56px rgba(2, 8, 22, 0.52),
    0 6px 20px rgba(2, 8, 22, 0.28);
  --glass-inset:
    inset 0 1px 0 var(--glass-specular-top),
    inset 0 -1px 0 var(--glass-specular-bottom);

  /* Typography */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Segoe UI", system-ui, sans-serif;
  --text-primary: #f5f9ff;
  --text-secondary: rgba(224, 236, 252, 0.74);
  --text-muted: rgba(202, 220, 245, 0.58);

  /* Liquid Accents & Semantic Telemetry Colors */
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.34);

  --status-up: #34d399;
  --status-up-bg: rgba(16, 185, 129, 0.18);
  --status-up-border: rgba(52, 211, 153, 0.42);

  --status-down: #fb7185;
  --status-down-bg: rgba(244, 63, 94, 0.2);
  --status-down-border: rgba(251, 113, 133, 0.45);

  --status-unknown: #fbbf24;
  --status-unknown-bg: rgba(245, 158, 11, 0.2);
  --status-unknown-border: rgba(251, 191, 36, 0.42);

  /* Geometry & Motion */
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(120% 90% at 15% 10%, rgba(14, 116, 144, 0.36) 0%, transparent 55%),
    radial-gradient(100% 80% at 85% 18%, rgba(37, 99, 235, 0.32) 0%, transparent 58%),
    radial-gradient(90% 80% at 50% 95%, rgba(16, 185, 129, 0.18) 0%, transparent 60%),
    linear-gradient(160deg, var(--bg-canvas) 0%, var(--bg-canvas-deep) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Ambient Refractive Orbs behind the glass layer */
.ambient-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.72;
  will-change: transform;
  animation: orbFloat 18s ease-in-out infinite alternate;
}

.ambient-orb--cyan {
  width: 34rem;
  height: 34rem;
  top: -10rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.5) 0%, rgba(14, 165, 233, 0.08) 70%);
}

.ambient-orb--cobalt {
  width: 38rem;
  height: 38rem;
  top: 12%;
  right: -12rem;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(99, 102, 241, 0.08) 72%);
  animation-delay: -6s;
  animation-duration: 22s;
}

.ambient-orb--emerald {
  width: 30rem;
  height: 30rem;
  bottom: -10rem;
  left: 28%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.38) 0%, rgba(56, 189, 248, 0.06) 72%);
  animation-delay: -11s;
  animation-duration: 24s;
}

@keyframes orbFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(24px, -18px, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-18px, 22px, 0) scale(0.96);
  }
}

/* Core Liquid Glass Surface */
.glass-surface {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  backdrop-filter: blur(28px) saturate(185%);
  -webkit-backdrop-filter: blur(28px) saturate(185%);
  transition:
    transform 0.35s var(--ease-spring),
    border-color 0.3s ease,
    box-shadow 0.35s var(--ease-spring);
}

.glass-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.04) 32%,
    transparent 60%
  );
  pointer-events: none;
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-surface {
    background: rgba(15, 28, 50, 0.9);
  }
}

/* Brand Mark */
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  background: linear-gradient(145deg, #38bdf8 0%, #0284c7 55%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 10px 24px rgba(14, 165, 233, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* Focus Accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Tabular Numbers for Telemetry */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .ambient-orb {
    animation: none;
  }

  .glass-surface,
  button,
  a {
    transition: none;
  }
}
