* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #eee;
  font-family: "Yu Gothic", "Meiryo", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

h1 {
  font-size: 20px; /* 縦の場所を取りすぎないよう控えめに */
  letter-spacing: 4px;
  text-shadow: 0 0 12px #00e5ff, 0 0 24px #00e5ff;
  color: #fff;
}

.main-area {
  display: flex;
  gap: 20px;
}

#board {
  background: #0d0d1a;
  border: 3px solid #4a4a6a;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 140px;
}

.panel-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #4a4a6a;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.panel-box h2 {
  font-size: 12px;
  color: #8ecae6;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.panel-box p {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

/* 操作方法(画面の下に横書きで表示) */
.key-help {
  font-size: 12px;
  color: #cfd8dc;
  text-align: center;
}

.sound-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #4a4a6a;
  border-radius: 8px;
  color: #fff;
  padding: 8px;
  font-size: 13px;
  cursor: pointer;
}

.sound-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

#hold, #next {
  background: #0d0d1a;
  border-radius: 4px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  background: #1a1a2e;
  border: 2px solid #00e5ff;
  border-radius: 10px;
  padding: 30px 50px;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
}

.overlay-content h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #ff5c8d;
}

.overlay-content p {
  margin-bottom: 20px;
  color: #cfd8dc;
}

#restart-btn {
  background: #00e5ff;
  border: none;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

#restart-btn:hover {
  background: #4dffea;
  transform: scale(1.05);
}
