/* ---------- 大厅 ---------- */
#lobby {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lobby-card {
  position: relative;
  width: 720px;
  max-width: 92vw;
  padding: 26px 30px;
  border-radius: 26px;
  background: rgba(6, 14, 8, 0.84);
  border: 2px solid rgba(190, 255, 170, 0.26);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  color: #eaf7e4;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lobby-card h2 { margin: 0; font-size: 30px; color: #eaffd6; text-align: center; }
.lobby-status { margin: 0; min-height: 20px; font-size: 14px; text-align: center; color: #ffd479; }
.lobby-actions { display: flex; gap: 10px; }
.lobby-actions button { flex: 1; min-height: 52px; font-size: 19px; }
.room-list {
  min-height: 150px;
  max-height: 42vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
}
.room-empty { text-align: center; font-size: 14px; color: rgba(230, 245, 225, 0.5); padding: 46px 0; }
.room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid rgba(190, 255, 170, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #eaf7e4;
  font-size: 17px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.room-item:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(190, 255, 170, 0.45); }
.room-code { font-size: 20px; letter-spacing: 2px; color: #c9ff9e; }
.room-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.9; }
#lobbyBackBtn { width: 100%; min-height: 46px; font-size: 17px; }

/* ---------- 创建 / 加入对话框 ---------- */
.dialog-card {
  position: relative;
  width: 460px;
  max-width: 92vw;
  padding: 26px;
  border-radius: 22px;
  background: #233526;
  border: 2px solid rgba(184, 255, 158, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dialog-card h3 { margin: 0; font-size: 24px; color: #eaffd6; text-align: center; }
.dialog-card input {
  height: 52px;
  border-radius: 12px;
  border: 2px solid rgba(190, 255, 170, 0.3);
  background: rgba(0, 0, 0, 0.28);
  color: #eaf7e4;
  font-family: inherit;
  font-size: 20px;
  padding: 0 14px;
}
.dialog-card input:focus { outline: none; border-color: #7ada5c; }
.dialog-actions { display: flex; gap: 10px; }
.dialog-actions button { flex: 1; }
.dialog-tip { margin: 0; font-size: 13px; color: rgba(220, 240, 215, 0.6); text-align: center; }
.conn-fail-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(220, 240, 215, 0.78);
  text-align: center;
  word-break: break-all;
}

/* ---------- 等待 / 准备 ---------- */
#wait, #ready { background: rgba(5, 10, 6, 0.7); z-index: 55; }
.ready-card {
  width: 460px;
  max-width: 92vw;
  padding: 28px;
  border-radius: 24px;
  background: #233526;
  border: 2px solid rgba(184, 255, 158, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #eaf7e4;
}
.ready-card h2 { margin: 0; font-size: 30px; color: #eaffd6; }
.ready-code { font-size: 16px; color: rgba(220, 240, 215, 0.7); }
.ready-status { font-size: 17px; min-height: 24px; color: #d9f6cd; }
.ready-count {
  font-size: 76px;
  line-height: 1;
  color: #ffe9b0;
  -webkit-text-stroke: 6px #0a170c;
  paint-order: stroke fill;
}
#readyBtn { width: 100%; }
