@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

/* PS5LM UI replica — 1920×1080 design canvas */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #151618;
  --bg-deep: #121315;
  --card: #1c1d1f;
  --text: #f2f3f5;
  --muted: #9a9ca2;
  --dim: #7c7e85;
  --line: rgba(255, 255, 255, 0.07);
  --blue: #3f69e1;
  --green: #40bd79;
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

html, body {
  height: 100%;
  background: var(--bg-deep);
  overflow: hidden;
}

body {
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  background:
    radial-gradient(1500px 950px at 6% -14%, #1c1d20 0%, rgba(21, 22, 24, 0) 60%),
    linear-gradient(180deg, #151618 0%, #151618 74%, #121315 100%);
  overflow: hidden;
}

/* ── top bar ─────────────────────────────────────────────── */

.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 130px;
  padding: 0 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #f6f7f9;
}
.brand span { color: #3c66e8; }

.topmeta {
  display: flex;
  align-items: center;
  gap: 42px;
  margin-top: 4px;
  font-size: 23px;
  color: #bcbec4;
  font-weight: 400;
  letter-spacing: 0.1px;
}

/* ── pages ───────────────────────────────────────────────── */

#views { position: absolute; inset: 0; }

.page {
  position: absolute;
  inset: 0;
  padding: 0 96px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.page.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.page-title {
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -0.6px;
  line-height: 1;
}

.muted { color: var(--muted); }

/* ── HOME ────────────────────────────────────────────────── */

.page-home {
  display: grid;
  grid-template-columns: 1fr 769px;
  height: 1080px;
  padding-top: 196px;
  align-items: start;
}

.home-main {
  height: 728px;
  padding-top: 30px;
  padding-bottom: 37px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.eyebrow {
  font-size: 25px;
  line-height: 1.2;
  color: #9d9fa5;
  letter-spacing: 0.1px;
  margin-bottom: 16px;
}

.model-title {
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 14px;
}

.model-spec {
  display: flex;
  gap: 24px;
  font-size: 23px;
  color: #8f9198;
  margin-bottom: 40px;
}

.model-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 862px;
  font-size: 22px;
  color: #d3d5d9;
}

.status { display: inline-flex; align-items: center; gap: 14px; }
.status .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(64,189,121,.45);
}
.endpoint { color: #a9abb1; letter-spacing: 0.2px; }

.metric-row {
  display: flex;
  align-items: flex-end;
  gap: 30px;
  margin-top: 30px;
}

.metric-value {
  font-size: 232px;
  font-weight: 300;
  letter-spacing: -21px;
  margin-left: -18px;
  line-height: .9;
  color: #e9eaec;
  font-variant-numeric: tabular-nums;
}

.metric-unit {
  font-size: 25px;
  color: #b4b6bc;
  padding-bottom: 46px;
  letter-spacing: 0.1px;
}

.gauges {
  margin-top: auto;
  display: flex;
  gap: 59px;
}

.gauge { width: 400px; }

.gauge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 21px;
  color: #b9bbc1;
  margin-bottom: 11px;
}
.gauge-value { color: #d8dade; }

.gauge-track {
  position: relative;
  height: 3px;
  width: 180px;
  background: rgba(255,255,255,0.10);
}
.gauge--wide .gauge-track { width: 100%; }
.gauge-track i {
  position: absolute;
  inset: 0 auto 0 0;
  background: #e6e7ea;
}

/* requests panel */

.panel {
  background: linear-gradient(180deg, #1d1e21 0%, #1b1c1f 100%);
  border-radius: 18px;
}

.requests-panel {
  height: 728px;
  padding: 40px 57px 0 56px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}
.panel-head h2 {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.1px;
}
.panel-head .muted { font-size: 21px; color: #8d8f96; }
.panel-head .muted span + span { margin-left: 26px; }

.req-list {
  display: flex;
  flex-direction: column;
  padding-top: 28px;
}

.req { display: flex; flex-direction: column; }
.req + .req { margin-top: 31px; }

.bubble {
  align-self: flex-end;
  max-width: 499px;
  background: var(--blue);
  border-radius: 16px;
  padding: 15px 24px;
  font-size: 21px;
  line-height: 24px;
  color: #eef0ff;
  margin-bottom: 14px;
}
.bubble p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.req-result {
  font-size: 21px;
  line-height: 1.35;
  color: #e2e3e7;
  letter-spacing: 0.1px;
  margin-bottom: 14px;
}

.req-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  line-height: 1.15;
  color: #85878e;
}
.req-meta-top { justify-content: flex-end; margin-bottom: 8px; }

.error-pill {
  align-self: flex-end;
  width: 48px; height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 24px;
  line-height: 48px;
  cursor: pointer;
}

.req-fail { font-size: 21px; color: #e2e3e7; margin-top: 17px; margin-bottom: 14px; }

/* ── MODELS ──────────────────────────────────────────────── */

.page-models { padding-top: 143px; }

.models-layout {
  display: grid;
  grid-template-columns: 417px 1fr;
  margin-top: 53px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  width: 300px;
  height: 76px;
  padding: 0 26px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #d4d6da;
  font-family: var(--font);
  font-size: 23px;
  text-align: left;
  cursor: pointer;
}
.side-item:hover { background: rgba(255,255,255,0.04); }
.side-item.active { background: #24262a; color: #f4f5f7; }
.side-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20px; bottom: 20px;
  width: 3px;
  border-radius: 2px;
  background: #d8dade;
}
.side-item .count { margin-left: auto; color: #8d8f96; }

.model-list { list-style: none; width: 1100px; margin-top: 5px; }

.model-row {
  position: relative;
  padding: 0 0 31px;
}
.model-row-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 3px;
}
.model-row-head h3 {
  font-size: 29px;
  line-height: 34px;
  font-weight: 400;
  letter-spacing: 0.1px;
  color: #eef0f3;
}
.chip { font-size: 17px; color: #9fa1a8; letter-spacing: 0.2px; }

.model-row-meta {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-size: 20px;
  line-height: 24px;
  color: #8b8d94;
}
.model-row-meta b {
  font-weight: 400;
  color: #b3b5bb;
  min-width: 96px;
}

.running-tag {
  position: absolute;
  right: 20px;
  bottom: 32px;
  font-size: 21px;
  color: #5b7bf0;
}

/* ── API ─────────────────────────────────────────────────── */

.page-api { padding-top: 143px; }

.api-layout {
  display: grid;
  grid-template-columns: 820px 1fr;
  gap: 140px;
  margin-top: 51px;
}

.api-label { font-size: 21px; color: #94969d; margin-bottom: 16px; }

.api-address {
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.3px;
  color: #f0f1f4;
  margin-bottom: 20px;
}

.api-note { font-size: 20px; color: #8b8d94; margin-bottom: 54px; }

.endpoints { list-style: none; display: flex; flex-direction: column; gap: 30px; }
.endpoints li { display: grid; grid-template-columns: 92px 1fr; align-items: baseline; }

.method {
  font-size: 16px;
  letter-spacing: 1.6px;
  color: #7e8087;
}

.ep-path { font-size: 24px; color: #eceef1; margin-bottom: 5px; }
.ep-desc { font-size: 20px; color: #8b8d94; }

.api-try {
  background: var(--card);
  border-radius: 18px;
  padding: 34px 38px 0;
  height: 660px;
  display: flex;
  flex-direction: column;
}

.try-title { font-size: 21px; color: #cbcdd2; margin-bottom: 26px; }

.code {
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.62;
  color: #d7d9de;
  white-space: pre-wrap;
}

.try-foot {
  margin-top: auto;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.055);
  font-size: 17px;
  color: #9a9ca3;
}
.try-foot code { font-family: var(--mono); color: #b9bbc2; }

/* ── CONSOLE ─────────────────────────────────────────────── */

.page-console { padding-top: 140px; }

.console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.segmented { display: flex; gap: 34px; padding-top: 6px; }
.seg {
  border: 0;
  background: none;
  font-family: var(--font);
  font-size: 21px;
  color: #7e8087;
  padding: 0 0 13px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.seg.active { color: #e9eaee; border-bottom-color: #e9eaee; }

.console-grid {
  display: grid;
  grid-template-columns: 548px 548px 1fr;
  grid-template-rows: 327px 326px;
  gap: 32px;
  margin-top: 44px;
}

.card {
  background: var(--card);
  border-radius: 18px;
}

.chart-card {
  padding: 28px 40px 21px;
  display: flex;
  flex-direction: column;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.chart-label { font-size: 22px; line-height: 1.2; color: #a4a6ac; }
.chart-value { font-size: 34px; line-height: 1; color: #eceef1; letter-spacing: -0.2px; font-variant-numeric: tabular-nums; }

.chart-body {
  position: relative;
  height: 160px;
  margin-top: 40px;
}

.grid-lines i {
  position: absolute;
  left: 95px;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.075);
}
.grid-lines i:nth-child(1) { top: 0; }
.grid-lines i:nth-child(2) { top: 50%; }
.grid-lines i:nth-child(3) { top: 100%; }

.ticks span {
  position: absolute;
  left: 0;
  font-size: 16px;
  line-height: 1;
  color: #808289;
  transform: translateY(-50%);
  background: var(--card);
  padding-right: 10px;
}
.ticks span:nth-child(1) { top: 0; }
.ticks span:nth-child(2) { top: 50%; }
.ticks span:nth-child(3) { top: 100%; }

.spark {
  position: absolute;
  left: 95px;
  right: 0;
  top: 0;
  width: calc(100% - 95px);
  height: 100%;
  overflow: visible;
}

.chart-foot {
  margin-top: 34px;
  display: flex;
  gap: 26px;
  font-size: 17px;
  color: #86888f;
}

.now-card { grid-column: 3; grid-row: 1 / 3; padding: 38px 44px 40px 40px; }

.now-title { margin-bottom: 19px; }

.now-list { display: flex; flex-direction: column; }
.now-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  font-size: 20px;
}
.now-list dt { color: #9d9fa5; }
.now-list dd { color: #e8e9ec; font-variant-numeric: tabular-nums; }
.now-list .now-gap { margin-top: 14px; }

/* ── SETTINGS ────────────────────────────────────────────── */

.page-settings { padding-top: 143px; }

.settings-layout {
  display: grid;
  grid-template-columns: 417px 1fr;
  margin-top: 52px;
}

.settings-rows { display: flex; flex-direction: column; gap: 25px; width: 1180px; }

.setting-row { display: flex; align-items: center; justify-content: space-between; }

.setting-label { font-size: 26px; color: #eef0f3; margin-bottom: 12px; }
.setting-desc { font-size: 20px; color: #8b8d94; }

.switch {
  width: 62px; height: 34px;
  border: 0;
  border-radius: 17px;
  background: #35373b;
  position: relative;
  cursor: pointer;
}
.switch i {
  position: absolute;
  top: 4px; left: 4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #d8dade;
  transition: transform .15s ease;
}
.switch[aria-checked="true"] { background: var(--blue); }
.switch[aria-checked="true"] i { transform: translateX(28px); }

.select {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: none;
  color: #e6e8eb;
  font-family: var(--font);
  font-size: 21px;
  cursor: pointer;
}
.select .chev { font-size: 13px; color: #a0a2a9; }

/* ── tab bar ─────────────────────────────────────────────── */

.tabbar {
  position: absolute;
  left: 96px; right: 96px; bottom: 0;
  height: 114px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tabbar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

.tabs { display: flex; gap: 30px; margin-left: -34px; }

.tab {
  width: 141px;
  border: 0;
  background: none;
  color: #8f9198;
  font-family: var(--font);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 2px 0 0;
}
.tab svg { width: 34px; height: 34px; fill: currentColor; }
.tab span { letter-spacing: 0.1px; }
.tab:not(.active):hover { color: #b8bac0; }
.tab.active { color: #eef0f3; }

.hints { display: flex; align-items: center; gap: 22px; }

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px; height: 27px;
  padding: 0 5px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 5px;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: #c9cbd0;
  background: rgba(255,255,255,0.03);
}
.key + .key { margin-left: -8px; }

.hint { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; color: #b7b9bf; }

.glyph { font-size: 15px; line-height: 1; }
.glyph.cross { color: #e2569b; }
.glyph.tri { color: #35b57c; }
.glyph.cross-blue { color: #6b86ff; }
.glyph.plus { color: #cfd1d6; }
