body {
  font-family: 'Comic Sans MS', sans-serif;
  background: #c39bc3;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}

h1 {
  margin: 20px 0;
}

#game-wrapper {
  display: flex;
  gap: 20px;
}

#game-container {
  position: relative;
  width: 400px;
  height: 600px;
  background: #fff;
  border: 5px solid #000;
  overflow: hidden;
}

#player {
  position: absolute;
  bottom: 20px;
  left: 180px;
  font-size: 100px;
}

.falling {
  position: absolute;
  top: 0;
  font-size: 45px;
  animation: fall linear;
}

@keyframes fall {
  from { top: 0; }
  to { top: 600px; }
}

#centerGameOver {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: bold;
  color: red;
  text-shadow: 2px 2px 5px black;
}

#sidebar {
  font-family: monospace;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  font-size: 22px;
  line-height: 1.8;
  padding: 20px;
  min-width: 180px;
}

.info-card {
  border: 2px solid #fff;
  padding: 10px;
  width: 180px; /* 固定寬度，避免抖動 */
  text-align: left;
}

#sidebar p {
  margin: 10px 0;
}

#gameOver {
  margin-top: 20px;
}

#gameOver h2 {
  margin-bottom: 10px;
  font-size: 26px;
  font-weight: bold;
}

#gameOver p {
  margin: 5px 0;
  font-size: 20px;
}

#gameOver button {
  margin-top: 15px;
  padding: 8px 16px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
}

#gameOver button:hover {
  background: #ff4b4b;
}

button {
  margin: 10px 0;
  padding: 10px 20px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background: #ff7675;
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: #d63031;
}

.float-text {
  position: absolute;
  font-size: 25px;
  font-weight: bold;
  animation: floatUp 1s ease-out forwards;
  pointer-events: none;
}

@keyframes floatUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-50px); }
}
