* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #1e1e2e;
  color: #cdd6f4;
  font-family: 'Segoe UI', sans-serif;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── 헤더 ── */
#header {
  background: #181825;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
#header h1 { font-size: 16px; font-weight: 700; white-space: nowrap; }
#status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #6272a4; flex-shrink: 0;
}
#status-text { font-size: 13px; color: #6272a4; }

/* ── 연결 패널 ── */
#connect-panel {
  background: #313244;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
input {
  background: #1e1e2e;
  border: 1px solid #45475a;
  color: #cdd6f4;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 15px;
  outline: none;
}
input:focus { border-color: #5865f2; }
#session-input {
  width: 120px;
  font-family: 'Consolas', monospace;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 4px;
  text-align: center;
}
#server-input { width: 220px; font-size: 13px; }

button {
  background: #5865f2;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
button:hover { background: #4752c4; }
button:disabled { background: #44475a; color: #6272a4; cursor: default; }
#disconnect-btn { background: #e74c3c; }
#disconnect-btn:hover { background: #c0392b; }

/* ── 뷰어 영역 ── */
#viewer-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  position: relative;
}
#remote-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#placeholder {
  color: #44475a;
  font-size: 15px;
  text-align: center;
  pointer-events: none;
}

/* ── 가상 키보드 버튼 (태블릿용) ── */
#toolbar {
  background: #181825;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  overflow-x: auto;
}
.key-btn {
  background: #313244;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;
  min-width: 40px;
}
.key-btn:hover { background: #45475a; }
