body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #f4f4f9;
  margin: 0;
  padding: 20px;
}

/* ユーザー情報 */
.user-info {
  background: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 15px;
  font-weight: bold;
}

.class-badge {
  color: #d32f2f;
}

.user-info button {
  margin-left: 10px;
  cursor: pointer;
}

.controls {
  margin-bottom: 15px;
}

.toggle-label {
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  margin: 0 10px;
}

hr {
  width: 100%;
  max-width: 650px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 15px 0;
}

/* ロビー */
.lobby-container {
  display: flex;
  gap: 20px;
  max-width: 650px;
  width: 100%;
}

.mode-section, .room-list-box {
  flex: 1;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mode-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 15px;
  margin-bottom: 12px;
  background: #fafafa;
}

.mode-card h4 { margin: 0 0 5px 0; }
.mode-card p { margin: 0 0 10px 0; font-size: 0.8rem; color: #666; }

.btn {
  padding: 8px 15px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-primary { background: #1976d2; color: #fff; width: 100%; }
.btn-secondary { background: #388e3c; color: #fff; }

.private-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-box {
  display: flex;
  gap: 5px;
}

.join-box input {
  text-transform: uppercase;
  padding: 6px;
  flex: 1;
}

.status-msg {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #d32f2f;
  font-weight: bold;
  text-align: center;
}

.badge {
  background: #ff9800;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.room-list-placeholder {
  border: 2px dashed #ccc;
  padding: 20px 10px;
  border-radius: 6px;
  color: #777;
  font-size: 0.85rem;
  text-align: center;
}

/* 昇格戦演出 */
.promo-badge {
  color: #ff3d00;
  font-weight: bold;
  animation: blink 1s infinite alternate;
}

.god-promo-badge {
  color: #ffd700;
  background: #111;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  animation: blink 0.6s infinite alternate;
}

@keyframes blink {
  from { opacity: 0.6; transform: scale(1); }
  to { opacity: 1; transform: scale(1.05); }
}

/* ゲーム盤面 */
.hidden { display: none; }

.status {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 15px 0;
  text-align: center;
}

.board {
  display: grid;
  grid-template-columns: repeat(8, 45px);
  grid-template-rows: repeat(8, 45px);
  gap: 2px;
  background-color: #111;
  border: 4px solid #111;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.cell {
  width: 45px;
  height: 45px;
  background-color: #2e8b57;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.2s, background-color 0.2s;
}

.disc.black { background-color: #111; }
.disc.white { background-color: #fff; }

.cell.valid::after {
  content: "";
  width: 10px;
  height: 10px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 50%;
}

.cell.valid:hover::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 50%;
  position: absolute;
  opacity: 0.4;
}

.turn-black .cell.valid:hover::before { background-color: #111; }
.turn-white .cell.valid:hover::before { background-color: #fff; }

.disc.flip-preview {
  transform: scale(0.85);
  box-shadow: 0 0 8px 3px #ffeb3b;
}