body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center; /* 横方向中央 */
  align-items: center;     /* 縦方向中央 */
  height: 100vh;           /* 画面全体の高さ */
  background-color: #ffffff;  /* 背景色（任意） */
  overflow: hidden;        /* スクロール防止 */
}

@media (max-width: 500px) {
  #button-container {
    flex-direction: column;
    align-items: center;
  }
}

#gamecanvas {
  display: block;
  margin: 0 auto;
  border: 3px solid #333;
}

#textcanvas {
  display: block;
  margin: 0 auto;
}

#startbutton {
  background: linear-gradient(135deg, #ff6ec4, #7873f5);
  color: white;
  font-size: 1.6rem;
  font-weight: bold;
  padding: 16px 36px;
  border: none;
  border-radius: 50px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#startbutton::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

#startbutton:hover::before {
  top: -30%;
  left: -30%;
}

#startbutton:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(120, 115, 245, 0.4);
}

#startbutton:active {
  transform: scale(0.95);
  box-shadow: 0 4px 8px rgba(120, 115, 245, 0.2);
}

#restart {
  background-color: #ff6b81;
  color: white;
  font-size: 20px;
  font-weight: bold;
  padding: 14px 28px;
  border: none;
  border-radius: 30px;
  box-shadow: 0 6px 0 #d94c63;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: 'Zen Maru Gothic', sans-serif;
}

#restart:hover {
  background-color: #ff8fa3;
  box-shadow: 0 4px 0 #d94c63;
  transform: translateY(2px);
}

#back {
  background-color: #ff6b81;
  color: white;
  font-size: 20px;
  font-weight: bold;
  padding: 14px 28px;
  border: none;
  border-radius: 30px;
  box-shadow: 0 6px 0 #d94c63;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: 'Zen Maru Gothic', sans-serif;
}

#back:hover {
  background-color: #ff8fa3;
  box-shadow: 0 4px 0 #d94c63;
  transform: translateY(2px);
}