/* pico-kvm arayuz stili */
:root {
  --bg: #0d1117;
  --panel: #161b22;
  --line: #30363d;
  --fg: #e6edf3;
  --dim: #8b949e;
  --ok: #2ea043;
  --bad: #d1242f;
  --accent: #1f6feb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font: 13px/1.4 "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
}

/* ------------------------------------------------------------------ ust bar */
#bar, #foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

#foot {
  border-bottom: none;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
  min-height: 28px;
}

.brand {
  font-weight: 700;
  letter-spacing: .4px;
  margin-right: 2px;
}

.tagline {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-right: 8px;
}

/* -------------------------------------------------- ekran ustu telemetri */
#hud {
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(8, 12, 18, .62);
  border: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(4px);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  z-index: 3;
}

.hud-row {
  display: grid;
  grid-template-columns: 34px 52px 20px;
  align-items: baseline;
  gap: 6px;
}

.hud-k {
  color: var(--dim);
  font-size: 10px;
  letter-spacing: .8px;
}

.hud-v {
  color: #7ee787;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

.hud-u {
  color: var(--dim);
  font-size: 10px;
}

.hud-v.warn { color: #e3b341; }
.hud-v.bad  { color: #ff8f8f; }

.hud-sub .hud-v {
  color: var(--dim);
  font-size: 11px;
  font-weight: 400;
}

.spacer { flex: 1 1 auto; }

.pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0b0f14;
  color: var(--dim);
  font-size: 12px;
  white-space: nowrap;
}
.pill[data-ok="1"] { color: #7ee787; border-color: #1f6f36; }
.pill[data-ok="0"] { color: #ff8f8f; border-color: #6f1f24; }

.btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #21262d;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover  { background: #30363d; }
.btn:active { transform: translateY(1px); }
.btn.on     { background: var(--accent); border-color: var(--accent); }
.btn.warn   { border-color: #6f1f24; }
.btn.warn:hover { background: #40161a; }

/* ------------------------------------------------------------------- sahne */
#stage {
  position: relative;
  background: #000;
  overflow: hidden;
  min-height: 0;
}

#video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* Mouse olaylarini yakalayan seffaf katman -- video/iframe'in ustunde durur */
#overlay {
  position: absolute;
  inset: 0;
  outline: none;
  cursor: crosshair;
  touch-action: none;
}
#overlay.armed { cursor: none; }

#hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--dim);
  pointer-events: none;
  gap: 6px;
}
#hint.hide { display: none; }
#hint p { margin: 0; font-size: 15px; }
#hint small { color: #6e7681; }

.nick {
  width: 96px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #0b0f14;
  color: var(--fg);
  font: inherit;
}
.nick:focus { outline: none; border-color: var(--accent); }

/* Kontrol sende degilken sahne izleme moduna gecer */
#stage.viewonly #overlay { cursor: not-allowed; }
#stage.viewonly::after {
  content: "izleme modu";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(13, 17, 23, .78);
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
  pointer-events: none;
}

#coords { font-variant-numeric: tabular-nums; }
#log { color: #6e7681; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
