:root {
  color-scheme: dark;
  --bg: #060815;
  --surface: rgba(9, 15, 34, 0.78);
  --surface-strong: rgba(13, 22, 48, 0.9);
  --surface-soft: rgba(18, 29, 60, 0.68);
  --line: rgba(106, 224, 255, 0.2);
  --line-strong: rgba(123, 97, 255, 0.38);
  --text: #f4f8ff;
  --muted: #9fb1d0;
  --muted-strong: #c9d8f5;
  --cyan: #23dfff;
  --cyan-soft: rgba(35, 223, 255, 0.16);
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.2);
  --magenta: #ff3df2;
  --green: #39ff9d;
  --green-soft: rgba(57, 255, 157, 0.16);
  --yellow: #ffd166;
  --yellow-soft: rgba(255, 209, 102, 0.18);
  --red: #ff477e;
  --red-soft: rgba(255, 71, 126, 0.18);
  --empty: #61718f;
  --empty-soft: rgba(97, 113, 143, 0.18);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  --glow-cyan: 0 0 26px rgba(35, 223, 255, 0.28);
  --glow-violet: 0 0 32px rgba(139, 92, 246, 0.28);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  padding: 28px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 10%, rgba(35, 223, 255, 0.2), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(255, 61, 242, 0.16), transparent 30%),
    radial-gradient(circle at 52% 92%, rgba(57, 255, 157, 0.1), transparent 24%),
    linear-gradient(135deg, #050711 0%, #09142c 46%, #13091f 100%);
  color: var(--text);
  font-family: "Rajdhani", "DIN Alternate", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background:
    linear-gradient(rgba(35, 223, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 223, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.2));
}

body::after {
  z-index: -1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  opacity: 0.42;
}

.page-shell {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: -28px -22px auto auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: rgba(255, 61, 242, 0.16);
  filter: blur(78px);
  pointer-events: none;
}

.overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(12, 22, 49, 0.94), rgba(11, 13, 31, 0.74)),
    var(--surface);
  box-shadow: var(--shadow), var(--glow-violet);
  backdrop-filter: blur(20px);
}

.overview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(35, 223, 255, 0.16), transparent 30%),
    linear-gradient(300deg, rgba(255, 61, 242, 0.1), transparent 32%);
  pointer-events: none;
}

.overview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.overview-copy,
.overview-metrics {
  position: relative;
  z-index: 1;
}

.overview-copy {
  display: flex;
  min-height: 198px;
  flex-direction: column;
  justify-content: center;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 12px;
  margin: 0 0 18px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(35, 223, 255, 0.3);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(14, 28, 60, 0.9), rgba(10, 12, 29, 0.82));
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.08), var(--glow-cyan);
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border: 1px solid rgba(35, 223, 255, 0.34);
  border-radius: 13px;
  background: radial-gradient(circle at 50% 20%, rgba(35, 223, 255, 0.18), rgba(5, 8, 21, 0.88));
  box-shadow: inset 0 0 20px rgba(35, 223, 255, 0.14), 0 0 22px rgba(35, 223, 255, 0.22);
}

.brand-logo {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(35, 223, 255, 0.36));
}

.brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.brand-text strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
}

.brand-text span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 9px;
  margin: 0 0 14px;
  padding: 7px 12px;
  border: 1px solid rgba(57, 255, 157, 0.24);
  border-radius: 999px;
  background: rgba(57, 255, 157, 0.1);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 0 16px rgba(57, 255, 157, 0.42);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(57, 255, 157, 0.13), 0 0 18px rgba(57, 255, 157, 0.8);
}

h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(35, 223, 255, 0.28);
}

.subtitle {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-tile {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid rgba(35, 223, 255, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(22, 35, 73, 0.84), rgba(8, 13, 30, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 32px rgba(0, 0, 0, 0.18);
}

.summary-tile-wide {
  grid-column: 1 / -1;
  min-height: 100px;
}

.summary-label,
.metric-label {
  color: var(--muted);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.summary-value,
.metric-value {
  font-variant-numeric: tabular-nums;
}

.summary-value {
  display: block;
  color: var(--text);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 22px rgba(35, 223, 255, 0.22);
}

.summary-note {
  color: var(--muted);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.summary-note b {
  color: var(--cyan);
  font-weight: 800;
}

.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(12, 22, 49, 0.78), rgba(8, 11, 27, 0.74));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), var(--glow-cyan);
  backdrop-filter: blur(16px);
}

.segmented {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid rgba(35, 223, 255, 0.18);
  border-radius: 999px;
  background: rgba(4, 8, 19, 0.72);
}

.segmented button {
  min-height: 38px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  padding: 8px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.segmented button:hover {
  color: var(--text);
  background: rgba(35, 223, 255, 0.1);
}

.segmented button.active {
  color: #04111a;
  background: linear-gradient(135deg, var(--cyan), #7c3aed);
  box-shadow: 0 0 24px rgba(35, 223, 255, 0.38), 0 10px 22px rgba(124, 58, 237, 0.24);
  transform: translateY(-1px);
}

.legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-dot.green { background: var(--green); box-shadow: 0 0 12px rgba(57, 255, 157, 0.65); }
.legend-dot.yellow { background: var(--yellow); box-shadow: 0 0 12px rgba(255, 209, 102, 0.6); }
.legend-dot.red { background: var(--red); box-shadow: 0 0 12px rgba(255, 71, 126, 0.6); }
.legend-dot.empty { background: var(--empty); box-shadow: 0 0 12px rgba(97, 113, 143, 0.5); }

.state-message {
  margin-top: 18px;
  padding: 20px;
  border: 1px dashed rgba(35, 223, 255, 0.25);
  border-radius: var(--radius-md);
  background: rgba(8, 14, 31, 0.72);
  color: var(--muted-strong);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.state-message.error {
  border-color: rgba(255, 71, 126, 0.42);
  background: rgba(82, 14, 39, 0.44);
  color: #ffd6e2;
}

.cards {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.status-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(13, 24, 54, 0.92), rgba(7, 10, 24, 0.88));
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.34);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  backdrop-filter: blur(16px);
}

.status-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--empty);
  box-shadow: 0 0 22px rgba(97, 113, 143, 0.45);
}

.status-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(35, 223, 255, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 38%);
  pointer-events: none;
}

.status-card-green::before { background: var(--green); box-shadow: 0 0 26px rgba(57, 255, 157, 0.72); }
.status-card-yellow::before { background: var(--yellow); box-shadow: 0 0 26px rgba(255, 209, 102, 0.65); }
.status-card-red::before { background: var(--red); box-shadow: 0 0 26px rgba(255, 71, 126, 0.7); }

.status-card:hover {
  transform: translateY(-2px);
  border-color: rgba(35, 223, 255, 0.34);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.42), var(--glow-cyan);
}

.card-top,
.timeline-block {
  position: relative;
  z-index: 1;
}

.card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.model-block {
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--empty);
  box-shadow: 0 0 0 7px var(--empty-soft), 0 0 20px rgba(97, 113, 143, 0.62);
}

.status-dot.green {
  background: var(--green);
  box-shadow: 0 0 0 7px var(--green-soft), 0 0 22px rgba(57, 255, 157, 0.8);
}

.status-dot.yellow {
  background: var(--yellow);
  box-shadow: 0 0 0 7px var(--yellow-soft), 0 0 22px rgba(255, 209, 102, 0.7);
}

.status-dot.red {
  background: var(--red);
  box-shadow: 0 0 0 7px var(--red-soft), 0 0 22px rgba(255, 71, 126, 0.72);
}

.model-name {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.18;
  text-shadow: 0 0 18px rgba(35, 223, 255, 0.22);
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.green {
  color: #04150d;
  background: var(--green);
  box-shadow: 0 0 18px rgba(57, 255, 157, 0.36);
}

.status-pill.yellow {
  color: #241600;
  background: var(--yellow);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.34);
}

.status-pill.red {
  color: #28020e;
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 71, 126, 0.36);
}

.status-pill.empty {
  color: #e7efff;
  background: rgba(97, 113, 143, 0.72);
}

.card-subtitle {
  margin: 10px 0 0 21px;
  color: var(--muted);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

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

.metric-box {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(35, 223, 255, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(7, 13, 29, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.metric-value {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 18px rgba(35, 223, 255, 0.22);
}

.timeline-block {
  margin-top: 20px;
  padding: 18px 6px 2px;
  border-top: 1px solid rgba(35, 223, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(35, 223, 255, 0.055), transparent 42%),
    linear-gradient(90deg, rgba(35, 223, 255, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(35, 223, 255, 0.08) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 24px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.timeline {
  display: grid;
  align-items: end;
  min-height: 90px;
  gap: 6px;
}

.timeline-slot {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 90px;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.timeline-bar {
  position: relative;
  display: block;
  width: 100%;
  min-width: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px 8px 3px 3px;
  opacity: 0.96;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.timeline-bar::before {
  content: "";
  position: absolute;
  inset: 2px 2px auto;
  height: 28%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.34);
  opacity: 0.5;
}

.timeline-slot:hover .timeline-bar,
.timeline-slot:focus-visible .timeline-bar {
  transform: translateY(-4px) scaleY(1.03);
  opacity: 1;
  filter: brightness(1.08);
}

.timeline-bar.green {
  background: linear-gradient(180deg, #b7ffd9 0%, var(--green) 45%, #0aa865 100%);
  box-shadow: 0 0 18px rgba(57, 255, 157, 0.38);
}

.timeline-bar.yellow {
  background: linear-gradient(180deg, #fff0b7 0%, var(--yellow) 48%, #c9850b 100%);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.34);
}

.timeline-bar.red {
  background: linear-gradient(180deg, #ffb4ca 0%, var(--red) 48%, #be164d 100%);
  box-shadow: 0 0 18px rgba(255, 71, 126, 0.36);
}

.timeline-bar.empty {
  background: linear-gradient(180deg, #9ba9c2 0%, #61718f 58%, #364157 100%);
  box-shadow: 0 0 14px rgba(97, 113, 143, 0.26);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tooltip {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: 270px;
  padding: 13px;
  border: 1px solid rgba(35, 223, 255, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(5, 8, 21, 0.96);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.46), var(--glow-cyan);
  color: #ffffff;
  pointer-events: none;
}

.tooltip-title {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 900;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.tooltip-row + .tooltip-row {
  margin-top: 7px;
}

.tooltip-row strong {
  color: var(--text);
}

@media (max-width: 900px) {
  body {
    padding: 16px;
  }

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

  .overview-copy {
    min-height: auto;
  }

  .control-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .legend {
    justify-content: flex-start;
  }

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

@media (max-width: 560px) {
  body {
    padding: 10px;
  }

  .overview,
  .status-card,
  .control-bar {
    padding: 14px;
  }

  .overview-metrics,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .brand-row {
    width: 100%;
    padding-right: 10px;
  }

  .brand-logo-wrap {
    width: 42px;
    height: 42px;
  }

  .brand-logo {
    width: 31px;
    height: 31px;
  }

  .segmented {
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .segmented button {
    flex: 1 1 44%;
    padding: 8px 10px;
  }

  .card-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .card-subtitle {
    margin-left: 0;
  }

  .timeline {
    gap: 4px;
  }
}
