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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  background-color: #f0f2f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.game-container {
  display: flex;
  gap: 10px;
  padding: 12px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  width: 100vw;
  height: 100vh;
  overflow: auto; /* 改为auto以便滚动查看 */
}

#gameCanvas {
  border: 2px solid #333;
  background-color: #f8f9fa;
  width: 50vw;
  max-width: 400px;
  height: 100vw;
  max-height: 800px;
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 40vw;
  max-width: 300px;
  height: auto;
  padding: 0px;
}

.instructions {
  position: relative;
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  width: 40vw;
  max-width: 300px;
  margin-top: 15px;
  flex-shrink: 0;
  max-height: 300px; /* 限制最大高度 */
  overflow-y: auto; /* 允许垂直滚动 */
}

.instructions-title {
  font-size: 16px;
  color: #333;
  font-weight: 500;
  margin-bottom: 10px;
}

.instructions-content {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

#nextPieceCanvas {
  border: 2px solid #333;
  background-color: #f8f9fa;
  margin-bottom: 5px;
  width: 40vw;
  max-width: 300px;
  height: 40vw;
  max-height: 300px;
}

.next-piece-label {
  font-size: 16px;
  color: #333;
  text-align: center;
}

.score, .level, .lines {
  font-size: 14px;
  color: #333;
  margin: 2px 0;
  line-height: 1.2;
}

.score-line-container {
  display: flex;
  gap: 10px;
}

#startBtn {
  padding: 10px 20px;
  font-size: 16px;
  color: white;
  background-color: #4CAF50;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#startBtn:hover {
  background-color: #45a049;
}

#startBtn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.control-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

#dropBtn, #pauseBtn {
  flex: 1;
  padding: 5px;
  font-size: 14px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#dropBtn {
  background-color: #2196F3;
}

#dropBtn:hover {
  background-color: #1976D2;
}

#pauseBtn {
  background-color: #FF9800;
}

#pauseBtn:hover {
  background-color: #F57C00;
}

#dropBtn:disabled, #pauseBtn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}
