:root {
  color-scheme: dark;
  --bg: #06101d;
  --surface: rgba(12, 29, 48, 0.82);
  --surface-strong: #0d2137;
  --line: rgba(160, 196, 225, 0.16);
  --line-bright: rgba(160, 196, 225, 0.28);
  --text: #f2f8fc;
  --muted: #8fa6b9;
  --cyan: #56d9ee;
  --green: #77ed8b;
  --blue: #5b96ff;
  --amber: #f6b84a;
  --danger: #ff6f73;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 48% -10%, rgba(42, 108, 164, 0.19), transparent 34rem),
    linear-gradient(160deg, #07131f 0%, #06101d 46%, #081522 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.3;
  background-image: linear-gradient(rgba(125, 181, 220, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 181, 220, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.ambient-one { top: 14%; right: -18rem; width: 36rem; height: 36rem; border: 1px solid rgba(86, 217, 238, 0.1); box-shadow: inset 0 0 90px rgba(86, 217, 238, 0.025); }
.ambient-two { bottom: -14rem; left: -10rem; width: 32rem; height: 32rem; border: 1px solid rgba(91, 150, 255, 0.08); }

.shell { width: min(1380px, calc(100% - 64px)); margin: 0 auto; padding: 34px 0 28px; }

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-size: 19px; font-weight: 760; letter-spacing: 0.08em; text-decoration: none; }
.brand strong { color: var(--cyan); font-weight: inherit; }
.brand-mark { position: relative; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(86, 217, 238, 0.32); border-radius: 8px; transform: rotate(45deg); }
.brand-mark span { width: 8px; height: 8px; background: var(--cyan); border-radius: 2px; box-shadow: 0 0 14px var(--cyan); }
.topbar-meta, .live-state { display: flex; align-items: center; gap: 12px; }
.eyebrow, .live-state { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.separator { width: 1px; height: 14px; background: var(--line-bright); }
.status-dot, .footer-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px currentColor; color: var(--amber); }
.status-dot.is-up, .footer-dot { color: var(--green); background: var(--green); }
.status-dot.is-down { color: var(--danger); background: var(--danger); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px; padding: 76px 5px 46px; }
.kicker { margin: 0 0 9px; color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 780px; font-size: clamp(44px, 6.3vw, 86px); font-weight: 650; letter-spacing: -0.058em; line-height: 0.96; }
.hero-description { max-width: 620px; margin: 24px 0 0; color: var(--muted); font-size: 17px; }
.hero-status { display: flex; align-items: center; gap: 18px; min-width: 275px; margin-bottom: 4px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(11, 27, 45, 0.55); box-shadow: var(--shadow); }
.pulse-orbit { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid rgba(119, 237, 139, 0.2); border-radius: 50%; }
.pulse-orbit span { width: 16px; height: 16px; border-radius: 50%; background: var(--green); box-shadow: 0 0 22px rgba(119, 237, 139, 0.8); animation: breathe 2.8s ease-in-out infinite; }
.status-heading, .status-subtitle { display: block; }
.status-heading { font-size: 15px; font-weight: 680; }
.status-subtitle { margin-top: 3px; color: var(--muted); font-size: 11px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card, .panel { position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(15, 37, 61, 0.88), rgba(9, 24, 41, 0.9)); box-shadow: var(--shadow); }
.metric-card { min-height: 218px; padding: 24px; border-radius: var(--radius); }
.metric-card::after { position: absolute; right: -15%; bottom: -46%; width: 200px; height: 200px; content: ""; border-radius: 50%; background: radial-gradient(circle, var(--card-glow, rgba(86, 217, 238, 0.07)), transparent 68%); }
.metric-header { display: flex; align-items: center; gap: 11px; color: #b9cad8; font-size: 12px; font-weight: 600; letter-spacing: 0.035em; text-transform: uppercase; }
.icon { display: grid; place-items: center; width: 29px; height: 29px; color: var(--cyan); border: 1px solid var(--line); border-radius: 8px; background: rgba(4, 15, 26, 0.35); }
.icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.metric-value { display: flex; align-items: baseline; gap: 4px; margin-top: 20px; }
.metric-value strong { font-size: 46px; font-weight: 620; letter-spacing: -0.055em; line-height: 1; }
.metric-value span { color: var(--muted); font-size: 17px; }
.metric-value-text strong { font-size: 30px; letter-spacing: -0.035em; }
.metric-card p { position: absolute; z-index: 1; bottom: 21px; margin: 0; color: var(--muted); font-size: 11px; }
.meter { position: relative; height: 4px; margin-top: 20px; overflow: hidden; border-radius: 999px; background: rgba(146, 178, 203, 0.12); }
.meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 12px rgba(86, 217, 238, 0.45); transition: width 700ms ease; }
.metric-memory .meter span { background: linear-gradient(90deg, #4e82ff, #8d79ff); }
.metric-storage .meter span { background: linear-gradient(90deg, #56c88b, var(--green)); }
.uptime-rule { display: flex; gap: 6px; margin-top: 26px; }
.uptime-rule span { width: 4px; height: 4px; border-radius: 50%; background: var(--line-bright); }
.uptime-rule span:first-child { width: 58px; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), rgba(86, 217, 238, 0.15)); }

.panel.docker-panel { min-height: 0; margin-top: 12px; }
.docker-header { align-items: center; }
.docker-summary { display: flex; align-items: center; gap: 8px; }
.docker-summary span { padding: 8px 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: rgba(4, 15, 26, 0.25); font-size: 10px; white-space: nowrap; }
.docker-summary strong { margin-right: 3px; color: var(--text); font-size: 12px; }
.container-row { display: grid; grid-template-columns: auto minmax(200px, 1fr) minmax(480px, 1.65fr); align-items: center; gap: 18px; padding: 22px 0 18px; }
.container-symbol { display: grid; place-items: center; width: 48px; height: 48px; color: var(--blue); border: 1px solid rgba(91, 150, 255, 0.25); border-radius: 14px; background: rgba(91, 150, 255, 0.08); }
.container-symbol svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.container-identity strong, .container-identity span, .container-identity code { display: block; }
.container-identity strong { font-size: 15px; }
.container-identity span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.container-identity code { max-width: 330px; margin-top: 8px; overflow: hidden; color: #8ea6ba; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.container-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid rgba(160, 196, 225, 0.1); border-radius: 13px; background: rgba(4, 15, 26, 0.22); }
.container-facts div { min-width: 0; padding: 14px 16px; border-right: 1px solid rgba(160, 196, 225, 0.1); }
.container-facts div:last-child { border: 0; }
.container-facts dd { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.container-state, .container-health { position: relative; padding-left: 12px; }
.container-state::before, .container-health::before { position: absolute; left: 0; top: 50%; width: 6px; height: 6px; content: ""; border-radius: 50%; background: currentColor; transform: translateY(-50%); box-shadow: 0 0 8px currentColor; }
.container-state.is-up, .container-health.is-up { color: var(--green); }
.container-state.is-down, .container-health.is-down { color: var(--danger); }
.container-health.is-warning { color: var(--amber); }
.docker-note { margin: 0; padding-top: 15px; color: #71889a; border-top: 1px solid var(--line); font-size: 9px; }

.detail-grid { display: grid; grid-template-columns: 1.08fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.panel { min-height: 355px; padding: 28px; border-radius: var(--radius); }
.temperature-panel { grid-column: 3; grid-row: 1; min-height: 234px; }
.services-panel { grid-column: 1 / -1; grid-row: 2; min-height: 210px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 20px; font-weight: 620; letter-spacing: -0.025em; }
.panel-number { color: rgba(143, 166, 185, 0.26); font-size: 13px; font-weight: 600; letter-spacing: 0.15em; }
.spec-list, .stack-list { margin: 7px 0 0; }
.spec-list div, .stack-list div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid rgba(160, 196, 225, 0.09); }
.spec-list div:last-child, .stack-list div:last-child { border: 0; }
dt { color: var(--muted); font-size: 11px; }
dd { margin: 0; font-size: 12px; font-weight: 570; }
dd small { color: var(--muted); font: inherit; font-weight: 400; }
.stack-list div { grid-template-columns: 1fr auto; }
.stack-list dd { color: #cfe0ed; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }

.service-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px 0 0; margin: 0; list-style: none; }
.service-list li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px; min-height: 103px; padding: 16px; border: 1px solid rgba(160, 196, 225, 0.1); border-radius: 13px; background: rgba(4, 15, 26, 0.22); }
.service-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--cyan); border: 1px solid rgba(86, 217, 238, 0.22); border-radius: 9px; font-size: 10px; font-weight: 800; letter-spacing: 0.05em; }
.plex-icon { color: var(--amber); border-color: rgba(246, 184, 74, 0.24); }
.service-list strong, .service-list small { display: block; }
.service-list strong { font-size: 12px; }
.service-list small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.service-list em { grid-column: 2; position: relative; padding-left: 13px; color: var(--amber); font-size: 10px; font-style: normal; text-transform: uppercase; letter-spacing: 0.08em; }
.service-list em::before { position: absolute; left: 0; top: 50%; width: 6px; height: 6px; content: ""; border-radius: 50%; background: currentColor; transform: translateY(-50%); box-shadow: 0 0 9px currentColor; }
.service-list em.is-up { color: var(--green); }
.service-list em.is-down { color: var(--danger); }

.temperature-body { display: flex; align-items: center; gap: 23px; padding-top: 32px; }
.temperature-gauge { position: relative; width: 76px; height: 76px; border: 6px solid rgba(146, 178, 203, 0.1); border-radius: 50%; }
.temperature-gauge span { position: absolute; inset: -6px; border: 6px solid transparent; border-top-color: var(--cyan); border-right-color: var(--cyan); border-radius: 50%; transform: rotate(15deg); filter: drop-shadow(0 0 6px rgba(86, 217, 238, 0.36)); }
.temperature-reading { display: flex; align-items: baseline; gap: 3px; }
.temperature-reading strong { font-size: 40px; font-weight: 620; letter-spacing: -0.05em; }
.temperature-reading > span { color: var(--muted); }
.temperature-reading small { display: block; width: 100%; margin-top: 3px; color: var(--muted); font-size: 10px; }
.temperature-reading { flex-wrap: wrap; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 28px 4px 0; color: #71889a; font-size: 10px; }
footer p { margin: 0; }
footer p:last-child { display: flex; align-items: center; gap: 7px; }

@keyframes breathe { 50% { transform: scale(0.78); opacity: 0.68; } }

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .container-row { grid-template-columns: auto 1fr; }
  .container-facts { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .hardware-panel, .stack-panel { grid-column: auto; }
  .services-panel { grid-column: 1 / -1; grid-row: 2; }
  .temperature-panel { grid-column: 1 / -1; grid-row: 3; }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 30px, 1380px); padding-top: 22px; }
  .topbar { align-items: flex-start; }
  .topbar-meta .eyebrow, .topbar-meta .separator { display: none; }
  .live-state { margin-top: 7px; font-size: 9px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 55px 2px 32px; }
  .hero h1 { font-size: clamp(44px, 15vw, 70px); }
  .hero-description { margin-top: 19px; font-size: 14px; }
  .hero-status { min-width: 0; width: 100%; margin: 0; }
  .metrics, .detail-grid { grid-template-columns: 1fr; }
  .docker-header { align-items: flex-start; gap: 20px; }
  .docker-summary { flex-wrap: wrap; justify-content: flex-end; }
  .container-facts { grid-template-columns: 1fr 1fr; }
  .container-facts div:nth-child(2) { border-right: 0; }
  .container-facts div:nth-child(-n + 2) { border-bottom: 1px solid rgba(160, 196, 225, 0.1); }
  .services-panel { grid-column: auto; grid-row: auto; }
  .temperature-panel { grid-column: auto; grid-row: auto; }
  .service-list { grid-template-columns: 1fr; }
  .panel, .metric-card { min-height: auto; }
  .metric-card { height: 210px; }
  .spec-list div { grid-template-columns: 100px 1fr; }
  footer { flex-direction: column; padding-bottom: 8px; }
}

@media (max-width: 470px) {
  .docker-header { display: block; }
  .docker-summary { justify-content: flex-start; margin-top: 18px; }
  .docker-summary span { padding: 7px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
