body {
  font-family: "Arial", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}

h1 {
  margin-bottom: 20px;
}

#colorPickerContainer {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.color-option {
  width: 30px;
  height: 30px;
  margin-right: 5px;
  cursor: pointer;
  border: 2px solid #ccc;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
}

.pixel-container {
  display: grid;
  gap: 0;
  margin-bottom: 20px;
  user-select: none;
  overflow: auto;
  border: 2px solid #000;
}

.pixel {
  width: 30px;
  height: 30px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  transition: background-color 0.2s ease, background-image 0.2s ease;
  background-size: cover;
  background-position: center;
}

button {
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  margin: 5px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #45a049;
}

#gridSizeSelector {
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  #colorPickerContainer {
    flex-wrap: wrap;
  }
  .color-option {
    margin-bottom: 5px;
  }
  .pixel {
    width: 25px;
    height: 25px;
  }
  #levelList {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  #levelManager h2 {
    font-size: 24px !important;
    margin-bottom: 20px !important;
  }
}

/* 关卡管理样式 */
#levelManager {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#levelList {
  max-height: 500px;
  overflow-y: auto;
}
