body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* 背景Canvas（全画面固定） */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  background-color: #000;
  z-index: 0;
}

/* ビジュアル用 */
#canvas2 {
    background-color: black; /* 背景黒 */
    display: block;
}

/* UIオーバーレイ */
.overlay {
  position: relative;
  z-index: 1;
  padding: 10px;
  color: #fff;
}

.center {
  text-align: center;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.button-group button {
  padding: 5px 10px;
}

fieldset {
  border: 1px solid #ccc;
  margin-bottom: 10px;
  padding: 5px;
  background-color: rgba(0,0,0,0.5);
}

legend {
  font-weight: bold;
  color: #fff;
}

/* レスポンシブ */
@media (max-width: 600px) {
  body {
    font-size: 14px;
  }
  button, input, select, textarea {
    font-size: 14px;
  }
  .button-group {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  body {
    font-size: 15px;
  }
}

@media (min-width: 901px) {
  body {
    font-size: 16px;
  }
}

/* モーダル */
#modal-content-ruleconfig,
#modal-content-userconfig,
#modal-content-chatlog {
  z-index: 2;
  width: 50%;
  margin: 1.5em auto 0;
  padding: 10px 20px;
  border: 2px solid #aaa;
  background: rgba(255,255,255,0.95);
  position: fixed;
  display: none;
}

#modal-overlay {
  z-index: 1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-color: rgba(0,0,0,0.75);
}

/* モーダルの背景オーバーレイ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.1), rgba(0,0,0,0.7));
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* ビジュアルクイズ用 */
#modeless-visual {
  z-index: 1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-color: rgba(0,0,0,1.0);
  opacity: 1;
  transition: opacity 1s ease; /* 1秒かけて表示 */
  
  /* 背面クリックを通す */
  pointer-events: none;
}

.modeless-visual {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.0), rgba(0,0,0,0.0));
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;

  /* 必要ならこちらも透過可能にする */
  pointer-events: none;  
}

/* モーダル本体 */
.modal-content {
  background-color: #fff;
  color: black;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 10px 20px rgba(0, 0, 0, 0.1);
  width: 50%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal-content input[type="text"],
.modal-content input[type="password"] {
  width: 100%;
  padding: 10px 6px;
  margin: 8px 0 8px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

.modal-content input[type="text"]:focus,
.modal-content input[type="password"]:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 5px #4CAF50;
}

.modal-content button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-content button:hover {
  background-color: #45a049;
}

/* ポップアップメニューの見た目 */
#contextMenu {
  position: absolute;
  display: none;
  background: #333;
  color: #fff;
  border-radius: 6px;
  padding: 6px 0;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
}

#contextMenu .item {
  padding: 8px 16px;
  cursor: pointer;
}

#contextMenu .item:hover {
  background: #555;
}

.fade {
  opacity: 0;
  transition: opacity 1s ease; /* 1秒かけて表示 */
}
.fade.show {
  opacity: 1;
}

/* カラーピッカーのサイズ調整 */
#colorPickerInput {
  width:  80px;
  height: 50px;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* OKボタン */
#applyColorBtn {
  display: block;
  margin-top: 15px;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  background: #0078ff;
  color: white;
  cursor: pointer;
}

#applyColorBtn:hover {
  background: #005fcc;
}

/* テーブル全体を囲むスクロール可能な領域 */
#room-table-wrapper {
  max-height: 500px;      /* 好きな高さに調整 */
  overflow-y: auto;       /* 縦スクロールを有効にする */
  border: 0px solid #ccc; /* 枠線を付けると見やすい */
}

/* テーブル自体の見た目調整 */
#room-table {
  border-collapse: collapse;
  width: 100%;
}
#room-table td {
  border: 1px solid #000;
  padding: 4px;
}
