#device-screen {
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
}

.device-header {
  text-align: center;
  margin-bottom: 32px;
}

.device-header h1 {
  color: #e94560;
  margin-bottom: 8px;
}

.device-header .subtitle {
  color: #888;
  font-size: 14px;
}

#device-search-wrap {
  max-width: 700px;
  margin: 0 auto 12px;
}

#device-search {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  background: #0f1424;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  box-sizing: border-box;
}

#device-search:focus {
  border-color: #e94560;
  outline: none;
}

#device-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.no-devices {
  text-align: center;
  color: #666;
  padding: 40px;
  font-size: 18px;
}

.device-card {
  background: #16213e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s;
}

.device-card.online { border-color: #4CAF50; }
.device-card.offline { opacity: 0.5; }
.device-card.busy { border-color: #ff6b6b; }
.device-card:hover { border-color: #e94560; }

.device-info { flex: 1; min-width: 0; }

.device-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.device-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rename-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 0 2px;
}

.rename-btn:hover { opacity: 1; }

.device-details {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-os { font-weight: 500; }

.device-version {
  color: #888;
  font-weight: normal;
}

.device-host,
.device-hw {
  font-size: 11px;
  color: #888;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-hw span + span { margin-right: 8px; }

.device-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #666;
  margin-top: 1px;
}

.device-status-text { font-size: 11px; }

.device-token { display: none; }

.device-actions {
  margin-right: 8px;
  display: flex;
  gap: 4px;
}

.connect-device-btn {
  padding: 6px 14px;
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.connect-device-btn:hover { background: #c73651; }

.connect-slow-btn {
  padding: 6px 10px;
  background: #555;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.connect-slow-btn:hover { background: #3a3a3a; }

#device-status {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.status-entry {
  padding: 10px 14px;
  border: 1px solid #ff6b6b;
  border-radius: 8px;
  background: #2a1a20;
  color: #ff6b6b;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: status-slide-in 200ms ease-out;
}

.status-entry .status-close {
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.7;
  flex-shrink: 0;
}

.status-entry .status-close:hover { opacity: 1; }

.status-entry .status-text { flex: 1; }

@keyframes status-slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
