* { box-sizing: border-box; }
body {
  font-family: -apple-system, system-ui, sans-serif;
  margin: 0;
  background: #0f1115;
  color: #e8e8e8;
}
header { padding: 16px 24px; background: #15181f; border-bottom: 1px solid #2a2e38; }
header h1 { margin: 0; font-size: 18px; }

#login { max-width: 360px; margin: 80px auto; text-align: center; }
#login input { width: 100%; padding: 10px; margin-bottom: 10px; border-radius: 6px; border: 1px solid #333; background: #1a1d24; color: #fff; }
.hint { font-size: 12px; color: #888; }

.hidden { display: none !important; }

#app { display: flex; min-height: calc(100vh - 57px); }
#sidebar { width: 280px; padding: 16px; border-right: 1px solid #2a2e38; }
#sidebar h2 { font-size: 14px; text-transform: uppercase; color: #999; }
.pair-box { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.pair-box input { padding: 8px; border-radius: 6px; border: 1px solid #333; background: #1a1d24; color: #fff; }

#deviceList { list-style: none; padding: 0; margin: 0; }
#deviceList li {
  padding: 10px; border-radius: 6px; cursor: pointer; margin-bottom: 6px;
  background: #1a1d24;
}
#deviceList li:hover { background: #22262f; }

#viewer { flex: 1; padding: 20px; }
#screen {
  width: 100%; max-width: 900px; border-radius: 8px; border: 1px solid #2a2e38;
  background: #000; display: block; min-height: 200px;
}
#controls { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; padding: 8px; border-radius: 6px; border: 1px solid #333; background: #1a1d24; color: #fff; }
button {
  padding: 8px 14px; border-radius: 6px; border: none; background: #3b82f6; color: #fff;
  cursor: pointer; font-size: 13px;
}
button:hover { background: #2563eb; }

#history { list-style: none; padding: 0; font-size: 13px; color: #aaa; max-height: 220px; overflow-y: auto; }

.error { color: #f87171; font-size: 13px; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
code { background: #1a1d24; padding: 2px 6px; border-radius: 4px; }
