body {
  margin: 0;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background: #2c2f33;
}

.window {
  position: absolute;
  width: 360px;
  max-height: calc(100vh - 120px);
  background: rgba(20, 22, 26, 0.92);
  color: #e6e6e6;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}

.win-hidden {
  display: none;
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  user-select: none;
}

.titlebar:active {
  cursor: grabbing;
}

.titlebar .title {
  font-weight: 700;
}

.winclose {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.winbody {
  padding: 0;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tab {
  flex: 1;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e6e6e6;
  border-radius: 8px;
  cursor: pointer;
}

.tab.active {
  background: rgba(88, 101, 242, 0.4);
  border-color: rgba(88, 101, 242, 0.65);
}

.view {
  padding: 10px;
}

.hidden {
  display: none;
}

.row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.primary {
  background: #5865f2;
  border: none;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  max-height: 60vh;
  padding-right: 4px;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.item .meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item .title {
  font-weight: 700;
}

.item .sub {
  font-size: 12px;
  opacity: 0.85;
}

.hint {
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.4;
}

#ui {
  position: absolute;
  bottom: 72px;
  left: 10px;
  display: none;
}

#chatInput {
  padding: 10px;
  width: 200px;
}

.chatlog {
  position: absolute;
  bottom: 118px;
  left: 10px;
  width: 320px;
  max-height: 35vh;
  overflow: auto;
  padding: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  display: none;
}

body.in-room #ui {
  display: block;
}

body.in-room .chatlog {
  display: block;
}

.dock {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(20, 22, 26, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.dockbtn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.dockbtn.active {
  background: rgba(88, 101, 242, 0.4);
  border-color: rgba(88, 101, 242, 0.65);
}

body.dragging {
  user-select: none;
}
