:root {
  --bg: #0f1216;
  --bar: #171c23;
  --card: #1f2530;
  --fg: #e6ebf5;
  --mut: #8b95a7;
  --acc: #2f6fdb;
  --acc2: #3d7ce8;
  --danger: #7a3030;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

#bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bar);
  border-bottom: 1px solid #232a34;
  flex-wrap: wrap;
  user-select: none;
}

.brand {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  color: #cfe0ff;
  margin-right: 6px;
}

.f { display: flex; align-items: center; gap: 5px; }
.f > span { font-size: 12px; color: var(--mut); }

input, select {
  background: #242a34;
  color: var(--fg);
  border: 1px solid #2f3743;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 13px;
  font-family: Consolas, "Courier New", monospace;
  outline: none;
}
input:focus, select:focus { border-color: var(--acc); }
#server { width: 250px; }
#sid { width: 120px; }
#pw { width: 130px; }

button {
  background: #2b323d;
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
button:hover:not(:disabled) { background: #374050; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--acc); }
button.primary:hover:not(:disabled) { background: var(--acc2); }
#disconnect { background: var(--danger); }
#disconnect:hover:not(:disabled) { background: #964040; }

#stage {
  position: relative;
  height: calc(100% - 78px);
  background: #000;
  overflow: hidden;
}

#screen {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

#hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hint-box { text-align: center; }
.hint-title { font-size: 22px; font-weight: 700; color: #4d5a6e; letter-spacing: 2px; }
.hint-sub { margin-top: 8px; font-size: 12px; color: #3c4657; }

#status {
  height: 26px;
  line-height: 26px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--mut);
  background: var(--bar);
  border-top: 1px solid #232a34;
  user-select: none;
}

#stage:fullscreen { height: 100%; }
#stage:fullscreen #screen { cursor: none; }
